By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,732 Members | 841 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,732 IT Pros & Developers. It's quick & easy.

Problem Function Pointer in C++ .Net

P: n/a
Hi,

I have made a Windows Forms .Net Project in C++. I use the Philips
Speech SDK to make voice recognition on WAV files. In the recognition
function, I must pass a pointer of a function which I create to a
structure of the Philips Speech SDK.

This is the code of the recognition function :

void Recognition()
{

...

PSPDICTCBSTRUCT dictationStruct ;
dictationStruct.onCommandResult = MyOnCommandResult ;

...

}
This is the MyOnCommandResult function :

VOID MyOnCommandResult(PSPDICTRCGHANDLE handle, const PSPCOMMANDRESULT
*commandResult, PSPUSERDATA userData)
{
...
}
I have test with pointer to view if structure and function is created
and have a memory address :

void Recognition()
{

...

PSPDICTCBSTRUCT dictationStruct ;
PSPDICTCBSTRUCT *dict ;
dict = &dictationStruct ; // dict address = 0x0012e658

dictationStruct.onCommandResult = MyOnCommandResult ;

...

}
Help me please.
Thanks a lot.
Papilloud Grégoire
Student at HEVs Sierre
pa******@students.hevs.ch
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.