Skip to content

Commit

Permalink
fix: Add stubs to fix steam.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBrest committed Nov 7, 2024
1 parent e27b6e8 commit 6360a0b
Show file tree
Hide file tree
Showing 12 changed files with 153 additions and 3 deletions.
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ enable_avicap32
enable_avifil32
enable_avrt
enable_bcrypt
enable_bcryptprimitives
enable_bluetoothapis
enable_browseui
enable_bthprops_cpl
Expand Down Expand Up @@ -1218,6 +1219,7 @@ enable_msimtf
enable_msisip
enable_msisys_ocx
enable_msls31
enable_msmpeg2vdec
enable_msnet32
enable_mspatcha
enable_msports
Expand Down Expand Up @@ -21837,6 +21839,7 @@ wine_fn_config_makefile dlls/avifile.dll16 enable_win16
wine_fn_config_makefile dlls/avrt enable_avrt
wine_fn_config_makefile dlls/bcrypt enable_bcrypt
wine_fn_config_makefile dlls/bcrypt/tests enable_tests
wine_fn_config_makefile dlls/bcryptprimitives enable_bcryptprimitives
wine_fn_config_makefile dlls/bluetoothapis enable_bluetoothapis
wine_fn_config_makefile dlls/browseui enable_browseui
wine_fn_config_makefile dlls/browseui/tests enable_tests
Expand Down Expand Up @@ -22225,6 +22228,7 @@ wine_fn_config_makefile dlls/msimtf enable_msimtf
wine_fn_config_makefile dlls/msisip enable_msisip
wine_fn_config_makefile dlls/msisys.ocx enable_msisys_ocx
wine_fn_config_makefile dlls/msls31 enable_msls31
wine_fn_config_makefile dlls/msmpeg2vdec enable_msmpeg2vdec
wine_fn_config_makefile dlls/msnet32 enable_msnet32
wine_fn_config_makefile dlls/mspatcha enable_mspatcha
wine_fn_config_makefile dlls/mspatcha/tests enable_tests
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2455,6 +2455,7 @@ WINE_CONFIG_MAKEFILE(dlls/avifile.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/avrt)
WINE_CONFIG_MAKEFILE(dlls/bcrypt)
WINE_CONFIG_MAKEFILE(dlls/bcrypt/tests)
WINE_CONFIG_MAKEFILE(dlls/bcryptprimitives)
WINE_CONFIG_MAKEFILE(dlls/bluetoothapis)
WINE_CONFIG_MAKEFILE(dlls/browseui)
WINE_CONFIG_MAKEFILE(dlls/browseui/tests)
Expand Down Expand Up @@ -2843,6 +2844,7 @@ WINE_CONFIG_MAKEFILE(dlls/msimtf)
WINE_CONFIG_MAKEFILE(dlls/msisip)
WINE_CONFIG_MAKEFILE(dlls/msisys.ocx)
WINE_CONFIG_MAKEFILE(dlls/msls31)
WINE_CONFIG_MAKEFILE(dlls/msmpeg2vdec)
WINE_CONFIG_MAKEFILE(dlls/msnet32)
WINE_CONFIG_MAKEFILE(dlls/mspatcha)
WINE_CONFIG_MAKEFILE(dlls/mspatcha/tests)
Expand Down
2 changes: 2 additions & 0 deletions dlls/kernel32/kernel32.spec
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@
@ stdcall -import GetFinalPathNameByHandleW(long ptr long long)
@ stdcall GetFirmwareEnvironmentVariableA(str str ptr long)
@ stdcall GetFirmwareEnvironmentVariableW(wstr wstr ptr long)
@ stdcall GetFirmwareType(ptr)
@ stdcall -import GetFullPathNameA(str long ptr ptr)
# @ stub GetFullPathNameTransactedA
# @ stub GetFullPathNameTransactedW
Expand Down Expand Up @@ -1448,6 +1449,7 @@
@ stdcall SetProcessAffinityMask(long long)
@ stdcall -import SetProcessAffinityUpdateMode(long long)
@ stdcall SetProcessDEPPolicy(long)
@ stdcall -import SetProcessInformation(long long ptr long)
@ stdcall -import SetProcessMitigationPolicy(long ptr long)
@ stdcall -import SetProcessPreferredUILanguages(long ptr ptr)
@ stdcall -import SetProcessPriorityBoost(long long)
Expand Down
12 changes: 12 additions & 0 deletions dlls/kernel32/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,18 @@ BOOL WINAPI SetFirmwareEnvironmentVariableW(const WCHAR *name, const WCHAR *guid
return FALSE;
}

/***********************************************************************
* GetFirmwareType (KERNEL32.@)
*/
BOOL WINAPI GetFirmwareType(FIRMWARE_TYPE *type)
{
if (!type)
return FALSE;

*type = FirmwareTypeUnknown;
return TRUE;
}

