Click here to Skip to main content
15,897,187 members
Home / Discussions / COM
   

COM

 
GeneralRe: COM inside COM Pin
Aleemulhaq9-May-06 2:55
Aleemulhaq9-May-06 2:55 
GeneralRe: COM inside COM Pin
Roger Stoltz9-May-06 3:01
Roger Stoltz9-May-06 3:01 
Question"Access Denied " message in DCOM (Win XP SP2) Pin
QuickDeveloper8-May-06 21:05
QuickDeveloper8-May-06 21:05 
AnswerRe: "Access Denied " message in DCOM (Win XP SP2) Pin
Steve S9-May-06 22:16
Steve S9-May-06 22:16 
QuestionRe: "Access Denied " message in DCOM (Win XP SP2) Pin
Laxman Auti11-May-06 18:48
Laxman Auti11-May-06 18:48 
AnswerRe: "Access Denied " message in DCOM (Win XP SP2) Pin
Steve S15-May-06 1:17
Steve S15-May-06 1:17 
QuestionStoppping Customer from using X to close window Pin
TheJudeDude8-May-06 11:55
TheJudeDude8-May-06 11:55 
Questionspeech sdk5.1 Pin
TheEagle8-May-06 6:49
TheEagle8-May-06 6:49 
Hi..
I want to use the CmdLoadFromResource() method of ths speech SDK 5.1 to make the xml file that includes the Grammar embeded but i dont know how to use this method in C#.

This code shows how i used this method:

[System.Runtime.InteropServices.DllImport("kernel32")]
private static extern long LoadLibrary(string lpLibFileName);
private void button2_Click(object sender, System.EventArgs e)
{
this.objRecoContext = new SpSharedRecoContext();
this.objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(RecoContext_Recognition);
this.objRecoContext.State=SpeechRecoContextState.SRCS_Enabled;
grammar = objRecoContext.CreateGrammar(0);
int hModule=Convert.ToInt32(LoadLibrary("ReviewWinApp.dll"));
int langID=409;
grammar.CmdLoadFromResource(hModule,"tryRecog.xml","CFGGRAMMAR",langID,SpeechLoadOption.SLODynamic);

grammar.State=SpeechGrammarState.SGSEnabled;
grammar.CmdSetRuleIdState(1,SpeechRuleState.SGDSActive);

}

When i click this button i got the error:

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ReviewWinApp.exe
Additional information: The specified resource type cannot be found in the image file.

I am not good in COM programming.Could any one give me a C# code sample for using this method?Cry | :((
Questionhotfix Pin
jesseca6-May-06 13:45
jesseca6-May-06 13:45 
QuestionCreate COM in VB.Net Pin
Anil Elavumthitta6-May-06 4:07
Anil Elavumthitta6-May-06 4:07 
AnswerRe: Create COM in VB.Net Pin
Milton Karimbekallil6-May-06 5:26
Milton Karimbekallil6-May-06 5:26 
QuestionControl Pin
rahultaing5-May-06 17:36
rahultaing5-May-06 17:36 
AnswerRe: Control Pin
Laxman Auti5-May-06 19:22
Laxman Auti5-May-06 19:22 
GeneralRe: Control Pin
rahultaing5-May-06 19:52
rahultaing5-May-06 19:52 
AnswerRe: Control Pin
Laxman Auti5-May-06 20:05
Laxman Auti5-May-06 20:05 
QuestionConnection Points and .NET Pin
MariusMatioc5-May-06 8:28
MariusMatioc5-May-06 8:28 
QuestionCOM Material need? Pin
raghuji.rao4-May-06 17:40
raghuji.rao4-May-06 17:40 
AnswerRe: COM Material need? Pin
User 2155975-May-06 15:46
User 2155975-May-06 15:46 
QuestionOle DB for OLAP Pin
Tarek Jabri4-May-06 4:46
Tarek Jabri4-May-06 4:46 
Questionregsvr32 Keeps Respawing itself Pin
#realJSOP4-May-06 4:45
professional#realJSOP4-May-06 4:45 
QuestionRe: regsvr32 Keeps Respawing itself Pin
Roger Stoltz4-May-06 11:52
Roger Stoltz4-May-06 11:52 
AnswerRe: regsvr32 Keeps Respawing itself Pin
#realJSOP7-May-06 23:45
professional#realJSOP7-May-06 23:45 
AnswerRe: regsvr32 Keeps Respawing itself Pin
#realJSOP8-May-06 4:36
professional#realJSOP8-May-06 4:36 
GeneralRe: regsvr32 Keeps Respawing itself Pin
Roger Stoltz8-May-06 5:07
Roger Stoltz8-May-06 5:07 
GeneralRe: regsvr32 Keeps Respawing itself Pin
#realJSOP8-May-06 5:13
professional#realJSOP8-May-06 5:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.