2

400 を超える関数を含む dll があり、exe ファイルは dll から 15 個の関数しか使用していないため、新しい dll を作成して関数をエクスポートし、それらの戻り値を偽造して、より複雑なシステムの出力をシミュレートする必要があります。 .

私が試したこと:

 #include "stdafx.h"

//the compiler complains about the '@20'

__declspec ( dllexport ) XLStatus _xlActivateChannel@20(XLportHandle,  XLuint64, unsigned int, unsigned int)
{
    return 0;
} 

// causing the exe to crash

dumpbin /exports vxlapi.dll (元の dll): 重複した関数名を表示します (すべての関数ではありません)。

ordinal  name
         _xlActivateChannel@20
14       xlActivateChannel

注: dll のヘッダー ファイルでは、関数は次のように宣言されます。

DECL_STDXL_FUNC ( xlActivateChannel, XLACTIVATECHANNEL, (
                  XLportHandle  portHandle,
                  XLaccess      accessMask,
                  unsigned int  busType,
                  unsigned int  flags)
                  );

dumpbin / export dll で、'_' アンダースコアで始まり '@number' で終わる関数名がある理由、注: exe は let's say(decorated) 関数を使用しており、新しい dll を作成して関数をエクスポートするにはどうすればよいですか@、

4

2 に答える 2