Description

Function will free current application instance for Network protection method and local application instance if "Limit number of application instances" feature is enabled.

Use this function in case your application is not using ExitProcess() or does not import this function at all. For example. this is the case with MFC based applications and VB 6 applications.

This function should be called before your application is closed.  

Availability

Protection method: All
Application status: All
Required features: None

Declaration

Visual C/C++
extern "C" __declspec(dllimport) int __stdcall FreeAppInstance();
Visual Basic
Declare Function FreeAppInstance Lib "pcgint.dll" Alias "_FreeAppInstance@0" () As Long
Delphi
function FreeAppInstance():longint;stdcall; external 'pcgint.dll' name '_FreeAppInstance@0';
Delphi 64bit
function FreeAppInstance(): Int64; stdcall; external 'pcgint64.dll';

Parameters

None

Return values

Function will always return PCGI_STATUS_OK.

Full list of return codes is available here.

Notes

- Application instance will be freed only once, no matter how many times you call this function.