/**********************************************************************
* GetNumaNodeProcessorMask (KERNEL32.@)
*/
Expand Down
1 change: 1 addition & 0 deletions dlls/kernelbase/kernelbase.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,7 @@
@ stdcall SetProcessAffinityUpdateMode(long long)
# @ stub SetProcessDefaultCpuSets
@ stdcall SetProcessGroupAffinity(long ptr ptr)
@ stdcall SetProcessInformation(long long ptr long)
# @ stub SetProcessInformation
@ stdcall SetProcessMitigationPolicy(long ptr long)
@ stdcall SetProcessPreferredUILanguages(long ptr ptr)
Expand Down
18 changes: 18 additions & 0 deletions dlls/kernelbase/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,24 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( const WCHAR *app_name, WCHAR *cmd_
inherit, flags, env, cur_dir, startup_info, info, NULL );
}

/**********************************************************************
* SetProcessInformation (kernelbase.@)
*/
BOOL WINAPI SetProcessInformation( HANDLE process, PROCESS_INFORMATION_CLASS info_class, void *info, DWORD size )
{
switch (info_class)
{
case ProcessMemoryPriority:
return set_ntstatus( NtSetInformationProcess( process, ProcessPagePriority, info, size ));
case ProcessPowerThrottling:
return set_ntstatus( NtSetInformationProcess( process, ProcessPowerThrottlingState, info, size ));
case ProcessLeapSecondInfo:
return set_ntstatus( NtSetInformationProcess( process, ProcessLeapSecondInformation, info, size ));
default:
FIXME("Unrecognized information class %d.\n", info_class);
return FALSE;
}
}

/*********************************************************************
* DuplicateHandle (kernelbase.@)
Expand Down
2 changes: 2 additions & 0 deletions dlls/userenv/userenv.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
138 stdcall @(long str str str str long str long long str str long) USERENV_138

@ stdcall CreateAppContainerProfile(wstr wstr wstr ptr long ptr)
@ stdcall CreateEnvironmentBlock(ptr ptr long)
@ stdcall DeriveAppContainerSidFromAppContainerName(wstr ptr)
@ stdcall DestroyEnvironmentBlock(ptr)
@ stdcall EnterCriticalPolicySection(long)
@ stdcall ExpandEnvironmentStringsForUserA(ptr str ptr long)
Expand Down
17 changes: 17 additions & 0 deletions dlls/userenv/userenv_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,3 +688,20 @@ BOOL WINAPI USERENV_138( int csidl, LPCSTR lnk_dir, LPCSTR lnk_filename,

return FALSE;
}

HRESULT WINAPI CreateAppContainerProfile(PCWSTR container_name, PCWSTR display_name, PCWSTR description,
SID_AND_ATTRIBUTES *capabilities, DWORD capability_count,
SID **container_sid)
{
FIXME("(%s, %s, %s, %p, %ld, %p): stub\n", debugstr_w(container_name), debugstr_w(display_name),
debugstr_w(description), capabilities, capability_count, container_sid);

return E_NOTIMPL;
}

HRESULT WINAPI DeriveAppContainerSidFromAppContainerName(PCWSTR container_name, PSID sid)
{
FIXME("(%s, %p): stub\n", debugstr_w(container_name), sid);

return E_NOTIMPL;
}
2 changes: 1 addition & 1 deletion include/ddk/wdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ NTSTATUS WINAPI ZwSetEvent(HANDLE,PULONG);
NTSTATUS WINAPI ZwSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
NTSTATUS WINAPI ZwSetInformationKey(HANDLE,const int,PVOID,ULONG);
NTSTATUS WINAPI ZwSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
NTSTATUS WINAPI ZwSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
NTSTATUS WINAPI ZwSetInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG);
NTSTATUS WINAPI ZwSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
NTSTATUS WINAPI ZwSetIoCompletion(HANDLE,ULONG,ULONG,NTSTATUS,ULONG);
NTSTATUS WINAPI ZwSetLdtEntries(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
Expand Down
16 changes: 16 additions & 0 deletions include/winbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,21 @@ typedef struct _WIN32_FIND_STREAM_DATA {
WCHAR cStreamName[MAX_PATH + 36];
} WIN32_FIND_STREAM_DATA,*PWIN32_FIND_STREAM_DATA;

typedef enum _PROCESS_INFORMATION_CLASS
{
ProcessMemoryPriority,
ProcessMemoryExhaustionInfo,
ProcessAppMemoryInfo,
ProcessInPrivateInfo,
ProcessPowerThrottling,
ProcessReservedValue1,
ProcessTelemetryCoverageInfo,
ProcessProtectionLevelInfo,
ProcessLeapSecondInfo,
ProcessMachineTypeInfo,
ProcessInformationClassMax
} PROCESS_INFORMATION_CLASS;

WINBASEAPI BOOL WINAPI ActivateActCtx(HANDLE,ULONG_PTR *);
WINADVAPI BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
WINADVAPI BOOL WINAPI AddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
Expand Down Expand Up @@ -2675,6 +2690,7 @@ WINBASEAPI BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
WINADVAPI BOOL WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,PGENERIC_MAPPING,HANDLE);
WINADVAPI BOOL WINAPI SetPrivateObjectSecurityEx(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,ULONG,PGENERIC_MAPPING,HANDLE);
WINBASEAPI BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD_PTR);
WINBASEAPI BOOL WINAPI SetProcessInformation(HANDLE,PROCESS_INFORMATION_CLASS,LPVOID,DWORD);
WINBASEAPI BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL);
WINBASEAPI BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD);
WINBASEAPI BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T);
Expand Down
7 changes: 7 additions & 0 deletions include/winnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -6265,6 +6265,13 @@ typedef enum _PROCESS_MITIGATION_POLICY
MaxProcessMitigationPolicy
} PROCESS_MITIGATION_POLICY, *PPROCESS_MITIGATION_POLICY;

typedef enum _FIRMWARE_TYPE
{
FirmwareTypeUnknown,
FirmwareTypeBios,
FirmwareTypeUefi,
FirmwareTypeMax
} FIRMWARE_TYPE, *PFIRMWARE_TYPE;

/* Intrinsic functions */

