Load a dll ?

In C#:

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;
 
Assuming you are using VB.NET, you do it the same as you did in VB6, with
Code:
Public 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.
 
Is there a way to find out using VB what are the functions in a dll and what arguments they take?
 
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
 

Similar threads

Back
Top