Documentation standardizations.

This commit is contained in:
Matthew Becker 1999-01-28 13:46:25 +00:00 committed by Alexandre Julliard
parent 1c4786fedf
commit e905f3c681
4 changed files with 485 additions and 222 deletions

View File

@ -11,10 +11,11 @@
#include <unistd.h>
/***********************************************************************
* GetUserNameA [ADVAPI32.67]
/******************************************************************************
* GetUserName32A [ADVAPI32.67]
*/
BOOL32 WINAPI GetUserName32A(LPSTR lpszName, LPDWORD lpSize)
BOOL32 WINAPI
GetUserName32A( LPSTR lpszName, LPDWORD lpSize )
{
size_t len;
char *name;
@ -34,10 +35,15 @@ BOOL32 WINAPI GetUserName32A(LPSTR lpszName, LPDWORD lpSize)
return 1;
}
/***********************************************************************
* GetUserNameW [ADVAPI32.68]
/******************************************************************************
* GetUserName32W [ADVAPI32.68]
*
* PARAMS
* lpszName []
* lpSize []
*/
BOOL32 WINAPI GetUserName32W(LPWSTR lpszName, LPDWORD lpSize)
BOOL32 WINAPI
GetUserName32W( LPWSTR lpszName, LPDWORD lpSize )
{
LPSTR name = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *lpSize );
DWORD size = *lpSize;

View File

@ -10,24 +10,30 @@
#include "heap.h"
/******************************************************************************
* BackupEventLog32A [ADVAPI32.15]
* BackupEventLog32A [ADVAPI32.15]
*/
BOOL32 WINAPI BackupEventLog32A( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
}
/******************************************************************************
* BackupEventLog32W [ADVAPI32.16]
* BackupEventLog32W [ADVAPI32.16]
*
* PARAMS
* hEventLog []
* lpBackupFileName []
*/
BOOL32 WINAPI BackupEventLog32W( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
BOOL32 WINAPI
BackupEventLog32W( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
}
/******************************************************************************
* ClearEventLog32A [ADVAPI32.19]
* ClearEventLog32A [ADVAPI32.19]
*/
BOOL32 WINAPI ClearEventLog32A ( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
{
@ -36,7 +42,7 @@ BOOL32 WINAPI ClearEventLog32A ( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
}
/******************************************************************************
* ClearEventLog32W [ADVAPI32.20]
* ClearEventLog32W [ADVAPI32.20]
*/
BOOL32 WINAPI ClearEventLog32W ( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
{
@ -45,7 +51,7 @@ BOOL32 WINAPI ClearEventLog32W ( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
}
/******************************************************************************
* CloseEventLog32 [ADVAPI32.21]
* CloseEventLog32 [ADVAPI32.21]
*/
BOOL32 WINAPI CloseEventLog32 ( HANDLE32 hEventLog )
{
@ -54,7 +60,7 @@ BOOL32 WINAPI CloseEventLog32 ( HANDLE32 hEventLog )
}
/******************************************************************************
* DeregisterEventSource32 [ADVAPI32.32]
* DeregisterEventSource32 [ADVAPI32.32]
* Closes a handle to the specified event log
*
* PARAMS
@ -69,25 +75,39 @@ BOOL32 WINAPI DeregisterEventSource32( HANDLE32 hEventLog )
}
/******************************************************************************
* GetNumberOfEventLogRecords32 [ADVAPI32.49]
* GetNumberOfEventLogRecords32 [ADVAPI32.49]
*
* PARAMS
* hEventLog []
* NumberOfRecords []
*/
BOOL32 WINAPI GetNumberOfEventLogRecords32( HANDLE32 hEventLog, PDWORD NumberOfRecords )
BOOL32 WINAPI
GetNumberOfEventLogRecords32( HANDLE32 hEventLog, PDWORD NumberOfRecords )
{
FIXME(advapi,"stub\n");
return TRUE;
}
/******************************************************************************
* GetOldestEventLogRecord [ADVAPI32.50]
* GetOldestEventLogRecord32 [ADVAPI32.50]
*
* PARAMS
* hEventLog []
* OldestRecord []
*/
BOOL32 WINAPI GetOldestEventLogRecord32( HANDLE32 hEventLog, PDWORD OldestRecord )
BOOL32 WINAPI
GetOldestEventLogRecord32( HANDLE32 hEventLog, PDWORD OldestRecord )
{
FIXME(advapi,"stub\n");
FIXME(advapi,":stub\n");
return TRUE;
}
/******************************************************************************
* NotifyChangeEventLog32 [ADVAPI32.98]
* NotifyChangeEventLog32 [ADVAPI32.98]
*
* PARAMS
* hEventLog []
* hEvent []
*/
BOOL32 WINAPI NotifyChangeEventLog32( HANDLE32 hEventLog, HANDLE32 hEvent )
{
@ -96,25 +116,31 @@ BOOL32 WINAPI NotifyChangeEventLog32( HANDLE32 hEventLog, HANDLE32 hEvent )
}
/******************************************************************************
* OpenBackupEventLog32A [ADVAPI32.105]
* OpenBackupEventLog32A [ADVAPI32.105]
*/
HANDLE32 WINAPI OpenBackupEventLog32A( LPCSTR lpUNCServerName, LPCSTR lpFileName )
HANDLE32 WINAPI
OpenBackupEventLog32A( LPCSTR lpUNCServerName, LPCSTR lpFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
}
/******************************************************************************
* OpenBackupEventLog32W [ADVAPI32.106]
* OpenBackupEventLog32W [ADVAPI32.106]
*
* PARAMS
* lpUNCServerName []
* lpFileName []
*/
HANDLE32 WINAPI OpenBackupEventLog32W( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
HANDLE32 WINAPI
OpenBackupEventLog32W( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
}
/******************************************************************************
* OpenEventLogA [ADVAPI32.107]
* OpenEventLog32A [ADVAPI32.107]
*/
HANDLE32 WINAPI OpenEventLog32A(LPCSTR uncname,LPCSTR source)
{
@ -123,16 +149,21 @@ HANDLE32 WINAPI OpenEventLog32A(LPCSTR uncname,LPCSTR source)
}
/******************************************************************************
* OpenEventLog32W [ADVAPI32.108]
* OpenEventLog32W [ADVAPI32.108]
*
* PARAMS
* uncname []
* source []
*/
HANDLE32 WINAPI OpenEventLog32W(LPCWSTR uncname,LPCWSTR source)
HANDLE32 WINAPI
OpenEventLog32W( LPCWSTR uncname, LPCWSTR source )
{
FIXME(advapi,"stub\n");
return TRUE;
}
/******************************************************************************
* ReadEventLog32A [ADVAPI32.124]
* ReadEventLog32A [ADVAPI32.124]
*/
BOOL32 WINAPI ReadEventLog32A( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
@ -142,17 +173,28 @@ BOOL32 WINAPI ReadEventLog32A( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRe
}
/******************************************************************************
* ReadEventLog32W [ADVAPI32.125]
* ReadEventLog32W [ADVAPI32.125]
*
* PARAMS
* hEventLog []
* dwReadFlags []
* dwRecordOffset []
* lpBuffer []
* nNumberOfBytesToRead []
* pnBytesRead []
* pnMinNumberOfBytesNeeded []
*/
BOOL32 WINAPI ReadEventLog32W( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
BOOL32 WINAPI
ReadEventLog32W( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
{
FIXME(advapi,"stub\n");
return TRUE;
}
/******************************************************************************
* RegisterEventSource32A [ADVAPI32.174]
* RegisterEventSource32A [ADVAPI32.174]
*/
HANDLE32 WINAPI RegisterEventSource32A( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
{
@ -165,18 +207,19 @@ HANDLE32 WINAPI RegisterEventSource32A( LPCSTR lpUNCServerName, LPCSTR lpSourceN
}
/******************************************************************************
* RegisterEventSource32W [ADVAPI32.175]
* RegisterEventSource32W [ADVAPI32.175]
* Returns a registered handle to an event log
*
* PARAMS
* lpUNCServerName [I] Server name for source
* lpSourceName [I] Source name for registered handle
* lpUNCServerName [I] Server name for source
* lpSourceName [I] Source name for registered handle
*
* RETURNS
* Success: Handle
* Failure: NULL
*/
HANDLE32 WINAPI RegisterEventSource32W( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
HANDLE32 WINAPI
RegisterEventSource32W( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
{
FIXME(advapi, "(%s,%s): stub\n", debugstr_w(lpUNCServerName),
debugstr_w(lpSourceName));
@ -184,7 +227,7 @@ HANDLE32 WINAPI RegisterEventSource32W( LPCWSTR lpUNCServerName, LPCWSTR lpSourc
}
/******************************************************************************
* ReportEvent32A [ADVAPI32.]
* ReportEvent32A [ADVAPI32.178]
*/
BOOL32 WINAPI ReportEvent32A ( HANDLE32 hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
@ -194,10 +237,23 @@ BOOL32 WINAPI ReportEvent32A ( HANDLE32 hEventLog, WORD wType, WORD wCategory, D
}
/******************************************************************************
* ReportEvent32W [ADVAPI32.]
* ReportEvent32W [ADVAPI32.179]
*
* PARAMS
* hEventLog []
* wType []
* wCategory []
* dwEventID []
* lpUserSid []
* wNumStrings []
* dwDataSize []
* lpStrings []
* lpRawData []
*/
BOOL32 WINAPI ReportEvent32W ( HANDLE32 hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData)
BOOL32 WINAPI
ReportEvent32W( HANDLE32 hEventLog, WORD wType, WORD wCategory,
DWORD dwEventID, PSID lpUserSid, WORD wNumStrings,
DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
{
FIXME(advapi,"stub\n");
return TRUE;

View File

@ -1,9 +1,13 @@
/*
* dlls/advapi32/security.c
*/
#include "windows.h"
#include "winerror.h"
#include "debug.h"
#include "heap.h"
#include "ntdll.h"
/* FIXME: Should these be in a header file? */
BOOL32 WINAPI IsValidSid (LPSID pSid);
BOOL32 WINAPI EqualSid (LPSID pSid1, LPSID pSid2);
BOOL32 WINAPI EqualPrefixSid (LPSID pSid1, LPSID pSid2);
@ -17,31 +21,39 @@ BYTE* WINAPI GetSidSubAuthorityCount(LPSID pSid);
DWORD WINAPI GetLengthSid(LPSID pSid);
BOOL32 WINAPI CopySid(DWORD nDestinationSidLength, LPSID pDestinationSid, LPSID pSourceSid);
/******************************************************************************
* OpenProcessToken [ADVAPI32.109]
* Opens the access token associated with a process
*
* PARAMS
* ProcessHandle [I] Handle to process
* DesiredAccess [I] Desired access to process
* TokenHandle [O] Pointer to handle of open access token
* ProcessHandle [I] Handle to process
* DesiredAccess [I] Desired access to process
* TokenHandle [O] Pointer to handle of open access token
*
* RETURNS STD
*/
BOOL32 WINAPI OpenProcessToken( HANDLE32 ProcessHandle, DWORD DesiredAccess,
HANDLE32 *TokenHandle )
BOOL32 WINAPI
OpenProcessToken( HANDLE32 ProcessHandle, DWORD DesiredAccess,
HANDLE32 *TokenHandle )
{
FIXME(advapi,"(%08x,%08lx,%p): stub\n",ProcessHandle,DesiredAccess,
TokenHandle);
return TRUE;
}
/***********************************************************************
* OpenThreadToken [ADVAPI32.114]
/******************************************************************************
* OpenThreadToken [ADVAPI32.114]
*
* PARAMS
* thread []
* desiredaccess []
* openasself []
* thandle []
*/
BOOL32 WINAPI OpenThreadToken( HANDLE32 thread,DWORD desiredaccess,
BOOL32 openasself,HANDLE32 *thandle )
BOOL32 WINAPI
OpenThreadToken( HANDLE32 thread, DWORD desiredaccess, BOOL32 openasself,
HANDLE32 *thandle )
{
FIXME(advapi,"(%08x,%08lx,%d,%p): stub!\n",
thread,desiredaccess,openasself,thandle);
@ -51,10 +63,10 @@ BOOL32 WINAPI OpenThreadToken( HANDLE32 thread,DWORD desiredaccess,
/******************************************************************************
* LookupPrivilegeValue32A [ADVAPI32.92]
* LookupPrivilegeValue32A [ADVAPI32.92]
*/
BOOL32 WINAPI LookupPrivilegeValue32A( LPCSTR lpSystemName,
LPCSTR lpName, LPVOID lpLuid)
BOOL32 WINAPI
LookupPrivilegeValue32A( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
{
LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
@ -64,78 +76,98 @@ BOOL32 WINAPI LookupPrivilegeValue32A( LPCSTR lpSystemName,
return ret;
}
/******************************************************************************
* LookupPrivilegeValue32W [ADVAPI32.93]
* LookupPrivilegeValue32W [ADVAPI32.93]
* Retrieves LUID used on a system to represent the privilege name.
*
* NOTES
* lpLuid should be PLUID
* lpLuid should be PLUID
*
* PARAMS
* lpSystemName [I] Address of string specifying the system
* lpName [I] Address of string specifying the privilege
* lpLuid [I] Address of locally unique identifier
* lpSystemName [I] Address of string specifying the system
* lpName [I] Address of string specifying the privilege
* lpLuid [I] Address of locally unique identifier
*
* RETURNS STD
*/
BOOL32 WINAPI LookupPrivilegeValue32W( LPCWSTR lpSystemName,
LPCWSTR lpName, LPVOID lpLuid )
BOOL32 WINAPI
LookupPrivilegeValue32W( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
{
FIXME(advapi,"(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
debugstr_w(lpName), lpLuid);
return TRUE;
}
/******************************************************************************
* GetFileSecurityA [ADVAPI32.45]
* GetFileSecurity32A [ADVAPI32.45]
*
* Obtains Specified information about the security of a file or directory
* The information obtained is constrained by the callers acces rights and
* priviliges
*/
BOOL32 WINAPI GetFileSecurity32A( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
LPSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength,
LPDWORD lpnLengthNeeded)
BOOL32 WINAPI
GetFileSecurity32A( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
LPSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
{
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
return TRUE;
}
/******************************************************************************
* GetFileSecurityiW [ADVAPI32.46]
* GetFileSecurity32W [ADVAPI32.46]
*
* Obtains Specified information about the security of a file or directory
* The information obtained is constrained by the callers acces rights and
* priviliges
*
* PARAMS
* lpFileName []
* RequestedInformation []
* pSecurityDescriptor []
* nLength []
* lpnLengthNeeded []
*/
BOOL32 WINAPI GetFileSecurity32W( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
LPSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength,
LPDWORD lpnLengthNeeded)
BOOL32 WINAPI
GetFileSecurity32W( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
LPSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
{
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
return TRUE;
}
/***********************************************************************
* AdjustTokenPrivileges [ADVAPI32.10]
/******************************************************************************
* AdjustTokenPrivileges [ADVAPI32.10]
*
* PARAMS
* TokenHandle []
* DisableAllPrivileges []
* NewState []
* BufferLength []
* PreviousState []
* ReturnLength []
*/
BOOL32 WINAPI AdjustTokenPrivileges(HANDLE32 TokenHandle,BOOL32 DisableAllPrivileges,
LPVOID NewState,DWORD BufferLength,LPVOID PreviousState,
LPDWORD ReturnLength )
BOOL32 WINAPI
AdjustTokenPrivileges( HANDLE32 TokenHandle, BOOL32 DisableAllPrivileges,
LPVOID NewState, DWORD BufferLength,
LPVOID PreviousState, LPDWORD ReturnLength )
{
return TRUE;
}
/***********************************************************************
* CopySid [ADVAPI.24]
/******************************************************************************
* CopySid [ADVAPI32.24]
*
* PARAMS
* nDestinationSidLength []
* pDestinationSid []
* pSourceSid []
*/
BOOL32 WINAPI CopySid (DWORD nDestinationSidLength, LPSID pDestinationSid,
LPSID pSourceSid)
BOOL32 WINAPI
CopySid( DWORD nDestinationSidLength, LPSID pDestinationSid, LPSID pSourceSid )
{
if (!IsValidSid(pSourceSid))
@ -149,20 +181,31 @@ BOOL32 WINAPI CopySid (DWORD nDestinationSidLength, LPSID pDestinationSid,
return TRUE;
}
/***********************************************************************
* IsValidSid (ADVAPI.80)
/******************************************************************************
* IsValidSid [ADVAPI32.80]
*
* PARAMS
* pSid []
*/
BOOL32 WINAPI IsValidSid (LPSID pSid) {
BOOL32 WINAPI
IsValidSid( LPSID pSid )
{
if (!pSid || pSid->Revision != SID_REVISION)
return FALSE;
return TRUE;
}
/***********************************************************************
* EqualSid (ADVAPI.40)
/******************************************************************************
* EqualSid [ADVAPI32.40]
*
* PARAMS
* pSid1 []
* pSid2 []
*/
BOOL32 WINAPI EqualSid (LPSID pSid1, LPSID pSid2) {
BOOL32 WINAPI
EqualSid( LPSID pSid1, LPSID pSid2 )
{
if (!IsValidSid(pSid1) || !IsValidSid(pSid2))
return FALSE;
@ -175,8 +218,8 @@ BOOL32 WINAPI EqualSid (LPSID pSid1, LPSID pSid2) {
return TRUE;
}
/***********************************************************************
* EqualPrefixSid (ADVAPI.39)
/******************************************************************************
* EqualPrefixSid [ADVAPI32.39]
*/
BOOL32 WINAPI EqualPrefixSid (LPSID pSid1, LPSID pSid2) {
if (!IsValidSid(pSid1) || !IsValidSid(pSid2))
@ -192,36 +235,65 @@ BOOL32 WINAPI EqualPrefixSid (LPSID pSid1, LPSID pSid2) {
return TRUE;
}
/***********************************************************************
* GetSidLengthRequired (ADVAPI.63)
/******************************************************************************
* GetSidLengthRequired [ADVAPI32.63]
*
* PARAMS
* nSubAuthorityCount []
*/
DWORD WINAPI GetSidLengthRequired (BYTE nSubAuthorityCount) {
DWORD WINAPI
GetSidLengthRequired( BYTE nSubAuthorityCount )
{
return sizeof (SID) + (nSubAuthorityCount - 1) * sizeof (DWORD);
}
/***********************************************************************
* GetTokenInformation [ADVAPI32.66]
/******************************************************************************
* GetTokenInformation [ADVAPI32.66]
*
* PARAMS
* token []
* tokeninfoclass []
* tokeninfo []
* tokeninfolength []
* retlen []
*
* FIXME
* tokeninfoclas should be TOKEN_INFORMATION_CLASS
*/
BOOL32 WINAPI GetTokenInformation(
HANDLE32 token,/*TOKEN_INFORMATION_CLASS*/ DWORD tokeninfoclass,LPVOID tokeninfo,
DWORD tokeninfolength,LPDWORD retlen
) {
BOOL32 WINAPI
GetTokenInformation( HANDLE32 token, DWORD tokeninfoclass, LPVOID tokeninfo,
DWORD tokeninfolength, LPDWORD retlen )
{
FIXME(advapi,"(%08x,%ld,%p,%ld,%p): stub\n",
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
return TRUE;
}
/***********************************************************************
* AllocateAndInitializeSid (ADVAPI.11)
/******************************************************************************
* AllocateAndInitializeSid [ADVAPI32.11]
*
* PARAMS
* pIdentifierAuthority []
* nSubAuthorityCount []
* nSubAuthority0 []
* nSubAuthority1 []
* nSubAuthority2 []
* nSubAuthority3 []
* nSubAuthority4 []
* nSubAuthority5 []
* nSubAuthority6 []
* nSubAuthority7 []
* pSid []
*/
BOOL32 WINAPI AllocateAndInitializeSid(LPSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount,
DWORD nSubAuthority0, DWORD nSubAuthority1,
DWORD nSubAuthority2, DWORD nSubAuthority3,
DWORD nSubAuthority4, DWORD nSubAuthority5,
DWORD nSubAuthority6, DWORD nSubAuthority7,
LPSID *pSid) {
BOOL32 WINAPI
AllocateAndInitializeSid( LPSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount,
DWORD nSubAuthority0, DWORD nSubAuthority1,
DWORD nSubAuthority2, DWORD nSubAuthority3,
DWORD nSubAuthority4, DWORD nSubAuthority5,
DWORD nSubAuthority6, DWORD nSubAuthority7,
LPSID *pSid )
{
if (!(*pSid = HeapAlloc( GetProcessHeap(), 0,
GetSidLengthRequired(nSubAuthorityCount))))
return FALSE;
@ -319,53 +391,75 @@ BOOL32 WINAPI InitializeSid (LPSID pSid, LPSID_IDENTIFIER_AUTHORITY pIdentifierA
return TRUE;
}
/***********************************************************************
* GetSidIdentifierAuthority (ADVAPI.62)
/******************************************************************************
* GetSidIdentifierAuthority [ADVAPI32.62]
*
* PARAMS
* pSid []
*/
LPSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority (LPSID pSid)
LPSID_IDENTIFIER_AUTHORITY WINAPI
GetSidIdentifierAuthority( LPSID pSid )
{
return &pSid->IdentifierAuthority;
}
/***********************************************************************
* GetSidSubAuthority (ADVAPI.64)
/******************************************************************************
* GetSidSubAuthority [ADVAPI32.64]
*
* PARAMS
* pSid []
* nSubAuthority []
*/
DWORD * WINAPI GetSidSubAuthority (LPSID pSid, DWORD nSubAuthority)
DWORD * WINAPI
GetSidSubAuthority( LPSID pSid, DWORD nSubAuthority )
{
return &pSid->SubAuthority[nSubAuthority];
}
/***********************************************************************
* GetSidSubAuthorityCount [ADVAPI.65]
/******************************************************************************
* GetSidSubAuthorityCount [ADVAPI32.65]
*
* PARAMS
* pSid []
*/
BYTE * WINAPI GetSidSubAuthorityCount (LPSID pSid)
BYTE * WINAPI
GetSidSubAuthorityCount (LPSID pSid)
{
return &pSid->SubAuthorityCount;
}
/***********************************************************************
* GetLengthSid [ADVAPI.48]
/******************************************************************************
* GetLengthSid [ADVAPI32.48]
*
* PARAMS
* pSid []
*/
DWORD WINAPI GetLengthSid (LPSID pSid)
DWORD WINAPI
GetLengthSid (LPSID pSid)
{
return GetSidLengthRequired(*GetSidSubAuthorityCount(pSid));
}
/******************************************************************************
* IsValidSecurityDescriptor [ADVAPI32]
* IsValidSecurityDescriptor [ADVAPI32.79]
*
* PARAMS
* lpsecdesc []
*/
BOOL32 WINAPI IsValidSecurityDescriptor(LPSECURITY_DESCRIPTOR lpsecdesc) {
FIXME(advapi,"(%p),stub!\n",lpsecdesc);
BOOL32 WINAPI
IsValidSecurityDescriptor( LPSECURITY_DESCRIPTOR lpsecdesc )
{
FIXME(advapi,"(%p):stub\n",lpsecdesc);
return TRUE;
}
/***********************************************************************
* LookupAccountSidA [ADVAPI32.86]
/******************************************************************************
* LookupAccountSid32A [ADVAPI32.86]
*/
BOOL32 WINAPI LookupAccountSid32A(LPCSTR system,PSID sid,
LPCSTR account,LPDWORD accountSize,
LPCSTR domain, LPDWORD domainSize,
PSID_NAME_USE name_use)
BOOL32 WINAPI
LookupAccountSid32A( LPCSTR system, PSID sid, LPCSTR account,
LPDWORD accountSize, LPCSTR domain, LPDWORD domainSize,
PSID_NAME_USE name_use )
{
FIXME(security,"(%s,%p,%p,%p,%p,%p,%p): stub\n",
system,sid,account,accountSize,domain,domainSize,name_use);
@ -373,13 +467,22 @@ BOOL32 WINAPI LookupAccountSid32A(LPCSTR system,PSID sid,
return FALSE;
}
/***********************************************************************
* LookupAccountSidW [ADVAPI32.86]
/******************************************************************************
* LookupAccountSid32W [ADVAPI32.87]
*
* PARAMS
* system []
* sid []
* account []
* accountSize []
* domain []
* domainSize []
* name_use []
*/
BOOL32 WINAPI LookupAccountSid32W(LPCWSTR system,PSID sid,
LPCWSTR account,LPDWORD accountSize,
LPCWSTR domain, LPDWORD domainSize,
PSID_NAME_USE name_use)
BOOL32 WINAPI
LookupAccountSid32W( LPCWSTR system, PSID sid, LPCWSTR account,
LPDWORD accountSize, LPCWSTR domain, LPDWORD domainSize,
PSID_NAME_USE name_use )
{
FIXME(security,"(%p,%p,%p,%p,%p,%p,%p): stub\n",
system,sid,account,accountSize,domain,domainSize,name_use);
@ -388,10 +491,9 @@ BOOL32 WINAPI LookupAccountSid32W(LPCWSTR system,PSID sid,
}
/******************************************************************************
* SetFileSecurityA [ADVAPI32.182]
* SetFileSecurity32A [ADVAPI32.182]
* Sets the security of a file or directory
*/
BOOL32 WINAPI SetFileSecurity32A( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
LPSECURITY_DESCRIPTOR pSecurityDescriptor)
@ -401,57 +503,95 @@ BOOL32 WINAPI SetFileSecurity32A( LPCSTR lpFileName,
}
/******************************************************************************
* SetFileSecurityW [ADVAPI32.183]
* SetFileSecurity32W [ADVAPI32.183]
* Sets the security of a file or directory
*
* PARAMS
* lpFileName []
* RequestedInformation []
* pSecurityDescriptor []
*/
BOOL32 WINAPI SetFileSecurity32W( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
LPSECURITY_DESCRIPTOR pSecurityDescriptor)
BOOL32 WINAPI
SetFileSecurity32W( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
LPSECURITY_DESCRIPTOR pSecurityDescriptor )
{
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
return TRUE;
}
/******************************************************************************
* MakeSelfRelativeSD [ADVAPI32]
* MakeSelfRelativeSD [ADVAPI32.95]
*
* PARAMS
* lpabssecdesc []
* lpselfsecdesc []
* lpbuflen []
*/
BOOL32 WINAPI MakeSelfRelativeSD(
LPSECURITY_DESCRIPTOR lpabssecdesc,
LPSECURITY_DESCRIPTOR lpselfsecdesc,LPDWORD lpbuflen
) {
BOOL32 WINAPI
MakeSelfRelativeSD( LPSECURITY_DESCRIPTOR lpabssecdesc,
LPSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen )
{
FIXME(advapi,"(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen);
return TRUE;
}
/******************************************************************************
* QueryWindows31FilesMigration [ADVAPI32]
* QueryWindows31FilesMigration [ADVAPI32.266]
*
* PARAMS
* x1 []
*/
BOOL32 WINAPI QueryWindows31FilesMigration(DWORD x1) {
FIXME(advapi,"(%ld),stub!\n",x1);
BOOL32 WINAPI
QueryWindows31FilesMigration( DWORD x1 )
{
FIXME(advapi,"(%ld):stub\n",x1);
return TRUE;
}
/******************************************************************************
* SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32]
* SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32.265]
*
* PARAMS
* x1 []
* x2 []
* x3 []
* x4 []
*/
BOOL32 WINAPI SynchronizeWindows31FilesAndWindowsNTRegistry(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
BOOL32 WINAPI
SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
DWORD x4 )
{
FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
return TRUE;
}
/******************************************************************************
* LsaOpenPolicy [ADVAPI32]
* LsaOpenPolicy [ADVAPI32.200]
*
* PARAMS
* x1 []
* x2 []
* x3 []
* x4 []
*/
BOOL32 WINAPI LsaOpenPolicy(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
BOOL32 WINAPI
LsaOpenPolicy( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
{
FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
return 0xc0000000; /* generic error */
}
/******************************************************************************
* NotifyBootConfigStatus [ADVAPI32]
* NotifyBootConfigStatus [ADVAPI32.97]
*
* PARAMS
* x1 []
*/
BOOL32 WINAPI NotifyBootConfigStatus(DWORD x1) {
FIXME(advapi,"(0x%08lx),stub!\n",x1);
BOOL32 WINAPI
NotifyBootConfigStatus( DWORD x1 )
{
FIXME(advapi,"(0x%08lx):stub\n",x1);
return 1;
}

View File

@ -10,23 +10,26 @@
#include "heap.h"
#include <time.h>
/***********************************************************************
* EnumServicesStatus32A [ADVAPI32.37]
/******************************************************************************
* EnumServicesStatus32A [ADVAPI32.38]
*/
BOOL32 WINAPI EnumServicesStatus32A( HANDLE32 hSCManager, DWORD dwServiceType,
DWORD dwServiceState, LPVOID lpServices,
DWORD cbBufSize, LPDWORD pcbBytesNeeded,
LPDWORD lpServicesReturned, LPDWORD lpResumeHandle)
BOOL32 WINAPI
EnumServicesStatus32A( HANDLE32 hSCManager, DWORD dwServiceType,
DWORD dwServiceState, LPVOID lpServices,
DWORD cbBufSize, LPDWORD pcbBytesNeeded,
LPDWORD lpServicesReturned, LPDWORD lpResumeHandle )
{ FIXME (advapi,"%x type=%lx state=%lx %p %lx %p %p %p\n", hSCManager,
dwServiceType, dwServiceState, lpServices, cbBufSize,
pcbBytesNeeded, lpServicesReturned, lpResumeHandle);
SetLastError (ERROR_ACCESS_DENIED);
return 0;
}
/***********************************************************************
* StartServiceCtrlDispatcherA [ADVAPI32.196]
/******************************************************************************
* StartServiceCtrlDispatcher32A [ADVAPI32.196]
*/
BOOL32 WINAPI StartServiceCtrlDispatcher32A(LPSERVICE_TABLE_ENTRY32A servent)
BOOL32 WINAPI
StartServiceCtrlDispatcher32A( LPSERVICE_TABLE_ENTRY32A servent )
{ LPSERVICE_TABLE_ENTRY32A ptr = servent;
while (ptr->lpServiceName)
@ -36,10 +39,14 @@ BOOL32 WINAPI StartServiceCtrlDispatcher32A(LPSERVICE_TABLE_ENTRY32A servent)
return TRUE;
}
/***********************************************************************
* StartServiceCtrlDispatcherW [ADVAPI32.197]
/******************************************************************************
* StartServiceCtrlDispatcher32W [ADVAPI32.197]
*
* PARAMS
* servent []
*/
BOOL32 WINAPI StartServiceCtrlDispatcher32W(LPSERVICE_TABLE_ENTRY32W servent)
BOOL32 WINAPI
StartServiceCtrlDispatcher32W( LPSERVICE_TABLE_ENTRY32W servent )
{ LPSERVICE_TABLE_ENTRY32W ptr = servent;
LPSERVICE_MAIN_FUNCTION32W fpMain;
@ -52,26 +59,43 @@ BOOL32 WINAPI StartServiceCtrlDispatcher32W(LPSERVICE_TABLE_ENTRY32W servent)
return TRUE;
}
/* FIXME: Where do these belong? */
typedef DWORD SERVICE_STATUS_HANDLE;
typedef VOID (WINAPI *LPHANDLER_FUNCTION)( DWORD dwControl);
/***********************************************************************
* RegisterServiceCtrlHandlerA [ADVAPI32.176]
/*****************************************************************************
* RegisterServiceCtrlHandlerA [ADVAPI32.176]
*/
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA (LPSTR lpServiceName, LPHANDLER_FUNCTION lpfHandler)
SERVICE_STATUS_HANDLE WINAPI
RegisterServiceCtrlHandlerA( LPSTR lpServiceName,
LPHANDLER_FUNCTION lpfHandler )
{ FIXME(advapi,"%s %p\n", lpServiceName, lpfHandler);
return 0xcacacafe;
}
/***********************************************************************
* RegisterServiceCtrlHandlerW [ADVAPI32.177]
/******************************************************************************
* RegisterServiceCtrlHandlerW [ADVAPI32.177]
*
* PARAMS
* lpServiceName []
* lpfHandler []
*/
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW (LPWSTR lpServiceName, LPHANDLER_FUNCTION lpfHandler)
SERVICE_STATUS_HANDLE WINAPI
RegisterServiceCtrlHandlerW( LPWSTR lpServiceName,
LPHANDLER_FUNCTION lpfHandler )
{ FIXME(advapi,"%s %p\n", debugstr_w(lpServiceName), lpfHandler);
return 0xcacacafe;
}
/***********************************************************************
* SetServiceStatus [ADVAPI32.192]
/******************************************************************************
* SetServiceStatus [ADVAPI32.192]
*
* PARAMS
* hService []
* lpStatus []
*/
BOOL32 WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE hService, LPSERVICE_STATUS lpStatus)
BOOL32 WINAPI
SetServiceStatus( SERVICE_STATUS_HANDLE hService, LPSERVICE_STATUS lpStatus )
{ FIXME(advapi,"%lx %p\n",hService, lpStatus);
TRACE(advapi,"\tType:%lx\n",lpStatus->dwServiceType);
TRACE(advapi,"\tState:%lx\n",lpStatus->dwCurrentState);
@ -86,8 +110,9 @@ BOOL32 WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE hService, LPSERVICE_STATUS
/******************************************************************************
* OpenSCManager32A [ADVAPI32.110]
*/
HANDLE32 WINAPI OpenSCManager32A( LPCSTR lpMachineName, LPCSTR lpDatabaseName,
DWORD dwDesiredAccess )
HANDLE32 WINAPI
OpenSCManager32A( LPCSTR lpMachineName, LPCSTR lpDatabaseName,
DWORD dwDesiredAccess )
{
LPWSTR lpMachineNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpMachineName);
LPWSTR lpDatabaseNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpDatabaseName);
@ -98,25 +123,25 @@ HANDLE32 WINAPI OpenSCManager32A( LPCSTR lpMachineName, LPCSTR lpDatabaseName,
return ret;
}
/******************************************************************************
* OpenSCManager32W [ADVAPI32.111]
* Establishes a connection to the service control manager and opens database
*
* NOTES
* This should return a SC_HANDLE
* This should return a SC_HANDLE
*
* PARAMS
* lpMachineName [I] Pointer to machine name string
* lpDatabaseName [I] Pointer to database name string
* dwDesiredAccess [I] Type of access
* lpMachineName [I] Pointer to machine name string
* lpDatabaseName [I] Pointer to database name string
* dwDesiredAccess [I] Type of access
*
* RETURNS
* Success: Handle to service control manager database
* Failure: NULL
* Success: Handle to service control manager database
* Failure: NULL
*/
HANDLE32 WINAPI OpenSCManager32W( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
DWORD dwDesiredAccess )
HANDLE32 WINAPI
OpenSCManager32W( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
DWORD dwDesiredAccess )
{
FIXME(advapi,"(%s,%s,0x%08lx): stub\n", debugstr_w(lpMachineName),
debugstr_w(lpDatabaseName), dwDesiredAccess);
@ -124,7 +149,15 @@ HANDLE32 WINAPI OpenSCManager32W( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
}
BOOL32 WINAPI AllocateLocallyUniqueId(LPLUID lpluid) {
/******************************************************************************
* AllocateLocallyUniqueId [ADVAPI32.12]
*
* PARAMS
* lpluid []
*/
BOOL32 WINAPI
AllocateLocallyUniqueId( LPLUID lpluid )
{
lpluid->LowPart = time(NULL);
lpluid->HighPart = 0;
return TRUE;
@ -135,13 +168,19 @@ BOOL32 WINAPI AllocateLocallyUniqueId(LPLUID lpluid) {
* ControlService [ADVAPI32.23]
* Sends a control code to a Win32-based service.
*
* PARAMS
* hService []
* dwControl []
* lpServiceStatus []
*
* NOTES
* hService should be SC_HANDLE
*
* RETURNS STD
*/
BOOL32 WINAPI ControlService( HANDLE32 hService, DWORD dwControl,
LPSERVICE_STATUS lpServiceStatus )
BOOL32 WINAPI
ControlService( HANDLE32 hService, DWORD dwControl,
LPSERVICE_STATUS lpServiceStatus )
{
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwControl,lpServiceStatus);
return TRUE;
@ -153,14 +192,15 @@ BOOL32 WINAPI ControlService( HANDLE32 hService, DWORD dwControl,
* Close handle to service or service control manager
*
* PARAMS
* hSCObject [I] Handle to service or service control manager database
* hSCObject [I] Handle to service or service control manager database
*
* NOTES
* hSCObject should be SC_HANDLE
* hSCObject should be SC_HANDLE
*
* RETURNS STD
*/
BOOL32 WINAPI CloseServiceHandle( HANDLE32 hSCObject )
BOOL32 WINAPI
CloseServiceHandle( HANDLE32 hSCObject )
{
FIXME(advapi, "(%d): stub\n", hSCObject);
return TRUE;
@ -170,8 +210,9 @@ BOOL32 WINAPI CloseServiceHandle( HANDLE32 hSCObject )
/******************************************************************************
* OpenService32A [ADVAPI32.112]
*/
HANDLE32 WINAPI OpenService32A( HANDLE32 hSCManager, LPCSTR lpServiceName,
DWORD dwDesiredAccess )
HANDLE32 WINAPI
OpenService32A( HANDLE32 hSCManager, LPCSTR lpServiceName,
DWORD dwDesiredAccess )
{
LPWSTR lpServiceNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpServiceName);
DWORD ret = OpenService32W( hSCManager, lpServiceNameW, dwDesiredAccess);
@ -184,6 +225,11 @@ HANDLE32 WINAPI OpenService32A( HANDLE32 hSCManager, LPCSTR lpServiceName,
* OpenService32W [ADVAPI32.113]
* Opens a handle to an existing service
*
* PARAMS
* hSCManager []
* lpServiceName []
* dwDesiredAccess []
*
* NOTES
* The return value should be SC_HANDLE
* hSCManager should be SC_HANDLE
@ -192,8 +238,9 @@ HANDLE32 WINAPI OpenService32A( HANDLE32 hSCManager, LPCSTR lpServiceName,
* Success: Handle to the service
* Failure: NULL
*/
HANDLE32 WINAPI OpenService32W( HANDLE32 hSCManager, LPCWSTR lpServiceName,
DWORD dwDesiredAccess )
HANDLE32 WINAPI
OpenService32W(HANDLE32 hSCManager, LPCWSTR lpServiceName,
DWORD dwDesiredAccess)
{
FIXME(advapi, "(%d,%p,%ld): stub\n",hSCManager, lpServiceName,
dwDesiredAccess);
@ -202,15 +249,16 @@ HANDLE32 WINAPI OpenService32W( HANDLE32 hSCManager, LPCWSTR lpServiceName,
/******************************************************************************
* CreateService32A [ADVAPI32.28]
* CreateService32A [ADVAPI32.29]
*/
DWORD WINAPI CreateService32A( DWORD hSCManager, LPCSTR lpServiceName,
LPCSTR lpDisplayName, DWORD dwDesiredAccess,
DWORD dwServiceType, DWORD dwStartType,
DWORD dwErrorControl, LPCSTR lpBinaryPathName,
LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId,
LPCSTR lpDependencies, LPCSTR lpServiceStartName,
LPCSTR lpPassword )
DWORD WINAPI
CreateService32A( DWORD hSCManager, LPCSTR lpServiceName,
LPCSTR lpDisplayName, DWORD dwDesiredAccess,
DWORD dwServiceType, DWORD dwStartType,
DWORD dwErrorControl, LPCSTR lpBinaryPathName,
LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId,
LPCSTR lpDependencies, LPCSTR lpServiceStartName,
LPCSTR lpPassword )
{
FIXME(advapi, "(%ld,%s,%s,...): stub\n",
hSCManager, debugstr_a(lpServiceName), debugstr_a(lpDisplayName));
@ -229,7 +277,8 @@ DWORD WINAPI CreateService32A( DWORD hSCManager, LPCSTR lpServiceName,
* NOTES
* hService should be SC_HANDLE
*/
BOOL32 WINAPI DeleteService( HANDLE32 hService )
BOOL32 WINAPI
DeleteService( HANDLE32 hService )
{
FIXME(advapi, "(%d): stub\n",hService);
return TRUE;
@ -242,8 +291,9 @@ BOOL32 WINAPI DeleteService( HANDLE32 hService )
* NOTES
* How do we convert lpServiceArgVectors to use the 32W version?
*/
BOOL32 WINAPI StartService32A( HANDLE32 hService, DWORD dwNumServiceArgs,
LPCSTR *lpServiceArgVectors )
BOOL32 WINAPI
StartService32A( HANDLE32 hService, DWORD dwNumServiceArgs,
LPCSTR *lpServiceArgVectors )
{
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwNumServiceArgs,lpServiceArgVectors);
return TRUE;
@ -255,17 +305,18 @@ BOOL32 WINAPI StartService32A( HANDLE32 hService, DWORD dwNumServiceArgs,
* Starts a service
*
* PARAMS
* hService [I] Handle of service
* dwNumServiceArgs [I] Number of arguments
* lpServiceArgVectors [I] Address of array of argument string pointers
* hService [I] Handle of service
* dwNumServiceArgs [I] Number of arguments
* lpServiceArgVectors [I] Address of array of argument string pointers
*
* RETURNS STD
*
* NOTES
* hService should be SC_HANDLE
* hService should be SC_HANDLE
*/
BOOL32 WINAPI StartService32W( HANDLE32 hService, DWORD dwNumServiceArgs,
LPCWSTR *lpServiceArgVectors )
BOOL32 WINAPI
StartService32W( HANDLE32 hService, DWORD dwNumServiceArgs,
LPCWSTR *lpServiceArgVectors )
{
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwNumServiceArgs,
lpServiceArgVectors);
@ -273,9 +324,19 @@ BOOL32 WINAPI StartService32W( HANDLE32 hService, DWORD dwNumServiceArgs,
}
/******************************************************************************
* QueryServiceStatus [ADVAPI32]
* QueryServiceStatus [ADVAPI32.123]
*
* PARAMS
* hService []
* lpservicestatus []
*
* FIXME
* hService should be SC_HANDLE
* lpservicestatus should be LPSERVICE_STATUS
*/
BOOL32 WINAPI QueryServiceStatus(/*SC_HANDLE*/HANDLE32 hService,/*LPSERVICE_STATUS*/LPVOID lpservicestatus) {
BOOL32 WINAPI
QueryServiceStatus( HANDLE32 hService, LPVOID lpservicestatus )
{
FIXME(advapi,"(%d,%p),stub!\n",hService,lpservicestatus);
return TRUE;
}