Click here to Skip to main content
15,900,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionInterview question Pin
tasumisra3-Jul-07 20:06
tasumisra3-Jul-07 20:06 
AnswerRe: Interview question Pin
G Haranadh3-Jul-07 20:27
G Haranadh3-Jul-07 20:27 
GeneralRe: Interview question Pin
tasumisra3-Jul-07 21:25
tasumisra3-Jul-07 21:25 
QuestionCross application process Handle Pin
SNI3-Jul-07 20:05
SNI3-Jul-07 20:05 
AnswerRe: Cross application process Handle Pin
Stephen Hewitt3-Jul-07 20:11
Stephen Hewitt3-Jul-07 20:11 
GeneralRe: Cross application process Handle Pin
SNI3-Jul-07 20:18
SNI3-Jul-07 20:18 
GeneralRe: Cross application process Handle Pin
Stephen Hewitt3-Jul-07 20:21
Stephen Hewitt3-Jul-07 20:21 
GeneralRe: Cross application process Handle Pin
SNI3-Jul-07 20:29
SNI3-Jul-07 20:29 
Here is the code where I am trying to get the handle of process B is Process A
--------------------------------------------------------------------------------
HWND hwnd = ::FindWindow(NULL,"Process B");
DWORD dwThreadId, dwProcessId;
dwThreadId = GetWindowThreadProcessId(hwnd, &dwProcessId);

HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS |PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,dwProcessId );

Here hProcess becomes NULL.

Thanks


SNI
GeneralRe: Cross application process Handle Pin
Stephen Hewitt3-Jul-07 20:35
Stephen Hewitt3-Jul-07 20:35 
GeneralRe: Cross application process Handle Pin
SNI3-Jul-07 20:44
SNI3-Jul-07 20:44 
GeneralRe: Cross application process Handle Pin
Stephen Hewitt3-Jul-07 20:48
Stephen Hewitt3-Jul-07 20:48 
GeneralRe: Cross application process Handle Pin
SNI3-Jul-07 21:10
SNI3-Jul-07 21:10 
GeneralRe: Cross application process Handle Pin
Naveen3-Jul-07 21:10
Naveen3-Jul-07 21:10 
GeneralRe: Cross application process Handle [modified] Pin
SNI3-Jul-07 23:46
SNI3-Jul-07 23:46 
QuestionFind computers Pin
IMANTHA3-Jul-07 19:38
IMANTHA3-Jul-07 19:38 
AnswerRe: Find computers Pin
Naveen3-Jul-07 20:03
Naveen3-Jul-07 20:03 
QuestionSorting a user class based CArray Pin
al25003-Jul-07 19:31
al25003-Jul-07 19:31 
AnswerRe: Sorting a user class based CArray Pin
Stephen Hewitt3-Jul-07 19:55
Stephen Hewitt3-Jul-07 19:55 
QuestionMy registered activex control is corrupted or missing. Pin
adityarao313-Jul-07 18:35
adityarao313-Jul-07 18:35 
QuestionRTTI option in compiler Pin
vibindia3-Jul-07 17:30
vibindia3-Jul-07 17:30 
AnswerRe: RTTI option in compiler Pin
User 5838523-Jul-07 17:36
User 5838523-Jul-07 17:36 
AnswerRe: RTTI option in compiler Pin
Rajkumar R3-Jul-07 18:22
Rajkumar R3-Jul-07 18:22 
AnswerRe: RTTI option in compiler Pin
Stephen Hewitt3-Jul-07 18:24
Stephen Hewitt3-Jul-07 18:24 
QuestionA Fast Bresenham Type Algorithm For Drawing Ellipse Pin
KienNT783-Jul-07 17:20
KienNT783-Jul-07 17:20 
AnswerRe: A Fast Bresenham Type Algorithm For Drawing Ellipse Pin
Rajkumar R3-Jul-07 19:22
Rajkumar R3-Jul-07 19:22 

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.