G
Guest
Hi,
I am using MAPI in a C#-Program via a wrapper-class which simple DLLImports
the functions from mapi32.dll.
I am calling MAPILogon like this:
MAPILogon(hwnd, null, null, 0, 0, ref session);
hwnd is IntPtr.Zero (NULL in C++).
When I call this code somewhere in FormShow or similar (in the GUI-Thread)
anything works fine, I get logged in without being prompted anything.
Now, I have a Socket which asynchroniously listens on a port. When some data
is being received I am in a new thread. In this thread the same code from
above failes with the error-code 3 (MAPI_E_LOGIN_FAILURE?)
Why? Please help, this is kinda urgent...
Thanks a lot in advance
I am using MAPI in a C#-Program via a wrapper-class which simple DLLImports
the functions from mapi32.dll.
I am calling MAPILogon like this:
MAPILogon(hwnd, null, null, 0, 0, ref session);
hwnd is IntPtr.Zero (NULL in C++).
When I call this code somewhere in FormShow or similar (in the GUI-Thread)
anything works fine, I get logged in without being prompted anything.
Now, I have a Socket which asynchroniously listens on a port. When some data
is being received I am in a new thread. In this thread the same code from
above failes with the error-code 3 (MAPI_E_LOGIN_FAILURE?)
Why? Please help, this is kinda urgent...
Thanks a lot in advance