more HEAP_strdupAtoW removals.

Matthew Davison m.davison at virgin.net
Thu Jan 23 01:38:49 CST 2003


On Thu, 2003-01-23 at 01:36, Dmitry Timoshkov wrote:
> "Matthew Davison" <m.davison at virgin.net> wrote:
> 
> > Changelog
> > Remove some more calls to HEAP_strdupWtoA
> 
> First of all, thanks for doing this!
> 
> > @@ -554,7 +555,11 @@
> > lpwstr = NULL;
> > for(i=0; i<dwNumServiceArgs; i++)
> > - lpwstr[i]=HEAP_strdupAtoW(GetProcessHeap(), 0, lpServiceArgVectors[i]);
> > + {
> > + RtlCreateUnicodeStringFromAsciiz (&usBuffer,lpServiceArgVectors[i]);
> > + lpwstr[i]=usBuffer.Buffer;
> > + RtlFreeUnicodeString(&usBuffer);
> > + }
> 
> Of course this is a typo and last RtlFreeUnicodeString should be removed.
yeah, damn, i thought id got that one.
> 
> > @@ -760,24 +774,26 @@
> > BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter,
> > LPPRINTER_DEFAULTSA pDefault)
> > {
> > - LPWSTR lpPrinterNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpPrinterName);
> > + UNICODE_STRING lpPrinterNameW;
> > + UNICODE_STRING usBuffer;
> > + RtlCreateUnicodeStringFromAsciiz(&lpPrinterNameW,lpPrinterName);
> > PRINTER_DEFAULTSW DefaultW, *pDefaultW = NULL;
> > BOOL ret;

> Are you sure that mixed data declarations/function call will be accepted
> by any C compiler out there? I doubt that even gcc will accept this.
well, im pretty sure gcc takes this, but ill change it anyway.
thanks.
-- 
Matthew Davison <m.davison at virgin.net>




More information about the wine-devel mailing list