I have this old application which I created long time ago (more than 10 years) which calls few dlls. The application is fine but I tried today to compile one of the DDL apps I get this error (which already was compiled fine then)
Unresolved External GetDiskFreeSpaceExA in DriveInfo.obj
It has been years since last compilation and many templates were added since then to my Clarion 6.3.
I tried to create a new DLL with fresh structure but still getting the same error.
This is the link-time error rather than the compile-time error, The entry for GetDiskFreeSpaceExA is in WIN32.LIB since C10. Before that it was in WIN32Ext.LIB. WIN32.LIB is adding to the link list automatically. WIN32Ext.LIB must be added to the project manually.
This error message means that the program executed the C-library free() procedure with incorrect parameter. Usually, call to free() is a result of some DISPOSE. Incorrect parameter can be an address of an improper variable (e.g. static) or an address of already DISPOSEd data, an address stored in the variable which has been erroneously overwritten, etc.
If you run into this problem:
find the PID of the running program, for example, using the Task Manager
find the TID of the thread which runs the error message box, for example, using WinSpy
attach the debugger to the program using its PID:
c60dbx -p pid
open the list of threads using Windows->Thread List menu item
highlight the row with the found TID and press Ctrl-Space key to suspend this thread
press the Space key to show the tread’s call stack in the Stack window.
I am not using any APIs, when I got the first error I created a simple application which is one DLL application that have one simple procedure (stop message) and another EXE calling the procedure from the DLL. and all are working fine except when I close the application I get the GPF message.