winebuild & (name, heap, init)

Patrik Stridvall ps at
Wed Sep 11 10:24:45 CDT 2002

> On September 11, 2002 11:07 am, Patrik Stridvall wrote:
> > Well as I said a lot of API use LPSTR when it really should
> > use LPCSTR so the potential IO/OUT cases are quite a few.
> I don't think it's "lot". Can you give a count where LPSTR/LPWSTR
> is used for a IN parameter only?

I don't know how to do that automatically. You will have
to look in the documentation and sometimes the documention
is wrong...

> And those we can fix in our
> sources, as you said.


> > You mean just add a OUT before the type. That is quite easy 
> to parse.
> Even better -- encode it in the typeinfo.
> /* M = modifiable */
> typedef LPSTR LPMSTR;
> Use LPM{,W}STR instead of LP{,W}STR where the parameter is an IO one.
> The type are equivalent, so no one will notice a difference except
> our parsing tool.

I personally like the OUT better since it is official defined by Microsoft.
> BTW, how many are IO? I would suspect most are O only...

For strings, not that many. Can't think of any right now.
However there are quite a few LPDWORD that specifies the
allocated length of the output buffer and the function
is should write the used length (or needed length,
if the function faild) in the pointed to DWORD.

Other than that it is quite uncommon IIRC.

More information about the wine-devel mailing list