adding dll to exe

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by pusztry.

Is there a way to add a dll to an exe and call it without putting it on the hard drive. From a search I found that there seems to be for images and icons but I REALY need this. If it can't be done can somebody give me a quick example of including the dll and the writing it to the users temp drectory and then deleting it after I am through using it.

Thanks So Much:)

- Ryan


WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> Can somebody give me a quick example of including the dll and the
> writing it to the users temp drectory and then deleting it after I
> am through using it.

See here:

viewtopic.php?t=2047


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by pusztry.

I was doing some reading on this and do I need to put the file in a DataSection? Second I tried this and it doesn't seem to work.

Thanks

- Ryan


WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> do I need to put the file in a DataSection?

Nope, although I think you can if you want. The example I gave is
fully working as it is, and works fine for me.

> Second I tried this and it doesn't seem to work.

What doesn't work, exactly? It should write the included file back
to disk with no problem, so what's wrong? I need more info from you
because I find no problems with the code I posted...


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by pusztry.

The Code that you posted works great. I added the DataSection stuff around the IncludeBinary. And that doesn't work. Sorry for the vague description.

Thanks

- Ryan


WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> I added the DataSection stuff around the IncludeBinary.
> And that doesn't work. Sorry for the vague description.

Ah, okay. Glad you got it working! :)

But remember: You only need to use this technique for files that are
not supported with CatchXXXXX commands. That is, don't use this for
bitmaps, sounds, etc, because they can all be included and read from
directly in the exe.


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by pusztry.

Are Binary files ever going to be supported with the CatchXXXXX commands?



- Ryan


WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
Post Reply