2 * KERNEL32.DLL stubs (STUB functions)
3 * Remove from this file, if you implement them.
12 SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
13 DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
20 BaseAttachCompleteThunk (VOID
)
30 BaseDumpAppcompatCache(VOID
)
39 BaseFlushAppcompatCache(VOID
)
49 BaseCheckAppcompatCache(ULONG Unknown1
,
55 if (Unknown4
) *Unknown4
= 0;
63 BaseUpdateAppcompatCache(ULONG Unknown1
, ULONG Unknown2
, ULONG Unknown3
)
118 ExtendVirtualBuffer (
134 HANDLE hVirtualBuffer
161 GetSystemPowerStatus (
162 LPSYSTEM_POWER_STATUS PowerStatus
166 PowerStatus
->ACLineStatus
= 1;
167 PowerStatus
->BatteryFlag
= 128;
168 PowerStatus
->BatteryLifePercent
= 255;
169 PowerStatus
->Reserved1
= 0;
170 PowerStatus
->BatteryLifeTime
= -1;
171 PowerStatus
->BatteryFullLifeTime
= -1;
181 GetVDMCurrentDirectories (
220 RegisterWowBaseHandlers (
247 SetSystemPowerState (
262 SetVDMCurrentDirectories (
291 VDMConsoleOperation (
306 VDMOperationStarted (
319 VirtualBufferExceptionHandler (
334 AllocateUserPhysicalPages(
336 PULONG_PTR NumberOfPages
,
337 PULONG_PTR UserPfnArray
349 BindIoCompletionCallback (
351 LPOVERLAPPED_COMPLETION_ROUTINE Function
,
364 CancelDeviceWakeupRequest(
379 PJOB_SET_ARRAY UserJobSet
,
396 return HeapFree( GetProcessHeap(), 0, hFindVolume
);
404 FindVolumeMountPointClose(
405 HANDLE hFindVolumeMountPoint
409 return HeapFree( GetProcessHeap(), 0, hFindVolumeMountPoint
);
417 FreeUserPhysicalPages(
419 PULONG_PTR NumberOfPages
,
447 GetNumaHighestNodeNumber(
448 PULONG HighestNodeNumber
460 GetNumaNodeProcessorMask(
462 PULONGLONG ProcessorMask
474 GetNumaProcessorNode(
493 PULONG_PTR lpdwCount
,
494 PULONG lpdwGranularity
506 HeapQueryInformation (
508 HEAP_INFORMATION_CLASS HeapInformationClass
,
509 PVOID HeapInformation OPTIONAL
,
510 SIZE_T HeapInformationLength OPTIONAL
,
511 PSIZE_T ReturnLength OPTIONAL
525 HEAP_INFORMATION_CLASS HeapInformationClass
,
526 PVOID HeapInformation OPTIONAL
,
527 SIZE_T HeapInformationLength OPTIONAL
539 IsSystemResumeAutomatic(
558 *Wow64Process
= FALSE
;
567 MapUserPhysicalPages(
568 PVOID VirtualAddress
,
569 ULONG_PTR NumberOfPages
,
570 PULONG_PTR PageArray OPTIONAL
582 MapUserPhysicalPagesScatter(
583 PVOID
*VirtualAddresses
,
584 ULONG_PTR NumberOfPages
,
585 PULONG_PTR PageArray OPTIONAL
599 FILE_SEGMENT_ELEMENT aSegmentArray
[],
600 DWORD nNumberOfBytesToRead
,
602 LPOVERLAPPED lpOverlapped
605 PIO_STATUS_BLOCK io_status
;
606 LARGE_INTEGER offset
;
609 DPRINT("(%p %p %u %p)\n", hFile
, aSegmentArray
, nNumberOfBytesToRead
, lpOverlapped
);
611 offset
.u
.LowPart
= lpOverlapped
->Offset
;
612 offset
.u
.HighPart
= lpOverlapped
->OffsetHigh
;
613 io_status
= (PIO_STATUS_BLOCK
)lpOverlapped
;
614 io_status
->Status
= STATUS_PENDING
;
615 io_status
->Information
= 0;
617 status
= NtReadFileScatter(hFile
,
623 nNumberOfBytesToRead
,
627 if (status
) SetLastError(RtlNtStatusToDosError(status
));
637 RemoveVectoredExceptionHandler(
638 PVOID VectoredHandlerHandle
663 RequestWakeupLatency(
677 LPVOID lpBaseAddress
,
702 SetMessageWaitingIndicator(
703 HANDLE hMsgIndicator
,
716 SetThreadExecutionState(
717 EXECUTION_STATE esFlags
720 static EXECUTION_STATE current
=
721 ES_SYSTEM_REQUIRED
| ES_DISPLAY_REQUIRED
| ES_USER_PRESENT
;
722 EXECUTION_STATE old
= current
;
724 DPRINT1("(0x%x): stub, harmless.\n", esFlags
);
726 if (!(current
& ES_CONTINUOUS
) || (esFlags
& ES_CONTINUOUS
))
739 FILE_SEGMENT_ELEMENT aSegmentArray
[],
740 DWORD nNumberOfBytesToWrite
,
742 LPOVERLAPPED lpOverlapped
745 PIO_STATUS_BLOCK io_status
;
746 LARGE_INTEGER offset
;
749 DPRINT("%p %p %u %p\n", hFile
, aSegmentArray
, nNumberOfBytesToWrite
, lpOverlapped
);
751 offset
.u
.LowPart
= lpOverlapped
->Offset
;
752 offset
.u
.HighPart
= lpOverlapped
->OffsetHigh
;
753 io_status
= (PIO_STATUS_BLOCK
) lpOverlapped
;
754 io_status
->Status
= STATUS_PENDING
;
755 io_status
->Information
= 0;
757 Status
= NtWriteFileGather(hFile
,
763 nNumberOfBytesToWrite
,
767 if (Status
) SetLastError(RtlNtStatusToDosError(Status
));
777 DeleteVolumeMountPointW(
778 LPCWSTR lpszVolumeMountPoint
796 HANDLE mgr
= CreateFileW( MOUNTMGR_DOS_DEVICE_NAME
, 0, FILE_SHARE_READ
|FILE_SHARE_WRITE
,
797 NULL
, OPEN_EXISTING
, 0, 0 );
798 if (mgr
== INVALID_HANDLE_VALUE
) return INVALID_HANDLE_VALUE
;
802 MOUNTMGR_MOUNT_POINT input
;
803 MOUNTMGR_MOUNT_POINTS
*output
;
805 if (!(output
= HeapAlloc( GetProcessHeap(), 0, size
)))
807 SetLastError( ERROR_NOT_ENOUGH_MEMORY
);
810 memset( &input
, 0, sizeof(input
) );
812 if (!DeviceIoControl( mgr
, IOCTL_MOUNTMGR_QUERY_POINTS
, &input
, sizeof(input
),
813 output
, size
, NULL
, NULL
))
815 if (GetLastError() != ERROR_MORE_DATA
) break;
817 HeapFree( GetProcessHeap(), 0, output
);
821 /* abuse the Size field to store the current index */
823 if (!FindNextVolumeW( output
, volume
, len
))
825 HeapFree( GetProcessHeap(), 0, output
);
826 return INVALID_HANDLE_VALUE
;
828 return (HANDLE
)output
;
831 return INVALID_HANDLE_VALUE
;
839 FindFirstVolumeMountPointW(
840 LPCWSTR lpszRootPathName
,
841 LPWSTR lpszVolumeMountPoint
,
842 DWORD cchBufferLength
860 MOUNTMGR_MOUNT_POINTS
*data
= handle
;
862 while (data
->Size
< data
->NumberOfMountPoints
)
864 static const WCHAR volumeW
[] = {'\\','?','?','\\','V','o','l','u','m','e','{',};
865 WCHAR
*link
= (WCHAR
*)((char *)data
+ data
->MountPoints
[data
->Size
].SymbolicLinkNameOffset
);
866 DWORD size
= data
->MountPoints
[data
->Size
].SymbolicLinkNameLength
;
868 /* skip non-volumes */
869 if (size
< sizeof(volumeW
) || memcmp( link
, volumeW
, sizeof(volumeW
) )) continue;
870 if (size
+ sizeof(WCHAR
) >= len
* sizeof(WCHAR
))
872 SetLastError( ERROR_FILENAME_EXCED_RANGE
);
875 memcpy( volume
, link
, size
);
876 volume
[1] = '\\'; /* map \??\ to \\?\ */
877 volume
[size
/ sizeof(WCHAR
)] = '\\'; /* Windows appends a backslash */
878 volume
[size
/ sizeof(WCHAR
) + 1] = 0;
879 DPRINT( "returning entry %u %s\n", data
->Size
- 1, volume
);
882 SetLastError( ERROR_NO_MORE_FILES
);
891 FindNextVolumeMountPointW(
892 HANDLE hFindVolumeMountPoint
,
893 LPWSTR lpszVolumeMountPoint
,
894 DWORD cchBufferLength
906 GetFirmwareEnvironmentVariableW(
923 LPCWSTR lpszFileName
,
924 LPWSTR lpszVolumePathName
,
925 DWORD cchBufferLength
937 GetVolumePathNamesForVolumeNameW(
938 LPCWSTR lpszVolumeName
,
939 LPWSTR lpszVolumePathNames
,
940 DWORD cchBufferLength
,
941 PDWORD lpcchReturnLength
953 SetFirmwareEnvironmentVariableW(
969 SetVolumeMountPointW(
970 LPCWSTR lpszVolumeMountPoint
,
971 LPCWSTR lpszVolumeName
983 DeleteVolumeMountPointA(
984 LPCSTR lpszVolumeMountPoint
1001 WCHAR
*buffer
= HeapAlloc( GetProcessHeap(), 0, len
* sizeof(WCHAR
) );
1002 HANDLE handle
= FindFirstVolumeW( buffer
, len
);
1004 if (handle
!= INVALID_HANDLE_VALUE
)
1006 if (!WideCharToMultiByte( CP_ACP
, 0, buffer
, -1, volume
, len
, NULL
, NULL
))
1008 FindVolumeClose( handle
);
1009 handle
= INVALID_HANDLE_VALUE
;
1012 HeapFree( GetProcessHeap(), 0, buffer
);
1021 FindFirstVolumeMountPointA(
1022 LPCSTR lpszRootPathName
,
1023 LPSTR lpszVolumeMountPoint
,
1024 DWORD cchBufferLength
1042 WCHAR
*buffer
= HeapAlloc( GetProcessHeap(), 0, len
* sizeof(WCHAR
) );
1045 if ((ret
= FindNextVolumeW( handle
, buffer
, len
)))
1047 if (!WideCharToMultiByte( CP_ACP
, 0, buffer
, -1, volume
, len
, NULL
, NULL
)) ret
= FALSE
;
1049 HeapFree( GetProcessHeap(), 0, buffer
);
1058 FindNextVolumeMountPointA(
1059 HANDLE hFindVolumeMountPoint
,
1060 LPSTR lpszVolumeMountPoint
,
1061 DWORD cchBufferLength
1073 GetFirmwareEnvironmentVariableA(
1089 GetVolumeNameForVolumeMountPointA(
1090 LPCSTR lpszVolumeMountPoint
,
1091 LPSTR lpszVolumeName
,
1092 DWORD cchBufferLength
1105 LPCSTR lpszFileName
,
1106 LPSTR lpszVolumePathName
,
1107 DWORD cchBufferLength
1119 GetVolumePathNamesForVolumeNameA(
1120 LPCSTR lpszVolumeName
,
1121 LPSTR lpszVolumePathNames
,
1122 DWORD cchBufferLength
,
1123 PDWORD lpcchReturnLength
1135 SetFirmwareEnvironmentVariableA(
1151 SetVolumeMountPointA(
1152 LPCSTR lpszVolumeMountPoint
,
1153 LPCSTR lpszVolumeName
1163 BOOL STDCALL
GetConsoleKeyboardLayoutNameA(LPSTR name
)
1172 BOOL STDCALL
GetConsoleKeyboardLayoutNameW(LPWSTR name
)
1181 DWORD STDCALL
GetHandleContext(HANDLE hnd
)
1190 HANDLE STDCALL
CreateSocketHandle(VOID
)
1199 BOOL STDCALL
SetHandleContext(HANDLE hnd
,DWORD context
)
1208 BOOL STDCALL
UTRegister( HMODULE hModule
, LPSTR lpsz16BITDLL
,
1209 LPSTR lpszInitName
, LPSTR lpszProcName
,
1210 FARPROC
*ppfn32Thunk
, FARPROC pfnUT32CallBack
,
1220 VOID STDCALL
UTUnRegister( HMODULE hModule
)
1229 FARPROC STDCALL
DelayLoadFailureHook(unsigned int dliNotify
, PDelayLoadInfo pdli
)
1231 FARPROC STDCALL
DelayLoadFailureHook(unsigned int dliNotify
, PVOID pdli
)
1241 NTSTATUS STDCALL
CreateNlsSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor
,ULONG Size
,ULONG AccessMask
)
1250 BOOL STDCALL
IsValidUILanguage(LANGID langid
)
1259 VOID STDCALL
NlsConvertIntegerToString(ULONG Value
, ULONG Base
, ULONG strsize
, LPWSTR str
, ULONG strsize2
)
1269 SetClientTimeZoneInformation(
1270 CONST TIME_ZONE_INFORMATION
*lpTimeZoneInformation
)
1278 NlsGetCacheUpdateCount(VOID
)
1286 Wow64EnableWow64FsRedirection (BOOL Wow64EnableWow64FsRedirection
)
1294 Wow64DisableWow64FsRedirection (VOID
** pv
)
1302 Wow64RevertWow64FsRedirection (VOID
* pv
)