Click here to Skip to main content
15,889,863 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need an advice on creating a text editor Pin
Cristoff7-May-06 23:34
Cristoff7-May-06 23:34 
GeneralRe: Need an advice on creating a text editor Pin
J4amieC7-May-06 23:41
J4amieC7-May-06 23:41 
GeneralRe: Need an advice on creating a text editor Pin
Cristoff8-May-06 4:08
Cristoff8-May-06 4:08 
QuestionInserting data into SQL Server database Pin
cshivaprasad7-May-06 19:51
cshivaprasad7-May-06 19:51 
AnswerRe: Inserting data into SQL Server database Pin
freshonlineMax7-May-06 20:12
freshonlineMax7-May-06 20:12 
GeneralRe: Inserting data into SQL Server database Pin
cshivaprasad7-May-06 21:34
cshivaprasad7-May-06 21:34 
AnswerRe: Inserting data into SQL Server database Pin
kalyanhere8-May-06 18:36
kalyanhere8-May-06 18:36 
Questionsppech sdk5.1 Pin
TheEagle7-May-06 19:38
TheEagle7-May-06 19:38 
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.

Iam not good in COM programming.Could any one give me a C# code sample for using this method?Cry | :((

QuestionSSL implementation problem....... Pin
Neeraj Arora7-May-06 18:17
Neeraj Arora7-May-06 18:17 
Questionnetwork configuration with C# Pin
jpablo12057-May-06 17:54
jpablo12057-May-06 17:54 
AnswerRe: network configuration with C# Pin
Ravi Bhavnani7-May-06 18:57
professionalRavi Bhavnani7-May-06 18:57 
GeneralRe: network configuration with C# Pin
jpablo12058-May-06 4:48
jpablo12058-May-06 4:48 
QuestionConvert.ToInt32() Pin
yongwpi7-May-06 16:32
yongwpi7-May-06 16:32 
AnswerRe: Convert.ToInt32() Pin
Ravi Bhavnani7-May-06 16:58
professionalRavi Bhavnani7-May-06 16:58 
AnswerRe: Convert.ToInt32() Pin
Christian Graus7-May-06 18:25
protectorChristian Graus7-May-06 18:25 
GeneralRe: Convert.ToInt32() Pin
yongwpi8-May-06 7:01
yongwpi8-May-06 7:01 
AnswerRe: Convert.ToInt32() Pin
HimaBindu Vejella8-May-06 0:10
HimaBindu Vejella8-May-06 0:10 
QuestionWebsite forms Pin
ChrisSharp7-May-06 15:37
ChrisSharp7-May-06 15:37 
AnswerRe: Website forms Pin
Ravi Bhavnani7-May-06 17:00
professionalRavi Bhavnani7-May-06 17:00 
QuestionBinary image segmentation Pin
haj_duke7-May-06 12:53
haj_duke7-May-06 12:53 
AnswerRe: Binary image segmentation Pin
Guffa7-May-06 12:57
Guffa7-May-06 12:57 
QuestionCopyFileEx Problem Pin
teejayem7-May-06 12:46
teejayem7-May-06 12:46 
AnswerRe: CopyFileEx Problem Pin
Guffa7-May-06 13:01
Guffa7-May-06 13:01 
GeneralRe: CopyFileEx Problem Pin
teejayem7-May-06 16:38
teejayem7-May-06 16:38 
Questionsharing files program Pin
hakerfucker7-May-06 9:49
hakerfucker7-May-06 9:49 

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.