Дед Пахом писал(а):Размер входного буфера никогда по ссылке не передаётся. В крайнем случае (при изменении размера буфера внутри метода) метод возвращает новый размер через return или через другой аргумент.
Вот и попалось опровержение:
BOOL WINAPI LookupAccountName(
__in_opt LPCTSTR lpSystemName,
__in LPCTSTR lpAccountName,
__out_opt PSID Sid,
__inout LPDWORD cbSid,
__out_opt LPTSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse
);
cbSid [in, out] - A pointer to a variable. On input, this value specifies the size, in bytes, of the Sid buffer. If the function fails because the buffer is too small or if cbSid is zero, this variable receives the required buffer size.
cchReferencedDomainName [in, out] - A pointer to a variable. On input, this value specifies the size, in TCHARs, of the ReferencedDomainName buffer. If the function fails because the buffer is too small, this variable receives the required buffer size, including the terminating null character. If the ReferencedDomainName parameter is NULL, this parameter must be zero.
Компьютер имеет то преимущество перед мозгом, что им пользуются...