http://blog.csdn.net/syf442/archive/2009/07/21/4366723.aspx我是按这里的来操作的,但是没办法实现,请问有谁知道是什么问题吗?
谢谢

解决方案 »

  1.   

    http://hi.baidu.com/netcicala/blog/item/c50c410e96adf7cf7bcbe1f6.html
      

  2.   

    先看一下是在哪一步出错的再来问
    另外:请确定你的系统不是win7!
      

  3.   

    xp 系统  vs2003.net   ascii编码   while(pImportDescriptor->FirstThunk)
    {
    char * dllname = (char *)((BYTE *)hMod + pImportDescriptor->Name); ofstream of( "tb.txt", ios::app );
    of<< dllname << endl;
    of.close(); pThunkData = (PIMAGE_THUNK_DATA)((BYTE *)hMod + pImportDescriptor->OriginalFirstThunk);
    ..这里输出dll的名字 如下MFC71D.DLL
    MSVCR71D.dll
    KERNEL32.dll
    USER32.dll
    COMCTL32.dll
    OLEAUT32.dll
    ADVAPI32.dll
    ole32.dll
    int no = 1;
    while(pThunkData->u1.Function)
    {
    char * funname = (char *)((BYTE *)hMod + (DWORD)pThunkData->u1.AddressOfData + 2);
    PDWORD lpAddr = (DWORD *)((BYTE *)hMod + (DWORD)pImportDescriptor->FirstThunk) +(no-1); ofstream of( "tt.txt", ios::app );
    of<< *lpAddr <<  "  " << addr << endl;
    of.close();打印出一下数据(部分)2082688816  77D5058A
    2082687936  77D5058A
    2082697392  77D5058A
    2082673296  77D5058A
    2082658992  77D5058A
    2082660240  77D5058A
    2082664464  77D5058A
    2082664368  77D5058A
    2082705664  77D5058A
    2082692000  77D5058A
    2083064208  77D5058A
    2083064176  77D5058A
    2082660384  77D5058A如果我想输出 funname  程序就会挂掉
    我想问下 //修改内存的部分
    if((*lpAddr) == (int)addr)
    凭什么可以用这句话来判断??这个是地址啊  我就想不通了咯 
    希望大拿解释下,谢谢
    或者有人能跑一下嘛? 这样的话比较可靠哦  哈哈