Develop FTP clients with Indy9

xiaoxiao2021-03-06  55

Develop FTP client with Indy9_02

- Calling the DLL written by BCB / VC with VB

Roger yang

My FTP client architecture is a monster. All FTP operations are encapsulated in the DLL written by BCB, and this DLL is called by VB, so multithreading is implemented in VB. Hey, more disgusting architectures, not yourself give yourself a set. There is no way, friends ask for this. Finally, the fact that the fact that it did give yourself a package, but this is a later words. Now say some questions about the VB calling the DLL written by BCB / VC. 1. VOID in the VC should be declared as subsection instead of function in VB instead of function

C function such void __stdcall ShowDlg (char * urlPath, char * savePath) {} statement so that vb Private Declare Sub ShowDlg Lib "DLLShared.dll" (ByVal urlPath As String, ByVal savePath As String) C function such __declspec (dllexport) int __stdcall ShowDlg (LPCSTR urlPath, LPCSTR savePath) {} statement so that vb Private declare Function ShowDlg Lib "DLLShared.dll" (ByVal urlPath As String, ByVal savePath As String) As Long 2. VC data types correspond to the VB Data Type VC Data Type VB Data Type Short Integer INT Long Long Long Unit Long Ulong Long Word, DWord Long WPARM, LPARM Long WMSG, UMSG Long HRESULT Long Bool Boolean Colorref Long Hwnd, HDC, Hbrush, HKEY, Waft LPSTR , LPCSTR STRING LPWSTR, OLECHAR, BSTR STRING LPTSTSTSTSTSTSTSTSTSTSTSTSTSTED VARIANT_BOOL BOOLEAN UNSIGNEDCHAR BYTE BYTE BYTE VARIANT VARIANT (any * or * * The end of the data type) long char * is a pointer, you use String instead of clearly

3. Char * is a pointer type, instead of String, but ByVal reference, not byref. Specific reasons, it seems to have an article explained.

转载请注明原文地址:https://www.9cbs.com/read-82813.html

New Post(0)