原型:
int WINAPI icePub_readFileToHexString(char *strFilename,char *strHexString,int maxLen)
输入:strFilename 待读取数据文件名
maxLen strHexString最大长度
输出:strHexString 读取转换16进制展开文本串
char strHexString[1024+1];
typedef int (WINAPI ICEPUB_READFILETOHEXSTRING)(char *strFilename,char *strHexString,int maxLen);
ICEPUB_READFILETOHEXSTRING *icePub_readFileToHexString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_readFileToHexString = (ICEPUB_READFILETOHEXSTRING *)GetProcAddress(hDLLDrv, "icePub_readFileToHexString");
}
if(icePub_readFileToHexString != NULL)
{
icePub_readFileToHexString("D:\\test\\a.exe", strHexString,1024);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strHexString);