Created
September 2, 2013 05:34
-
-
Save 82488059/6409498 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CString szStr(_T("Provider=SQLOLEDB.1;SERVER=192.168.0.121;UID=sa;PWD=12345;DATABASE=jinhe;")); | |
CString sKey = _T("z12345"); | |
typedef CString (PASCAL EXPORT *BuildNcProgram)(const CString&, const CString&,const CString&); | |
HINSTANCE hDLL; | |
hDLL = LoadLibrary(_T("BuildNcProgram.dll")); | |
if (NULL != hDLL) | |
{ | |
BuildNcProgram Building =(BuildNcProgram)GetProcAddress(hDLL, _T("BuildNcProgram")); | |
if (NULL != Building ) | |
{ | |
CString sss = Building(szStr, sKey, "E:\\"); | |
MessageBox(sss); | |
} | |
else | |
{ | |
CString ss = _T("取函数错误!"); | |
} | |
FreeLibrary(hDLL);//卸载MyDll.dll文件; | |
} | |
else | |
{ | |
_T("加载DLL错误!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment