Declare StringConversionType (Function | Sub) MethodName Lib "DllName" ([Args]) As Type
- StringConversionType is for what type of conversion should take place. Either we can specify Unicode to convert all strings to Unicode values, or Auto to convert strings according to the .NET runtime rules.
- MethodName is the name of the API to call.
- DllName is the name of the DLL.
- Args are any arguments to the API call.
- Type is the return type of the API call.
Below is a sample code for VB.NET which uses Sleep windows API