|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Import DLLsI 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 wayWin32 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 -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup.
Other interesting topics
newbie: GetType or typeof?
Effective strategy for using VSS in a development team? How to Anonymous IP address in C# Getting Event of Lock Windows OS Why won't you give me your scrollbars?! I hate you, TreeView! Application Idle - Good or bad practice? Getting text box value on key press? Desing problem C++ class in DLL to be imported to C# file uploading in windows application in .net |
|||||||||||||||||||||||