How to get the structure in callback?

S

Shizuka

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)(TransportCheckForNewMailInfo*);

BOOL CALLBACK CheckNewMailProc(TransportCheckForNewMailInfo *pInfo)
{

return TRUE;
}


BOOL CEmailView::TransportConnect()
{
HINSTANCE hInst = LoadLibrary(_T("imap4.dll"));
typedef BOOL(*PTRANSPORTCHECKFORNEWMAIL)(HANDLE,CHECKFORNEWMAILCALLBACK);


PTRANSPORTCHECKFORNEWMAIL pTransportCheckForNewMail =
(PTRANSPORTCHECKFORNEWMAIL)GetProcAddress(hInst,_T("TransportCheckForNewMail"));

if(!pTransportCheckForNewMail(hService, CheckNewMailProc))//<---can't
all "CheckNewMailProc"
{
return FALSE;
}
return TRUE;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,351
Latest member
LolaD32479

Latest Threads

Top