API functions

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top