다음을 통해 공유


ISpNotifyTranslator::InitWin32Event (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

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 Value

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

Header sapi.h, sapi.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpNotifyTranslator
SAPI Interfaces