我知道createfile函数包含createfileA和createfileW,但是我的
HookAPI("Kernel32.dll", "CreateFileW", HookCreateFileWCallback,(PVOID*)&CreateFileWNext);
为什么在我进行log文件跟踪的时候进不去这个函数!?

解决方案 »

  1.   

    对于WindowsXP这样的操作系统来说,任何时候调用CreateFileA,
    其内部调用的实际上是CreateFileW
    不知道楼主的是什么操作系统
      

  2.   

    CreateFileA 貌似不会直接调用 CreateFileW 而是 ZwCreateFile
      

  3.   

    CreateFileA
    .text:7C801A24                 mov     edi, edi
    .text:7C801A26                 push    ebp
    .text:7C801A27                 mov     ebp, esp
    .text:7C801A29                 push    [ebp+lpFileName]
    .text:7C801A2C                 call    sub_7C80E094
    .text:7C801A31                 test    eax, eax
    .text:7C801A33                 jz      short loc_7C801A53
    .text:7C801A35                 push    [ebp+hTemplateFile] ; hTemplateFile
    .text:7C801A38                 push    [ebp+dwFlagsAndAttributes] ; dwFlagsAndAttributes
    .text:7C801A3B                 push    [ebp+dwCreationDisposition] ; dwCreationDisposition
    .text:7C801A3E                 push    [ebp+lpSecurityAttributes] ; lpSecurityAttributes
    .text:7C801A41                 push    [ebp+dwShareMode] ; dwShareMode
    .text:7C801A44                 push    [ebp+dwDesiredAccess] ; dwDesiredAccess
    .text:7C801A47                 push    dword ptr [eax+4] ; lpFileName
    .text:7C801A4A                 call    CreateFileWCreateFileW调用NtCreateFile