Calling a Windows DLL from Within a Script

A declaration for a DLL starts with an interface that has a Dll attribute. The syntax of the declaration is the following:
<Dll("dllname.dll")> Public Interface DllInterfaceName
  FunctionDeclaration
  [FunctionDeclaration]…
End Interface
// C# code
[Dll("dllname.dll")]
public interface DllInterfaceName {
  FunctionDeclaration ...
}
dllname
The name of or the full path to the DLL file that contains the functions you want to call from your scripts. Environment variables in the DLL path are automatically resolved. You do not have to use double backslashes (\\) in the path, single backslashes (\) are sufficient.
DllInterfaceName
The identifier that is used to interact with the DLL in a script.
FunctionDeclaration
A function declaration of a DLL function you want to call.