GetProcAddress和直接用函数名获得的地址为啥不一样?
一个exe调用一个dll,GetProcAddress获得这个dll中一个函数的地址,跟直接用这个函数名获得的地址不一样?为什么?
请大侠帮忙分析,谢谢。
//附件为整个工程。
FunPtr_Type1 xx1=DllTestFun1;
printf("SP DllTestFun1 address :%x \n",xx1);
//
{
HMODULE XXModule=::LoadLibrary("DllTest.dll");
FunPtr_Type1 xx1=(FunPtr_Type1)GetProcAddress(XXModule,"DllTestFun1");
printf("DP DllTestFun1 address :%x \n",xx1);
//
FreeLibrary(XXModule);
}