Click or drag to resize

_GetInst Function

X#
Return the instance handle of an application or DLL.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION _GetInst() AS IntPtr
Request Example View Source

Return Value

Type: IntPtr
Remarks
The instance handle is assigned by Windows to the application or DLL and is needed for low-level Windows system programming.
Examples
The following example loads a string from the string table.
This example requires the Win32 API library to be included in the application's search path:
X#
1FUNCTION Start()
2    LOCAL x := BUFFER(64) AS STRING
3    LOCAL cb AS WORD
4    cb := LoadString(_GetInst(), 100, x, 64)
5    x := LEFT(x, cb)
6    ? x         // Hello World
X#
1RESOURCE StringTable
2    {
3        100, "Hello World"
4    }
See Also