LoadDLL
(Engine-Level Function)
Description: |
Loads a Microsoft Windows™ dynamic link library. 64-bit VTScada can load only 64-bit DLLs. 32-bit VTScada can load only 32-bit DLLs. |
Returns: | DLL handle, numeric error code, or Invalid. See comments |
Usage: | Steady State only. |
Function Groups: | Compilation and On-Line Modifications, DLL, Software and Hardware |
Related to: | DLL |
Format: | LoadDLL(FileName[, VICRemoted]) |
Parameters: |
FileName |
Required. Any text expression for the file name of the DLL to load. If the path is not specified, the standard Windows search pattern for DLLs will be used. Windows applications that load DLL's without using a fully qualified pathname are vulnerable to DLL hijacking where an attacker can place a malicious copy of the DLL in the search path. Take care to specify the path in all cases. |
VICRemoted |
(Optional). A parameter that indicates whether the handle returned by LoadDLL will be remoted to the VIC. If VICRemoted is a valid, non-zero, positive integer, and the LoadDLL function is being executed in a module instance that is within a VIC session, then all DLL calls using the handle that LoadDLL returns will be remoted to the VIC. Whether the LoadDLL is in a VIC session is determined by the call tree from the module instance running the LoadDLL call. The root of the call tree must be an instance of BrowserClient. In practical terms, this means that you cannot expect session-aware DLL calls to function if you explicitly launch a module with a caller other than a module instance within the VIC session tree. Defaults to 0 if not otherwise specified. |
Comments: |
Your DLL must return an object as a buffer in order for VTScada to be able to read it. The return value is either the Windows™ handle of the new DLL (ValueType == 38), or on failure, the least significant 16-bits of operating system error code (ValueType < 3). |