Click here to Skip to main content
15,921,212 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I monitor data on a serial port opened by another application? Pin
IamJimW31-Mar-04 14:51
IamJimW31-Mar-04 14:51 
AnswerRe: How can I monitor data on a serial port opened by another application? Pin
Gary R. Wheeler31-Mar-04 14:58
Gary R. Wheeler31-Mar-04 14:58 
AnswerRe: How can I monitor data on a serial port opened by another application? Pin
rmnowick31-Mar-04 15:31
rmnowick31-Mar-04 15:31 
GeneralRe: How can I monitor data on a serial port opened by another application? Pin
Harold Bamford1-Apr-04 12:41
Harold Bamford1-Apr-04 12:41 
GeneralRe: How can I monitor data on a serial port opened by another application? Pin
IamJimW1-Apr-04 17:04
IamJimW1-Apr-04 17:04 
GeneralGetMenuItemInfo generates Access Violation in USER32.dll Pin
jphillips_2003@hotmail.com31-Mar-04 14:49
jphillips_2003@hotmail.com31-Mar-04 14:49 
GeneralRe: GetMenuItemInfo generates Access Violation in USER32.dll Pin
Prakash Nadar31-Mar-04 15:06
Prakash Nadar31-Mar-04 15:06 
GeneralRe: GetMenuItemInfo generates Access Violation in USER32.dll Pin
jphillips_2003@hotmail.com31-Mar-04 15:30
jphillips_2003@hotmail.com31-Mar-04 15:30 
Maybe I should clarify that I am trying to do this from another process.

void getMenuItem(HWND hWndMenu)
{
HMENU menu = GetMenu(hWndMenu);
MENUITEMINFO mi, *_mi; unsigned long pid;
HANDLE process;

GetWindowThreadProcessId(hWndMenu, &pid);
process=OpenProcess (PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid);
_mi=(MENUITEMINFO*)VirtualAllocEx(process, NULL, sizeof(MENUITEMINFO), MEM_COMMIT, PAGE_READWRITE);

ZeroMemory(&mi, sizeof(MENUITEMINFO));

mi.cbSize = sizeof(MENUITEMINFO);
mi.fMask = MIIM_TYPE;
mi.fType = MFT_STRING;
mi.dwTypeData=NULL;
WriteProcessMemory(process, _mi, &mi, sizeof(MENUITEMINFO), NULL);
// this fails GetMenuItemInfo(menu, 1, true, _mi);
ReadProcessMemory(process, _mi, mi, sizeof(MENUITEMINFO), NULL);
int size = mi.cch;
VirtualFreeEx(process, _mi, 0, MEM_RELEASE);
GeneralCombo box not showing pull down list Pin
rmnowick31-Mar-04 14:48
rmnowick31-Mar-04 14:48 
GeneralRe: Combo box not showing pull down list Pin
Christian Graus31-Mar-04 14:56
protectorChristian Graus31-Mar-04 14:56 
GeneralRe: Combo box not showing pull down list Pin
Prakash Nadar31-Mar-04 15:04
Prakash Nadar31-Mar-04 15:04 
GeneralRe: Combo box not showing pull down list Pin
rmnowick31-Mar-04 15:15
rmnowick31-Mar-04 15:15 
QuestionHow to use EnumPrinters function to enum all printers Pin
GflPower31-Mar-04 13:37
GflPower31-Mar-04 13:37 
AnswerRe: How to use EnumPrinters function to enum all printers Pin
Prakash Nadar31-Mar-04 14:55
Prakash Nadar31-Mar-04 14:55 
AnswerRe: How to use EnumPrinters function to enum all printers Pin
Indivara31-Mar-04 16:55
professionalIndivara31-Mar-04 16:55 
Generala question about socket Pin
Member 98096831-Mar-04 13:18
Member 98096831-Mar-04 13:18 
GeneralRe: a question about socket Pin
Prakash Nadar31-Mar-04 15:01
Prakash Nadar31-Mar-04 15:01 
GeneralRe: a question about socket Pin
Member 98096831-Mar-04 16:06
Member 98096831-Mar-04 16:06 
GeneralRe: a question about socket Pin
Prakash Nadar31-Mar-04 16:55
Prakash Nadar31-Mar-04 16:55 
GeneralRe: a question about socket Pin
Alexander M.,1-Apr-04 3:42
Alexander M.,1-Apr-04 3:42 
GeneralRe: a question about socket Pin
Member 9809681-Apr-04 14:10
Member 9809681-Apr-04 14:10 
GeneralDisable Back/Next/FontChange in webbrowser2 Pin
Ravi Bhavnani31-Mar-04 12:06
professionalRavi Bhavnani31-Mar-04 12:06 
Generaldlgdata.cpp error in line 43 Pin
youssef31-Mar-04 10:52
youssef31-Mar-04 10:52 
GeneralRe: dlgdata.cpp error in line 43 Pin
Rob Manderson31-Mar-04 11:25
protectorRob Manderson31-Mar-04 11:25 
GeneralRe: dlgdata.cpp error in line 43 Pin
xinzhu_liu23-Nov-09 15:17
xinzhu_liu23-Nov-09 15:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.