Skip to content

Latest commit

 

History

History
87 lines (77 loc) · 3.74 KB

readme.md

File metadata and controls

87 lines (77 loc) · 3.74 KB

PBox is a modular development platform based on Dll Form

I. Development purpose

Based on the principle of minimizing or not modifying the original project source code;
Support Delphi、VC、QT, Dll Form;

II. Development platform

Delphi10.3.3、WIN10X64;
The code does not use any third-party controls;
It refers to the OpenSource code Library,It is placed under the 3rdparty directory; directly referenced and does not need to be installed;
WIN7X64、WIN10X64 test pass;Support X86、X64;
Email:[email protected]
QQ   :101611228

III.Usage

Delphi:

  • Delphi original exe project, modified to DLL project. Output specific functions, the original code without any modification.
  • Put the compiled DLL file in the plugins directory.
  • Example: Module\SysSPath
  • Delphi function declaration:
 type
 {supported file types} 
 TSPFileType = (ftDelphiDll, ftVCDialogDll, ftVCMFCDll, ftQTDll, ftEXE);  
 procedure db_ShowDllForm_Plugins(
 var frm: TFormClass;
 var ft: TSPFileType;
 var strParentModuleName,
 strSubModuleName, strClassName, strWindowName, strIconFileName: PAnsiChar; 
 const bShow: Boolean = True); stdcall;

VC:

  • The original exe project of VC remains unchanged, and the EXE is compiled. Copy obj and res files generated by compilation (copy the entire directory);
  • Create a new xxx.cpp file and export the db_ShowDllForm_Plugins function. Compile and generate xxx.obj;
  • Link xxx.obj and the obj and res files generated by the original compiled exe to get the DLL file and put it in the plugins directory.
  • Example 1:DOC\VC\Dialog\7zip
  • Example 2:DOC\VC\Dialog\Notepad2
  • VC function declaration:
 enum TSPFileType {ftDelphiDll, ftVCDialogDll, ftVCMFCDll, ftQTDll, ftEXE};
 extern "C" __declspec(dllexport) void db_ShowDllForm_Plugins(
 void** frm, 
 TSPFileType* spFileType,
 char** * strParentModuleName,
 char** strSubModuleName,
 char** strClassName,
 char** strWindowName,
 char** strIconFileName,
 const bool show = true)

IV: Description of DLL output function parameters

 procedure db_ShowDllForm_Plugins(
 var frm: TFormClass;
 var ft: TSPFileType;
 var strParentModuleName,strSubModuleName, strClassName, strWindowName, strIconFileName: PAnsiChar;
 const bShow: Boolean = True); stdcall;

 frm                 :Delphi only. Dll main form class name in Delphi; VC NULL; 
 ft                  :Type of this Dll;Support: 
        ftDelphiDll   :The form DLL written by Delphi;  
        ftVCDialogDll :The form DLL written by dialog mode in VC language; 
        ftVCMFCDll    :The form DLL written by MFC    mode in VC language; 
        ftQTDll       :The Form DLL written by QT                language; 
        ftEXE         :EXE file with form;  
 strParentModuleName :Parent module name;  
 strSubModuleName    :Sub module name;  
 strClassName        :VC only; VC DLL main form class name; Delphi null;  
 strWindowName       :VC only; VC DLL main form title name; Delphi null;  
 strIconFileName     :Icon file; can be empty. In PBox configuration, select the icon;  
 bShow               :VC only; display DLL form or not; when VC DLL is called for the first time, it is not necessary to create a display DLL form, just to get parameters.  

V. Features

The UI supports menu display, button (dialog box) display and list view display.  
PBox also supports the display of an EXE form program in our forms. 
Support the EXE program of dynamic change of form class name. 
Support x86 program to call x64 program, x64 program to call x86 program.

Vi. Next work:

Add database support (because I am not familiar with the database, the development is slow, and it is developed in my spare time)  
Add support for VC MFC DLL / Qt DLL Forms;