> On Tuesday 19 December 2000 9:05 am, Francois Gouget wrote:
> > It just has one problem: I tested it on comctl32 and it did not
> > generate anything for entry-points that are exported by
> ordinal only.
> > But I believe adding support for them should be easy.
>
> heh, I think it probably has more than one problem! ;-)
>
> What I'd really like to be able to do is scan a directory to get the
> prototypes for functions out of headers. Once you have those you can
> automatically write the prtotypes, the implementation, parse
> and dump the
> arguments in a TRACE, and return a dummy value (of the
> correct type) if
> needed. that would be cool.
OK. That is not very hard.
> Also you could LoadLibrary the real dll and have each
> function call through,
> dumping its return value as well as the inputs. A nice,
> unobtrusive way to
> see what a dll does, allowing you to reimplement the
> functions one at a time,
> while your program keeps working (well, I can dream).
>
> Only problem is, I suck at perl, and writing it in c would be
> a chore :-)
>
> Someone out in netland must have written a c-function-prototype
> grep in perl, I'm just buggered if I can find it...
I have (almost). Just look in wine/tools/winapi_check/winapi_parser.pm.
Any way, I can write it for you if you wish.
Let get this straight, what you want is a script that takes a list of
header (.h) files and generates a stub implementation for them?
Like it I encounter
FLOAT WINAPI Foo(LPVOID table, LPSTR str, LPWSTR wstr, INT x, FLOAT
y);
I output
FLOAT WINAPI Foo(LPVOID table, LPSTR str, LPWSTR wstr, INT x, FLOAT y)
{
TRACE("(%p, %s, %s, %d, %f): stub\n",
table, debugstr_a(str), debugstr_w(wstr), x, y);
return 0.0;
}
or somthing like that.
Anyway I'm at work now so it will have to wait until I get home.