Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Quick question: How can I access the BN_CLICKED constant and other constants defined for the Win32 API from .NET? Are they defined in some library? Do I have to define them myself? If so, where can I find these values? And are the values version-specific between versions of Windows?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
550 views
Welcome To Ask or Share your Answers For Others

1 Answer

I find the PInvoke Interop Assistant to be really helpful: http://blogs.microsoft.co.il/blogs/sasha/archive/2008/01/12/p-invoke-signature-generator.aspx.

It has almost everything and can convert the C++ to C#/VB for you. I rarely, if ever, resort to searching google/pinvoke.net anymore. Screenshot

Here's the MSDN Magazine Article: http://msdn.microsoft.com/en-us/magazine/cc164193.aspx

The original January 2008 MSDN Magazine Article is now only available as a .CHM help file download, linked from the very bottom of https://msdn.microsoft.com/magazine/msdn-magazine-issues. (Column "CLR Inside Out: Marshaling between managed and unmanaged code.")

And here's the download: http://download.microsoft.com/download/f/2/7/f279e71e-efb0-4155-873d-5554a0608523/CLRInsideOut2008_01.exe. The source code can be found at http://clrinterop.codeplex.com/.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...