   Using SAPI 5.1 In Game and Trouble with Loading
  Hi, I'm mostly new to these forums so I hope this would be the appropriate place for my inquiry. Basically, I'm a student doing a research project on implementing Speech Recognition into games for an easier experience with the UI. The problem I've run into is with loading a Grammar into the SAPI. I've tried two of the four methods provided, those two being LoadCmdFromResource and LoadCmdFromFile. Both of these were done in spec with the documentation, however I can't seem to get them to load the grammar. Both return a similar HRESULT, something to the effect of not being able to load the resource. Specifically, the File loading one returns "The system cannot find the file specified." and the resource one returns "The specified resource type cannot be found in the image file".The only thing I can figure is I must be doing something blantantly simple wrong, otherwise it would work like it's supposed to. After doing some searching on Google, I've found a couple people have had similar problems and didn't receive any responses on different forums, and I thought I might have some luck here. Here's a posting of my initialization code for SAPI://////////////// CODE START ////////////////m_hWnd = hWnd;HRESULT hr = S_OK;hr = m_cpEngine.CoCreateInstance(CLSID_SpInprocRecognizer); //CLSID_SpSharedRecognizer for shared usehr = m_cpEngine->CreateRecoContext(&m_cpRecoCtxt);// Sets up the message to be used for the processinghr = m_cpRecoCtxt->SetNotifyWindowMessage(m_hWnd, WM_RECOEVENT, 0, 0);// Sets it so only the Recognition message is senthr = m_cpRecoCtxt->SetInterest(SPFEI(SPEI_RECOGNITION), SPFEI(SPEI_RECOGNITION));hr = m_cpRecoCtxt->CreateGrammar(GRAMMARID1, &m_cpCmdGrammar);// Loads Grammar from a resourcehr = m_cpCmdGrammar->LoadCmdFromResource(NULL,MAKEINTRESOURCEW(IDR_CMD_CFG),L"SRGRAMMAR",MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL), SPLO_DYNAMIC );// Loads it from a file//hr = m_cpCmdGrammar->LoadCmdFromFile((WCHAR *)szFilename, SPLO_STATIC );// Explicitly states the state of the rules which are normally defined in the XMLhr = m_cpCmdGrammar->SetRuleState( NULL, NULL, SPRS_ACTIVE ); //////////////// CODE END ////////////////As you can see, I currently am loading from a resource and have the load from file commented out, but I would prefer to load from a file if possible. If anyone has any ideas, please let me know. Even if I can't finish this in time to turn it in, I'd still like to try and get it into my Final Project. Thanks for your time!   
  You may look onto this sapi 5 tutorials:http://www.generation5.org/articles.asp?Action=List&Topic=Speech%20Recognitionit worked for megreetings   