C++ SDK

◆ InitApi()

static int CApplicationAPI::InitApi ( LPCTSTR  lpszPath,
APPLICATION_HANDLEPROC  pfnApplicationEventHandler,
int  nLeft,
int  nTop,
int  nWidth,
int  nHeight,
BOOL  bRunInForeground = TRUE,
BOOL  bNoCaption = FALSE,
HWND  hParentWnd = NULL 
)
static

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

Parameters
lpszPathFull path to application Drive.exe.
pfnApplicationEventHandlerDelegate of APPLICATION_HANDLEPROC type. Can be used to process events generated by Drive. Supported events are enumerated in ApplicationEvents.
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.
Returns
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 method first.

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