1

How to get HANDLE for an application say Outlook from my program

subbu
  • 3,229
  • 13
  • 49
  • 70
  • process HANDLE or window (HWND)? –  Oct 12 '10 at 09:53
  • possible duplicate of [How can I get a process handle by its name in C++?](http://stackoverflow.com/questions/865152/how-can-i-get-a-process-handle-by-its-name-in-c) – Steve Townsend Oct 12 '10 at 11:34

3 Answers3

1

You need to get the process id of the process you want to get the handle for and use OpenProcess.

Here's an example for this as well: http://msdn.microsoft.com/en-us/library/ms686701(v=VS.85).aspx

Vinzenz
  • 2,749
  • 17
  • 23
0

Use WIN32 API FindWindow().

0

Probably try this:

HANDLE hOutlook = FindWindow("rctrl_renwnd32", NULL);
wengseng
  • 1,330
  • 1
  • 14
  • 27