Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

<processthreadsapi.h> functions #492

Merged
merged 20 commits into from
Jul 4, 2020

Conversation

vatsan-madhavan
Copy link
Member

Partially addresses #491.

  • Adds tests where possible.
    • I hope to add additional tests as more related API's are added. Sometimes (yet to be added) fn. B might make writing a test for fn. A viable.
  • Some types were moved out of storebanned\ because they were needed by functions that are available in store/UWP contexts.

Functions

  • FlushInstructionCache
  • FlushProcessWriteBuffers
  • GetCurrentProcessorNumber
  • GetCurrentProcessorNumberEx
  • GetCurrentProcessToken
  • GetCurrentThread
  • GetCurrentThreadEffectiveToken
  • GetCurrentThreadStackLimits
  • GetCurrentThreadToken
  • GetPriorityClass
  • GetProcessHandleCount
  • GetProcessIdOfThread
  • GetProcessInformation
  • GetProcessMitigationPolicy
  • GetProcessPriorityBoost
  • GetProcessShutdownParameters
  • GetProcessVersion
  • GetSystemTimes
  • GetThreadContext
  • GetThreadDescription
  • GetThreadId
  • GetThreadIdealProcessorEx
  • GetThreadInformation
  • GetThreadIOPendingFlag
  • GetThreadPriority
  • GetThreadPriorityBoost
  • GetThreadTimes
  • IsProcessCritical
  • IsProcessorFeaturePresent
  • OpenProcessToken
  • OpenThread
  • OpenThreadToken
  • ProcessIdToSessionId
  • QueryProcessAffinityUpdateMode
  • QueryProtectedPolicy
  • QueueUserAPC
  • SetPriorityClass
  • SetProcessAffinityUpdateMode
  • SetProcessDynamicEHContinuationTargets
  • SetProcessInformation
  • SetProcessMitigationPolicy
  • SetProcessPriorityBoost
  • SetProtectedPolicy
  • SetThreadContext
  • SetThreadDescription
  • SetThreadIdealProcessor
  • SetThreadIdealProcessorEx
  • SetThreadInformation
  • SetThreadPriority
  • SetThreadPriorityBoost
  • SetThreadStackGuarantee
  • SetThreadToken
  • SwitchToThread
  • TlsAlloc
  • TlsFree
  • TlsGetValue
  • TlsSetValue

Structs/types

  • APP_MEMORY_INFORMATION
  • MEMORY_PRIORITY_INFORMATION
  • PROCESS_LEAP_SECOND_INFO
  • PROCESS_MEMORY_EXHAUSTION_INFO
  • PROCESS_POWER_THROTTLING_STATE
  • PROCESS_PROTECTION_LEVEL_INFORMATION
  • THREAD_POWER_THROTTLING_STATE
  • PROCESS_INFORMATION_CLASS
  • PROCESS_MEMORY_EXHAUSTION_TYPE
  • PROCESSOR_NUMBER

Additional types

  • ProcessPriorityClass enum
  • ThreadAccess enum

@AArnott
Copy link
Collaborator

AArnott commented Jul 4, 2020

@vatsan-madhavan is your intention to get this PR merged as soon as I approve, or after your checklist is completed?

src/Kernel32/storebanned/Kernel32.cs Outdated Show resolved Hide resolved
src/Kernel32/Kernel32.cs Outdated Show resolved Hide resolved
@vatsan-madhavan
Copy link
Member Author

your intention to get this PR merged as soon as I approve, or after your checklist is completed?

I'd rather merge it piecemeal so that reviews could be done easily and feedback incorporated sooner (eg uint* vs out uint is likely affect other functions as well).

I'm flexible re: the approach.

@AArnott
Copy link
Collaborator

AArnott commented Jul 4, 2020

Well this looks high quality. I'll be happy to merge once the couple of minor issues are fixed.

@AArnott AArnott merged commit 51cba65 into dotnet:master Jul 4, 2020
@vatsan-madhavan vatsan-madhavan deleted the processthreadapis branch July 4, 2020 18:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants