error C2197

A

Angus

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?
 
A

Andre Kostur

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.
 

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,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top