473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Win32 API: Unmanaged equivalent Process.MainWindowHandle

115 100+
Hi all,

Can anyone tell me what the unmanaged equivalent is to get the main window handle of a process?
May 16 '08 #1
4 4159
Plater
7,872 Expert 4TB
Can't you just pass in the managed handle reference to the unmanged code? It returns an IntPtr to the native handle?
Expand|Select|Wrap|Line Numbers
  1. myProcess.Handle
  2.  
Otherwise, just look up the Win32_API for it?
May 19 '08 #2
ShadowLocke
115 100+
Can't you just pass in the managed handle reference to the unmanged code? It returns an IntPtr to the native handle?
Expand|Select|Wrap|Line Numbers
  1. myProcess.Handle
  2.  
Otherwise, just look up the Win32_API for it?

The Win32 API is what I am looking for. I haven't found an API or solid technique to accomplish this. (Im programming in a proprietary language but have access to the API, but no access to .NET classes)
May 19 '08 #3
ShadowLocke
115 100+
The Win32 API is what I am looking for. I haven't found an API or solid technique to accomplish this. (Im programming in a proprietary language but have access to the API, but no access to .NET classes)
Found an answer:

http://www.codeguru.com/forum/showthread.php?t=428029
May 19 '08 #4
Plater
7,872 Expert 4TB
If you have no access to .NET classes, why did you post in .NET forum?
I will move this to C/C++, I think they have answers for win32_API
May 20 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: | last post by:
Hi, In the Process class there is a CloseMainWindow, why is there not a BringMainWindowToForeground or similar method? What would be the best way to do this if we jsut have the process info...
5
by: Chi Tang | last post by:
Hi, I need to implement a stand alone gui application which need to call some other regular DLL functions (unmanaged code). Should I use .net with C# or just use Win32 API to write this exe? ...
15
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
0
by: Guy Mahieu | last post by:
Hi, I am trying to dynamically add menu items to external win32 applications from c# code. I have found some VB6 examples on the net that do just that, but when I rewrite them into c# they will...
5
by: Dan | last post by:
Okay...one last question. I've pretty much spent the weekend reading up on .Net, Soap, web services and enough three letter acronyms to feed the world alphabet soup. Is it a fair and mostly...
1
by: Lenny | last post by:
Hello, I inherited a project from another team. They’re using Win32 APIs for some tasks, even though there’re equivalent .NET namespaces for the same functionality. Is it a good idea to use...
14
by: John | last post by:
My friend told me that his company will migrate the VC++ win32 applications to C++ .NET windows applications. I don't understand why since currently Microsoft only supports .NET on windows...
21
by: Paul Edwards | last post by:
I have written a public domain (not GPL etc) C runtime library (PDPCLIB) for DOS, OS/2 and MVS. You can see it here: http://sourceforge.net/projects/pdos/ I now wish to port it to Win32, so...
3
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I am not sure what am I doing wrong here. I spend almost whole day working on this. I am trying to set focus on the process that I started by Process.start. Below is my code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.