PRB: AUDIOSD Sample Returns E_FAIL from CoCreateInstance

Last reviewed: February 22, 1996
Article ID: Q147122
The information in this article applies to:
  • Microsoft Speech Software Development Kit (SDK) version 1.0

SYMPTOMS

When an application attempts to create an instance of the CLSID_MyAudioSource or CLSID_MyAudioDest object contained in the AUDIOSD.DLL, CoCreateInstance() returns an HRESULT of E_FAIL.

CAUSE

The DllGetClassObject() function in the AUDIOSD sample will always fail because it compares the CLSID passed into CoCreateInstance() with CLSID_MMAudioSource and CLSID_MMAudioDest rather than the correct CLSID_MyAudioSource and CLSID_MyAudioDest. This will cause DllGetClassObject() to return E_FAIL, which in turn is returned from CoCreateInstance().

RESOLUTION

Edit the DLLGetClassObject() function found in the Cf.cpp file of the AUDIOSD sample as described below and recompile the sample:

  1. Replace both instances of CLSID_MMAudioSource with CLSID_MyAudioSource.

  2. Replace both instances of CLSID_MMAudioDest with CLSID_MyAudioDest.

STATUS

This behavior is by design.


Additional reference words: SAPI 1.00
KBCategory: kbmm kbprb
KBSubcategory: MMSpeech


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 22, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.