Win32 API Library -> Class library

S

Sin Jeong-hun

The .NET BCL is great but not always sufficient. We need Win32 API's
to do certain tasks. It's not impossible. We can manually write extern
function signatures by hand or copy and paste from a site like
pInvoke.net. But I always feel this is a little bit painstaking.
Sometimes some signatures are missing or not provided for the CLR
language I'm in use or those codes don't work and I have to search
Google for it.

So, what if someone can make a class library (a single .dll file) for
all (or most of ) the Win32 api's functions, constants or structures?
Then we don't need to copy and paste them everytime we need them, we
just simply reference the library. Things would get much easier I
think.
 
A

Arne Vajhøj

Sin said:
The .NET BCL is great but not always sufficient. We need Win32 API's
to do certain tasks. It's not impossible. We can manually write extern
function signatures by hand or copy and paste from a site like
pInvoke.net. But I always feel this is a little bit painstaking.
Sometimes some signatures are missing or not provided for the CLR
language I'm in use or those codes don't work and I have to search
Google for it.

So, what if someone can make a class library (a single .dll file) for
all (or most of ) the Win32 api's functions, constants or structures?
Then we don't need to copy and paste them everytime we need them, we
just simply reference the library. Things would get much easier I
think.

That is more or less the same that those sites does.

And I can see a couple of reasons to do it their way instead
of your way:
* Win32 API is not the same on all Windows versions so you would
need many different libraries
* I believe that some Win32 API calls will be done differently in .NET
depending on what you want to use it for

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top