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

error C2197

P: n/a
Hello

I am getting this error:

error C2197: 'long (__stdcall *)(void)' : too many actual parameters
Error executing cl.exe.

The offending line is:

if ((lResult = (*pfnGetProviderList)(0x00020000,
pProviderList)) != 0) // this one
{
goto ProviderInstall_freeProviderList;
}

I am converting this C code into C++. Is the problem that compiler
does not understand the parameters required for pfnGetProviderList?
How can I fix?

Feb 14 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Angus" <an*********@gmail.comwrote in news:1171474942.333988.60210
@p10g2000cwp.googlegroups.com:
Hello

I am getting this error:

error C2197: 'long (__stdcall *)(void)' : too many actual parameters
Error executing cl.exe.

The offending line is:

if ((lResult = (*pfnGetProviderList)(0x00020000,
pProviderList)) != 0) // this one
{
goto ProviderInstall_freeProviderList;
}

I am converting this C code into C++. Is the problem that compiler
does not understand the parameters required for pfnGetProviderList?
How can I fix?
We'd need to see the type of pfnGetProviderList. However, guessing
based on the error message, pfnGetProviderList was declared as a pointer
to function taking empty parentheses as the parameter list. In C that
works out to "will accept any parameters". In C++ that works out to
void.

So... change your declaraction of pfnGetProviderList's type to the right
function signature.
Feb 14 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.