调用时出现0xC0000005: Access Violation.错误
我的代码如下:         
         CString m_Currpath="D:\\";
CString P02subpath="P02\\";
HINSTANCE hTrans;
hTrans=::LoadLibrary("testp.dll");
char* SInfo="C:\\Program Files\\";
CString temp=m_Currpath+P02subpath;
char* PInfo=NULL;
int i=temp.GetLength();
LPTSTR p=temp.GetBuffer(i);
PInfo=(char*)p;
temp.ReleaseBuffer();
int (*TRANSFORM)(char* PathInfo,char* SourceInfo);
if(hTrans)
{
         TRANSFORM=(int(*)(char*,char*))::GetProcAddress(hTrans,"Mytest");
if(TRANSFORM)
                           //错误在这一句出现
TRANSFORM(PInfo,SInfo);
FreeLibrary(hTrans);
}Delphi中export的函数原型是:
Function Mytest(PathInfo:PChar;SInfo:PChar):Integer;export;我想应该是参数传递的问题吧?希望高手指教!谢谢!