Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dangerously hijack file handles to close them #6

Draft
wants to merge 306 commits into
base: development
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Oct 15, 2022

  1. Configuration menu
    Copy the full SHA
    3c1b2ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2f22c7e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1236997 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a8ac39b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    47b1bb7 View commit details
    Browse the repository at this point in the history
  6. feat: add equivalent methods for handling handles to public API

    Ready for testing. Need a CLI project at the very least.
    BinToss committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    637471f View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Configuration menu
    Copy the full SHA
    f203ee1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7cd5501 View commit details
    Browse the repository at this point in the history
  3. refactor: override GetHashCode() in pseudo-funcptr

    resolves warning CS0659
    BinToss committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    216a1ef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e52fdbd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3c6cc06 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c1ce4e7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a6c31d2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7616902 View commit details
    Browse the repository at this point in the history
  9. refactor: add method CheckAccess for debugging purposes

    docs: add missing quotation mark
    BinToss committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    ab3435f View commit details
    Browse the repository at this point in the history
  10. refactor: add parameter to pass out WarningException

    refactor: add Refresh for FileLockerEx Lockers list
    BinToss committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    d59487b View commit details
    Browse the repository at this point in the history
  11. refactor: move CsWin32 supplements to new files

    todo: move SYSTEM_HANDLE_ definitions to CsWin32 namespace
    BinToss committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    79397ec View commit details
    Browse the repository at this point in the history
  12. refactor: slightly improve getting process command lines

    It still fails more often than not due to crossing into unreadable memory. I'll look into it later.
    BinToss committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    97e4992 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    7d49548 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    123d581 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f0763ab View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    0e2083a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    44bccb8 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    023a2df View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    780275a View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    7d3ae8e View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    572ce32 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    41b4c5a View commit details
    Browse the repository at this point in the history
  23. refactor: add more native definitions, supporting Types

    Some are platform-specific, hence the 32/64 suffixes.
    Although PEB32 and PEB64 are done, plain ol'
      PEB isn't done yet.
    I exploited FieldOffsetAttribute quite bit in these
      platform-specific definitions.
    Additionally, some of the less important, platform
      specific type definitions were skipped to save time.
    BinToss committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    1f1dc4f View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2023

  1. Configuration menu
    Copy the full SHA
    cab4e5b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9c29b0a View commit details
    Browse the repository at this point in the history
  3. refactor: refactor NTSTATUS, mimic dotnet/PInvoke

    refactor: remove redundant const STATUS_INFO_LENGTH_MISMATCH;
    refactor: define 'using' aliases to ensure the correct Types are used.
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    137c35f View commit details
    Browse the repository at this point in the history
  4. docs: update inline code docs

    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    a9d70cb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7a21538 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f506116 View commit details
    Browse the repository at this point in the history
  7. refactor: simplify 'using' statement

    csharp(IDE0063)
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    777e7ee View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    96f3e5e View commit details
    Browse the repository at this point in the history
  9. fix: use correct types for param rgsFileNames of RmRegisterResources

    The overload requires a span of PCWSTR, not PWSTR.
    PCWSTR: A pointer to a null-terminated, constant character string.
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    0242b56 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    58faeaf View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1a8cb83 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d1fe87b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ad659aa View commit details
    Browse the repository at this point in the history
  14. refactor: overhaul GetProcessCommandLine

    This adds the following:
    * Parameter validation
    * Exception handling and throwing
    * On windows 8.1 or later, NtQueryInformationProcess is called with ProcessCommandLineInformation (60). Otherwise...
    * On Windows 8.0 and below:
        * As a 32-bit process, acquire a 64-bit process's command line. We use a custom, ulong-based UIntPtr64 for pointers.
            1. Pass ProcessBasicInformation (0) to NtWow64QueryInformationProcess64 to copy the 64-bit PROCESS_BASIC_INFORMATION.
            2. Pass Peb field to NtWow64ReadVirtualMemory64 to copy the 64-bit PEB.
            3. Pass ProcessParameters field to NtWow64ReadVirtualMemory64 to copy the 64-bit RTL_USER_PROCESS_PARAMETERS.
            4. Pass CommandLine field to NtWow64ReadVirtualMemory to copy the UNICODE_STRING command line.
        * As a 64-bit process, acquire 32-bit process's command line. We use a custom, uint-based `UIntrPtr32` for pointers.
            1. Pass ProcessBasicInformation (0) to NtQueryInformationProcess to copy the 32-bit PROCESS_BASIC_INFORMATION.
            2. Pass the Peb field to ReadProcessMemory to copy target's 32-bit PEB.
            3. Pass ProcessParameters field to ReadProcessMemory to copy the 32-bit RTL_USER_PROCESS_PARAMETERS.
            4. Pass CommandLine field to ReadProcessMemory to copy the UNICODE_STRING command line.
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    143b27d View commit details
    Browse the repository at this point in the history
  15. refactor: improve GetFullProcessImageName

    refactor: use dotnet functionality to acquire process names
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    4b9135c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    ab43042 View commit details
    Browse the repository at this point in the history
  17. refactor: check if handle is File handle in SafeFileHandleEx ctor

    refactor: ignore some inaccessible system processes
    refactor: improve exception handling
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    79f2abe View commit details
    Browse the repository at this point in the history
  18. refactor: improve TryGetFinalPath

    * System process is ignored. Throw InvalidOperationException.
    * Open ProcessHandle for target process
    * Throw exception if OpenProcess_SafeHandle fails
    * Duplicate handle. Pass duplicate to GetFinalPathNameByHandle.
    * Throw exception if DuplicateHandle fails.
    * Retry when GetFinalPathNameByHandle buffer is too small.
    * Throw different exceptions based on native error code when GetFinalPathNameByHandle still fails.
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    33453cc View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    83c4bb1 View commit details
    Browse the repository at this point in the history
  20. reactor: add internal method IsDebugModeEnabled

    Checks the current security token for SeDebugPrivilege.
    If it is not present, the user can call Process.EnterDebugMode().
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    06ac4f6 View commit details
    Browse the repository at this point in the history
  21. build: set EmitCompilerGeneratedFiles to true

    This should help with debugging in some editors.
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    f13cff9 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    e11386b View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    ee29401 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    23a207f View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    63dc718 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    75dc135 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    f652e54 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    19469b6 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    8dd3f01 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    8605bce View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    911b58e View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    2efab6f View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    edd8920 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    01edeb7 View commit details
    Browse the repository at this point in the history
  35. refactor: set structs or their members to readonly

    docs: update PEB_LDR_DATA64 inline docs
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    f128e47 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    49b0e18 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    3eca414 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    af39417 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    a3057cc View commit details
    Browse the repository at this point in the history
  40. fix: use non-generic LIST_ENTRY

    LIST_ENTRY instances can form a list of objects of many different Types.
    Specifying a Type using LIST_ENTRY<T> is too restrictive.
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    cf09984 View commit details
    Browse the repository at this point in the history
  41. fix: prevent runtime TypeLoadException

    Though it Roslyn didn't catch it, this appears to be CS0523:
    > Struct member 'ExampleType.ExampleMember' of type 'ExampleType' causes a cycle in the struct layout
    
    ExampleType cannot have a member of type ExampleType.
    Likewise, ExampleType<T> cannot have a member of type ExampleType<T>
    BinToss committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    72c5d2d View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    53a3cde View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    0a44710 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    70f8390 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    51b3682 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2023

  1. Configuration menu
    Copy the full SHA
    dd2a087 View commit details
    Browse the repository at this point in the history
  2. refactor: add GetSafeHandle() to system handle

    refactor: change readonly fields to Get properties
    refactor: exclude system handle's GrantedAccess from Json code generation
    refactor: add GrantedAccessString for Json code generation
    docs: change some summaries to single line
    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    9ee76c8 View commit details
    Browse the repository at this point in the history
  3. refactor: set HANDLE members to internal

    Json code generation was assuming the type was public because the members were public.
    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    625e24c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    894e679 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    06e1882 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c83db4d View commit details
    Browse the repository at this point in the history
  7. refactor: update usings

    chore: remove old comments
    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    5bc848a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ef4337e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    15fdd44 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    abf91de View commit details
    Browse the repository at this point in the history
  11. refactor: base ObjectTypesInformationBuffer on SafeBuffer<T>

    refactor: add GetTypesInfo()
    refactor: move ObjectTypes to ObjectTypesInformation buffer
    refactor: remove ReAllocate(); use SafeBuffer<T>.Reallocate() instead
    refactor: override Dispose to free buffer with Marshal.FreeHGlobal()
    refactor: remove remaining Ph functions
    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    34128bf View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    dcdee0b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    96016f1 View commit details
    Browse the repository at this point in the history
  14. docs: remove old TODO

    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    c4d3ece View commit details
    Browse the repository at this point in the history
  15. refactor: remove ObjectTypesInformationBuffer

    It provides caching, but we would needs to match the ObjectTypeIndex to a type in the List.
    That was unreliable.
    It often spat out garbage due to platform differences and other causes I couldn't identify.
    SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX.GetHandleObjectType() is easier to implement.
    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    952f1ba View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    bca3936 View commit details
    Browse the repository at this point in the history
  17. docs: remove old comments

    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    326cfaa View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    247e2eb View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    238ce6b View commit details
    Browse the repository at this point in the history
  20. refactor: move IsFileHandle() to SafeHandleEx

    refactor: change CloseSourceHandle to return bool
    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    aa3a482 View commit details
    Browse the repository at this point in the history
  21. refactor: add TryGetFullProcessImageName

    fix: avoid Marshal.ReAllocHGlobal bug
    
    ReAllocHGlobal will sometimes encounter an error, but it discards the error and throws a deceptive OutOfMemoryException.
    See dotnet/runtime.git
    BinToss committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    feee78c View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    8e46b33 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2023

  1. Configuration menu
    Copy the full SHA
    8d24878 View commit details
    Browse the repository at this point in the history
  2. refactor: add exception message

    refactor: remove unused ToSafeFileHandle()
    chore: add Methods region
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    6576402 View commit details
    Browse the repository at this point in the history
  3. refactor: rework SafeHandleEx constructor, properties

    docs: add TODO: remove closed handles from list
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    8b43267 View commit details
    Browse the repository at this point in the history
  4. refactor: rework SafeFileHandleEx constructor, properties

    chore: update a reference to SYSTEM_HANDLE_TABLE_ENTRY_EX
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    5048cdd View commit details
    Browse the repository at this point in the history
  5. refactor: rework TryGetFinalPath()

    * throw exception if a process is protected i.e. inaccessible because it's a system process
    * don't throw exceptions
    * return tuple
    * use using statements for disposable objects
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    8b3df17 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    91655bc View commit details
    Browse the repository at this point in the history
  7. refactor: remove redundant FreeHGlobal

    We switched from a pointer to a 'using PWSTR'.
    The hidden Finally statement frees memory before the exiting the method.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    9cd45c6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b110aea View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    28593c1 View commit details
    Browse the repository at this point in the history
  10. refactor: remove old DEBUG preprocessor ops

    refactor: remove redundant return statement
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    64786cc View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    48d4d12 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a92efb1 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    71ac75a View commit details
    Browse the repository at this point in the history
  14. refactor: remove redundant "is (not) default" checks

    These were intended to instantiate the tuple property before checking its items, but the runtime runs the Get accessor whenever the property or its items are referenced.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    b86b304 View commit details
    Browse the repository at this point in the history
  15. refactor: ensure all native GetProcessCommandLine exceptions are wrap…

    …ped and have custom messages
    
    docs: update GetProcessCommandLine exception docs
    docs: update SafeHandleEx.ReleaseHandle() 'returns' docs
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    05ac570 View commit details
    Browse the repository at this point in the history
  16. chore: split, update FileLockerEx TODO

    Implementing RefreshList() and removing closed/invalid handles are independent tasks.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    4a6cdf6 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    91860f6 View commit details
    Browse the repository at this point in the history
  18. refactor: update HandlesFilter enum with IncludeProtectedProcesses

    ! This may need to be update again to differentiate between different levels of process protection.
    
    This new enum value is intended to include handles from processes with Light or Full process protection.
    This protection limits the information that can be acquired from a process e.g. command line, per-handle details, and more.
    Among these details is the Name of a handle (i.e. the full file path) and the Type of a handle's object, hence the inherent inclusion of IncludeFailedTypeQuery.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    5d50cc6 View commit details
    Browse the repository at this point in the history
  19. refactor: remove unused variable 'exceptionData'

    This was originally intended for returning a warning in addition to whatever value is returned by GetProcessCommandLine.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    c07b8a1 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    cc81b4b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d8870cd View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    62f6ca1 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    7bc0972 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    06f05dd View commit details
    Browse the repository at this point in the history
  25. refactor: add SafeHandleEx.ProcessProtection property

    The CommandLine cannot be queried from Full protection processes, but it *can* be queried from Light protection processes via the Win8.1+ code path.
    Because the <Win8.1 code paths require the PROCESS_VM_READ permission, the function may be denied access.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    fdb3a77 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    0750c40 View commit details
    Browse the repository at this point in the history
  27. refactor: check process protection for command line accessibility

    refactor: add using static PS_PROTECTED_TYPE for simpler access
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    ea8e997 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    a0dd6d6 View commit details
    Browse the repository at this point in the history
  29. revert: remove try-catch from GetHandleObjectType

    Partially reverts 894e679 "refactor: replace PhGetObjectTypeName with custom solution"
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    7831d99 View commit details
    Browse the repository at this point in the history
  30. refactor: wrap the entirety of TryGetFinalPath in try-catch

    refactor: try getting file object's path/name without duplicating the handle; try duplicating if this fails
    refactor: throw InvalidOperationException for more TryGetFinalPath scenarios
    docs: update TryGetFinalPath exception docs, remarks
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    1e5c1b0 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    a07d7b5 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    306e842 View commit details
    Browse the repository at this point in the history
  33. refactor: add SafeFileHandleEx.FileNameInfo

    refactor: add query GetFileInformationByHandleEx, FILE_NAME_INFO
    refactor: rename TypeOfFileHandle to FileType
    refactor: inline GetIsFileHandle()
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    d4c3247 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    c749fe3 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    d6f3e2c View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    ea2fb9f View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    26c04bc View commit details
    Browse the repository at this point in the history
  38. refactor: inline TryGetFullProcessImageName

    ...but not GetFullProcessImageName. That would be a bit too cluttered for my preferences.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    21d6048 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    57d0b38 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    931038e View commit details
    Browse the repository at this point in the history
  41. refactor: add SafeHandle.ObjectName property

    This will *hopefully* be less problematic than obtaining a "file" handle's name or path. The possibility of redundancy is acceptable.
    
    FindLockingHandles will be updated in a later commit with the addition of ProcessInfo.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    1f84d0c View commit details
    Browse the repository at this point in the history
  42. refactor: replace HandleObjectType's ProcessIsProtected refs with Pro…

    …cessProtection
    
    refactor: add uncommitted using namespace
    docs: add TODO 'override IsInvalid'
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    9b01fe9 View commit details
    Browse the repository at this point in the history
  43. docs: add summaries for FileType

    refactor: remove enum member unused by Windows
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    02a2afc View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    09a4a4a View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    8faaca9 View commit details
    Browse the repository at this point in the history
  46. refactor: add ProcessInfo

    A wrapper for System.Diagnostic.Process objects. Adds properties e.g. Handles lists.
    An inheriting class would be preferred, but casting to/from base classes and inheriting classes is prohibited
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    419a38b View commit details
    Browse the repository at this point in the history
  47. refactor: change FindLockingHandles return type to List<ProcessInfo>

    docs: update FileLockerEx.Path summary
    
    I had fun with LINQ and async ops for a while.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    c887584 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    d8f6c6f View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    e44c523 View commit details
    Browse the repository at this point in the history
  50. fix: change string comparison operator

    ("File" is "File") == false, apparently
    Use == for strings.
    BinToss committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    a1ced27 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    6d8ca88 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2023

  1. refactor: add TryGetFinalPath stopwatch

    refactor: remove unused variable from TryGetFinalPath
    BinToss committed Apr 10, 2023
    Configuration menu
    Copy the full SHA
    2bc267b View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2023

  1. feat: allow user to specify the how the handle list is sorted

    * add FileLockerEx.SortByProperty enum
    * add FileLockerEx.SortByPrimary property
    * add FileLockerEx.SortBySecondary property
    
    Not all SortByProperty members have been fully implemented.
    BinToss committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    05bf4f7 View commit details
    Browse the repository at this point in the history
  2. docs: refine FileLockerEx.Path summary

    It wasn't entirely correct.
    BinToss committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    5dc8a17 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2023

  1. feat: add class ProcessQueryHandle to store access rights with handle

    refactor: remove per-ProcessInfo handle lists
    feat: add ProcessId property to access underlying Process Id
    BinToss committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    2f461e0 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. refactor: move process properties, methods to ProcessInfo

    refactor: add method PS_PROTECTION.ToString()
    refactor: add static property NativeMethods.Processes
    BinToss committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    717bf36 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2023

  1. refactor: remove instanced process lists from FileLockerEx

    refactor: make FindLockingHandles return List<SafeFileHandleEx>
    docs: add "TODO: contemplate fuzzy search benefits"
    refactor: change Console.WriteLine calls to Trace.Trace*() for better logging
    docs: add "TODO: ProcessList garbage cleanup"
    
    All ProcessInfo activity in FindLockingHandles() is now implicit.
    ProcessInfo data will be instantiated and added to NativeMethods.Processes when requested by a SafeHandleEx (or inheritor's) property.
    
    TODO: ProcessList garbage collection. Items are being added to NativeMethods' static Processes, but none are removed.
    BinToss committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    3ee71ca View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2023

  1. build: expose CsWin32 API publicly

    Only a few things need to be public, but granular exposure is not an option...yet.
    BinToss committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    e7b2019 View commit details
    Browse the repository at this point in the history
  2. fix: assign correct field offsets for PROCESS_BASIC_INFORMATION64

    Some were set to default (0x00). Oops.
    BinToss committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    b186662 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Configuration menu
    Copy the full SHA
    7df3ebc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4b05eeb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2f1b50d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bcb5a94 View commit details
    Browse the repository at this point in the history
  5. refactor: make PROCESS_BASIC_INFORMATION public

    refactor: rename InheritedFromUniqueProcessId to ParentProcessId
    refactor: try IsDebugModeEnabled check and EnterDebugMode call for higher handle access
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    3b61f26 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a600f8f View commit details
    Browse the repository at this point in the history
  7. refactor: remove PEB_Ex

    refactor: rename BeingDebugged_bool to IsBeingDebugged
    
    The purpose of the incomplete PEB_Ex is already fulfilled by ProcessEnvironmentBlock and ProcessInfo.
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    8249163 View commit details
    Browse the repository at this point in the history
  8. refactor: add record struct ProcessAndHostOSArch

    This provides a readonly Type definition of the ValueTuple (IMAGE_FILE_MACHINE, IMAGE_FILE_MACHINE)
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    a24601a View commit details
    Browse the repository at this point in the history
  9. perf: replace enum.HasFlag() with & operator

    As it turns out, enum.HasFlag performs several Type and reference checks before it checks if the given object has the flag value.
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    e2bd6bb View commit details
    Browse the repository at this point in the history
  10. refactor: add wrapper classes for 32-bit, 64-bit native definitions

    Wrapped structs:
    - PROCESS_BASIC_INFORMATION
    - PROCESS_BASIC_INFORMATION32
    - PROCESS_BASIC_INFORMATION64
    - PEB32
    - PEB64
    - RTL_USER_PROCESS_PARAMETERS32
    - RTL_USER_PROCESS_PARAMETERS64
    
    TODO: PEB, PEB_LDR_DATA, RTL_USER_PROCESS_PARAMETERS
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    67b48d1 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    28d3dc5 View commit details
    Browse the repository at this point in the history
  12. refactor: remove alias of global::PInvoke.NTSTATUS

    Most of its properties have been reimplemented in global::Windows.Win32.Foundation.NTSTATUS
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    3ba04cc View commit details
    Browse the repository at this point in the history
  13. fix: reference ProcessInfo.ProcessId instead of ProcessInfo.Process.Id

    The Process property is null when the .NET runtime failed to create the instance because the process's exited and its data isn't cached in the runtime's internal process list.
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    436427e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    12e7bdb View commit details
    Browse the repository at this point in the history
  15. refactor: pass Is32BitEmulateProcess to GetProcessCommandLine

    refactor: alias System.Environment
    refactor: make TryGetProcessCommandLine instanced
    refactor: change references from processId to ProcessId
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    29d8a20 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    acb957b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b142b96 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    696e434 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    89aa84f View commit details
    Browse the repository at this point in the history
  20. refactor: add ParentId to SafeFileHandleEx.ToString()

    refactor: use null-coalescing expression for ProcessProtection.ToString()
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    e7ce7d6 View commit details
    Browse the repository at this point in the history
  21. fix: SortByProperty.HandleType sorts by HandleObjectType

    refactor: add SortByProperty.HandleSubType for FileHandleType
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    dfeb9e9 View commit details
    Browse the repository at this point in the history
  22. refactor: rename ObjectProperName to ObjectRealName

    docs: add summary for SafeFileHandleEx.FileHandleType
    BinToss committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    ac118fc View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2023

  1. feat: add property safeFileHandleEx.IsFilePathRemote

    refactor: make FileHandleType, FileNameInfo check ProcessProtection
    
    In System Informer, data gathered by GetFileType and GetFileInformationByHandleEx is not accessible when the handle's owner (i.e. a process) has Light or full-level protection. If these queries work despite protection, it may be a security oversight.
    BinToss committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    8c740cd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    df1c8e0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bbac7d1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    30bf1ad View commit details
    Browse the repository at this point in the history
  5. refactor: change ProcessCommandLine to call GetPropertiesViaProcessHa…

    …ndle instead of TryGetProcessCommandLine
    BinToss committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    28b6631 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Configuration menu
    Copy the full SHA
    9e5cf56 View commit details
    Browse the repository at this point in the history
  2. refactor: make ProcessProtection compare field to (null, null) instea…

    …d of default
    
    It's a small difference that *should* skip some type comparisons.
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    f600e61 View commit details
    Browse the repository at this point in the history
  3. fix: allow casting List<ProcessInfo> to/from ProcessList

    refactor: change ProcessList from List<T> to IList<T> with List<T> backing field
    
    .NET Runtime prohibits casting an object from a base class to an inheriting class. I can come up with more reasons why it should be *allowed* than *disallowed*.
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    9045fa2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cc5c5a1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    61d8c30 View commit details
    Browse the repository at this point in the history
  6. refactor: inline TryGetFinalPath

    refactor: remove tasks from FileFullPath
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    b4f8987 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    29e198d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    acd9b15 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7d5a7b8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    82ae66d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    edbaae2 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2267f20 View commit details
    Browse the repository at this point in the history
  13. refactor: allow calling SafeFileHandleEx.ToString without initializin…

    …g properties' fields
    
    refactor: add SafeHandleEx.IsInvalid
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    ea518ac View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    fbe991c View commit details
    Browse the repository at this point in the history
  15. refactor: add constants for FileFullPath strings

    refactor: improve FileFullPath error handling
    refactor: replace NewLine with return-new constant
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    66104ff View commit details
    Browse the repository at this point in the history
  16. refactor: do not normalize FileFullPath when IsFilePathRemote

    > The Server Message Block (SMB) Protocol does not support queries for normalized paths. Consequently, when you call this function passing the handle of a file opened using SMB, and with the FILE_NAME_NORMALIZED flag, the function splits the path into its components and tries to query for the normalized name of each of those components in turn. If the user lacks access permission to any one of those components, then the function call fails with ERROR_ACCESS_DENIED.
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    ee46bfb View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    3431542 View commit details
    Browse the repository at this point in the history
  18. refactor: make get_ProcessHandle assign values to canGetQueryLimitedI…

    …nfoHandle, canGetReadMemoryHandle
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    d0cadd7 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8102108 View commit details
    Browse the repository at this point in the history
  20. refactor: use SafeBuffer<T> instead of PWSTR

    PWSTR doesn't have a Reallocate method (which would dispose the old buffer). I *could* write it.
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    d037aac View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    a1f886f View commit details
    Browse the repository at this point in the history
  22. refactor: compare fields to const values instead of default

    refactor: ensure all properties' code paths assign values to their uninitialized fields
    BinToss committed May 2, 2023
    Configuration menu
    Copy the full SHA
    b1ca0d9 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. Configuration menu
    Copy the full SHA
    5dd5b91 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Configuration menu
    Copy the full SHA
    5273f06 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. Configuration menu
    Copy the full SHA
    1c54e02 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    771e379 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f003c8b View commit details
    Browse the repository at this point in the history
  4. fix: assign, return type when GetFileType succeeds

    refactor: simplify FileHandleType code branching
    refactor: add errFailedMsg, errUnableMsg
    refactor: rename unableErrMsg, unableErr, errFailMsg
    refactor: prepend Win32Exception message with errFailedMsg
    BinToss committed May 5, 2023
    Configuration menu
    Copy the full SHA
    0e6c43b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0f298a9 View commit details
    Browse the repository at this point in the history
  6. feat: add HandleAttributes property

    feat: implement sorting by HandleAttributes, ObjectRealName (FileFullPath, FileNameInfo)
    docs: add notes regarding FileShareAccess requirements
    refactor: remove redundancy "SortByProperty.HandleName"
    
    FileShareAccess can't be queried without a kernel mode driver.
    BinToss committed May 5, 2023
    Configuration menu
    Copy the full SHA
    756d0b7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    95d9eb0 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2023

  1. refactor: also check FileNameInfo for FileName processing

    refactor: return exception to FileName when a path's file/directory name cannot be obtained
    BinToss committed May 6, 2023
    Configuration menu
    Copy the full SHA
    beeb6b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a056ce3 View commit details
    Browse the repository at this point in the history
  3. feat: add ProcessId property to system handle ex struct; converts fro…

    …m UniqueProcessId
    
    refactor: make HandleValue display as both hexadecimal and decimal in debugger
    BinToss committed May 6, 2023
    Configuration menu
    Copy the full SHA
    57dc820 View commit details
    Browse the repository at this point in the history
  4. feat: finish SortByProperty implementation

    refactor: comment out SortByProperty.FileShareAccess
    docs: update SortByProperty.ObjectRealName summary to reflect implementation
    docs: update SortByProperty.FileShareAccess comment to reflect requirements
    docs: remove SortByProperty TODO
    BinToss committed May 6, 2023
    Configuration menu
    Copy the full SHA
    28b576d View commit details
    Browse the repository at this point in the history

Commits on May 7, 2023

  1. feat: finish implementing new IsClosed property

    It is now used to discard a closed or invalid handle during the keep() function and SafeHandleEx ctors
    BinToss committed May 7, 2023
    Configuration menu
    Copy the full SHA
    e38511c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4dd2396 View commit details
    Browse the repository at this point in the history
  3. feat: add CloseSourceHandle(bool) overload

    The parameterless overload now calls CloseSourceHandle(false) to increase perceived safety at the cost of reliability.
    When parameter removeCloseProtection is true, the method will attempt to remove the HANDLE_FLAG_PROTECT_FROM_CLOSE attribute from the handle before attempting to close it.
    BinToss committed May 7, 2023
    Configuration menu
    Copy the full SHA
    4251f05 View commit details
    Browse the repository at this point in the history
  4. docs: add readonly HandleAttributes remarks

    refactor: use coalesce expression
    BinToss committed May 7, 2023
    Configuration menu
    Copy the full SHA
    f5e5c72 View commit details
    Browse the repository at this point in the history
  5. fix: convert properties to strings for sorting instead of to byte arrays

    This *should* prevent an InvalidOperationException thrown by `System.Collection.Generic.ArraySortHelper<T>.Sort(Span<T> keys, Comparison<T> comparison)`.
    Its inner exception, an ArgumentException "At least one object must implement IComparable", is thrown by System.Collection.Comparer.Compare(Object a, Object b).
    BinToss committed May 7, 2023
    Configuration menu
    Copy the full SHA
    4312a64 View commit details
    Browse the repository at this point in the history
  6. fix: do not initialize properties by default when evaluating SafeFile…

    …HandleEx.ToString()
    
    This issue was causing the debugger to unpause threads or sometimes crash the debuggee process.
    BinToss committed May 7, 2023
    Configuration menu
    Copy the full SHA
    72fe0a3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bfb841b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7ad0787 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. fix: if buffer too small and returnLength is less than buffer length,…

    … double buffer length instead of assigning returnLength
    BinToss committed May 8, 2023
    Configuration menu
    Copy the full SHA
    1ddff98 View commit details
    Browse the repository at this point in the history
  2. refactor: use 'is' when comparing to constants

    style: remove unnecessary parentheses
    BinToss committed May 8, 2023
    Configuration menu
    Copy the full SHA
    b4819c2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bfbd325 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    36eceb1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1cdea26 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cbbc524 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7b052c5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0087880 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3766142 View commit details
    Browse the repository at this point in the history
  10. fix: remove trailing null characters from ProcessMainModulePath

    refactor: remove unnecessary array buffer
    BinToss committed May 8, 2023
    Configuration menu
    Copy the full SHA
    500c7ec View commit details
    Browse the repository at this point in the history
  11. fix: correctly init, read FileNameInfo buffer

    Wrong buffer size. Wrong offsets. Redundant operations.
    BinToss committed May 8, 2023
    Configuration menu
    Copy the full SHA
    76a9c29 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    abae5f7 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    491df6c View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. feat: add handle-returning DuplicateHandle overload

    refactor: throw exception when OpenProcess_SafeHandle fails
    refactor: use global::PInvoke.Win32Exception instead of built-in type
    refactor: remove unnecessary usings
    
    I'm sorry I didn't commit every thing separately.
    
    TODO: Dup handles if not owned by current process
    BinToss committed May 11, 2023
    Configuration menu
    Copy the full SHA
    d32b6c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    007e96e View commit details
    Browse the repository at this point in the history
  3. refactor: add overload SysHandleEx.GetHandleInfo(SafeProcessHandle)

    Still unused, but may be useful at a later date.
    BinToss committed May 11, 2023
    Configuration menu
    Copy the full SHA
    7c6ead9 View commit details
    Browse the repository at this point in the history
  4. feat: add property DuplicateHandle

    refactor: split IsClosed to
    
    BREAK: IsClosed is now a tuple
    
    This is the noun usage and pronunciation of "duplicate".
    BinToss committed May 11, 2023
    Configuration menu
    Copy the full SHA
    672cf78 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2023

  1. refactor: rename ProcessQueryHandle to SafeProcessHandleEx

    refactor: open one temporary process handle per requested access right to determine which ones can be acquired
    refactor: try opening process handle with PROCESS_DUP_HANDLE to duplicate other process's owned handles
    BinToss committed May 12, 2023
    Configuration menu
    Copy the full SHA
    b32aa35 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a5c665e View commit details
    Browse the repository at this point in the history
  3. refactor: replace ProcessHandle's consecutive try-catch statements wi…

    …th Parallel.ForEach
    
    docs: document ProcessInfo.ProcessHandle summary, value
    BinToss committed May 12, 2023
    Configuration menu
    Copy the full SHA
    b158c42 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2023

  1. fix: duplicate source handle when not owned by current process

    refactor: remove redundant 'duplicate handle' block
    refactor: finish refactoring IsClosed references
    
    When the handle is owned by the current process, DuplicateHandle is a duplicate the the kernel-provided handle-the same as when the handle is owned by a different process.
    DuplicateHandle will NEVER have DUPLICATE_SOURCE_CLOSE.
    BinToss committed May 16, 2023
    Configuration menu
    Copy the full SHA
    886dbb8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0375677 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0ec0c11 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0349dd0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    192d36d View commit details
    Browse the repository at this point in the history