Is there an easier way to declare & use API in C# than importing the DLL like so?
Code:[DllImport("DLL", EntryPoint="blah...")]
blah blah blah MessageBox(blah...);
Thanks,
Sir Loin
Printable View
Is there an easier way to declare & use API in C# than importing the DLL like so?
Code:[DllImport("DLL", EntryPoint="blah...")]
blah blah blah MessageBox(blah...);
Thanks,
Sir Loin
That is the easiest way - and it is fairly easy - you have to specify some minimal information in the DllImport attribute so that the API function can be found.
Some people have an odd definition of difficult. ;)