HRESULT Activate(HWND hWnd);
Activates a dictation session. The application must have called register before calling Activtate. Speech recognition will not necessarily start listening right away after an Activate call. The dictation mode in ISRAttributes::ModeSet must be set to a mode that enables dictation. The session will be listening if and only if Activate has been called AND the foreground window is hWnd AND the site's mode (ISRAttributes::ModeSet/Get) supports dictation. Calling Deactivate will stop dictation for the session. If an application releases the voice dictation object then Deactivate is automatically called.
· Returns NOERROR if successful, or one of these error values:
E_INVALIDARG
E_OUTOFMEMORY
hWnd
[in] Specifies the top-level window that must be active for dictation to happen. If the window handle is NULL the recognition will be for all windows, unless preempted by another dictation session specific to a window. Only one application can activate dictation with a NULL handle.