На главную

On-line справка по Win32 API

Написать письмо
БЕСПЛАТНАЯ ежедневная online лотерея! Выигрывай каждый день БЕСПЛАТНО!
Список всех статей A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z | Скачать Вниз

AllocateAndInitializeSid



The AllocateAndInitializeSid function allocates and initializes a security identifier (SID) with up to eight subauthorities.

BOOL AllocateAndInitializeSid(

PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, // pointer to identifier authority
BYTE nSubAuthorityCount, // count of subauthorities
DWORD dwSubAuthority0, // subauthority 0
DWORD dwSubAuthority1, // subauthority 1
DWORD dwSubAuthority2, // subauthority 2
DWORD dwSubAuthority3, // subauthority 3
DWORD dwSubAuthority4, // subauthority 4
DWORD dwSubAuthority5, // subauthority 5
DWORD dwSubAuthority6, // subauthority 6
DWORD dwSubAuthority7, // subauthority 7
PSID *pSid // pointer to pointer to SID
);


Parameters

pIdentifierAuthority

Pointer to an SID_IDENTIFIER_AUTHORITY structure, giving the top-level identifier authority value to set in the SID.

nSubAuthorityCount

Specifies the number of subauthorities to place in the SID. This parameter also identifies how many of the subauthority parameters have meaningful values. This parameter must contain a value from 1 through 8.
For example, a value of 3 indicates that the subauthority values specified by the dwSubAuthority0, dwSubAuthority1, and dwSubAuthority2 parameters have meaningful values and to ignore the remainder.

dwSubAuthority0 through dwSubAuthority7

Specify subauthority values to place in the SID.

pSid

Pointer to a variable that receives the pointer to the allocated and initialized SID structure.



Return Values

If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

An SID allocated with the AllocateAndInitializeSid function must be freed by using the FreeSid function.

See Also

FreeSid, GetSidIdentifierAuthority, InitializeSid, SID_IDENTIFIER_AUTHORITY


Пригласи друзей и счет твоего мобильника всегда будет положительным!
Предыдущая статья
 
Сайт Народ.Ру Интернет
Следующая статья
Пригласи друзей и счет твоего мобильника всегда будет положительным!

AllocateAndInitializeSid



Функция AllocateAndInitializeSid распределяет и инициализирует идентификатор безопасности (SID) с вплоть до восьми subauthorities.

BOOL AllocateAndInitializeSid(

pIdentifierAuthority PSID_IDENTIFIER_AUTHORITY, // указатель в руководство идентификатора BYTE nSubAuthorityCount, // счета subauthorities DWORD dwSubAuthority0, // subauthority 0 DWORD dwSubAuthority1, // subauthority 1 DWORD dwSubAuthority2, // subauthority 2 DWORD dwSubAuthority3, // subauthority 3 DWORD dwSubAuthority4, // subauthority 4 DWORD dwSubAuthority5, // subauthority 5 DWORD dwSubAuthority6, // subauthority 6 DWORD dwSubAuthority7, // subauthority 7 PSID *указатель pSid // на указатель на SID
);


Параметры

pIdentifierAuthority

Указатель на структура SID_IDENTIFIER_AUTHORITY, дающий величину руководства идентификатора верхнего уровня, чтобы устанавливаться в SID.

nSubAuthorityCount

Определяет число subauthorities, чтобы устанавливаться в SID. Этот параметр также идентифицирует сколько параметров subauthority иметь значимые величины. Этот параметр должен содержать величину с 1 по 8.
Например, величина 3 указывает, что величины subauthority определенные dwSubAuthority0, dwSubAuthority1, и параметрами dwSubAuthority2 имеют значимые величины и, чтобы игнорировать разность.

dwSubAuthority0 через dwSubAuthority7

Определите величины subauthority, чтобы устанавливаться в SID.

pSid

Указатель в переменную, которая получает указатель в размещенную и инициализированную структуру SID.



Обратные Величины

Если функция добивается успеха, обратная величина ненулевая.
Если функция терпит неудачу, обратная величина нулевая. Для того, чтобы расширять информацию ошибки, назовите GetLastError.

Замечания

SID Распределенное функцией AllocateAndInitializeSid должно быть освобождено использованием функции FreeSid.

Смотри Также

FreeSid, GetSidIdentifierAuthority, InitializeSid, SID_IDENTIFIER_AUTHORITY


Вверх Version 1.3, Oct 26 2010 © 2007, 2010, mrhx Вверх
 mrhx software  Русский перевод OpenGL  Русский перевод Win32 API
 
Используются технологии uCoz