Re: [PATCH 4/5] winspool.drv: Fix AddPrinterDriverA so that the strings actually get written.
7 Nov
2006
7 Nov
'06
10:35 a.m.
On Di, 2006-11-07 at 14:37 +0000, Huw Davies wrote:
RegSetValueExA(hkeyName, "Dependent Files", 0, REG_MULTI_SZ, + (LPBYTE) di3.pDependentFiles, lstrlenA(di3.pDependentFiles) + 1);
Hi Huw. Thanks for working on winspool.drv again, but: "lstrlenA(di3.pDependentFiles) + 1" is not correct for REG_MULTI_SZ I suggest: LPSTR ptr; DWORD total; .... total = 0; ptr = di3.pDependentFiles; if (ptr) { while (ptr[0]) { len = lstrlenA(ptr) + 1; /* actual string */ total += len; ptr += len; } total++; /* extra '\0' for REG_MULTI_SZ - termination */ } -- By by ... Detlef
6972
Age (days ago)
6972
Last active (days ago)
0 comments
1 participants
participants (1)
-
Detlef Riekenberg