Commit 9cfe2d53 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Added stubs for user32,advapi32 functions.

parent 51505b12
......@@ -1557,10 +1557,19 @@ HRESULT WINAPI SHFlushClipboard()
* SheGetDirW [SHELL32.281]
*
*/
HRESULT WINAPI SheGetDirW(LPWSTR u, LPWSTR v)
HRESULT WINAPI SheGetDir32W(LPWSTR u, LPWSTR v)
{ FIXME(shell,"%s %s stub\n",debugstr_w(u),debugstr_w(v) );
return 0;
}
/*************************************************************************
* SheChangeDirW [SHELL32.274]
*
*/
HRESULT WINAPI SheChangeDir32W(LPWSTR u)
{ FIXME(shell,"(%s),stub\n",debugstr_w(u));
return 0;
}
/*************************************************************************
* StrRChrW [SHELL32.320]
*
......
......@@ -170,6 +170,8 @@ DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HWAVE);
DECLARE_HANDLE(HWAVEIN);
DECLARE_HANDLE(HWAVEOUT);
DECLARE_HANDLE(HWINSTA);
DECLARE_HANDLE(HDESK);
DECLARE_HANDLE(HWND);
DECLARE_HANDLE(HKL);
DECLARE_HANDLE(HIC);
......
......@@ -3,7 +3,7 @@
*
* Implements C run-time functionality as known from UNIX.
*
* Copyright 1996 Marcus Meissner
* Copyright 1996,1998 Marcus Meissner
* Copyright 1996 Jukka Iivonen
* Copyright 1997 Uwe Bonnes
*/
......@@ -18,6 +18,11 @@ Unresolved issues Uwe Bonnes 970904:
for Win32, based on lcc, from Jacob Navia
*/
/* NOTE: This file also implements the wcs* functions. They _ARE_ in
* the newer Linux libcs, but use 4 byte wide characters, so are unusable,
* since we need 2 byte wide characters. - Marcus Meissner, 981031
*/
/* FIXME: all the file handling is hopelessly broken -- AJ */
#include <errno.h>
......@@ -1721,6 +1726,40 @@ CHAR* __cdecl CRTDLL__getcwd(LPSTR buf, INT32 size)
}
/*********************************************************************
* _getdcwd (CRTDLL.121)
*/
CHAR* __cdecl CRTDLL__getdcwd(INT32 drive,LPSTR buf, INT32 size)
{
char test[1];
int len;
FIXME(crtdll,"(\"%c:\",%s,%d)\n",drive+'A',buf,size);
len = size;
if (!buf) {
if (size < 0) /* allocate as big as nescessary */
len =GetCurrentDirectory32A(1,test) + 1;
if(!(buf = CRTDLL_malloc(len)))
{
/* set error to OutOfRange */
return( NULL );
}
}
size = len;
if(!(len =GetCurrentDirectory32A(len,buf)))
{
return NULL;
}
if (len > size)
{
/* set error to ERANGE */
TRACE(crtdll,"buffer to small\n");
return NULL;
}
return buf;
}
/*********************************************************************
* _getdrive (CRTDLL.124)
*
* Return current drive, 1 for A, 2 for B
......@@ -1741,6 +1780,16 @@ INT32 __cdecl CRTDLL__mkdir(LPCSTR newdir)
}
/*********************************************************************
* remove (CRTDLL.448)
*/
INT32 __cdecl CRTDLL_remove(LPCSTR file)
{
if (!DeleteFile32A(file))
return -1;
return 0;
}
/*********************************************************************
* _errno (CRTDLL.52)
* Yes, this is a function.
*/
......@@ -1933,5 +1982,43 @@ INT32 __cdecl CRTDLL__memicmp(
* __dllonexit (CRTDLL.25)
*/
VOID __cdecl CRTDLL__dllonexit ()
{ FIXME(crtdll,"stub\n");
}
{
FIXME(crtdll,"stub\n");
}
/*********************************************************************
* wcstok (CRTDLL.519)
* Like strtok, but for wide character strings. s is modified, yes.
*/
LPWSTR CRTDLL_wcstok(LPWSTR s,LPCWSTR delim) {
static LPWSTR nexttok = NULL;
LPWSTR x,ret;
if (!s)
s = nexttok;
if (!s)
return NULL;
x = s;
while (*x && !CRTDLL_wcschr(delim,*x))
x++;
ret = nexttok;
if (*x) {
*x='\0';
nexttok = x+1;
} else
nexttok = NULL;
return ret;
}
/*********************************************************************
* wcstol (CRTDLL.520)
* Like strtol, but for wide character strings.
*/
INT32 CRTDLL_wcstol(LPWSTR s,LPWSTR *end,INT32 base) {
LPSTR sA = HEAP_strdupWtoA(GetProcessHeap(),0,s),endA;
INT32 ret = strtol(sA,&endA,base);
HeapFree(GetProcessHeap(),0,sA);
if (end) *end = s+(endA-sA); /* pointer magic checked. */
return ret;
}
......@@ -243,6 +243,15 @@ BOOL32 WINAPI OpenPrinter32A(LPSTR lpPrinterName,HANDLE32 *phPrinter,
return FALSE;
}
BOOL32 WINAPI OpenPrinter32W(LPWSTR lpPrinterName,HANDLE32 *phPrinter,
LPPRINTER_DEFAULTS32W pDefault)
{
FIXME(print,"(%s,%p,%p):stub\n",debugstr_w(lpPrinterName), phPrinter,
pDefault);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
BOOL32 WINAPI EnumPrinters32A(DWORD dwType, LPSTR lpszName,
DWORD dwLevel, LPBYTE lpbPrinters,
DWORD cbBuf, LPDWORD lpdwNeeded,
......
......@@ -80,7 +80,7 @@ type win32
0076 stub InitiateSystemShutdownW
0077 stdcall IsTextUnicode(ptr long ptr) RtlIsTextUnicode
0078 stub IsValidAcl
0079 stub IsValidSecurityDescriptor
0079 stdcall IsValidSecurityDescriptor(ptr) IsValidSecurityDescriptor
0080 stdcall IsValidSid(ptr) IsValidSid
0081 stub LockServiceDatabase
0082 stub LogonUserA
......@@ -96,9 +96,9 @@ type win32
0092 stdcall LookupPrivilegeValueA(ptr ptr ptr) LookupPrivilegeValue32A
0093 stdcall LookupPrivilegeValueW(ptr ptr ptr) LookupPrivilegeValue32W
0094 stub MakeAbsoluteSD
0095 stub MakeSelfRelativeSD
0095 stdcall MakeSelfRelativeSD(ptr ptr ptr) MakeSelfRelativeSD
0096 stub MapGenericMask
0097 stub NotifyBootConfigStatus
0097 stdcall NotifyBootConfigStatus(long) NotifyBootConfigStatus
0098 stub NotifyChangeEventLog
0099 stub ObjectCloseAuditAlarmA
0100 stub ObjectCloseAuditAlarmW
......@@ -108,7 +108,7 @@ type win32
0104 stub ObjectPrivilegeAuditAlarmW
0105 stub OpenBackupEventLogA
0106 stub OpenBackupEventLogW
0107 stub OpenEventLogA
0107 stdcall OpenEventLogA(str str) OpenEventLog32A
0108 stub OpenEventLogW
0109 stdcall OpenProcessToken(long long ptr) OpenProcessToken
0110 stdcall OpenSCManagerA(ptr ptr long) OpenSCManager32A
......@@ -124,7 +124,7 @@ type win32
0120 stub QueryServiceLockStatusA
0121 stub QueryServiceLockStatusW
0122 stub QueryServiceObjectSecurity
0123 stub QueryServiceStatus
0123 stdcall QueryServiceStatus(long ptr) QueryServiceStatus
0124 stub ReadEventLogA
0125 stub ReadEventLogW
0126 stdcall RegCloseKey(long) RegCloseKey
......@@ -201,7 +201,7 @@ type win32
0197 stdcall StartServiceCtrlDispatcherW(ptr) StartServiceCtrlDispatcher32W
0198 stdcall StartServiceW(long long ptr) StartService32W
0199 stub UnlockServiceDatabase
0200 stub LsaOpenPolicy
0200 stdcall LsaOpenPolicy(long long long long) LsaOpenPolicy
0201 stub LsaLookupSids
0202 stub LsaFreeMemory
0203 stub LsaQueryInformationPolicy
......@@ -265,3 +265,9 @@ type win32
0261 stub ElfReportEventW
0262 stub ElfDeregisterEventSource
0263 stub ElfDeregisterEventSourceW
0264 stub I_ScSetServiceBit
0265 stdcall SynchronizeWindows31FilesAndWindowsNTRegistry(long long long long) SynchronizeWindows31FilesAndWindowsNTRegistry
0266 stdcall QueryWindows31FilesMigration(long) QueryWindows31FilesMigration
0267 stub LsaICLookupSids
0268 stub SystemFunction031
0269 stub I_ScSetServiceBitsA
......@@ -122,7 +122,7 @@ type win32
118 stub _getch
119 stub _getche
120 cdecl _getcwd(ptr long) CRTDLL__getcwd
121 stub _getdcwd
121 cdecl _getdcwd(long ptr long) CRTDLL__getdcwd
122 stub _getdiskfree
123 stub _getdllprocaddr
124 cdecl _getdrive() CRTDLL__getdrive
......@@ -449,7 +449,7 @@ type win32
445 stub raise
446 cdecl rand() CRTDLL_rand
447 cdecl realloc(ptr long) CRTDLL_realloc
448 stub remove
448 cdecl remove(str) CRTDLL_remove
449 cdecl rename(str str) CRTDLL_rename
450 stub rewind
451 stub scanf
......@@ -520,8 +520,8 @@ type win32
516 cdecl wcsspn(wstr wstr) CRTDLL_wcsspn
517 cdecl wcsstr(wstr wstr) CRTDLL_wcsstr
518 stub wcstod
519 stub wcstok
520 stub wcstol
519 cdecl wcstok(wstr wstr) CRTDLL_wcstok
520 cdecl wcstol(wstr ptr long) CRTDLL_wcstol
521 cdecl wcstombs(ptr ptr long) CRTDLL_wcstombs
522 stub wcstoul
523 stub wcsxfrm
......
......@@ -111,3 +111,6 @@ type win32
0106 stub WNetGetPropertyTextA
0107 stub WNetPropertyDialogA
0108 stub WNetGetDirectoryTypeA
0109 stub WNetFMXGetPermHelp
0110 stub WNetFMXEditPerm
0111 stub WNetFMXGetPermCaps
......@@ -280,14 +280,14 @@ init Shell32LibMain
271 stub SheChangeDirA
272 stub SheChangeDirExA
273 stub SheChangeDirExW
274 stub SheChangeDirW
274 stdcall SheChangeDirW(wstr) SheChangeDir32W
275 stub SheConvertPathW
276 stub SheFullPathA
277 stub SheFullPathW
278 stub SheGetCurDrive
279 stub SheGetDirA@8
280 stub SheGetDirExW@12
281 stdcall SheGetDirW (long long) SheGetDirW
281 stdcall SheGetDirW (long long) SheGetDir32W
282 stub SheGetPathOffsetW
283 stub SheRemoveQuotesA
284 stub SheRemoveQuotesW
......@@ -376,3 +376,4 @@ init Shell32LibMain
# later additions ... FIXME: incorrect ordinals
1218 stdcall SHGetSpecialFolderPathA(long long long long) SHGetSpecialFolderPath
1219 stub DoEnvironmentSubstW
......@@ -369,7 +369,7 @@ type win32
366 stdcall LoadImageW(long wstr long long long long) LoadImage32W
367 stub LoadKeyboardLayoutA
368 stub LoadKeyboardLayoutW
369 stub LoadLocalFonts
369 stdcall LoadLocalFonts() LoadLocalFonts
370 stdcall LoadMenuA(long str) LoadMenu32A
371 stdcall LoadMenuIndirectA(ptr) LoadMenuIndirect32A
372 stdcall LoadMenuIndirectW(ptr) LoadMenuIndirect32W
......@@ -423,7 +423,7 @@ type win32
420 stdcall PostMessageW(long long long long) PostMessage32W
421 stdcall PostQuitMessage(long) PostQuitMessage32
422 stdcall PostThreadMessageA(long long long long) PostThreadMessage32A
423 stub PostThreadMessageW
423 stdcall PostThreadMessageW(long long long long) PostThreadMessage32W
424 stdcall PtInRect(ptr long long) PtInRect32
425 stub QuerySendMessage
426 stdcall RedrawWindow(long ptr long long) RedrawWindow32
......@@ -486,7 +486,7 @@ type win32
483 stdcall SetInternalWindowPos(long long ptr ptr) SetInternalWindowPos32
484 stdcall SetKeyboardState(ptr) SetKeyboardState
485 stdcall SetLastErrorEx(long long) SetLastErrorEx
486 stub SetLogonNotifyWindow
486 stdcall SetLogonNotifyWindow(long long) SetLogonNotifyWindow
487 stdcall SetMenu(long long) SetMenu32
488 stub SetMenuContextHelpId
489 stdcall SetMenuDefaultItem(long long long) SetMenuDefaultItem32
......
......@@ -97,7 +97,7 @@ type win32
194 stub GetPrinterW
195 stub InitializeDll
196 stdcall OpenPrinterA(str ptr ptr) OpenPrinter32A
197 stub OpenPrinterW
197 stdcall OpenPrinterW(wstr ptr ptr) OpenPrinter32W
198 stub PlayGdiScriptOnPrinterIC
199 stub PrinterMessageBoxA
200 stub PrinterMessageBoxW
......
......@@ -428,3 +428,70 @@ HANDLE32 WINAPI RegisterEventSource32W( LPCWSTR lpUNCServerName,
return 1;
}
/******************************************************************************
* QueryServiceStatus [ADVAPI32]
*/
BOOL32 WINAPI QueryServiceStatus(/*SC_HANDLE*/HANDLE32 hService,/*LPSERVICE_STATUS*/LPVOID lpservicestatus) {
FIXME(advapi,"(%d,%p),stub!\n",hService,lpservicestatus);
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;
}
......@@ -1274,6 +1274,24 @@ BOOL32 WINAPI PostThreadMessage32A(DWORD idThread , UINT32 message,
return PostAppMessage16(thdb->process->task, message, wParam, lParam);
}
/**********************************************************************
* PostThreadMessage32W (USER32.423)
*
* BUGS
*
* Thread-local message queues are not supported.
*
*/
BOOL32 WINAPI PostThreadMessage32W(DWORD idThread , UINT32 message,
WPARAM32 wParam, LPARAM lParam )
{
THDB *thdb = THREAD_ID_TO_THDB(idThread);
if (!thdb || !thdb->process) return FALSE;
FIXME(sendmsg, "(...): Should use thread-local message queue!\n");
return PostAppMessage16(thdb->process->task, message, wParam, lParam);
}
/***********************************************************************
* SendMessage32A (USER32.454)
*/
......
......@@ -421,12 +421,18 @@ DWORD WINAPI UserSeeUserDo(WORD wReqType, WORD wParam1, WORD wParam2, WORD wPara
}
}
/***********************************************************************
* RegisterLogonProcess (USER32.434)
*/
DWORD WINAPI RegisterLogonProcess(HANDLE32 hprocess,BOOL32 x) {
FIXME(win32,"(%d,%d),stub!\n",hprocess,x);
return 1;
}
HANDLE32 /* HWINSTA */ WINAPI CreateWindowStation32W(
/***********************************************************************
* CreateWindowStation32W (USER32.86)
*/
HWINSTA32 WINAPI CreateWindowStation32W(
LPWSTR winstation,DWORD res1,DWORD desiredaccess,
LPSECURITY_ATTRIBUTES lpsa
) {
......@@ -436,11 +442,17 @@ HANDLE32 /* HWINSTA */ WINAPI CreateWindowStation32W(
return 0xdeadcafe;
}
BOOL32 WINAPI SetProcessWindowStation(/*HWINSTA*/ HANDLE32 hWinSta) {
/***********************************************************************
* SetProcessWindowStation (USER32.496)
*/
BOOL32 WINAPI SetProcessWindowStation(HWINSTA32 hWinSta) {
FIXME(win32,"(%d),stub!\n",hWinSta);
return TRUE;
}
/***********************************************************************
* SetUserObjectSecurity (USER32.514)
*/
BOOL32 WINAPI SetUserObjectSecurity(
HANDLE32 hObj,
/*LPSECURITY_INFORMATION*/LPVOID pSIRequested,
......@@ -450,7 +462,10 @@ BOOL32 WINAPI SetUserObjectSecurity(
return TRUE;
}
/*HDESK*/HANDLE32 WINAPI CreateDesktop32W(
/***********************************************************************
* CreateDesktop32W (USER32.69)
*/
HDESK32 WINAPI CreateDesktop32W(
LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODE32W pDevmode,
DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa
) {
......@@ -461,7 +476,26 @@ BOOL32 WINAPI SetUserObjectSecurity(
return 0xcafedead;
}
/***********************************************************************
* SetWindowStationUser (USER32.521)
*/
DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) {
FIXME(win32,"(%d,%d),stub!\n",x1,x2);
FIXME(win32,"(%ld,%ld),stub!\n",x1,x2);
return 1;
}
/***********************************************************************
* SetLogonNotifyWindow (USER32.486)
*/
DWORD WINAPI SetLogonNotifyWindow(HWINSTA32 hwinsta,HWND32 hwnd) {
FIXME(win32,"(0x%lx,%ld),stub!\n",hwinsta,hwnd);
return 1;
}
/***********************************************************************
* LoadLocalFonts (USER32.486)
*/
VOID WINAPI LoadLocalFonts(VOID) {
/* are loaded. */
return;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment