If a program needs 1 EXE plus 5 DLLS, perhaps using this method, you can put all DLL API calls, JMP jump to the memory resource DLL address, realize multiple files bundled into 1 EXE.
There are many Chinese explanations in the code, please use the translation software to read and learn. Afraid that automatic translation will make you not understand.
form here:http://www.m5home.com/bbs/thread-3965-1-1.html
To declare API, this call API is more trouble, you can find windowsAPI.tlb on the Internet, reference to the tlb can be removed from the API statement, and call the same API speed up about 1.5 times (API call cancel saved), for drawing repeatedly call API is still useful. To invoke a manually declared API, VB's DllFunctionCall is invoked first and then the system API is invoked by DllFunctionCall. To reference tlb, DllFunctionCall is not required
There are many Chinese explanations in the code, please use the translation software to read and learn. Afraid that automatic translation will make you not understand.
form here:http://www.m5home.com/bbs/thread-3965-1-1.html
Code:
Private Sub Form_Load()
WriteFile "D:\123.txt", "test"
WriteFile "D:\234.txt", "test"
WriteFile "D:\345.txt", "test"
Function WriteFile(FileName As String, Str1 As String) As Boolean
On Error Resume Next
Dim FNo As Integer: FNo = FreeFile
Open FileName For output As FNo
Print FNo, Str1
Close FNo
WriteFile = Err.Number = 0
End Function