WinInitialize

Initializes the PM facilities to be used by an application.

Syntax
WinInitialize( flOptions )

Usage Explanation
This function must be the first PM function called by any application thread intending to use PM or GPI services. The return value is sometimes needed by other functions and should be saved. WinTerminate can be called if a thread no longer needs these services. This API can only be called once per thread.

Parameters

 * ULONG flOptions (input)
 * The only allowed value is 0L.

Returns

 * HAB hab
 * This return value is a handle to an anchor block. The anchor block is a structure which is used by OS/2 to keep track of application specific error information, and the handle is needed for certain other PM functions, such as WinCreateMsgQueue. NULLHANDLE is returned if an error occurred.

Define (C/C++)
or or
 * 1) define INCL_WINWINDOWMGR
 * 1) define INCL_WIN
 * 1) define INCL_PM
 * 2) include 

Sample Code
HAB hab; ULONG flOptions = 0L; HMQ hmq; hab=WinInitialize(flOptions); hmq=WinCreateMsgQueue(hab, 0L);