By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,227 Members | 1,310 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,227 IT Pros & Developers. It's quick & easy.

How to get the structure in callback?

P: n/a
I have wrote the following code, and my question is how to get the
"pInfo"?
It seem that can't call the CheckNewMailProc but return TRUE, is
something get wrong or I got misunderstand?

typedef BOOL(__cdecl *
CHECKFORNEWMAILCALLBACK)(TransportCheckForNewMailI nfo*);

BOOL CALLBACK CheckNewMailProc(TransportCheckForNewMailInfo *pInfo)
{

return TRUE;
}
BOOL CEmailView::TransportConnect()
{
HINSTANCE hInst = LoadLibrary(_T("imap4.dll"));
typedef BOOL(*PTRANSPORTCHECKFORNEWMAIL)(HANDLE,CHECKFORNE WMAILCALLBACK);
PTRANSPORTCHECKFORNEWMAIL pTransportCheckForNewMail =
(PTRANSPORTCHECKFORNEWMAIL)GetProcAddress(hInst,_T ("TransportCheckForNewMail"));

if(!pTransportCheckForNewMail(hService, CheckNewMailProc))//<---can't
all "CheckNewMailProc"
{
return FALSE;
}
return TRUE;
}
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.