API functions

G

Guest

Hi
I really don't like to use the [Import Dll] for usage of API functions
Is the .NET Framework support in all API functions ? I use: Beep, IsNetworkAlive, ShellExecuteEx etc..

My application will not run on Linux or Mac since I go to Windows Functions

What are the possibilities ? Where can I find any article that has all the API to .NET Namespaces o
maybe the most needed

thanx.
 
R

Richard Grimes [MVP]

Oren said:
Hi,
I really don't like to use the [Import Dll] for usage of API functions.
Is the .NET Framework support in all API functions ? I use: Beep,
IsNetworkAlive, ShellExecuteEx etc...

What's wrong with using [DllImport], why don't you like it?

This attribute exists solely so that you can access unmanaged code from code
running under the runtime, so you really don't have any other option. If you
*really* don't want to use it you could switch to managed C++ which lets you
call functions in static libraries (and hence import libraries) directly.
But under the covers managed C++ still uses the underlying thunking
mechanisms that [DllImport] uses.

Richard
 

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