Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

defines from Windows.h in C#?

Tags:

c#

winapi

Is there any easy way to get the defines (at least the WM_ stuff) from windows.h in C#?

like image 975
Prody Avatar asked Dec 03 '22 15:12

Prody


2 Answers

Sure, you can copy them out of the code listing here at the Pinvoke website:

http://www.pinvoke.net/default.aspx/Enums/WindowsMessages.html

like image 58
nothrow Avatar answered Dec 22 '22 00:12

nothrow


Another option is to use the PInvoke Interop Assistant. It contains a data base of almost every constant defined via windows.h and provides the ability to translate C header code on the fly.

http://www.codeplex.com/clrinterop

like image 42
JaredPar Avatar answered Dec 22 '22 00:12

JaredPar