Debug Error! dialog

Hi all,

I have built a DCOM object and now I want to test it locally.

1. My test client create the COM object with CoCreateInstance(CLSID_Controller ...) (works fine).
2. Gets a pointer to the interface
pUnk->QueryInterface(IID_IController, (LPVOID FAR*) &pController)(works fine)

But when I call a method to this interface as below:
SAFEARRAY* pMean;
SAFEARRAY* pVar;

pController->getMeanVar(&pMean, &pVar);

I get the following error:

*********************************
"Debug Error!
(...)
The value of ESP was not properly saved across a function call.
This is usually a result of calling a function declared with one
calling convention with a function pointer declared with a
different calling convention."
****************************

After reading the mail archive I found that may be by changing the calling covention from __cdecl(which is default project setting) to __stdcall might solve my problem.
But it didn't help.
Is there anybody who can guide me what to do?

thanks in advance
regards
/saleem
[1155 byte] By [rsasalm] at [2007-11-17 11:49:47]
# 1 Re: Debug Error! dialog
Hi again,

I forgot to mention that I can call interface methods successfully which don't have parameters like:

pController->abort(); (works fine and no error).

regards
/saleem
rsasalm at 2007-11-10 8:06:51 >