Import DLLs

  • Thread starter Thread starter Thomas Klein
  • Start date Start date
T

Thomas Klein

Hello newsgroup,

I am new to C# and need to import a DLLs from a software vendor. I have
already successfully tried to import a Win32-DLL in this way:

/*
* import DLL
*/
[DllImport("kernel32.dll")]

/*
* Prototype for external function
*/
public static extern bool Beep(int frequency, int duration);


My vendor's DLL is located in D:\xxx\dev.dll.
How can I import this DLL and use its defined functions?

Thynk you very much for your help!
Thomas
 
How can I import this DLL and use its defined functions?

Assuming the DLL exports functions as static entry points the same way
Win32 DLLs do, you use the same technique (with the DllImport
attribute and so on). Of course you need to know the names and
signatures of the functions you want to call.


Mattias
 
Back
Top