Message 334760 - Python tracker (original) (raw)
It should be fine. If the docs don't require initializing cb, we can assume it's done for us.
For example, msvcrt.dll calls GetStartupInfo without initializing this field:
0:000> kc 3
Call Site
KERNELBASE!GetStartupInfoW
msvcrt!ioinit
msvcrt!__CRTDLL_INIT
In x64, the first argument (lpStartupInfo) is in rcx. We see the DWORD (dd) value of cb is initially 0:
0:000> dd @rcx l1
00000094`25ddefd0 00000000
Continue to the ret[urn] instruction via pt and check that the returned value of cb is sizeof(*lpStartupInfo):
0:000> pt
KERNELBASE!GetStartupInfoW+0xb2:
00007fff`8ae41282 c3 ret
0:000> dd 94`25ddefd0 l1
00000094`25ddefd0 00000068