Datahighway Posted September 1, 2003 Posted September 1, 2003 Hi All. How can i load a dll . e.g i want load a dll from the folder Windows\system32. Thanks Regards Datahighway Quote
*Experts* Volte Posted September 1, 2003 *Experts* Posted September 1, 2003 What DLL? What's in it? Why do you need it? Quote
pjv Posted September 1, 2003 Posted September 1, 2003 Do a search for the DllImport attribute. -- Pete Quote
BrianHansen Posted September 1, 2003 Posted September 1, 2003 In C#: [DllImport ("user32.dll")] public static extern void mouse_event( int dwFlags, // flags specifying various motion/click variants float dx, float dy, int dwData // amount of wheel movement ); and remember to include: using System.Runtime.InteropServices; Quote
Datahighway Posted September 2, 2003 Author Posted September 2, 2003 i mean a import from a dll. I want to use the netapi32.dll. Regards Datahighway Quote
*Experts* Volte Posted September 2, 2003 *Experts* Posted September 2, 2003 Assuming you are using VB.NET, you do it the same as you did in VB6, withPublic Declare Function SomeFunction Lib "netapi32.dll" (argument As Integer, argument2 As Integer)At which point use SomeFunction as usual. Remember, if you are translating the definitions from VB6 to change all Longs to Integers in VB.NET. If you are using C#, do what BrianHanson said. Quote
duckax Posted September 4, 2003 Posted September 4, 2003 Is there a way to find out using VB what are the functions in a dll and what arguments they take? Quote
*Experts* mutant Posted September 4, 2003 *Experts* Posted September 4, 2003 If you reference a DLL then you should be able to see what It contains using the Object Browser. You can view it by going to the menu: View, Object Browser Quote
Recommended Posts