VisualC++ ---- Problems with (__cdecl *)

Status
Not open for further replies.

dperez79

Member level 1
Joined
Feb 10, 2004
Messages
35
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
299
Hi, I'm integrating a console class into a new VisaulC++ Project with dialogs. After changing several settings of the projects, I always get this error:

c:\documents and settings\dani p.dani\mis documentos\visual studio projects\code project\serial mio\serial mioview.cpp(80) : error C2664: 'setManager' : cannot convert parameter 1 from 'void (unsigned long,unsigned long)' to 'void (__cdecl *)(unsigned long,unsigned long)'
None of the functions with this name in scope match the target type

I think that I must change some project setting but I don't know which of them.
Could someone help me? Thanks.
 

Advanced MFC Programming.pdf
 

Microsoft Visual C++ MFC FAQ v5.6.chm
 


just change your function like :
void test(DWORD test,DWORD test)
{
...
...
}

to

void (__cdecl *) test(DWORD test,DWORD test)
{
...
...
}

I forget (__cdecl *) is similiar like fastcall in borland c++ builder.
I don't use Visucal C++ for a long time.
hmm... I remember maybe the keyword is PASCAL
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…