TWURegisterCallback
The TWURegisterCallback function registers a new event/progress callback function for use during the session.
URESULT TWURegisterCallback( TWUHANDLE hSession, fTWUCallback pfCallback, LPARAM lCallbackCookie );
Delphi version:
function TWURegisterCallback( hSession: TWUHANDLE; pfCallback: fTWUCallback; lCallbackCookie: LPARAM ): URESULT;
Parameters
- hSession
- [Input] Handle to an open TWU session.
- pCallback
- [Input] Pointer to the callback function that will be called when significant events occur and when progress is being made during file downloads. If you set this parameter to NULL, no callback function will be called.
- lCallbackCookie
- [Input] User-defined value that will be passed unchanged to the callback function. You can use this cookie to pass additional information to the callback function.
Return value
The function returns ERROR_SUCCESS (0) if successful, or a nonzero error code if not.