Click or drag to resize

_GetInst Function

Return the instance handle of an application or DLL.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.2a
Syntax
 FUNCTION _GetInst() AS IntPtr
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#
FUNCTION Start()
        LOCAL x := BUFFER(64) AS STRING
        LOCAL cb AS WORD
        cb := LoadString(_GetInst(), 100, x, 64)
        x := LEFT(x, cb)
        ? x         // Hello World
X#
RESOURCE StringTable
        {
                100, "Hello World"
        }
See Also