CommandLineToArgvW fix

Alexandre Julliard julliard at
Mon Oct 8 22:35:45 CDT 2001

Francois Gouget <fgouget at> writes:

>    The problem is that CommandLineToArgvW is supposed to return a
> pointer, not a handle. But I cannot do:
>    hargv=GlobalAlloc(...);
>    argv=GlobalLock(hargv);
>    ...
>    return argv;

Sure you can do that, as long as the allocation is GMEM_FIXED
GlobalLock doesn't touch the lock count so you don't need to unlock
it. It's basically just a glorified typecast.

>    Sigh. What a stupid memory API.

Here I have to agree...

Alexandre Julliard
julliard at

More information about the wine-devel mailing list