Some imort libraries are added to the source base. I was hoping to do this the simple way by target the .dll files directly, at least the 64-bit without any decoration.
32 libw /n /c /l /b /fac /ii version.lib %windir%\system32\version.dll
64 libw /n /c /l /b /fac /i6 version.lib %windir%\system32\version.dll
However, this didn't work very well for some (unknown) reason, so I ended up using .def files for all of them. The command that works looks like this:
Given this works (I assume), the import record for the simple approach should in theory also work, at least for C and FASTCALL.
I have also done some testing with using windows.inc for differnt targets. The same include files should now work for both 32 and 64.bit, unicode/ascii, C/stdcall/fastcall, creating PE (no libs), using msvcrt (C/fastcall), or using the local library with startup modules.
Some changes have also been added to MAKE to simplify the build process. If %AsmcDir% is set MAKE will use the .\lib directory as a common include directory for .mif files.
Well, parsing these includes is tidious work so the current state looks like this:
WIN32_LEAN_AND_MEAN equ 1
I currently only need kernel32 and user32 in the source base, but as the parsing improves more files will be added. Depending on how these functions are decleared, some will be defined with return type and line breaks, others with a single line:
if (_WIN32_WINNT GE 0x0500)
InitializeCriticalSectionAndSpinCount proto _CType \
SetCriticalSectionSpinCount proto _CType \
;; also declared in direct.h
_wchdir proto :ptr wchar_t
_wgetcwd proto :ptr wchar_t, :SINT
_wgetdcwd proto :SINT, :ptr wchar_t, :SINT
_wmkdir proto :ptr wchar_t
_wrmdir proto :ptr wchar_t
_WDIRECT_DEFINED equ 1