来源:蜘蛛抓取(WebSpider)
时间:2016-03-03 10:31
标签:
dll cstring
C#调C++的dll的函数
C#调C++的dll的函数
[摘要:C++ struct HHFC_SET { char* UID; }; extern "C" __declspec(dllexport) int PReadUID(HHFC_SET* mystruct, char* lpKeyNo, LPTSTR lpKeyNo2 ) { //int a=5; CString ds="sea中国"; //wchar_t a[] = L"sea"; //lpKeyNo = (LPTSTR)(LPCTSTR)a; //l]
C++struct HHFC_SET{&char* &UID;&&int & &&&&};extern "C" __declspec(dllexport) int &PReadUID(HHFC_SET* mystruct, char* lpKeyNo, LPTSTR lpKeyNo2 ){&& & & //int a=5;&& & & CString ds="sea中国";
& //wchar_t a[] = L"sea";&
& //lpKeyNo = (LPTSTR)(LPCTSTR)a;
&//lpKeyNo = L'中国a';
&strcpy(lpKeyNo,"中国aabbbcccc");
&wcscpy(lpKeyNo2,L"中国aabbbcccc");
&//lpKeyNo[0] = L'a';
&//lpKeyNo[1] = L'b';
&//lpKeyNo[2] = L'c';
&//lpKeyNo[3] = L'