What tools were used for the MASM64 SDK to convert a DLL exports into the .inc files, such as kernel32.inc? By using dumpbin on the DLL, I can see what was done, but that still would have meant a tremendous amount of typing, so I thought someone here may have a tool that simplified that.
I found h2incX on the web and tried it, but the results were not useful.
I need to convert the winver.h file and its included header files into .inc files for ML64, so any help is appreciated.
winver.h only has ~20 lines of actual definitions, so conversion could be done by hand.
Having said that, these are function definitions. I know how to make MASM PROTOs out of them, but what I don't know is how to create the library entries for them. Someone else here will have to answer that. (That involves more than just "converting" the .h file to an .inc; the library has to be created with all those functions in it.)
My mistake, I may already have what I need, after looking at the MS docs again. Winver.h functions are from Microsoft's version.lib, and that has been converted into MASM64's version.inc and version.lib.
I'll try this again.
ML64 is giving me some odd errors when working with version.inc, such as:
\masm64\include64\version.inc(1): error A2006: undefined symbol : PPROC
\masm64\include64\version.inc(1): error A2195: parameter or local cannot have void type : __imp_GetFileVersionInfoA
I get these errors for every function listed in version.inc, though ML64 doesn't have trouble with any other include file from \masm64\include64 that I use.
Still hunting the reason for the errors...
In Win64.inc is
; ---------------------------------------------------------------------
PPROC TYPEDEF PTR PROC ; for include file prototypes
; ---------------------------------------------------------------------
Hi BobC,
Here is attempt to create include files:
https://masm32.com/board/index.php?topic=5496.0 (https://masm32.com/board/index.php?topic=5496.0)
Things are now working as they should. Use of the include directive seems it can work a little different than with the C++ I have been using for years, just enough the toss my brain around a bit.
I worked with 16-bit ASM many years ago, hardly did anything with 32-bit, and am just getting into 64-bit. As a learning project, I plan to convert 94,000+ lines of C++ code in a stock option tracking program I wrote into an x64 project. I have no deadline, so however long it takes, so be it.
Thanks everyone for the help.
Quote from: BobC on May 10, 2025, 06:41:14 AMThings are now working as they should. Use of the include directive seems it can work a little different than with the C++ I have been using for years, just enough the toss my brain around a bit.
I'm curious: how do you see assembly-language include files as different from C++ ones?
Sure, the languages are completely different. But I would think the actual function of the include files is pretty much the same: to bring in additional data definitions (equates, structures, etc.) needed by the program.
Maybe you meant to say that the contents of assembly-language .inc files is different from C++, which indeed it is.
In any case, congrats on solving your problem.
Yeah, I didn't word that correctly.
I began writing that C++ app in 2017 and I wanted to get it up and running quickly, and since I was most familiar with MFC at the time, that's what I chose. (I don't like MFC much; it seems bloated, verbose and clumsy.) I was used to including headers only once, for the most part, due to the translation unit hierarchy MFC gives you. But as it turned out, I needed "include \masm64\include64\masm64rt.inc" in both of the two asm files I am using in order to resolve ML64 complaints and to move on with my understanding of x64 asm. And I had to add the include/includelib statements for version.inc and version.lib to masm64rt.inc since they were not there (I may take those out of masm64rt.inc later and put them in my own code modules).
So usage of the headers isn't really different. My mindset needed fixing to get out of the C++/MFC mold.