in C#, you can import function from DLLs like this
how do I do this in c++?Code:[System.runtime.interopServices.DLLImport("win32.dll")]
public extern int MessageBox(........);
Printable View
in C#, you can import function from DLLs like this
how do I do this in c++?Code:[System.runtime.interopServices.DLLImport("win32.dll")]
public extern int MessageBox(........);
Win32API way is LoadLibrary. Which will still work with C++/CLI
anywhere I can find a tutorial on how to do this?
LoadLibrary/GetProcAddress can be used to import things at run-time if that is what you want.
DLL Main: http://msdn2.microsoft.com/en-us/library/1ez7dh12.aspx
LoadLibrary/GetProcAddress:
http://msdn.microsoft.com/library/de...oadlibrary.asp
http://msdn.microsoft.com/library/de...rocaddress.asp
http://msdn2.microsoft.com/en-us/library/zzk20sxw.aspx
http://msdn2.microsoft.com/en-us/library/64tkc9y5.aspx
Determining which method to use:
http://msdn2.microsoft.com/en-us/library/253b8k2c.aspx
Example code everywhere. You can search the internet, MSDN, newsgroups, this forum, etc.
But actually you should just get the header and import library of the DLL from the vendor and use the functions directly.