Author Topic: WINAPI, SHSTDAPI etc  (Read 9880 times)

jj2007

  • Member
  • *****
  • Posts: 8889
  • Assembler is fun ;-)
    • MasmBasic
Re: WINAPI, SHSTDAPI etc
« Reply #15 on: September 19, 2013, 02:02:58 AM »
Nice :t
With LWSTDAPI_, 21000+ are found.

Zen

  • Member
  • ****
  • Posts: 962
  • slightly red-shifted
Re: WINAPI, SHSTDAPI etc
« Reply #16 on: September 19, 2013, 03:51:16 AM »
JOCHEN,
Weirdly enough,...I dreamed about this question last night,...as I was falling asleep,... :icon_eek:
In my dream,...I did everything the hard way. I copied all those windows headers to a new directory (so as to not inadvertently write something trivial to the source files,...this can be a horror,...trying to find the error later). Then, I inspected all 1370+ files (the dream turned into a nightmare at that point, and, I woke up screaming !).
...Then when I fell back asleep, I wrote my assembly program (you know I worship code bloat) so that it makes TWO scans of every one of those windows headers,...the first scan to find the keyword (or modifier) that indicates the beginning of the API prototype,...and, the second scan to actually make the API listing. :icon_rolleyes:
...Anyway,...I often try to find the most reliable way to accomplish something, even if it takes an extraordinary amount of time.   
But,...I think you are doing it the most efficient way.
When do we get to see your complete assembly code ???
Zen

Vortex

  • Member
  • *****
  • Posts: 1872
Re: WINAPI, SHSTDAPI etc
« Reply #17 on: September 19, 2013, 04:26:20 AM »
ToutEnMasm wrote a SDK translator if I am not wrong.

wjr

  • Member
  • **
  • Posts: 198
    • WJR's website
Re: WINAPI, SHSTDAPI etc
« Reply #18 on: September 19, 2013, 04:53:03 AM »
I can't really answer your question, as I did it the hard way, checking for everything else, and if not processed, then checking for possible Function (...);

However, running 7.1 through my xlatHinc (functions show up as comments in my INC output since GoAsm does not use LIBs or PROTO or EXTERN), then passing the resulting files into EmEditor with a command line search for ";" I get closer to 111,081 which includes each interface function. The resulting EmEditor text file shows the source file, line number, and line contents, for a total of ~15MB (taking out the file and line info, leaving just the functions and parameter names, would be about half that).

GoneFishing

  • Member
  • *****
  • Posts: 1056
  • Gone fishing
Re: WINAPI, SHSTDAPI etc
« Reply #19 on: September 19, 2013, 06:30:56 AM »
...
« Last Edit: September 18, 2015, 06:27:11 AM by GoneFishing »

jj2007

  • Member
  • *****
  • Posts: 8889
  • Assembler is fun ;-)
    • MasmBasic
Re: WINAPI, SHSTDAPI etc
« Reply #20 on: September 19, 2013, 07:48:31 AM »
Hi Zen, Erol, Wayne and Vertograd,
Thanks for gently pulling my leg ;)

I knew it had been done before... xlatHinc looks very mature, congrats to Wayne.

What I want is not that serious, just a quick and dirty list of APIs with their parameters, for use in my editor. For my needs, Hutch' Masm32 includes are more than sufficient, but I never can remember the number and positions of those bloody ShellExecute invoke parameters, so I thought a tooltip would be handy ;-)

When do we get to see your complete assembly code ???

Attached. Thanks for all the helpful remarks :icon14:

wjr

  • Member
  • **
  • Posts: 198
    • WJR's website
Re: WINAPI, SHSTDAPI etc
« Reply #21 on: September 19, 2013, 10:37:08 AM »
Thanks, and nicely done too for quick and dirty (too much time in header files can render one dysfunctional :-).

If you were aiming for one parameter per line, just a bit more fine tuning with leading /*...*/ or __RPC or of the form __some_annotation(... , ...). With the exception of this last one, it may be easier to use the comma as the line separator.

jj2007

  • Member
  • *****
  • Posts: 8889
  • Assembler is fun ;-)
    • MasmBasic
Re: WINAPI, SHSTDAPI etc
« Reply #22 on: September 25, 2013, 08:24:08 PM »
Thanks, and nicely done too for quick and dirty

Thanks, Wayne ;-)

I've picked up an idea of Dave: get the DLL exports first. Here is a first attempt, it creates a text file of exports from the System32 folder.

dedndave

  • Member
  • *****
  • Posts: 8807
  • Still using Abacus 2.0
    • DednDave
Re: WINAPI, SHSTDAPI etc
« Reply #23 on: September 25, 2013, 08:50:13 PM »
i like it   :t

XP MCE2005, SP3
i got about 92,300 lines of text   :P

jj2007

  • Member
  • *****
  • Posts: 8889
  • Assembler is fun ;-)
    • MasmBasic
Re: WINAPI, SHSTDAPI etc
« Reply #24 on: September 25, 2013, 09:29:02 PM »
78,600 for Win7-32 (no word wrap).
75*CreateInstance, 715*DllCanUnloadNow - some are quite repetitive.

Attached version 2a without duplicates. Win XP SP3:
1410 dll files with 43029 calls written to DllSys32.txt

P.S.: [?rbegin@?$list@VFilePathComponent@iop@@V?$allocator@VFilePathComponent@iop@@@std@@@std@@QBE?A
V?$reverse_bidirectional_iterator@Vconst_iterator@?$list@VFilePathComponent@iop@@V?$allocator@
VFilePathComponent@iop@@@std@@@std@@VFilePathComponent@iop@@ABV45@PBV45@H@2@XZ] is 265 chars long... guess for which company the authors of that DLL are working ;)
« Last Edit: September 26, 2013, 06:11:17 AM by jj2007 »