• 大小: 0.40M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-04-19
  • 语言: C/C++
  • 标签: windows  window  ws  

资源简介

windows hook 框架 detours

资源截图

代码片段和文件信息

//////////////////////////////////////////////////////////////////////////////
//
//  Detour Test Program (comeasy.cpp of comeasy.exe)
//
//  Microsoft Research Detours Package
//
//  Copyright (c) Microsoft Corporation.  All rights reserved.
//

#include 
#include 
#include 

//////////////////////////////////////////////////////////////////////////////
//
int __cdecl main(int argc char **argv)
{
    HRESULT hr;

    (void)argc;
    (void)argv;

    LPSTREAM pStream = NULL;
    ULARGE_INTEGER ul;
    LARGE_INTEGER li;

    printf(“comeasy.exe: Starting (at %p).\n“ main);

    CoInitialize(NULL);

    hr = CreateStreamOnHGlobal(NULL TRUE &pStream);

    ul.QuadPart = 512;
    hr = pStream->SetSize(ul);

    li.QuadPart = 0;
    hr = pStream->Seek(li STREAM_SEEK_SET NULL);

    printf(“comeasy.exe: First write.\n“);
    fflush(stdout);

    li.QuadPart = 0;
    hr = pStream->Write(&ul sizeof(ul) NULL);

    printf(“comeasy.exe: Second write.\n“);
    fflush(stdout);

    li.QuadPart = 1;
    hr = pStream->Write(&li sizeof(li) NULL);

    printf(“comeasy.exe: Third write.\n“);
    fflush(stdout);

    li.QuadPart = 2;
    hr = pStream->Write(&li sizeof(li) NULL);

    pStream->Release();
    pStream = NULL;

    CoUninitialize();

    printf(“comeasy.exe: Exiting.\n\n“);
    fflush(stdout);

    return 0;
}

//
///////////////////////////////////////////////////////////////// End of File.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-11-08 01:37  Detours-4.0.1\
     文件        4838  2016-11-08 01:37  Detours-4.0.1\CREDITS.TXT
     文件        1099  2016-11-08 01:37  Detours-4.0.1\LICENSE.md
     文件        1782  2016-11-08 01:37  Detours-4.0.1\Makefile
     文件        1218  2016-11-08 01:37  Detours-4.0.1\README.md
     目录           0  2016-11-08 01:37  Detours-4.0.1\samples\
     文件        9031  2016-11-08 01:37  Detours-4.0.1\samples\Makefile
     文件         947  2016-11-08 01:37  Detours-4.0.1\samples\README.TXT
     目录           0  2016-11-08 01:37  Detours-4.0.1\samples\comeasy\
     文件        3913  2016-11-08 01:37  Detours-4.0.1\samples\comeasy\Makefile
     文件        1450  2016-11-08 01:37  Detours-4.0.1\samples\comeasy\comeasy.cpp
     文件        5100  2016-11-08 01:37  Detours-4.0.1\samples\comeasy\wrotei.cpp
     文件         560  2016-11-08 01:37  Detours-4.0.1\samples\comeasy\wrotei.rc
     目录           0  2016-11-08 01:37  Detours-4.0.1\samples\commem\
     文件        1198  2016-11-08 01:37  Detours-4.0.1\samples\commem\Makefile
     文件        3240  2016-11-08 01:37  Detours-4.0.1\samples\commem\commem.cpp
     文件        1991  2016-11-08 01:37  Detours-4.0.1\samples\common.mak
     目录           0  2016-11-08 01:37  Detours-4.0.1\samples\cping\
     文件        3424  2016-11-08 01:37  Detours-4.0.1\samples\cping\Makefile
     文件        1524  2016-11-08 01:37  Detours-4.0.1\samples\cping\ReadMe.Txt
     文件       65001  2016-11-08 01:37  Detours-4.0.1\samples\cping\cping.cpp
     文件           0  2016-11-08 01:37  Detours-4.0.1\samples\cping\cping.dat
     文件         681  2016-11-08 01:37  Detours-4.0.1\samples\cping\iping.idl
     目录           0  2016-11-08 01:37  Detours-4.0.1\samples\disas\
     文件        2081  2016-11-08 01:37  Detours-4.0.1\samples\disas\Makefile
     文件        6759  2016-11-08 01:37  Detours-4.0.1\samples\disas\arm.asm
     文件       19842  2016-11-08 01:37  Detours-4.0.1\samples\disas\disas.cpp
     文件       28061  2016-11-08 01:37  Detours-4.0.1\samples\disas\ia64.asm
     文件         309  2016-11-08 01:37  Detours-4.0.1\samples\disas\unk.cpp
     文件       16917  2016-11-08 01:37  Detours-4.0.1\samples\disas\x64.asm
     文件        5082  2016-11-08 01:37  Detours-4.0.1\samples\disas\x86.cpp
............此处省略160个文件信息

评论

共有 条评论