December 31, 2012newer header files for windows with dmc
I've used dmc 8.52 recently with considerable success to revive some tens of thousands of lines of old code from the 20th century (DOS and windows) and move them to win32, where they run successfully even on x64. Now I find that I need headers that include prototypes for many online documented win32 api functions that the dmc lib tool informs me are in the import libraries that come with dmc 8.52 but that a script informs me have no prototypes in any header file that accompanies that compiler. I'd like some advice how to proceed in updating the headers (and possibly the import libs in dm/lib/ though those look at a glance adequate to build things good back to XP SP3 --- do I need to improve these using implib?). A script indicates that there are around 1100 functions in the import libraries for the following win32 DLLs that do not have declarations in any header supplied with the latest dmc. And the latest suggestions online on how to update a dmc installation's import libraries and headers are from 2003. ["kernel32.dll", "advapi32.dll", "user32.dll", "gdi32.dll", "shell32.dll", "comdlg32.dll", "comctl32.dll", "netapi32.dll", "wsock32.dll" ] Any help appreciated much.
January 04, 2013Re: newer header files for windows with dmc
Posted in reply to Carl Sturtivant
Went ahead and picked up the 2010 SDK, converted the import libs to OMF to be dmc/optlink compatible using COFFIMPLIB http://www.digitalmars.com/ctg/coffimplib.html and dropped them in place of their predecessors in dm\lib\ . Then dropped the new header files, some in place of their predecessors in dm\include\win32\ but others new, and put edited copies of dm\include\windows.h referring to any new such headers so an include of a new header from the SDK . e.g. a new header frogstar.h which will be sought in dm\include\frogstar.h will find frogstar.h and will bring in dm\include\win32\frogstar.h in the dmc standard way --- dm\include\frogstar.h is just dm\include\windows.h edited to include dm\include\win32\frogstar.h instead of dm\include\win32\windows.h --- I did this for each real new header file in place of frogstar.h . sal.h was missing from the SDK despite being referred to by other headers. This is about some C pre-processor annotation games (some design-by-contract related). These annotation macros can be defined to map to no text at all to get rid of them. I placed suitable declarations in my own sal.h (more on this in a later post answering myself in this thread). I've simplified slightly here, as this took me some hours, and wasn't the only problem solved to work around that missing file. Once my entire solution works, I will post the final details here. After all this, a C file that included <windows.h> compiled with dmc -c with two problems. Here they are: __declspec(deprecated) #pragma deprecated(.......) Not sure what to do about these except edit them out, as they cause dmc a problem. Any suggestions?
Copyright © 1999-2018 by the D Language Foundation