Moved ADVAPI32 files to dlls/advapi32.
Added stubs for eventlog functions.
This commit is contained in:
parent
afb1d2e8ec
commit
f7b0de3f26
|
@ -28,6 +28,7 @@ LIBSUBDIRS = \
|
|||
tools/wrc \
|
||||
controls \
|
||||
console \
|
||||
dlls/advapi32 \
|
||||
dlls/comctl32 \
|
||||
dlls/imagehlp \
|
||||
dlls/msacm \
|
||||
|
@ -93,6 +94,7 @@ INSTALLSUBDIRS = $(DOCSUBDIRS)
|
|||
LIBOBJS = \
|
||||
controls/controls.o \
|
||||
console/console.o \
|
||||
dlls/advapi32/advapi32.o \
|
||||
dlls/comctl32/comctl32.o \
|
||||
dlls/imagehlp/imagehlp.o \
|
||||
dlls/msacm/msacm.o \
|
||||
|
|
|
@ -3905,6 +3905,7 @@ console/Makefile
|
|||
controls/Makefile
|
||||
debugger/Makefile
|
||||
dlls/Makefile
|
||||
dlls/advapi32/Makefile
|
||||
dlls/comctl32/Makefile
|
||||
dlls/imagehlp/Makefile
|
||||
dlls/msacm/Makefile
|
||||
|
@ -4058,6 +4059,7 @@ console/Makefile
|
|||
controls/Makefile
|
||||
debugger/Makefile
|
||||
dlls/Makefile
|
||||
dlls/advapi32/Makefile
|
||||
dlls/comctl32/Makefile
|
||||
dlls/imagehlp/Makefile
|
||||
dlls/msacm/Makefile
|
||||
|
|
|
@ -557,6 +557,7 @@ console/Makefile
|
|||
controls/Makefile
|
||||
debugger/Makefile
|
||||
dlls/Makefile
|
||||
dlls/advapi32/Makefile
|
||||
dlls/comctl32/Makefile
|
||||
dlls/imagehlp/Makefile
|
||||
dlls/msacm/Makefile
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
SUBDIRS = \
|
||||
advapi32 \
|
||||
comctl32 \
|
||||
imagehlp \
|
||||
msacm \
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Makefile
|
|
@ -0,0 +1,21 @@
|
|||
DEFS = @DLLFLAGS@ -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = advapi32
|
||||
|
||||
C_SRCS = \
|
||||
advapi.c \
|
||||
eventlog.c \
|
||||
security.c \
|
||||
service.c
|
||||
|
||||
all: check_wrc $(MODULE).o
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
$(RC_SRCS:.rc=.s): $(WRC)
|
||||
|
||||
### Dependencies:
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Win32 advapi functions
|
||||
*
|
||||
* Copyright 1995 Sven Verdoolaege
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "winerror.h"
|
||||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
/***********************************************************************
|
||||
* GetUserNameA [ADVAPI32.67]
|
||||
*/
|
||||
BOOL32 WINAPI GetUserName32A(LPSTR lpszName, LPDWORD lpSize)
|
||||
{
|
||||
size_t len;
|
||||
char *name;
|
||||
|
||||
name=getlogin();
|
||||
#if 0
|
||||
/* FIXME: should use getpwuid() here */
|
||||
if (!name) name=cuserid(NULL);
|
||||
#endif
|
||||
len = name ? strlen(name) : 0;
|
||||
if (!len || !lpSize || len > *lpSize) {
|
||||
if (lpszName) *lpszName = 0;
|
||||
return 0;
|
||||
}
|
||||
*lpSize=len;
|
||||
strcpy(lpszName, name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetUserNameW [ADVAPI32.68]
|
||||
*/
|
||||
BOOL32 WINAPI GetUserName32W(LPWSTR lpszName, LPDWORD lpSize)
|
||||
{
|
||||
LPSTR name = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *lpSize );
|
||||
DWORD size = *lpSize;
|
||||
BOOL32 res = GetUserName32A(name,lpSize);
|
||||
|
||||
lstrcpynAtoW(lpszName,name,size);
|
||||
HeapFree( GetProcessHeap(), 0, name );
|
||||
return res;
|
||||
}
|
|
@ -0,0 +1,204 @@
|
|||
/*
|
||||
* Win32 advapi functions
|
||||
*
|
||||
* Copyright 1995 Sven Verdoolaege, 1998 Juergen Schmied
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "winerror.h"
|
||||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
|
||||
/******************************************************************************
|
||||
* BackupEventLog32A [ADVAPI32.15]
|
||||
*/
|
||||
BOOL32 WINAPI BackupEventLog32A( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
/******************************************************************************
|
||||
* BackupEventLog32W [ADVAPI32.16]
|
||||
*/
|
||||
BOOL32 WINAPI BackupEventLog32W( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ClearEventLog32A [ADVAPI32.19]
|
||||
*/
|
||||
BOOL32 WINAPI ClearEventLog32A ( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ClearEventLog32W [ADVAPI32.20]
|
||||
*/
|
||||
BOOL32 WINAPI ClearEventLog32W ( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CloseEventLog32 [ADVAPI32.21]
|
||||
*/
|
||||
BOOL32 WINAPI CloseEventLog32 ( HANDLE32 hEventLog )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* DeregisterEventSource32 [ADVAPI32.32]
|
||||
* Closes a handle to the specified event log
|
||||
*
|
||||
* PARAMS
|
||||
* hEventLog [I] Handle to event log
|
||||
*
|
||||
* RETURNS STD
|
||||
*/
|
||||
BOOL32 WINAPI DeregisterEventSource32( HANDLE32 hEventLog )
|
||||
{
|
||||
FIXME(advapi, "(%d): stub\n",hEventLog);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetNumberOfEventLogRecords32 [ADVAPI32.49]
|
||||
*/
|
||||
BOOL32 WINAPI GetNumberOfEventLogRecords32( HANDLE32 hEventLog, PDWORD NumberOfRecords )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetOldestEventLogRecord [ADVAPI32.50]
|
||||
*/
|
||||
BOOL32 WINAPI GetOldestEventLogRecord32( HANDLE32 hEventLog, PDWORD OldestRecord )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* NotifyChangeEventLog32 [ADVAPI32.98]
|
||||
*/
|
||||
BOOL32 WINAPI NotifyChangeEventLog32( HANDLE32 hEventLog, HANDLE32 hEvent )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* OpenBackupEventLog32A [ADVAPI32.105]
|
||||
*/
|
||||
HANDLE32 WINAPI OpenBackupEventLog32A( LPCSTR lpUNCServerName, LPCSTR lpFileName )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* OpenBackupEventLog32W [ADVAPI32.106]
|
||||
*/
|
||||
HANDLE32 WINAPI OpenBackupEventLog32W( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* OpenEventLogA [ADVAPI32.107]
|
||||
*/
|
||||
HANDLE32 WINAPI OpenEventLog32A(LPCSTR uncname,LPCSTR source)
|
||||
{
|
||||
FIXME(advapi,"(%s,%s),stub!\n",uncname,source);
|
||||
return 0xcafe4242;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* OpenEventLog32W [ADVAPI32.108]
|
||||
*/
|
||||
HANDLE32 WINAPI OpenEventLog32W(LPCWSTR uncname,LPCWSTR source)
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ReadEventLog32A [ADVAPI32.124]
|
||||
*/
|
||||
BOOL32 WINAPI ReadEventLog32A( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
|
||||
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ReadEventLog32W [ADVAPI32.125]
|
||||
*/
|
||||
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]
|
||||
*/
|
||||
HANDLE32 WINAPI RegisterEventSource32A( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
|
||||
{
|
||||
LPWSTR lpUNCServerNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpUNCServerName);
|
||||
LPWSTR lpSourceNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpSourceName);
|
||||
HANDLE32 ret = RegisterEventSource32W(lpUNCServerNameW,lpSourceNameW);
|
||||
HeapFree(GetProcessHeap(),0,lpSourceNameW);
|
||||
HeapFree(GetProcessHeap(),0,lpUNCServerNameW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* 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
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Handle
|
||||
* Failure: NULL
|
||||
*/
|
||||
HANDLE32 WINAPI RegisterEventSource32W( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
|
||||
{
|
||||
FIXME(advapi, "(%s,%s): stub\n", debugstr_w(lpUNCServerName),
|
||||
debugstr_w(lpSourceName));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ReportEvent32A [ADVAPI32.]
|
||||
*/
|
||||
BOOL32 WINAPI ReportEvent32A ( HANDLE32 hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
|
||||
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
|
||||
{
|
||||
FIXME(advapi,"stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ReportEvent32W [ADVAPI32.]
|
||||
*/
|
||||
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;
|
||||
}
|
|
@ -1,10 +1,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windows.h"
|
||||
#include "winerror.h"
|
||||
#include "ntdll.h"
|
||||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
#include "ntdll.h"
|
||||
|
||||
BOOL32 WINAPI IsValidSid (LPSID pSid);
|
||||
BOOL32 WINAPI EqualSid (LPSID pSid1, LPSID pSid2);
|
||||
|
@ -19,6 +17,137 @@ 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
|
||||
*
|
||||
* RETURNS STD
|
||||
*/
|
||||
BOOL32 WINAPI OpenProcessToken( HANDLE32 ProcessHandle, DWORD DesiredAccess,
|
||||
HANDLE32 *TokenHandle )
|
||||
{
|
||||
FIXME(advapi,"(%08x,%08lx,%p): stub\n",ProcessHandle,DesiredAccess,
|
||||
TokenHandle);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* OpenThreadToken [ADVAPI32.114]
|
||||
*/
|
||||
BOOL32 WINAPI OpenThreadToken( HANDLE32 thread,DWORD desiredaccess,
|
||||
BOOL32 openasself,HANDLE32 *thandle )
|
||||
{
|
||||
FIXME(advapi,"(%08x,%08lx,%d,%p): stub!\n",
|
||||
thread,desiredaccess,openasself,thandle);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* LookupPrivilegeValue32A [ADVAPI32.92]
|
||||
*/
|
||||
BOOL32 WINAPI LookupPrivilegeValue32A( LPCSTR lpSystemName,
|
||||
LPCSTR lpName, LPVOID lpLuid)
|
||||
{
|
||||
LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
|
||||
LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
|
||||
BOOL32 ret = LookupPrivilegeValue32W( lpSystemNameW, lpNameW, lpLuid);
|
||||
HeapFree(GetProcessHeap(), 0, lpNameW);
|
||||
HeapFree(GetProcessHeap(), 0, lpSystemNameW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* LookupPrivilegeValue32W [ADVAPI32.93]
|
||||
* Retrieves LUID used on a system to represent the privilege name.
|
||||
*
|
||||
* NOTES
|
||||
* 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
|
||||
*
|
||||
* RETURNS STD
|
||||
*/
|
||||
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]
|
||||
* 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)
|
||||
{
|
||||
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetFileSecurityiW [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
|
||||
*/
|
||||
|
||||
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]
|
||||
*/
|
||||
BOOL32 WINAPI AdjustTokenPrivileges(HANDLE32 TokenHandle,BOOL32 DisableAllPrivileges,
|
||||
LPVOID NewState,DWORD BufferLength,LPVOID PreviousState,
|
||||
LPDWORD ReturnLength )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CopySid [ADVAPI.24]
|
||||
*/
|
||||
BOOL32 WINAPI CopySid (DWORD nDestinationSidLength, LPSID pDestinationSid,
|
||||
LPSID pSourceSid)
|
||||
{
|
||||
|
||||
if (!IsValidSid(pSourceSid))
|
||||
return FALSE;
|
||||
|
||||
if (nDestinationSidLength < GetLengthSid(pSourceSid))
|
||||
return FALSE;
|
||||
|
||||
memcpy(pDestinationSid, pSourceSid, GetLengthSid(pSourceSid));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* IsValidSid (ADVAPI.80)
|
||||
*/
|
||||
|
@ -69,6 +198,18 @@ DWORD WINAPI GetSidLengthRequired (BYTE nSubAuthorityCount) {
|
|||
return sizeof (SID) + (nSubAuthorityCount - 1) * sizeof (DWORD);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetTokenInformation [ADVAPI32.66]
|
||||
*/
|
||||
BOOL32 WINAPI GetTokenInformation(
|
||||
HANDLE32 token,/*TOKEN_INFORMATION_CLASS*/ 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)
|
||||
*/
|
||||
|
@ -166,7 +307,7 @@ DWORD * WINAPI GetSidSubAuthority (LPSID pSid, DWORD nSubAuthority)
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetSidSubAuthorityCount (ADVAPI.65)
|
||||
* GetSidSubAuthorityCount [ADVAPI.65]
|
||||
*/
|
||||
BYTE * WINAPI GetSidSubAuthorityCount (LPSID pSid)
|
||||
{
|
||||
|
@ -174,33 +315,23 @@ BYTE * WINAPI GetSidSubAuthorityCount (LPSID pSid)
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetLengthSid (ADVAPI.48)
|
||||
* GetLengthSid [ADVAPI.48]
|
||||
*/
|
||||
DWORD WINAPI GetLengthSid (LPSID pSid)
|
||||
{
|
||||
return GetSidLengthRequired(*GetSidSubAuthorityCount(pSid));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CopySid (ADVAPI.24)
|
||||
/******************************************************************************
|
||||
* IsValidSecurityDescriptor [ADVAPI32]
|
||||
*/
|
||||
BOOL32 WINAPI CopySid (DWORD nDestinationSidLength, LPSID pDestinationSid,
|
||||
LPSID pSourceSid)
|
||||
{
|
||||
|
||||
if (!IsValidSid(pSourceSid))
|
||||
return FALSE;
|
||||
|
||||
if (nDestinationSidLength < GetLengthSid(pSourceSid))
|
||||
return FALSE;
|
||||
|
||||
memcpy(pDestinationSid, pSourceSid, GetLengthSid(pSourceSid));
|
||||
|
||||
return TRUE;
|
||||
BOOL32 WINAPI IsValidSecurityDescriptor(LPSECURITY_DESCRIPTOR lpsecdesc) {
|
||||
FIXME(advapi,"(%p),stub!\n",lpsecdesc);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LookupAccountSidA [ADVAPI32.86]
|
||||
* LookupAccountSidA [ADVAPI32.86]
|
||||
*/
|
||||
BOOL32 WINAPI LookupAccountSid32A(LPCSTR system,PSID sid,
|
||||
LPCSTR account,LPDWORD accountSize,
|
||||
|
@ -214,7 +345,7 @@ BOOL32 WINAPI LookupAccountSid32A(LPCSTR system,PSID sid,
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LookupAccountSidW [ADVAPI32.86]
|
||||
* LookupAccountSidW [ADVAPI32.86]
|
||||
*/
|
||||
BOOL32 WINAPI LookupAccountSid32W(LPCWSTR system,PSID sid,
|
||||
LPCWSTR account,LPDWORD accountSize,
|
||||
|
@ -227,3 +358,70 @@ BOOL32 WINAPI LookupAccountSid32W(LPCWSTR system,PSID sid,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SetFileSecurityA [ADVAPI32.182]
|
||||
* Sets the security of a file or directory
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI SetFileSecurity32A( LPCSTR lpFileName,
|
||||
SECURITY_INFORMATION RequestedInformation,
|
||||
LPSECURITY_DESCRIPTOR pSecurityDescriptor)
|
||||
{
|
||||
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SetFileSecurityW [ADVAPI32.183]
|
||||
* Sets the security of a file or directory
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI SetFileSecurity32W( LPCWSTR lpFileName,
|
||||
SECURITY_INFORMATION RequestedInformation,
|
||||
LPSECURITY_DESCRIPTOR pSecurityDescriptor)
|
||||
{
|
||||
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
|
||||
return TRUE;
|
||||
}
|
||||
/******************************************************************************
|
||||
* MakeSelfRelativeSD [ADVAPI32]
|
||||
*/
|
||||
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]
|
||||
*/
|
||||
BOOL32 WINAPI QueryWindows31FilesMigration(DWORD x1) {
|
||||
FIXME(advapi,"(%ld),stub!\n",x1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32]
|
||||
*/
|
||||
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]
|
||||
*/
|
||||
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]
|
||||
*/
|
||||
BOOL32 WINAPI NotifyBootConfigStatus(DWORD x1) {
|
||||
FIXME(advapi,"(0x%08lx),stub!\n",x1);
|
||||
return 1;
|
||||
}
|
|
@ -4,13 +4,12 @@
|
|||
* Copyright 1995 Sven Verdoolaege
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include "windows.h"
|
||||
#include "winerror.h"
|
||||
#include "shell.h"
|
||||
#include "heap.h"
|
||||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
#include <time.h>
|
||||
|
||||
/***********************************************************************
|
||||
* EnumServicesStatus32A [ADVAPI32.37]
|
||||
*/
|
||||
|
@ -83,98 +82,6 @@ BOOL32 WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE hService, LPSERVICE_STATUS
|
|||
TRACE(advapi,"\tWaitHint:%lx\n",lpStatus->dwWaitHint);
|
||||
return TRUE;
|
||||
}
|
||||
/******************************************************************************
|
||||
* 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
|
||||
*
|
||||
* RETURNS STD
|
||||
*/
|
||||
BOOL32 WINAPI OpenProcessToken( HANDLE32 ProcessHandle, DWORD DesiredAccess,
|
||||
HANDLE32 *TokenHandle )
|
||||
{
|
||||
FIXME(advapi,"(%08x,%08lx,%p): stub\n",ProcessHandle,DesiredAccess,
|
||||
TokenHandle);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* OpenThreadToken [ADVAPI32.114]
|
||||
*/
|
||||
BOOL32 WINAPI OpenThreadToken( HANDLE32 thread,DWORD desiredaccess,
|
||||
BOOL32 openasself,HANDLE32 *thandle )
|
||||
{
|
||||
FIXME(advapi,"(%08x,%08lx,%d,%p): stub!\n",
|
||||
thread,desiredaccess,openasself,thandle);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* LookupPrivilegeValue32A [ADVAPI32.92]
|
||||
*/
|
||||
BOOL32 WINAPI LookupPrivilegeValue32A( LPCSTR lpSystemName,
|
||||
LPCSTR lpName, LPVOID lpLuid)
|
||||
{
|
||||
LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
|
||||
LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
|
||||
BOOL32 ret = LookupPrivilegeValue32W( lpSystemNameW, lpNameW, lpLuid);
|
||||
HeapFree(GetProcessHeap(), 0, lpNameW);
|
||||
HeapFree(GetProcessHeap(), 0, lpSystemNameW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* LookupPrivilegeValue32W [ADVAPI32.93]
|
||||
* Retrieves LUID used on a system to represent the privilege name.
|
||||
*
|
||||
* NOTES
|
||||
* 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
|
||||
*
|
||||
* RETURNS STD
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* AdjustTokenPrivileges [ADVAPI32.10]
|
||||
*/
|
||||
BOOL32 WINAPI AdjustTokenPrivileges(HANDLE32 TokenHandle,BOOL32 DisableAllPrivileges,
|
||||
LPVOID NewState,DWORD BufferLength,LPVOID PreviousState,
|
||||
LPDWORD ReturnLength )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetTokenInformation [ADVAPI32.66]
|
||||
*/
|
||||
BOOL32 WINAPI GetTokenInformation(
|
||||
HANDLE32 token,TOKEN_INFORMATION_CLASS tokeninfoclass,LPVOID tokeninfo,
|
||||
DWORD tokeninfolength,LPDWORD retlen
|
||||
) {
|
||||
FIXME(advapi,"(%08x,%d,%p,%ld,%p): stub\n",
|
||||
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* OpenSCManager32A [ADVAPI32.110]
|
||||
|
@ -260,66 +167,6 @@ BOOL32 WINAPI CloseServiceHandle( HANDLE32 hSCObject )
|
|||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* GetFileSecurityA [32.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)
|
||||
{
|
||||
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetFileSecurityiW [32.46]
|
||||
* 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 GetFileSecurity32W( LPCWSTR lpFileName,
|
||||
SECURITY_INFORMATION RequestedInformation,
|
||||
LPSECURITY_DESCRIPTOR pSecurityDescriptor,
|
||||
DWORD nLength,
|
||||
LPDWORD lpnLengthNeeded)
|
||||
{
|
||||
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SetFileSecurityA [32.182]
|
||||
* Sets the security of a file or directory
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI SetFileSecurity32A( LPCSTR lpFileName,
|
||||
SECURITY_INFORMATION RequestedInformation,
|
||||
LPSECURITY_DESCRIPTOR pSecurityDescriptor)
|
||||
{
|
||||
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SetFileSecurityW [32.183]
|
||||
* Sets the security of a file or directory
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI SetFileSecurity32W( LPCWSTR lpFileName,
|
||||
SECURITY_INFORMATION RequestedInformation,
|
||||
LPSECURITY_DESCRIPTOR pSecurityDescriptor)
|
||||
{
|
||||
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* OpenService32A [ADVAPI32.112]
|
||||
*/
|
||||
|
@ -425,58 +272,6 @@ BOOL32 WINAPI StartService32W( HANDLE32 hService, DWORD dwNumServiceArgs,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* DeregisterEventSource [ADVAPI32.32]
|
||||
* Closes a handle to the specified event log
|
||||
*
|
||||
* PARAMS
|
||||
* hEventLog [I] Handle to event log
|
||||
*
|
||||
* RETURNS STD
|
||||
*/
|
||||
BOOL32 WINAPI DeregisterEventSource( HANDLE32 hEventLog )
|
||||
{
|
||||
FIXME(advapi, "(%d): stub\n",hEventLog);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* RegisterEventSource32A [ADVAPI32.174]
|
||||
*/
|
||||
HANDLE32 WINAPI RegisterEventSource32A( LPCSTR lpUNCServerName,
|
||||
LPCSTR lpSourceName )
|
||||
{
|
||||
LPWSTR lpUNCServerNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpUNCServerName);
|
||||
LPWSTR lpSourceNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpSourceName);
|
||||
HANDLE32 ret = RegisterEventSource32W(lpUNCServerNameW,lpSourceNameW);
|
||||
HeapFree(GetProcessHeap(),0,lpSourceNameW);
|
||||
HeapFree(GetProcessHeap(),0,lpUNCServerNameW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* 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
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Handle
|
||||
* Failure: NULL
|
||||
*/
|
||||
HANDLE32 WINAPI RegisterEventSource32W( LPCWSTR lpUNCServerName,
|
||||
LPCWSTR lpSourceName )
|
||||
{
|
||||
FIXME(advapi, "(%s,%s): stub\n", debugstr_w(lpUNCServerName),
|
||||
debugstr_w(lpSourceName));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* QueryServiceStatus [ADVAPI32]
|
||||
*/
|
||||
|
@ -485,62 +280,3 @@ BOOL32 WINAPI QueryServiceStatus(/*SC_HANDLE*/HANDLE32 hService,/*LPSERVICE_STAT
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IsValidSecurityDescriptor [ADVAPI32]
|
||||
*/
|
||||
BOOL32 WINAPI IsValidSecurityDescriptor(LPSECURITY_DESCRIPTOR lpsecdesc) {
|
||||
FIXME(advapi,"(%p),stub!\n",lpsecdesc);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* MakeSelfRelativeSD [ADVAPI32]
|
||||
*/
|
||||
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]
|
||||
*/
|
||||
BOOL32 WINAPI QueryWindows31FilesMigration(DWORD x1) {
|
||||
FIXME(advapi,"(%ld),stub!\n",x1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32]
|
||||
*/
|
||||
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]
|
||||
*/
|
||||
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]
|
||||
*/
|
||||
BOOL32 WINAPI NotifyBootConfigStatus(DWORD x1) {
|
||||
FIXME(advapi,"(0x%08lx),stub!\n",x1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* OpenEventLogA [ADVAPI32]
|
||||
*/
|
||||
HANDLE32 WINAPI OpenEventLog32A(LPCSTR uncname,LPCSTR source) {
|
||||
FIXME(advapi,"(%s,%s),stub!\n",uncname,source);
|
||||
return 0xcafe4242;
|
||||
}
|
||||
|
|
@ -16,13 +16,13 @@ type win32
|
|||
0012 stdcall AllocateLocallyUniqueId(ptr) AllocateLocallyUniqueId
|
||||
0013 stub AreAllAccessesGranted
|
||||
0014 stub AreAnyAccessesGranted
|
||||
0015 stub BackupEventLogA
|
||||
0016 stub BackupEventLogW
|
||||
0015 stdcall BackupEventLogA (long str) BackupEventLog32A
|
||||
0016 stdcall BackupEventLogW (long wstr) BackupEventLog32W
|
||||
0017 stub ChangeServiceConfigA
|
||||
0018 stub ChangeServiceConfigW
|
||||
0019 stub ClearEventLogA
|
||||
0020 stub ClearEventLogW
|
||||
0021 stub CloseEventLog
|
||||
0019 stdcall ClearEventLogA (long str) ClearEventLog32A
|
||||
0020 stdcall ClearEventLogW (long wstr) ClearEventLog32W
|
||||
0021 stdcall CloseEventLog (long) CloseEventLog32
|
||||
0022 stdcall CloseServiceHandle(long) CloseServiceHandle
|
||||
0023 stdcall ControlService(long long ptr) ControlService
|
||||
0024 stdcall CopySid(long ptr ptr) CopySid
|
||||
|
@ -33,7 +33,7 @@ type win32
|
|||
0029 stdcall CreateServiceW (long ptr ptr long long long long ptr ptr ptr ptr ptr ptr) CreateService32A
|
||||
0030 stub DeleteAce
|
||||
0031 stdcall DeleteService(long) DeleteService
|
||||
0032 stdcall DeregisterEventSource(long) DeregisterEventSource
|
||||
0032 stdcall DeregisterEventSource(long) DeregisterEventSource32
|
||||
0033 stub DestroyPrivateObjectSecurity
|
||||
0034 stub DuplicateToken
|
||||
0035 stub EnumDependentServicesA
|
||||
|
@ -50,8 +50,8 @@ type win32
|
|||
0046 stdcall GetFileSecurityW(wstr long ptr long ptr) GetFileSecurity32W
|
||||
0047 stub GetKernelObjectSecurity
|
||||
0048 stdcall GetLengthSid(ptr) GetLengthSid
|
||||
0049 stub GetNumberOfEventLogRecords
|
||||
0050 stub GetOldestEventLogRecord
|
||||
0049 stdcall GetNumberOfEventLogRecords (long ptr) GetNumberOfEventLogRecords32
|
||||
0050 stdcall GetOldestEventLogRecord (long ptr) GetOldestEventLogRecord32
|
||||
0051 stub GetPrivateObjectSecurity
|
||||
0052 stub GetSecurityDescriptorControl
|
||||
0053 stub GetSecurityDescriptorDacl
|
||||
|
@ -99,17 +99,17 @@ type win32
|
|||
0095 stdcall MakeSelfRelativeSD(ptr ptr ptr) MakeSelfRelativeSD
|
||||
0096 stub MapGenericMask
|
||||
0097 stdcall NotifyBootConfigStatus(long) NotifyBootConfigStatus
|
||||
0098 stub NotifyChangeEventLog
|
||||
0098 stdcall NotifyChangeEventLog (long long) NotifyChangeEventLog32
|
||||
0099 stub ObjectCloseAuditAlarmA
|
||||
0100 stub ObjectCloseAuditAlarmW
|
||||
0101 stub ObjectOpenAuditAlarmA
|
||||
0102 stub ObjectOpenAuditAlarmW
|
||||
0103 stub ObjectPrivilegeAuditAlarmA
|
||||
0104 stub ObjectPrivilegeAuditAlarmW
|
||||
0105 stub OpenBackupEventLogA
|
||||
0106 stub OpenBackupEventLogW
|
||||
0107 stdcall OpenEventLogA(str str) OpenEventLog32A
|
||||
0108 stub OpenEventLogW
|
||||
0105 stdcall OpenBackupEventLogA (str str) OpenBackupEventLog32A
|
||||
0106 stdcall OpenBackupEventLogW (wstr wstr) OpenBackupEventLog32W
|
||||
0107 stdcall OpenEventLogA (str str) OpenEventLog32A
|
||||
0108 stdcall OpenEventLogW (wstr wstr) OpenEventLog32W
|
||||
0109 stdcall OpenProcessToken(long long ptr) OpenProcessToken
|
||||
0110 stdcall OpenSCManagerA(ptr ptr long) OpenSCManager32A
|
||||
0111 stdcall OpenSCManagerW(ptr ptr long) OpenSCManager32W
|
||||
|
@ -125,8 +125,8 @@ type win32
|
|||
0121 stub QueryServiceLockStatusW
|
||||
0122 stub QueryServiceObjectSecurity
|
||||
0123 stdcall QueryServiceStatus(long ptr) QueryServiceStatus
|
||||
0124 stub ReadEventLogA
|
||||
0125 stub ReadEventLogW
|
||||
0124 stdcall ReadEventLogA (long long long ptr long ptr ptr) ReadEventLog32A
|
||||
0125 stdcall ReadEventLogW (long long long ptr long ptr ptr) ReadEventLog32W
|
||||
0126 stdcall RegCloseKey(long) RegCloseKey
|
||||
0127 stdcall RegConnectRegistryA(str long ptr) RegConnectRegistry32A
|
||||
0128 stdcall RegConnectRegistryW(wstr long ptr) RegConnectRegistry32W
|
||||
|
@ -179,8 +179,8 @@ type win32
|
|||
0175 stdcall RegisterEventSourceW(ptr ptr) RegisterEventSource32W
|
||||
0176 stdcall RegisterServiceCtrlHandlerA (ptr ptr) RegisterServiceCtrlHandlerA
|
||||
0177 stdcall RegisterServiceCtrlHandlerW (ptr ptr) RegisterServiceCtrlHandlerW
|
||||
0178 stub ReportEventA
|
||||
0179 stub ReportEventW
|
||||
0178 stdcall ReportEventA (long long long long ptr long long str ptr) ReportEvent32A
|
||||
0179 stdcall ReportEventW (long long long long ptr long long wstr ptr) ReportEvent32W
|
||||
0180 stub RevertToSelf
|
||||
0181 stub SetAclInformation
|
||||
0182 stdcall SetFileSecurityA(str long ptr ) SetFileSecurity32A
|
||||
|
|
|
@ -6,7 +6,6 @@ VPATH = @srcdir@
|
|||
MODULE = win32
|
||||
|
||||
C_SRCS = \
|
||||
advapi.c \
|
||||
code_page.c \
|
||||
console.c \
|
||||
device.c \
|
||||
|
@ -18,7 +17,6 @@ C_SRCS = \
|
|||
newfns.c \
|
||||
ordinals.c \
|
||||
process.c \
|
||||
security.c \
|
||||
struct32.c \
|
||||
thread.c \
|
||||
time.c
|
||||
|
|
36
win32/init.c
36
win32/init.c
|
@ -72,39 +72,3 @@ BOOL32 WINAPI GetComputerName32W(LPWSTR name,LPDWORD size)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetUserNameA [ADVAPI32.67]
|
||||
*/
|
||||
BOOL32 WINAPI GetUserName32A(LPSTR lpszName, LPDWORD lpSize)
|
||||
{
|
||||
size_t len;
|
||||
char *name;
|
||||
|
||||
name=getlogin();
|
||||
#if 0
|
||||
/* FIXME: should use getpwuid() here */
|
||||
if (!name) name=cuserid(NULL);
|
||||
#endif
|
||||
len = name ? strlen(name) : 0;
|
||||
if (!len || !lpSize || len > *lpSize) {
|
||||
if (lpszName) *lpszName = 0;
|
||||
return 0;
|
||||
}
|
||||
*lpSize=len;
|
||||
strcpy(lpszName, name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetUserNameW [ADVAPI32.68]
|
||||
*/
|
||||
BOOL32 WINAPI GetUserName32W(LPWSTR lpszName, LPDWORD lpSize)
|
||||
{
|
||||
LPSTR name = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *lpSize );
|
||||
DWORD size = *lpSize;
|
||||
BOOL32 res = GetUserName32A(name,lpSize);
|
||||
|
||||
lstrcpynAtoW(lpszName,name,size);
|
||||
HeapFree( GetProcessHeap(), 0, name );
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue