News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Headers update

Started by donkey, January 17, 2010, 06:48:35 AM

Previous topic - Next topic

Yuri

Hi, Edgar

At the moment, I only have the four mentioned above.

donkey

Hi Yuri,

I will add the following to API_Filter.h

// Winuser.h macros that are not supported
#DEFINE DialogBox DialogBox_MacroNotSupported
#DEFINE DialogBoxIndirect DialogBoxIndirect_MacroNotSupported
#DEFINE CreateDialog CreateDialog_MacroNotSupported
#DEFINE CreateDialogIndirect CreateDialogIndirect_MacroNotSupported

It will be included in the next update on Sunday.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

It's been a while since the last update, sorry but I've been quite busy lately. I have uploaded headers version 0x021019. It includes the filters Yuri requested above as well as some expansion of the Winternl.h file that I needed for my profiler project. There are also a few corrections but no new additions.

Note that much of the expansion to Winternl.h are undocumented equates and structures for Ntxxxxx functions so use them at your own risk.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Hello all,

I have finally got around to making some corrections in the headers as well as a few additions. Special thanks to Ramon Sala for his bug reports. winerror.h has been entirely regenerated, there was a mistake in the automated search and replace that caused any error number ending in 5 to be incorrect, I found it easier to scrap the old file completely and regenerate it from the Windows 7 header directly. A few other files have also been corrected (mmsystem.h and acctrl.h to name 2). I have included the headers for RadAsm 3 and moved them to a separate folder along with the RadAsm 2 header. The files are no longer switchable in Windows.h, you will have to modify any existing software to reflect this. The paths for #including them are:

#include "Radasm\AddIns.h" ; for RadAsm 3.x
#include "Radasm\RadAsm.h" ; for RadAsm 2.x

I have uploaded version 0x021022 to my website

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

This is a very minor update but contains a critical fix to the ACCEL structure. The ACCEL structure needs to have all of its members aligned on WORD boundaries and even though the fVirt member is identified as a BYTE in the MSDN headers it was changed to WORD in this version. All API's that use this structure will fail without this change. There were also some additions to the winternl.h file for a project I am working on, structures and equates for NtQueryInformationFile have been added.

New upload is GOASMHDRVER = 0x021024
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

A minor update, there was some interest in sqlite so I have included the headers for that library in the general headers package, sqlite3.h and sqlite3ext.h have been included. sqlite3ext.h is meant for use with a static lib version of the library, it defaults to the name libsqlite3.lib however that is modifiable using #DEFINE SQLITELIB xxxx.lib, it should not be included if you are using the DLL version, sqlite3.h contains the structures and equates necessary to build sqlite applications. I do not have a static lib version of sqlite that is usable from GoAsm so I have not included it in the libs folder, when I find or build one I will distribute it with the headers. Also there were a couple of minor corrections to 64 bit structures, some PTR members were still defined as DD in commdlg.h.

New upload is GOASMHDRVER = 0x021025
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Uploaded version 0x021028, it contains a few additions to Winternl.h as well as a lot of additions to shlwapi.h to bring it up to date with Windows 7. Some other minor edits, i have started to change duplicated structures but it will take a while to get them all. The API filter messages have been changed to include spaces to make them more readable (well not really spaces but character 255) so filter error messages now look like this:

QuoteError!
The following symbol was not defined in the object file or files:-
DialogBox (Macro Not Supported)
Output file not made

Error!
The following symbol was not defined in the object file or files:-
ImageList_DestroyShared (Not Available)
Output file not made

Error!
The following symbol was not defined in the object file or files:-
RtlCompareVariants (Deprecated)
Output file not made

Error!
The following symbol was not defined in the object file or files:-
DefSubclassProc (Ordinal only export)
Output file not made

Its a little easier to read without the underscores I think. As always define the FILTERAPI switch to enable API filtering and set WINVER to the minimum supported OS you need, default is Windows XP no service pack.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Uploaded version 0x02102A, there are several small corrections and updates for WIN64, the most significant is the CoInvoke macro found in macros.h. I had tested it but never ran into a method with more than 2 or 3 parameters and was under the impression that it worked, it didn't. Luckily I haven't gotten any feedback about it so nobody ran into the ceiling as I did today. There were several problems with the macro, starting with the 5th parameter (since *this is one parameter it appears to be 4) the values have to be pushed right to left also the stack allocation for the shadow registers has to come after all the pushes are done, the pushed parameters also have to be cleaned off the stack. These issues have been dealt with and it is tested and works fine.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Uploaded version 0x02102B, the only significant change was to the 64 bit version of the CoInvoke macro. There was an issue with inline strings in the first 3 parameters, since FASTCALL requires that the string pointers be moved into a register the CoInvoke macro required that you use OFFSET. I have eliminated this by using push/pop for the registers, that puts in a bit of bloat but not much (~3 bytes per parameter). It also demonstrated an issue in GoAsm 32 bit that involved using a * in inline strings when OFFSET was used, Jeremy is looking into the problem.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

New upload (GOASMHDRVER = 0x02102E), a few changes to various header files, mostly technical that will not affect any usage but makes future expansion easier. Added the readgsqword and writegsqword macros to macros.h. Added dwmapi.h for the Desktop Windows Manager interface.

Note that the DWM api is available from Vista onward and if you are using the FILTERAPI switch the functions will not be available unless WINVER is set to NTDDI_VISTA or higher. The readgsqword and writegsqword macros are available only in X64 mode.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

FlySky

Great contribution ones again donkey :U

FlySky

Normally I would just change my message, but since I was the last to reply and me having a new question I am replying with a new message.

You're doing a phenomenal job Edgar.

I was wondering are you using a tool to convert the header files into files GoASM can read or are you doing it all by hand?.


donkey

Hi FlySky,

Sorry for the late reply, I was out camping in the mountains for the last 2 weeks and just got home. I translate all headers by hand, that way I have more control over syntax and structure.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Its been a while since there's been any updates to the headers. I've uploaded an interim update since some projects I've been working on require some that weren't included. Since the main headers have yet to be finished I haven't incremented the version number as of yet. Notable additions in this one are the Direct3D 9 headers and also VMR9. You can download them from my website.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

I've noticed a small problem with the windef.h file, if WIN64 is not defined before it is included it will use 32 bit types. Attached is the corrected windef.h, or you can just make sure that you define WIN64 in your source. Any future updates will include the fixed windef.h.

"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable