Click here to Skip to main content
15,916,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: memory based Pin
aaaan30-Apr-06 21:22
aaaan30-Apr-06 21:22 
GeneralRe: memory based Pin
YaronNir30-Apr-06 21:23
YaronNir30-Apr-06 21:23 
GeneralRe: memory based Pin
aaaan1-May-06 0:14
aaaan1-May-06 0:14 
QuestionMFC Method Pin
N.Byarley30-Apr-06 18:08
N.Byarley30-Apr-06 18:08 
AnswerRe: MFC Method Pin
Maxwell Chen30-Apr-06 18:31
Maxwell Chen30-Apr-06 18:31 
AnswerRe: MFC Method Pin
YaronNir30-Apr-06 20:48
YaronNir30-Apr-06 20:48 
AnswerRe: MFC Method Pin
N.Byarley1-May-06 1:53
N.Byarley1-May-06 1:53 
Questionfunction pointer ,,,easy but not simple Pin
vtalau30-Apr-06 17:04
vtalau30-Apr-06 17:04 
I have a problem with using function poiter. My program has two parts:

part 1: mydll.dll

typedef BOOL (*SpeakFunc)(const CString s);
#define DLL_EXPORT __declspec(dllexport)

BOOL DLL_EXPORT Init(HWND hwnd,SpeakFunc func)
{
...
}

part 2: adding the mydll.lib of the part 1 into the project of the part 2

in the test.cpp file of the "Test" class

typedef BOOL (*SpeakFunc)(const CString str);
extern BOOL Init(HWND hwnd,SpeakFunc func);

BOOL CTest::Speak(const CString)
{
...
}

void CTest::TestMethod()
{
...
Init (NULL,&CTest::Speak) ; // the compiler notices an error here

...
}

The error message like below:
"error C2440: 'initializing' : cannot convert from 'int (__thiscall CTest::*)(const class CString)' to 'int (__cdecl *)(const class CString)'
There is no context in which this conversion is possible"

please help me...Thanks a lot.




AnswerRe: function pointer ,,,easy but not simple Pin
Stephen Hewitt30-Apr-06 17:06
Stephen Hewitt30-Apr-06 17:06 
AnswerRe: function pointer ,,,easy but not simple Pin
Michael Dunn30-Apr-06 18:53
sitebuilderMichael Dunn30-Apr-06 18:53 
QuestionHai ,How Can we Run a Batch file ? Pin
CodeVarma30-Apr-06 16:31
CodeVarma30-Apr-06 16:31 
AnswerRe: Hai ,How Can we Run a Batch file ? Pin
Maxwell Chen30-Apr-06 18:06
Maxwell Chen30-Apr-06 18:06 
AnswerRe: Hai ,How Can we Run a Batch file ? Pin
Ryan Binns30-Apr-06 18:17
Ryan Binns30-Apr-06 18:17 
AnswerRe: Hai ,How Can we Run a Batch file ? Pin
Michael Dunn30-Apr-06 18:54
sitebuilderMichael Dunn30-Apr-06 18:54 
QuestionHow do i read internet files through C++? Pin
c-wanna-be30-Apr-06 15:34
c-wanna-be30-Apr-06 15:34 
AnswerRe: How do i read internet files through C++? Pin
Hamid_RT30-Apr-06 18:57
Hamid_RT30-Apr-06 18:57 
AnswerRe: How do i read internet files through C++? Pin
YaronNir30-Apr-06 21:20
YaronNir30-Apr-06 21:20 
AnswerRe: How do i read internet files through C++? Pin
_AnsHUMAN_ 30-Apr-06 22:09
_AnsHUMAN_ 30-Apr-06 22:09 
AnswerRe: How do i read internet files through C++? Pin
Ganesh_T1-May-06 0:46
Ganesh_T1-May-06 0:46 
Questionget current directory Pin
rahultaing30-Apr-06 15:13
rahultaing30-Apr-06 15:13 
AnswerRe: get current directory Pin
Demian Panello30-Apr-06 16:29
Demian Panello30-Apr-06 16:29 
QuestionMultiple Views Pin
Demian Panello30-Apr-06 12:24
Demian Panello30-Apr-06 12:24 
AnswerRe: Multiple Views Pin
Ryan Binns30-Apr-06 18:19
Ryan Binns30-Apr-06 18:19 
GeneralRe: Multiple Views Pin
Demian Panello1-May-06 5:43
Demian Panello1-May-06 5:43 
QuestionRe: Multiple Views Pin
David Crow1-May-06 6:11
David Crow1-May-06 6:11 

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.