Share via


ISpNotifyTranslator::InitWin32Event (Windows CE 5.0)

Send Feedback

This method sets up a Win32 event object to be used by an ISpNotifyTranslator object. The translator will call the Win32 method SetEvent when the translator Notify method is called. For an explanation of Win32 event objects see the Microsoft Windows SDK documentation.

Once an event object has been initialized for the translator object, the client uses WaitForNotifyEvent and GetNotifyEventHandle methods. Win32 event objects and SAPI events are different. This method is similar ISpNotifySource::SetNotifyWin32Event.

HRESULT InitWin32Event(  HANDLE hEvent,  BOOL fCloseHandleOnRelease);

Parameters

  • hEvent
    [in] Handle of an existing Win32 event object for the application to use with ISpNotifyTranslator. If this parameter is NULL, then a new event will be created.
  • fCloseHandleOnRelease
    [in] Value specifying if the notify translator should close the handle specified by hEvent when the object is released. Set this value to TRUE to close the handle, and to FALSE otherwise. If hEvent is NULL, this parameter is ignored and the handle will always be closed on release of the object.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
SPERR_ALREADY_INITIALIZED Interface is already initialized.
FAILED(hr) Appropriate error message.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

ISpNotifyTranslator | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.