I think you have correctly idendified the problem. You cannot have the GCL for MFC compiled into a DLL you are calling from a main program, and also compiled into the main program. The error that you describe would happen if instance data in the WCT32D.DLL was out of sync with calling program.
The only solution we can recommend is to only have the GCL in either your external DLL, or the main program, but not both. And to only place calls to our graphics routines from within your DLL, or from within your main program, but not interspersed between both.
|