◆ InitApi() [2/5]

static int InitApi ( string  strPath,
ApplicationHandler  Handler,
int  nLeft,
int  nTop,
int  nWidth,
int  nHeight,
bool  bRunInForeground 

The function initializes ApplicationAPI and must be called at the very first place.

strPathFull path to application Drive.exe.
HandlerDelegate of ApplicationHandler type. Can by used to process events generated by Drive. Supported events are enumerated in ApplicationEvents enum.
nLeftx-coordinate of Drive top left corner.
nTopy-coordinate of Drive top left corner.
nWidthWidth of Drive in pixels.
nHeightHeight of Drive in pixels.
bRunInForegroundIndicates whether Drive shall be brought to foreground after initialization
1 if successful, other value otherwise.

The function initializes ApplicationAPI and starts Drive.exe.

This function should be called just once at the beginning. Before start Drive repeatedly use CloseApi metod.

If Handler is set to null events will not be processed.