简体   繁体   中英

Where can I find a list of windows API constants

Every time I interact with dll's like the user32.dll I need constants like MF_REMOVE. Is there a overview for all that constants or ac# library that constants all these constants?

You'll find all the constants in the C headers of the win32 API. The low-tech way of getting this information is to simply run a text search in the headers folder of visual studio or the platform SDK.
This will usually be something like :

C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Include\\

This online tool MagnumDb as "Magic Number Database" (disclaimer: I wrote it) is a totally free seach engine that contains 99% of Windows SDK constants (around 380000 integers, enums, guids, interface ids, clsids, etc.).

You can query it by name or by value, using wildcards, etc., for example: http://www.magnumdb.com/search?q=MF_REMOVE

will get you this (name, type, value, hex value, SDK header file location):

MF_REMOVE   Int32   4096    0x00001000  %ProgramFiles(x86)%\Windows Kits\10\Include\10.0.16299.0\um\winuser.rh(1213,0)

我想你会在那里找到你想要的关于 API 的所有东西: http : //pinvoke.net/

Try the PInvoke Interop Assistant . For most constants, all you have to do is simply enter their name and it will spit out the C# or VB.Net code which represents these contstants.

The tool is not limited to constants. It can also help with type definitions, functions, and function pointers. It can also translate most definition snippets on the fly to managed code.


(source: msdn.com )

Windows API functions for C # and VB With syntax, explanation and sample code

http://www.pinvoke.net

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM