我已經嘗試了很多東西,但是我無法得到它的工作。我可以向C++傳遞並接收普通字符串(char *),但我無法接收C++中的Unicode字符串(w_char_t *
)。將unicode字符串從VB.net傳遞到C++ dll
下面是C上的碼的一些比特++
__declspec(dllimport) int __stdcall readFile(const w_char_t *file_path)
上VB.net
Public Declare Function readFile Lib "MyDll.dll" Alias "[email protected]" (ByVal file_path As String) As Integer
當我改變w_char_t
到char
我收到正確的字符串。
我發現在VB6了大量的素材,而不是VB.net
任何幫助極大的讚賞。
萊昂
這有幫助。非常感謝。 (也稱dllexport) – Leon 2010-12-15 07:53:31