forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Embedded dll and include

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Tue Feb 18, 2003 11:01 pm    Post subject: Embedded dll and include Reply with quote

I would love to see the option to embedd the dll runtime file when compiling. Two options, one compiling without and one with. And also the ability to add 16bit icons.

And I would love to see an option to be able to include external scripts kinda like with the PHP include command, but it might look something like this #include, filename.vds

And the script would be inserted at the line of the include point and the script would be inserted normally when compiling.

And more directory paths.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Feb 18, 2003 11:15 pm    Post subject: Reply with quote

Hi Geo,

Several of us were kinda diappointed when SADE dropped the
option to integrate the runtime DLL in the EXE (VDS2x had that).

It wouldn't be too hard to write a VDS utility to insert code at
specific points - it'd just hafta be run before compiling... Wink

Welcome to the board. Smile

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Tue Feb 18, 2003 11:18 pm    Post subject: Reply with quote

Thanks for the welcome Mac.

Oh, I didn't know that.
Kinda strange he did that.

But It's really not a biggie.
When compressing the dll with UPX it only takes 180 kb and that is not bad concidering the power of VDS Smile

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1562

PostPosted: Tue Feb 18, 2003 11:19 pm    Post subject: Reply with quote

You can use the BINFILE command to write binary data to the end of your exe and then extract it out on program execution. You would have to extract the dll out before it is called by the program.

- OR -

If you want to integrate the vdsrun40.dll or other dlls' into your exe you can also take a look at my software ALLOY, which will embed the vdsrun40.dll and other dll's, bmp's etc into the exe in an easy manner.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Feb 19, 2003 12:54 am    Post subject: Reply with quote

Quote:
You can use the BINFILE command to write binary data to the end of your exe and then extract it out on program execution. You would have to extract the dll out before it is called by the program.


Really? It's possible to do that? Any tips on how to use BINFILE to extract
the VDSRUN30/40/50.DLL before execution? Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1562

PostPosted: Wed Feb 19, 2003 3:29 am    Post subject: Reply with quote

Not really possible to extract the vdsrun40.dll before execution as you have to call the BINFILE command which is interpreted by vdsrun40.dll, kind of a chicken and the egg type situation. This is exactly what Alloy does, it basically extracts out the vdsrun40.dll/30.dll before the exe's code is run, thus allowing you to have a single .exe file.
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Feb 19, 2003 3:57 am    Post subject: Reply with quote

Be warned though about adding dlls into your program using binfile....
The size of the dll within your script will be about 3 times the size of the
dll itself. So if you have a 40 KB dll you want to tuck into your program,
it'll add about 120 kb to your program.

-Garrett
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Wed Feb 19, 2003 8:27 am    Post subject: Reply with quote

Cool, I'll check out that Alloy software Smile
Thanks guys.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Tue Feb 25, 2003 10:34 pm    Post subject: Reply with quote

I don't think it would add three times the size. It would only be neccesary to use three times the size of the file in number of characters to write and read from the file, but the actual result is the file being added only once.

Garrett wrote:
Be warned though about adding dlls into your program using binfile....
The size of the dll within your script will be about 3 times the size of the
dll itself. So if you have a 40 KB dll you want to tuck into your program,
it'll add about 120 kb to your program.

-Garrett
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Feb 26, 2003 8:48 am    Post subject: Reply with quote

Or it's because the files first have to be unpacked before you can run them...
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Feb 27, 2003 4:48 pm    Post subject: Reply with quote

Oops, I realize what Garrett meant now.

If you were to use something like the following, this would indeed be true:

BINFILE WRITE,1,HEX,AA 09 88 55
BINFILE WRITE,1,HEX,AA 09 88 55
BINFILE WRITE,1,HEX,AA 09 88 55

However it may be possible to append the DLL's binary data to the end of the script's .EXE file
and then when the script is executed, read the binary data from itself and write it to a separate
file.

Skit3000 wrote:
Or it's because the files first have to be unpacked before you can run them...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Feb 27, 2003 5:48 pm    Post subject: Reply with quote

I've been doing a little experimenting, and it is possible to append binary
data and resources to the exe itself. I've done it with BINFILE and
successfully then used the resources that were appended to the .exe.

It'll take some careful thought and planning, but it can be done.

I would not recommend this method for the VDS runtimes however.
Smile

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Thu Feb 27, 2003 5:51 pm    Post subject: Reply with quote

OK, while the BINFILE is on the subject here...

How can I append data to a file?
Everytime I try to write to a file using BINFILE it just overwrites the contents.

I'm writing an error log function that I'm gonna use in the error trapping portion of my program.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Feb 27, 2003 6:09 pm    Post subject: Reply with quote

I'm not going to get into details here, but I'll give you the general idea.

Steps:
1) Use BINFILE to read the original source file into a string list.
2) Use BINFILE to read files to append to source file into another string list.
3) Append string list 2 to string list 1
4) Repeat step 2 if more than one file to be appended to the original.
5) Use BINFILE to write the first string list as binary data.

Plan it carefully. And good luck. Smile

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Thu Feb 27, 2003 6:10 pm    Post subject: Reply with quote

Thanks m8.
Didn't even think about using LIST Wink

Thanks alot.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group