zoukankan      html  css  js  c++  java
  • MinGW 可以编译驱动的

    #include <ddk/ntddk.h>

    static VOID STDCALL
    my_unload( IN PDRIVER_OBJECT DriverObject ) {
    }

    NTSTATUS STDCALL
    DriverEntry( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath ) {
    DbgPrint("DriverEntry called ");

    DriverObject->DriverUnload = my_unload;

    return STATUS_SUCCESS;
    }


    编译:gcc -o "OBJ文件名" -O3 -c "源文件名"
    连接:ld "OBJ文件名" --subsystem=native --image-base=0x10000 --file-alignment=0x1000 --section-alignment=0x1000 --entry=_DriverEntry@8 -nostartfiles --nostdlib -shared -L "库路径" -l ntoskrnl -o "驱动文件名"

  • 相关阅读:
    github
    mysql安装和应用
    11月9日(visio安装很坑)
    11月4日
    11月3日
    10月29日
    10月26日
    10月25日
    9月29日
    9月28日
  • 原文地址:https://www.cnblogs.com/csnd/p/11535427.html
Copyright © 2011-2022 走看看