Aliasing a DLL Name

If a DLL function has the same name as a reserved word in Visual Basic, or the function does not have a name but an ordinal number, you need to rename the function within your declaration and use the alias statement to map the declared name to the actual name.

Example

For example, the Exit statement is reserved by the Visual Basic compiler. Therefore, to call a function named exit, you need to declare it with another name, and add an alias statement, as shown here:
<Dll("mydll.dll")> Public Interface IMyDllFunctions
  <DllFunctionOptions(Alias:="exit")> Sub MyExit()
End Interface