C++与VB能不能一起用?
初一我学C++的,现在暑假老师叫我学VB说,学VB很快,比C++简单(看书后有感觉)现在很不熟悉VB的代码,总觉得C++要先进和灵活的多,所以,有些不牵扯到什么控件、窗体的代码我希望用C++完成
比如用C++的函数得到返回值再放到VB里,以及更复杂的,能实现吗?高手们
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { return TRUE; }
bool _stdcall AAA(int opt,char *FileNames, char *TmpFileNameStr, char *E_FileName) { //XXXX }
;XXX.def LIBRARY XXX EXPORTS AAA @1 BBB @2 CCC @3 DDD @4 EEE @5 ....
Declare Function 函式名称 Lib "DLL名称.dll" (ByVal opt As Integer, ByVal FileName As String, ByVal TmpFileNameStr As String, ByVal E_FileName As String) As Boolean ..... Call CheckFileFolder(filecount, FileName, TmpFileNameStr, E_FileName) '获取参数资料 a = 函式名称(opt, FileName, TmpFileNameStr, E_FileName) ..... Private Sub CheckFileFolder(xxx as xxx,....,...,...) 'XXXXX End Sub