Title: RE: [MSVC] function pointers

Jason thats works fine if i declare a variable in this way

LPMAPILOGONEX MapiLogonEx and do the assignment but if I try to use the
declaration made for MAPILogonEx that comes in mapix.h i get the
following compiler error

d:\Work\Mail\MRD10\MapiEngine.cpp(43): error C2659: '=' : overloaded
function as left operand


This fragment of code is from mapix.h

/*  Extended MAPI Logon function */


typedef HRESULT (STDMETHODCALLTYPE MAPILOGONEX)(
        ULONG_PTR ulUIParam,
        LPTSTR lpszProfileName,
        LPTSTR lpszPassword,
        ULONG ulFlags,   /*  ulFlags takes all that SimpleMAPI does + MAPI_UNICODE */
        LPMAPISESSION FAR * lppSession
);
typedef MAPILOGONEX FAR *LPMAPILOGONEX;

MAPILOGONEX MAPILogonEx;

Thats the way in which is declared MAPILogonEx. The same applies for all
mapi fucntions declared in mapix.h


On Tue, 23 Sep 2003 16:30:34 +0100, "Jason Teagle" <[EMAIL PROTECTED]>
said:
> > If the solution is the second scenario what for the header mapix.h???? if
> > the solution is the first scanerio  please
> > drop me an example about how to make a cast i don't know to do for
> > example with the function MapiLogonEx
>
> Having just looked, the types are already defined: thus, you should be
> able
> to cast the result of GetProcAddress() like this:
>
> MapiLogonEx = (LPMAPILOGONEX)GetProcAddress(...);
>
> --
> Jason Teagle
> [EMAIL PROTECTED]
>
>
--
  Yosvel
  [EMAIL PROTECTED]

--
http://www.fastmail.fm - The professional email service

Reply via email to