Expand Down
73 changes: 71 additions & 2 deletions include/winternl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1568,11 +1568,80 @@ typedef enum _PROCESSINFOCLASS {
ProcessThreadStackAllocation = 41,
ProcessWorkingSetWatchEx = 42,
ProcessImageFileNameWin32 = 43,
ProcessImageFileMapping = 44,
ProcessAffinityUpdateMode = 45,
ProcessMemoryAllocationMode = 46,
ProcessGroupInformation = 47,
ProcessTokenVirtualizationEnabled = 48,
ProcessConsoleHostProcess = 49,
ProcessWindowInformation = 50,
ProcessHandleInformation = 51,
ProcessMitigationPolicy = 52,
ProcessDynamicFunctionTableInformation = 53,
ProcessHandleCheckingMode = 54,
ProcessKeepAliveCount = 55,
ProcessRevokeFileHandles = 56,
ProcessWorkingSetControl = 57,
ProcessHandleTable = 58,
ProcessCheckStackExtentsMode = 59,
ProcessCommandLineInformation = 60,
ProcessProtectionInformation = 61,
ProcessMemoryExhaustion = 62,
ProcessFaultInformation = 63,
ProcessTelemetryIdInformation = 64,
ProcessCommitReleaseInformation = 65,
ProcessDefaultCpuSetsInformation = 66,
ProcessAllowedCpuSetsInformation = 67,
ProcessSubsystemProcess = 68,
ProcessJobMemoryInformation = 69,
ProcessInPrivate = 70,
ProcessRaiseUMExceptionOnInvalidHandleClose = 71,
ProcessIumChallengeResponse = 72,
ProcessChildProcessInformation = 73,
ProcessHighGraphicsPriorityInformation = 74,
ProcessSubsystemInformation = 75,
ProcessEnergyValues = 76,
ProcessPowerThrottlingState = 77,
ProcessReserved3Information = 78,
ProcessWin32kSyscallFilterInformation = 79,
ProcessDisableSystemAllowedCpuSets = 80,
ProcessWakeInformation = 81,
ProcessEnergyTrackingState = 82,
ProcessManageWritesToExecutableMemory = 83,
ProcessCaptureTrustletLiveDump = 84,
ProcessTelemetryCoverage = 85,
ProcessEnclaveInformation = 86,
ProcessEnableReadWriteVmLogging = 87,
ProcessUptimeInformation = 88,
ProcessImageSection = 89,
ProcessDebugAuthInformation = 90,
ProcessSystemResourceManagement = 91,
ProcessSequenceNumber = 92,
ProcessLoaderDetour = 93,
ProcessSecurityDomainInformation = 94,
ProcessCombineSecurityDomainsInformation = 95,
ProcessEnableLogging = 96,
ProcessLeapSecondInformation = 97,
ProcessFiberShadowStackAllocation = 98,
ProcessFreeFiberShadowStackAllocation = 99,
ProcessAltSystemCallInformation = 100,
ProcessDynamicEHContinuationTargets = 101,
ProcessDynamicEnforcedCetCompatibleRanges = 102,
ProcessCreateStateChange = 103,
ProcessApplyStateChange = 104,
ProcessEnableOptionalXStateFeatures = 105,
ProcessAltPrefetchParam = 106,
ProcessAssignCpuPartitions = 107,
ProcessPriorityClassEx = 108,
ProcessMembershipInformation = 109,
ProcessEffectiveIoPriority = 110,
ProcessEffectivePagePriority = 111,
MaxProcessInfoClass,
#ifdef __WINESRC__
ProcessWineMakeProcessSystem = 1000,
ProcessWineLdtCopy,
#endif
} PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
} PROCESSINFOCLASS;

#define MEM_EXECUTE_OPTION_DISABLE 0x01
#define MEM_EXECUTE_OPTION_ENABLE 0x02
Expand Down Expand Up @@ -4124,7 +4193,7 @@ NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULO
NTSYSAPI NTSTATUS WINAPI NtSetInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
Expand Down

0 comments on commit 6360a0b

Please sign in to comment.