windows-development

Windows系统开发 - C++/驱动/构建全栈

View on GitHub
Author 743175724
Namespace @743175724/professional-development-agents
Category development
Version 1.0.0
Stars 0
Downloads 4
self.md verified
Table of content

Windows系统开发 - C++/驱动/构建全栈

Installation

npx claude-plugins install @743175724/professional-development-agents/windows-development

Contents

Folders: agents, commands, skills

Included Skills

This plugin includes 2 skill definitions:

cpp-best-practices

现代C++编程规范和性能优化

View skill definition

C++ Best Practices Skill

Overview

Modern C++ programming best practices for high-performance Windows development.

Key Principles

RAII (Resource Acquisition Is Initialization)

class FileHandle {
    HANDLE handle_;
public:
    FileHandle(const wchar_t* path) {
        handle_ = CreateFileW(path, ...);
    }
    ~FileHandle() {
        if (handle_ != INVALID_HANDLE_VALUE) {
            CloseHandle(handle_);
        }
    }
    // Disable copying, enable moving
    FileHandle(const FileHandle&) = delete;
    FileHandle(FileHandle&& other) noexcept
        : handle_(other.handle_) {
        other.handle_ = INVALID_HANDLE_VALUE;
    }
};

Smart Pointers

Modern C++ Features

Performance Tips

  1. Avoid unnecessary copying (use std::move)
  2. Reserve container capacity
  3. Use string_view for read-only strings
  4. Inline hot functions
  5. Profile before optimizing

windows-kernel-basics

IRQL、内存池、同步机制

View skill definition

Windows Kernel Development Basics

IRQL Levels

Memory Pools

// NonPagedPool: Always resident, use at DISPATCH_LEVEL
PVOID buffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, size, 'Tag1');

// PagedPool: Can be paged out, use at PASSIVE_LEVEL
PVOID buffer = ExAllocatePool2(POOL_FLAG_PAGED, size, 'Tag2');

// Don't forget to free
ExFreePoolWithTag(buffer, 'Tag1');

Synchronization

Common Pitfalls

Source

View on GitHub

Tags: development cppwindowsdriverkernelbuild