mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 21:55:28 +00:00
829fe323e4
Sat Jul 25 19:45:45 1998 Juergen Schmied <juergen.schmied@metronet.de> * [include/shlobj.h][misc/shell.c][misc/shellord.c][ole/folders.c] [shell32.spec] Added SHFILEOPSTRUCT32[A|W] and constants, prototypes. Implemented SHGetSpecialFolderLocation, SHGetPathFromIDList32[A]. Many IShellFolder, pidl, shell -related changes. SHChangeNotifyRegister, SHChangeNotifyDeregister, SHShellFolderView_Message, SHMapPIDLToSystemImageListIndex, SHAddToRecentDocs32, SHFileOperation, SHChangeNotify, SHCreateShellFolderViewEx stubs. Sat Jul 25 17:16:25 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [files/profile.c] Fix return value of PROFILE_GetSection(). Fri Jul 24 22:45:19 1998 Ove Kaaven <ovek@isflak.arcticnet.no> * [controls/edit.c] Killed the modified flag on WM_SETTEXT. Eudora should no longer bother asking whether you want to save an unchanged message. Fri Jul 24 21:21:35 1998 Andreas Mohr <100.30936@germany.net> * [controls/menu.c] Fixed bug in GetMenuState32. Doesn't fix Free Agent 32 :(( * [documentation/debugging] Hints added. * [files/dos_fs.c] [include/msdos.h] [msdos/int21.c] Enhanced DOS device support. * [if1632/Makefile.in] [if1632/builtin.c] [if1632/rasapi16.spec] [relay32/Makefile.in] [relay32/builtin32.c] [relay32/rasapi32.spec] Added RASAPI16/32.DLL. * [misc/aspi.c] [relay32/wnaspi32.spec] Implemented GetASPI32SupportInfo. * [multimedia/mmsystem.c] Implemented mmTaskCreate. Fri Jul 24 20:55:31 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/toolbar.c] Fixed some bugs and added new features. * [controls/tooltips.c][include/tooltips.h] Added more messages and started display code. * [misc/shell.c][misc/shellord.c][relay32/shell.spec] Fixed StrToOleStrN (SHELL32_79) and added OleStrToStrN (SHELL32_78). Added some new stubs. * [objects/cursoricon.c][misc/imagelist.c][include/windows.h] Fixed GetIconInfo and removed the GetIconInfo hack from the image list code. * [controls/pager.c][include/pager.h][controls/treeview.c] [include/treeview.h] Added some messages. * [misc/tweak.c][winows/nonclient.c][documentation/win95look] Removed unused tweak variables. * [documentation/common_controls] Updated. Fri Jul 24 18:36:32 1998 James Moody <013263m@dragon.acadiau.ca> * [objects/font.c] Fixed a bug in GetTextFace. Fri Jul 24 17:09:33 1998 Marcus Meissner <marcus@jet.franken.de> * [misc/commdlg.c] Fixed stacksmashing bug due to invalid specified function pointers. * [files/dos_fs.c] Small change in case handling... be able to create files with uppercase in them (like Program Files/). * [graphics/ddraw.c] XF86DGA support made threadsafe, added more Xlib dependent stuff (create Window using CreateWindow(), draw into it). xlib support is not satisfying. * [scheduler/critsection.c] Don't recurse on HeapLock with semaphore id 0. * [win32/user32.c][windows/message.c][windows/event.c] Moved win32 *Message functions where they belong. Removed some potential races between XPending and XNextEvent by a bit more locking. Fri Jul 24 13:58:19 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/pe_image.c] [loader/ne/segment.c] Use bogus pointer value instead of NULL for unresolved externals. * [memory/selector.c] Clear saved_fs on selector free. * [msdos/cdrom.c] [configure.in] Added check for linux/ucdrom.h. * [scheduler/client.c] [server/socket.c] Fix for missing struct cmsghdr. Attempt to support msg_accrights fd passing (completely untested). * [windows/event.c] Do not grab the pointer in SetCapture (Win32 behavior). Tue Jul 21 22:28:13 1998 James Juran <jrj120@psu.edu> * [Make.rules.in] Changed $(MKDIR) macro to use -p option (make parent directories if they don't already exist. This fixes an error in 'make install' if /usr/local/include doesn't already exist. Tue Jul 21 13:37:04 Rein Klazes <rklazes@casema.net> * [include/heap.h] Replaced macro SEGPTR_GET by inline function to avoid *lots* of wrong use of this macro. * [relay32/comdlg32.spec] Corrected GetSaveFileNameW entry. * [relay32/advapi32.spec] [win32/advapi.c] [relay32/ole32.spec] [ ole/moniker.c] Added stubs for SetFileSecurity[AW] and CreateFileMoniker32 * [graphics/x11drv/graphics.c] Finished implementation of bezier drawing code. Tue Jul 21 11:00:51 1998 Claus Fischer <cfischer@td2cad.intel.com> * [files/drive.c] Remove label trailing blanks in GetVolumeInformation32A. * [documentation/cdrom-labels] Added documentation on how to find out a CD-ROM label. Sun Jul 19 23:16:41 1998 Pascal Cuoq <pcuoq@ens-lyon.fr> * [include/windows.h] Added some DM_* and DISP_CHANGE_* flags. * [relay32/user32.spec] [windows/user.c] Added stub for ChangeDisplaySettingA. * [ole/ole2nls.c] is_punctuation: reuse information from another table. Sun Jul 19 22:04:46 1998 Douglas Ridgway <ridgway@winehq.com> * [Make.rules.in] Updated automatic documentation rules. * [graphics/path.c] [misc/aspi.c] [misc/ntdll.c] [misc/winsock_dns.c] [ole/ole2dsp.c] [relay32/user32.spec] Comment format futzing to keep c2man happy. * [documentation/README.documentation] Updated description of automatic documentation. Wed Jul 15 19:10:09 1998 Andrew M. Bishop <amb@gedanken.demon.co.uk> * [files/profile.c] Cache the 10 most recently used .ini files. Tue May 20 19:20:23 1997 Pablo Saratxaga <srtxg@chanae.alphanet.ch> * [misc/commdlg.c] Makes PrintDlg32A() return TRUE even if it is an empty stub, so most programs are happy and run anyway instead of aborting at startup. * [graphics/x11drv/xfont.c] Increased the maximum font families as (X11) font aliases eated up a lot of families causing wine to stop reading fonts.
431 lines
13 KiB
C
431 lines
13 KiB
C
/*
|
|
* Win32 advapi functions
|
|
*
|
|
* 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"
|
|
|
|
/***********************************************************************
|
|
* StartServiceCtrlDispatcherA [ADVAPI32.196]
|
|
*/
|
|
BOOL32 WINAPI StartServiceCtrlDispatcher32A(LPSERVICE_TABLE_ENTRY32A servent)
|
|
{
|
|
FIXME(advapi,"(%p '%s'): STUB.\n",servent,servent->lpServiceName);
|
|
return TRUE;
|
|
}
|
|
|
|
/***********************************************************************
|
|
* StartServiceCtrlDispatcherW [ADVAPI32.197]
|
|
*/
|
|
BOOL32 WINAPI StartServiceCtrlDispatcher32W(LPSERVICE_TABLE_ENTRY32W servent)
|
|
{
|
|
char buffer[200];
|
|
|
|
lstrcpynWtoA(buffer,servent->lpServiceName,200);
|
|
FIXME(advapi,"(%p '%s'): STUB.\n",servent,buffer);
|
|
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]
|
|
*/
|
|
HANDLE32 WINAPI OpenSCManager32A( LPCSTR lpMachineName, LPCSTR lpDatabaseName,
|
|
DWORD dwDesiredAccess )
|
|
{
|
|
LPWSTR lpMachineNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpMachineName);
|
|
LPWSTR lpDatabaseNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpDatabaseName);
|
|
DWORD ret = OpenSCManager32W(lpMachineNameW,lpDatabaseNameW,
|
|
dwDesiredAccess);
|
|
HeapFree(GetProcessHeap(),0,lpDatabaseNameW);
|
|
HeapFree(GetProcessHeap(),0,lpMachineNameW);
|
|
return ret;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* OpenSCManager32W [ADVAPI32.111]
|
|
* Establishes a connection to the service control manager and opens database
|
|
*
|
|
* NOTES
|
|
* 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
|
|
*
|
|
* RETURNS
|
|
* Success: Handle to service control manager database
|
|
* Failure: NULL
|
|
*/
|
|
HANDLE32 WINAPI OpenSCManager32W( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
|
|
DWORD dwDesiredAccess )
|
|
{
|
|
FIXME(advapi,"(%s,%s,%08lx): stub\n", debugstr_w(lpMachineName),
|
|
debugstr_w(lpDatabaseName), dwDesiredAccess);
|
|
return 1;
|
|
}
|
|
|
|
|
|
BOOL32 WINAPI AllocateLocallyUniqueId(LPLUID lpluid) {
|
|
lpluid->LowPart = time(NULL);
|
|
lpluid->HighPart = 0;
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* ControlService [ADVAPI32.23]
|
|
* Sends a control code to a Win32-based service.
|
|
*
|
|
* NOTES
|
|
* hService should be SC_HANDLE
|
|
*
|
|
* RETURNS STD
|
|
*/
|
|
BOOL32 WINAPI ControlService( HANDLE32 hService, DWORD dwControl,
|
|
LPSERVICE_STATUS lpServiceStatus )
|
|
{
|
|
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwControl,lpServiceStatus);
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* CloseServiceHandle [ADVAPI32.22]
|
|
* Close handle to service or service control manager
|
|
*
|
|
* PARAMS
|
|
* hSCObject [I] Handle to service or service control manager database
|
|
*
|
|
* NOTES
|
|
* hSCObject should be SC_HANDLE
|
|
*
|
|
* RETURNS STD
|
|
*/
|
|
BOOL32 WINAPI CloseServiceHandle( HANDLE32 hSCObject )
|
|
{
|
|
FIXME(advapi, "(%d): stub\n", hSCObject);
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* 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]
|
|
*/
|
|
HANDLE32 WINAPI OpenService32A( HANDLE32 hSCManager, LPCSTR lpServiceName,
|
|
DWORD dwDesiredAccess )
|
|
{
|
|
LPWSTR lpServiceNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpServiceName);
|
|
DWORD ret = OpenService32W( hSCManager, lpServiceNameW, dwDesiredAccess);
|
|
HeapFree(GetProcessHeap(),0,lpServiceNameW);
|
|
return ret;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* OpenService32W [ADVAPI32.113]
|
|
* Opens a handle to an existing service
|
|
*
|
|
* NOTES
|
|
* The return value should be SC_HANDLE
|
|
* hSCManager should be SC_HANDLE
|
|
*
|
|
* RETURNS
|
|
* Success: Handle to the service
|
|
* Failure: NULL
|
|
*/
|
|
HANDLE32 WINAPI OpenService32W( HANDLE32 hSCManager, LPCWSTR lpServiceName,
|
|
DWORD dwDesiredAccess )
|
|
{
|
|
FIXME(advapi, "(%d,%p,%ld): stub\n",hSCManager, lpServiceName,
|
|
dwDesiredAccess);
|
|
return 1;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* CreateServiceA [ADVAPI32.28]
|
|
*/
|
|
DWORD WINAPI CreateServiceA( 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));
|
|
return 1;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* DeleteService [ADVAPI32.31]
|
|
*
|
|
* PARAMS
|
|
* hService [I] Handle to service
|
|
*
|
|
* RETURNS STD
|
|
*
|
|
* NOTES
|
|
* hService should be SC_HANDLE
|
|
*/
|
|
BOOL32 WINAPI DeleteService( HANDLE32 hService )
|
|
{
|
|
FIXME(advapi, "(%d): stub\n",hService);
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* StartService32A [ADVAPI32.195]
|
|
*
|
|
* NOTES
|
|
* How do we convert lpServiceArgVectors to use the 32W version?
|
|
*/
|
|
BOOL32 WINAPI StartService32A( HANDLE32 hService, DWORD dwNumServiceArgs,
|
|
LPCSTR *lpServiceArgVectors )
|
|
{
|
|
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwNumServiceArgs,lpServiceArgVectors);
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/******************************************************************************
|
|
* StartService32W [ADVAPI32.198]
|
|
* Starts a service
|
|
*
|
|
* PARAMS
|
|
* 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
|
|
*/
|
|
BOOL32 WINAPI StartService32W( HANDLE32 hService, DWORD dwNumServiceArgs,
|
|
LPCWSTR *lpServiceArgVectors )
|
|
{
|
|
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwNumServiceArgs,
|
|
lpServiceArgVectors);
|
|
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;
|
|
}
|
|
|