Francois Gouget fgouget@free.fr 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...