Click here to Skip to main content
15,918,808 members
Home / Discussions / C#
   

C#

 
GeneralRe: Converting and ArrayList into a string Pin
Christian Graus11-May-06 10:15
protectorChristian Graus11-May-06 10:15 
Questionplz make a easy project 4 me Pin
Qasimsha9-May-06 10:17
Qasimsha9-May-06 10:17 
AnswerRe: plz make a easy project 4 me Pin
Christian Graus9-May-06 10:35
protectorChristian Graus9-May-06 10:35 
GeneralRe: plz make a easy project 4 me Pin
Colin Angus Mackay10-May-06 0:47
Colin Angus Mackay10-May-06 0:47 
GeneralRe: plz make a easy project 4 me Pin
Qasimsha15-May-06 10:04
Qasimsha15-May-06 10:04 
GeneralRe: plz make a easy project 4 me Pin
Colin Angus Mackay15-May-06 10:57
Colin Angus Mackay15-May-06 10:57 
JokeRe: plz make a easy project 4 me Pin
Office Lineman9-May-06 11:24
Office Lineman9-May-06 11:24 
QuestionCmdLoadFromResource method Pin
TheEagle9-May-06 10:14
TheEagle9-May-06 10:14 
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?
QuestionDisabling the Close (X) command in Windows Pin
TheJudeDude9-May-06 9:58
TheJudeDude9-May-06 9:58 
AnswerRe: Disabling the Close (X) command in Windows Pin
Christian Graus9-May-06 10:36
protectorChristian Graus9-May-06 10:36 
GeneralRe: Disabling the Close (X) command in Windows Pin
TheJudeDude9-May-06 18:15
TheJudeDude9-May-06 18:15 
GeneralRe: Disabling the Close (X) command in Windows Pin
Christian Graus10-May-06 10:06
protectorChristian Graus10-May-06 10:06 
AnswerRe: Disabling the Close (X) command in Windows Pin
User 17164929-May-06 10:38
professionalUser 17164929-May-06 10:38 
GeneralRe: Disabling the Close (X) command in Windows Pin
TheJudeDude9-May-06 18:16
TheJudeDude9-May-06 18:16 
GeneralRe: Disabling the Close (X) command in Windows Pin
User 171649210-May-06 0:00
professionalUser 171649210-May-06 0:00 
AnswerRe: Disabling the Close (X) command in Windows Pin
Luis Alonso Ramos9-May-06 17:48
Luis Alonso Ramos9-May-06 17:48 
GeneralRe: Disabling the Close (X) command in Windows Pin
TheJudeDude9-May-06 18:17
TheJudeDude9-May-06 18:17 
QuestionC# winsock getdata problem Pin
_tasleem9-May-06 9:30
_tasleem9-May-06 9:30 
QuestionDefining DataType to DataColumn Pin
NaNg152419-May-06 9:14
NaNg152419-May-06 9:14 
QuestionNetwork Traffic Pin
SoftcodeSoftware9-May-06 9:08
SoftcodeSoftware9-May-06 9:08 
AnswerRe: Network Traffic Pin
Ravi Bhavnani9-May-06 10:41
professionalRavi Bhavnani9-May-06 10:41 
GeneralRe: Network Traffic Pin
SoftcodeSoftware9-May-06 11:13
SoftcodeSoftware9-May-06 11:13 
QuestionCustom collections with DataGridView Pin
Wjousts9-May-06 8:13
Wjousts9-May-06 8:13 
QuestionRemoving white spaces from an ArrayList Pin
Rizwan Rathore9-May-06 7:47
Rizwan Rathore9-May-06 7:47 
AnswerRe: Removing white spaces from an ArrayList Pin
cshivaprasad9-May-06 7:51
cshivaprasad9-May-06 7:51 

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.