API call missing in .Net? Search for NativeMethods!

You may have noticed that the .Net framework does not cover every aspect of Windows programming. Sometimes API calls or whole features are simply not accessible when programming in .Net.

However I found that there’s a lot of interfacing code available on the net that makes WinAPI calls and structures available as static methods of static classes, using the DllImport feature.

The static class is usually called NativeMethods, and googling “NativeMethods” plus the API call or DLL you’d like to call, should deliver results quickly.

Advertisements

One Response to API call missing in .Net? Search for NativeMethods!

  1. […] WinAPI with .Net In a previous post I noted that some WinAPIs can be found on the web by searching for the string NativeMethods, which […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: