Skip to content

Conversation

Copy link

Copilot AI commented Nov 30, 2025

  • Analyze current nt.h file that uses <winternl.h>
  • Create a new nt.h that uses PHNT-style definitions instead of <winternl.h>
  • Add required NT structures (UNICODE_STRING, PEB, TEB, etc.)
  • Add required NT functions (NtQueryVirtualMemory, RtlExitUserThread, etc.)
  • Add SYSTEM_INFORMATION_CLASS and related structures
  • Add linked list manipulation functions (InitializeListHead, InsertTailList, etc.)
  • Fix WINDOWS_VERSION enum class to regular C enum for VS2010 compatibility
  • Add GitHub Actions workflow for MSVC compilation testing
  • Fix platform names in workflow (x86/x64 instead of Win32)
  • Verify MSVC compilation passes (waiting for workflow approval)

Note: The workflow needs to be approved in GitHub Actions before it can run. Please approve the workflow at https://github.com/iamasbcx/MemoryModulePP/actions

Original prompt

有很多重新定义 根据源码修改定义 还有很多找不到标识符nt.h 应该不使用#include <winternl.h>头文件


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 30, 2025
Copilot AI and others added 4 commits November 30, 2025 02:07
- Removed #include <winternl.h> from nt.h to avoid redefinition conflicts
- Added complete NTSTATUS, STRING, UNICODE_STRING, OBJECT_ATTRIBUTES definitions
- Added PROCESSINFOCLASS and THREADINFOCLASS enumerations
- Added PEB_LDR_DATA, RTL_USER_PROCESS_PARAMETERS structures
- Added complete PEB structure with SessionId field
- Added TEB structure with ClientId field
- Added linked list manipulation functions (InitializeListHead, InsertTailList, etc.)
- Added MEMORY_INFORMATION_CLASS enumeration
- Added NtQueryVirtualMemory, NtOpenSection, RtlExitUserThread functions
- Added RtlEncodePointer/RtlDecodePointer, RtlImageDirectoryEntryToData functions
- Added RtlProcessHeap macro
- Added STATUS_ALREADY_INITIALIZED constant
- Fixed WINDOWS_VERSION enum class to regular C enum for VS2010 compatibility
- Fixed COMIMAGE_FLAGS_ILONLY usage to not use scoped enum syntax

Co-authored-by: iamasbcx <34831834+iamasbcx@users.noreply.github.com>
…S_INFORMATION and related NT structures

- Added SYSTEM_INFORMATION_CLASS enumeration with all system info classes
- Added NtQuerySystemInformation function declaration
- Added SYSTEM_THREAD_INFORMATION and SYSTEM_PROCESS_INFORMATION structures
- Added THREAD_BASIC_INFORMATION structure
- Added NtOpenThread function declaration
- Added NtCurrentTeb, NtCurrentProcessId, NtCurrentThreadId macros
- Improved comment for RtlZeroMemory/RtlMoveMemory/RtlCopyMemory clarification

Co-authored-by: iamasbcx <34831834+iamasbcx@users.noreply.github.com>
Co-authored-by: iamasbcx <34831834+iamasbcx@users.noreply.github.com>
Co-authored-by: iamasbcx <34831834+iamasbcx@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix redefinitions and nt.h identifier issues Remove winternl.h dependency and add PHNT-style NT API definitions Nov 30, 2025
Copilot AI requested a review from iamasbcx November 30, 2025 02:23
@iamasbcx
Copy link
Owner

@copilot 编译不行好像

…stead of Win32)

Co-authored-by: iamasbcx <34831834+iamasbcx@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 30, 2025

@copilot 编译不行好像

已修复CI配置问题 (commit ab084ff)。之前的编译失败是因为GitHub Actions workflow使用了错误的平台名称 Win32,但解决方案文件使用的是 x86。已将平台名称从 Win32 改为 x86

请在 GitHub Actions 页面批准运行新的workflow来验证编译是否成功。

@iamasbcx
Copy link
Owner

@copilot 看看什么问题 帮我修复好啊

@iamasbcx
Copy link
Owner

@copilot 请Copilot再试一次

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants