System.MainInstance

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

MainInstance: THandle;    { Handle of the main(.EXE) HInstance }

C++

extern DELPHI_PACKAGE HINSTANCE MainInstance;

Properties

Type Visibility Source Unit Parent
variable public
System.pas
System.hpp
System System

Description

Indicates the instance handle for the main executable.

Use MainInstance to obtain the instance handle for the main executable of an application. This is useful in applications that use runtime libraries or packages, when you need the handle for the executable rather than for the library.

See Also