Re: cryptdlg(2/2): Implement FormatVerisignExtension
"Juan Lang" <juan.lang(a)gmail.com> writes:
+ if (dwFormatStrType & CRYPT_FORMAT_STR_NO_HEX) + { + static BOOL stringLoaded = FALSE; + DWORD bytesNeeded; + + if (!stringLoaded) + { + LoadStringW(hInstance, IDS_VERISIGN_STATEMENT, verisign_statement, + sizeof(verisign_statement) / sizeof(verisign_statement[0])); + stringLoaded = TRUE; + }
There's no need to store a copy of the string. You should load it directly into the destination buffer. -- Alexandre Julliard julliard(a)winehq.org
There's no need to store a copy of the string. You should load it directly into the destination buffer.
LoadStringW doesn't do what FormatVerisignExtension does: it doesn't SetLastError(ERROR_MORE_DATA) if the buffer is too small. The callers of FormatVerisignExtension call it with a NULL pointer to determine the size. --Juan
"Juan Lang" <juan.lang(a)gmail.com> writes:
There's no need to store a copy of the string. You should load it directly into the destination buffer.
LoadStringW doesn't do what FormatVerisignExtension does: it doesn't SetLastError(ERROR_MORE_DATA) if the buffer is too small. The callers of FormatVerisignExtension call it with a NULL pointer to determine the size.
Sure, that still doesn't mean you need to store a copy of the string, you can just retrieve a pointer to it by setting length to 0. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Juan Lang