Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Passing a file through a Socket Pin
RobJones18-Sep-02 6:57
RobJones18-Sep-02 6:57 
GeneralRe: Passing a file through a Socket Pin
RobJones18-Sep-02 11:06
RobJones18-Sep-02 11:06 
GeneralRe: Passing a file through a Socket Pin
Bilal18-Sep-02 20:42
Bilal18-Sep-02 20:42 
GeneralUTF-8 to Unicode or ANSI. Pin
Halls18-Sep-02 3:25
Halls18-Sep-02 3:25 
GeneralRe: UTF-8 to Unicode or ANSI. Pin
Stephane Rodriguez.18-Sep-02 3:37
Stephane Rodriguez.18-Sep-02 3:37 
GeneralAfxBeginThread Pin
vampiras^18-Sep-02 3:15
sussvampiras^18-Sep-02 3:15 
GeneralRe: AfxBeginThread Pin
Chris Meech18-Sep-02 3:55
Chris Meech18-Sep-02 3:55 
QuestionHow to pass address of a method to a function Pin
Raphael Kindt18-Sep-02 3:06
Raphael Kindt18-Sep-02 3:06 
Hi world...

I've got some error compilation when I want to catch the address of a method inside his class...
My code is:
int BsCard::InitInterrupt() const
{
	void (BsCard:: *intHdl)(HANDLE hCHA_DIG, INT_RESULT* pintResult) = this->InterruptHandler;
	if (!IntEnable(m_hCard, intHdl)) {
		printf("Enabling Interrupt failed\n");
		return ERR_INITINT; // Enabling Interrupt failed
	} 
	return 0;
}


My method who I want to pass her address is:
void BsCard::InterruptHandler(HANDLE hCHA_DIG, INT_RESULT* pintResult)
{
}


My error compilation is:
C:\My Projects VC++\Generic DLL Architecture\MyDLL\RedCode\BsCard.cpp(267) : error C2664: 'IntEnable' : cannot convert parameter 2 from 'void (__thiscall BsCard::*)(struct STRUCT *,INT_RESULT *
)' to 'void (__cdecl *)(struct STRUCT *,INT_RESULT *)'
        There is no context in which this conversion is possible

The problems seems to come from the (__cdecl *)... But I'm not sur.

Thanks for any clues...

Hello World!!! Smile | :)
from Raphaël
AnswerRe: How to pass address of a method to a function Pin
Stephane Rodriguez.18-Sep-02 3:40
Stephane Rodriguez.18-Sep-02 3:40 
AnswerRe: How to pass address of a method to a function Pin
Joaquín M López Muñoz18-Sep-02 4:08
Joaquín M López Muñoz18-Sep-02 4:08 
AnswerRe: How to pass address of a method to a function Pin
Axter18-Sep-02 5:16
professionalAxter18-Sep-02 5:16 
Generalstd::string Pin
Furrukh18-Sep-02 2:15
Furrukh18-Sep-02 2:15 
GeneralRe: std::string Pin
jhwurmbach18-Sep-02 2:31
jhwurmbach18-Sep-02 2:31 
GeneralRe: std::string Pin
Joaquín M López Muñoz18-Sep-02 4:05
Joaquín M López Muñoz18-Sep-02 4:05 
GeneralRe: std::string Pin
Axter18-Sep-02 5:31
professionalAxter18-Sep-02 5:31 
GeneralProcessing Speed Pin
:_Rocket_:18-Sep-02 1:45
:_Rocket_:18-Sep-02 1:45 
GeneralScrollbar Drawing Pin
Jawache18-Sep-02 1:22
Jawache18-Sep-02 1:22 
QuestionMemory leak searcher? Pin
Chun Te, Ewe18-Sep-02 1:18
Chun Te, Ewe18-Sep-02 1:18 
AnswerRe: Memory leak searcher? Pin
jhwurmbach18-Sep-02 1:38
jhwurmbach18-Sep-02 1:38 
GeneralRe: Memory leak searcher? Pin
Chun Te, Ewe18-Sep-02 2:39
Chun Te, Ewe18-Sep-02 2:39 
GeneralRe: Memory leak searcher? Pin
Jawache18-Sep-02 6:01
Jawache18-Sep-02 6:01 
GeneralRe: Memory leak searcher? Pin
Bart Robeyns18-Sep-02 6:27
Bart Robeyns18-Sep-02 6:27 
GeneralRe: Memory leak searcher? Pin
RChin18-Sep-02 6:46
RChin18-Sep-02 6:46 
GeneralRe: Memory leak searcher? Pin
Bart Robeyns18-Sep-02 12:01
Bart Robeyns18-Sep-02 12:01 
AnswerRe: Memory leak searcher? Pin
Stephane Rodriguez.18-Sep-02 2:36
Stephane Rodriguez.18-Sep-02 2:36 

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.