troubleshooting Question

Function pointer type mismatch

Avatar of quiklearner
quiklearner asked on
14 Comments2 Solutions366 ViewsLast Modified:
I am using MSVC++ 6.0.  I have an application and a client, both mine.  I was attempting to handle some emulated file i/o stuff within the client, however the work is being perfomred by a set of libraries (not mine) called by the application.  Basically I have to maintain/retain the structure (type defined in the 3rd party library) that holds the pointers to the three functions (read, write, seek) inside of the application.  Where i attempt to set the pointers (example):
channel[iLineNumber - 1].ChanUIO.u_read = channel[iLineNumber - 1].MCPCli->uio_read;
I get:
error C2440: '=' : cannot convert from 'int (__thiscall McpRef::McpClient::*)(int,char *,unsigned int)' to 'int (__cdecl *)(int,char *,unsigned int)'

I had changed the calling convention on these to __cdecl but it didn't get me any further.  I believe this will be real easy, but if not, how should I go about it?
Join our community to see this answer!
Unlock 2 Answers and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros