[求助]用c++怎么制作dll文件?
[求助]用c++怎么制作dll文件?
看你要做什麼,下面是傳回一個cstring
dll
extern "C"__declspec(dllexport) CString* biosversion()
{
CString *data=new CString;
(*data)="wwww";
return data;
}
main
HINSTANCE dllHandle = NULL;
MYPROC ProcAdd;
CString* temp;
dllHandle = LoadLibrary("biosversion.dll");
ProcAdd = (MYPROC) GetProcAddress(dllHandle,"Batterycapability");
temp = (ProcAdd)();