Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.
 

changlee

Newbie level 4
Joined
Jun 22, 2004
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
34
Advanced MFC Programming.pdf
 

changlee

Newbie level 4
Joined
Jun 22, 2004
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
34
Microsoft Visual C++ MFC FAQ v5.6.chm
 

jhonny_yang

Full Member level 2
Joined
Mar 8, 2002
Messages
130
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Activity points
988
dperez79 said:
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.

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.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top