|
-
Aug 17th, 2000, 10:02 PM
#1
Thread Starter
New Member
Is there any way to compile dll files into an executable.
-
Aug 17th, 2000, 10:11 PM
#2
you can use Bit-Arts Fusion
I hear it costs a-lot though.
-
Aug 17th, 2000, 11:24 PM
#3
Guru
Another way!
If it's not an ActiveX DLL, then you can include it in a resource file. Make your program check if it exists as a regular file. If it doesn't, your program will give the resource file a ring and tell it to create the file.
If it's an ActiveX DLL then this way obviously doesn't work (ActiveX DLLs must exist when the program loads, so the program can't get them to exist).
However if it's an ActiveX DLL, then you can create two applications.
One is your program, and the other will contain the DLL in it and will unpack it.
The unpacking program does not require the DLL so it will work.
The user will have to use the unpacking program, or the actual program won't work.
Checking what type of DLL it is:
ActiveX DLL: A DLL which is referenced in Project menu -> References.
Non-ActiveX DLL: A DLL which is referenced in a Declare statement in the code.
Post if you need instructions for how to do this.
-
Aug 17th, 2000, 11:37 PM
#4
what if he needs to include Msvbvm60.dll or another ver. vb dll?
how is the res file gonna work then?
-
Aug 17th, 2000, 11:38 PM
#5
Here is an example made in VB on how to make an Active Self-Extractor.
Active Self-Extract
The author says that it works. And if you look at his feedback, for some people, it worked great.
-
Aug 17th, 2000, 11:41 PM
#6
Guru
Ummm... In that case... Create an unpacking program in Visual C++!
Or use Bit-Arts Fusion which of course costs a lot.
-
Aug 17th, 2000, 11:50 PM
#7
You could also try joining files together using this code:
Code:
Public Function JoinFiles(Source1 As String, Source2 As String, _
Dest As String) As Boolean
On Error GoTo errorhandler
Dim Buffer() As Byte
Open Source1 For Binary Access Read As #1
Open Source2 For Binary Access Read As #2
Open Dest For Binary Access Write As #3
ReDim Buffer(1 To LOF(1))
Get #1, , Buffer
Put #3, , Buffer
ReDim Buffer(1 To LOF(2))
Get #2, , Buffer
Put #3, , Buffer
Close #1, #2, #3
JoinFiles = True
errorhandler:
Close #1
Close #2
Close #3
Exit Function
I never used this, if you do use it, let me know if it works.
[Edited by Matthew Gates on 08-18-2000 at 01:24 AM]
-
Aug 18th, 2000, 12:00 AM
#8
Guru
It would work, but:
- The things you put just after Exit Function should be just before it.
- It is not useful for including DLL files in your EXE...
-
Aug 18th, 2000, 06:16 AM
#9
Junior Member
True, but if you extracted and registered the needed files before anything in your project references it, then you'll be just fine.
Create a Sub_Main and add the routines to check if the needed files exist. If they do not, then extract them from the resource file and run RegSvr on them. Then load your main form.
-
Aug 18th, 2000, 06:27 AM
#10
Junior Member
And if you plan on investing in BitArts Fusion because you think it protects your OCXs and DLLs, then you're mistaken. All it does is extract and register the included files if they do not already exist, which offers no protection whatsoever.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|