reko icon indicating copy to clipboard operation
reko copied to clipboard

finish win16 API description

Open uxmal opened this issue 9 years ago • 10 comments

Today Reko has no knowledge of the win16 API. It needs a metadata file to support friendly names for the Windows API calls the subject program is making

uxmal avatar Sep 21 '15 21:09 uxmal

I've used the *.spec files from the Wine project. They have some drawbacks: No precise datatypes for procedure arguments No indication at all of return values

A better way would be to find a windows.h file from VC++ 1.x and use it instead. Any takers?

uxmal avatar Sep 22 '15 15:09 uxmal

That's a tough one to find.

halsten avatar Sep 22 '15 16:09 halsten

I'm hoping this is what you need, it was pretty much an archeological expedition to find it. :)

I found some old win16 programs with source here that mentioned they could be compiled with Borland C++ 4.5, which I eventually found. I installed this with wine, and though it crashed halfway through, a search of the install directory found WINDOWS.H which I have uploaded for you.

moparisthebest avatar Sep 23 '15 16:09 moparisthebest

You were carrying the requisite fedora and whip when you did this, right ? This is much appreciated. You wouldn't have commdlg.h lying there as well?

A more tricky question is: is it OK to add these header files to the git project? My gut hunch is no, so I will have to do the following:

  1. adapt Reko's C parser to understand the lovely awesomeness that are _far and _near pointers.
  2. Use the c2xml tool to convert windows.h and commdlg.h to XML

uxmal avatar Sep 23 '15 17:09 uxmal

Haha no but I probably should have been. :) I found COMMDLG.H as well in the same directory.

Licenses are terrible, and since these say Copyright 1994 Borland I'd assume you probably couldn't legally include them without permission from Borland. On the other hand I can't imagine Borland pursuing you for ancient headers that they had to have reverse engineered or copied themselves from microsoft code at some point... Anyway I'm just a lowly programmer so I can't say. :)

moparisthebest avatar Sep 23 '15 17:09 moparisthebest

I have the header files for MSVC1.51 (the last pre 32-bit compiler from MS) & all the headers from Borland 4.0. Would these help?

Also, I'm looking for Borland C++ 4.01 & 4.02 as I'm looking for version 6.01 of TLINK that will hopefully help me validate a successful reverse engineering of Dragon Dictate 3.0? (circa 1997) that I'm not succeeding with yet!

Wall-AF avatar Jul 22 '20 14:07 Wall-AF

Hello, @Wall-AF! Those files would be very useful -- perhaps you can contact me on https://gitter.im/uxmal/reko to discuss? I'm on vacation the coming weeks so my online presence is spotty but I try to respond as soon as I can.

I'm afraid I don't have BC++ binaries available, much as I'd like to help you.

uxmal avatar Jul 24 '20 13:07 uxmal

BC4_INCLUDE.zip MSVC151_INCLUDE.zip MSVC151_MFC_INCLUDE.zip

Here are the include files for Borland C++ 4.0 and MSVC 1.51.

I hope these will help.

Have a great holiday.

Wall-AF avatar Jul 24 '20 13:07 Wall-AF

Has this been actioned???

Wall-AF avatar Mar 26 '21 15:03 Wall-AF

Misclick! Thanks for keeping me on my toes!

uxmal avatar Mar 26 '21 16:03 uxmal