Click here to Skip to main content
15,918,624 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralProblem with WriteFile Pin
Deepak Samuel24-Nov-03 2:41
Deepak Samuel24-Nov-03 2:41 
GeneralRe: Problem with WriteFile Pin
David Crow24-Nov-03 3:00
David Crow24-Nov-03 3:00 
GeneralRe: Problem with WriteFile Pin
Deepak Samuel24-Nov-03 3:41
Deepak Samuel24-Nov-03 3:41 
GeneralRe: Problem with WriteFile Pin
Roger Allen24-Nov-03 4:27
Roger Allen24-Nov-03 4:27 
GeneralRe: Problem with WriteFile Pin
Adam Gritt24-Nov-03 3:21
Adam Gritt24-Nov-03 3:21 
Generalpointer to member function Pin
El'Cachubrey24-Nov-03 2:14
El'Cachubrey24-Nov-03 2:14 
GeneralRe: pointer to member function Pin
David Crow24-Nov-03 2:24
David Crow24-Nov-03 2:24 
GeneralRe: pointer to member function Pin
Antti Keskinen24-Nov-03 2:41
Antti Keskinen24-Nov-03 2:41 
The error of your code is in the declaration. In the function vfun(), you do not specify a pointer to function, but a pointer to void. Pointers to function have different type of declaration. According to MSDN, a pointer to function receives the following type of specification:
return-value (*variable)(param, ...)
So, according to this, the pointers pfun and pvfun should be declared as:
void (*pfun)(void) = pfun;<DIV>
...<DIV>
void (*pvfun)(void) = pvfun;
Now you can call the functions through the pointers by issuing pfun() or pvfun(), as long as you're inside the correct context (inside the function the pointers are declared)

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: pointer to member function Pin
Michael Dunn24-Nov-03 4:44
sitebuilderMichael Dunn24-Nov-03 4:44 
Generalmodeless dialog Pin
viliam24-Nov-03 2:07
viliam24-Nov-03 2:07 
GeneralRe: modeless dialog Pin
jhwurmbach24-Nov-03 2:22
jhwurmbach24-Nov-03 2:22 
GeneralRe: modeless dialog Pin
valikac24-Nov-03 5:45
valikac24-Nov-03 5:45 
Generalwww.itbooksearch.com.Huge IT ebook resources,You need not amazon any more. Each $4. Pin
Anonymous24-Nov-03 2:02
Anonymous24-Nov-03 2:02 
GeneralGetting a network device detail Pin
Ilamparithi24-Nov-03 1:47
Ilamparithi24-Nov-03 1:47 
GeneralRe: Getting a network device detail Pin
Alexander M.,24-Nov-03 3:42
Alexander M.,24-Nov-03 3:42 
GeneralRe: Getting a network device detail Pin
Ilamparithi24-Nov-03 4:32
Ilamparithi24-Nov-03 4:32 
GeneralWaiting a process Pin
chadell24-Nov-03 0:50
chadell24-Nov-03 0:50 
GeneralRe: Waiting a process Pin
Mike Dimmick24-Nov-03 1:45
Mike Dimmick24-Nov-03 1:45 
GeneralLoad BMP image by IExplorer using MFC Pin
zenta24-Nov-03 0:32
zenta24-Nov-03 0:32 
Generaltrying to get methods and properties of access table Pin
helpapp24-Nov-03 0:26
helpapp24-Nov-03 0:26 
GeneralClistCtrl Problem. Pin
Prakash Nadar24-Nov-03 0:09
Prakash Nadar24-Nov-03 0:09 
GeneralRe: ClistCtrl Problem. Pin
David Crow24-Nov-03 2:30
David Crow24-Nov-03 2:30 
GeneralRe: ClistCtrl Problem. Pin
Anonymous24-Nov-03 2:46
Anonymous24-Nov-03 2:46 
GeneralRe: ClistCtrl Problem. Pin
David Crow24-Nov-03 2:52
David Crow24-Nov-03 2:52 
GeneralDetect closing of application from windows Pin
Manfred Staiger23-Nov-03 23:58
Manfred Staiger23-Nov-03 23:58 

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.