FtVspcApiInit Function

Initializes API. You should call it once at the beginning before using the API.

BOOL FtVspcApiInit(
	LPFNVSPCEVENTS lpfnOnEvent,
	LONG_PTR Context,
	LPCTSTR lpszLicenseKey 
	);

Parameters

lpfnOnEvent

[in] A pointer to the function to call on event (cannot be NULL). Refer to FtVspc_Event.

Context

[in] User context (any value).

lpszLicenseKey

[in] License key string. If NULL or empty string, the control works in demo mode.

Return Value

If the function succeeds, the return value is TRUE. Otherwise, use FtVspcGetLastError to get the error code (FtVspc_ErrorCode).

Errors

ftvspcErrorFailed 1 The operation has not been completed.
ftvspcErrorInvalidParameter 2 Invalid parameter.
ftvspcErrorAlreadyInitialized 3 Already initialized.
ftvspcErrorInvalidLicense 5 Invalid license.
ftvspcErrorIncompatibleVersions 6 Incompatible versions of service and DLL API.

See Also

FtVspc_Event, FtVspcApiClose