I’ve been trying to write an 3d modeler for Win32 using an MFC-based main program and non-MFC based DLLs. The basic idea is the main program creates the window and the opengl rendering context and then calls functions in the DLL that execute gl commands to draw to the window… It usually works, but in debugging it I noted that every time the code executes gl commands in the DLLs i get an access violation in GDI.DLL. Commenting out the calls to the DLL, any gl commands within the main program paint call execute just fine. Any ideas?
VC Debug output:
“First-chance exception in main.exe (GDI32.DLL): 0xC0000005: Access Violation.”