Click here to Skip to main content
15,914,820 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Here's some example code that can at least point you in the right direction:

class BsCard
{
public:
typedef void (BsCard::*FuncPtr)(HANDLE hCHA_DIG, INT_RESULT* pintResult);
void InterruptHandler(HANDLE hCHA_DIG, INT_RESULT* pintResult);
bool IntEnable(int, FuncPtr){return true;};
int InitInterrupt1();
int InitInterrupt2();
int m_hCard;
};

int BsCard::InitInterrupt1()
{
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;
}

int BsCard::InitInterrupt2()
{
FuncPtr intHdl = this->InterruptHandler;
if (!IntEnable(m_hCard, intHdl)) {
printf("Enabling Interrupt failed\n");
return ERR_INITINT; // Enabling Interrupt failed
}
return 0;
}

void BsCard::InterruptHandler(HANDLE hCHA_DIG, INT_RESULT* pintResult)
{
}

Using above method, it's going to be hard to keep your InitInterrupt as a const type.
I recommend you change it to a none-constant function.
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 
AnswerRe: Memory leak searcher? Pin
dazinith18-Sep-02 5:12
dazinith18-Sep-02 5:12 
GeneralSerialization problem Pin
simbakid18-Sep-02 0:45
simbakid18-Sep-02 0:45 
GeneralRe: Serialization problem Pin
Jawache18-Sep-02 1:24
Jawache18-Sep-02 1:24 

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.