"Matthew Davison" <[EMAIL PROTECTED]> 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. > @@ -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. -- Dmitry.