Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Dec 13, 2019 10:39 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Detect missing DLL
PostPosted: Sat Jul 09, 2011 5:41 pm 
Offline

Joined: Sun Nov 18, 2007 11:19 am
Posts: 140
Location: New Brunswick, Canada
Is there a way to detect if one of the RB included DLL's is missing from the libs folder and throw your own exception?


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sat Jul 09, 2011 6:17 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
No
They are loaded at launch of your app and if they are missing your app never gets a chance to start

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sat Jul 09, 2011 6:35 pm 
Offline

Joined: Sun Nov 18, 2007 11:19 am
Posts: 140
Location: New Brunswick, Canada
bah :( can't wait until they get LLVM going (if they manage to get it working the way they want)

thanks for the response.


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sat Jul 09, 2011 7:28 pm 
Offline

Joined: Wed May 20, 2009 11:02 am
Posts: 423
I thought you could use soft declares to prevent your application from not startig if any of the used libraries is missing, and then check the availability of your dll with system.isfunctionavailable before actually calling it?

Read more about soft declares and system.isfunctionavailable here: http://docs.realsoftware.com/index.php/Declare

Pixe

_________________
Using RS2011r4.3 on Windows7.


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 12:23 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Soft declares work for your own declare statements. But if an RB framework DLL is missing, you're out of luck.


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 12:52 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
reets wrote:
bah :( can't wait until they get LLVM going (if they manage to get it working the way they want)

LLVM is unlikely to change this

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 1:44 am 
Offline
User avatar

Joined: Thu Aug 26, 2010 6:57 am
Posts: 569
Location: Sydney Australia
What happened to the single exe?

_________________
Regards

Chris Musty
http://www.specialised.net.au
-----------------------------------------------
if date.shortdate >= 4/6/2013 then
msgbox "I am using Xojo - YAY!!!"
else
msgbox "I am still using RS 12r2.1 - BOO!!!"
end if

Win 8 Pro, Ubuntu 13.04, Mint and Debian(gnome and KDE)
AWS for Hosting and TKL for AMI's


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 4:00 am 
Offline

Joined: Mon Sep 22, 2008 9:01 pm
Posts: 61
What would cause a framework DLL to go missing in the first place? If the program is installed in Program Files directory it should relatively be safe except if the user of the computer manually deleted it cuz they're retarded (which is likely) lol... in my opinion if a user is that dense they deserve errors :D
Simple re-install which anyone would think to do would cure the issue.

Specialised wrote:
What happened to the single exe?
the rb framework has been using dll's for awhile now, I've also noticed any realbasic plugin used by the program is compiled into a DLL as well, put in the same Libs folder. I remember when rb apps used to have the DLL's embedded in the exe itself and extracted them to a temp directory every time you launched the exe lol, was very stealth like hacksy way of doing things which i think caused problems in rare cases. (at least i think thats what was happening previous to the change which happened several years ago)


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 5:05 am 
Offline
User avatar

Joined: Thu Aug 26, 2010 6:57 am
Posts: 569
Location: Sydney Australia
I don't know where I got the reference and have no real desire to look it up but someone somewhere said that with LLVM the single exe would be possible. DLL's can be beneficial for some apps but for a simple transportable type app the single exe is preferred.

_________________
Regards

Chris Musty
http://www.specialised.net.au
-----------------------------------------------
if date.shortdate >= 4/6/2013 then
msgbox "I am using Xojo - YAY!!!"
else
msgbox "I am still using RS 12r2.1 - BOO!!!"
end if

Win 8 Pro, Ubuntu 13.04, Mint and Debian(gnome and KDE)
AWS for Hosting and TKL for AMI's


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 2:06 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
Specialised wrote:
What happened to the single exe?


LLVM _should_ make it possible to create a single file exe.
Nothing changed there.
But that's not likely the first thing that will be part of implementing LLVM so DLL's may be with us for some time yet

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 7:32 pm 
Offline
User avatar

Joined: Thu Aug 26, 2010 6:57 am
Posts: 569
Location: Sydney Australia
Thanks for the clarification.

_________________
Regards

Chris Musty
http://www.specialised.net.au
-----------------------------------------------
if date.shortdate >= 4/6/2013 then
msgbox "I am using Xojo - YAY!!!"
else
msgbox "I am still using RS 12r2.1 - BOO!!!"
end if

Win 8 Pro, Ubuntu 13.04, Mint and Debian(gnome and KDE)
AWS for Hosting and TKL for AMI's


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 7:36 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Specialised wrote:
I don't know where I got the reference and have no real desire to look it up but someone somewhere said that with LLVM the single exe would be possible. DLL's can be beneficial for some apps but for a simple transportable type app the single exe is preferred.

Geoff Perlman said exactly that on the RS blog last year.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 10:04 pm 
Offline
User avatar

Joined: Thu Aug 26, 2010 6:57 am
Posts: 569
Location: Sydney Australia
Thanks charonn0 I was feeling too lazy to search for it this morning.

_________________
Regards

Chris Musty
http://www.specialised.net.au
-----------------------------------------------
if date.shortdate >= 4/6/2013 then
msgbox "I am using Xojo - YAY!!!"
else
msgbox "I am still using RS 12r2.1 - BOO!!!"
end if

Win 8 Pro, Ubuntu 13.04, Mint and Debian(gnome and KDE)
AWS for Hosting and TKL for AMI's


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect missing DLL
PostPosted: Sun Jul 10, 2011 11:21 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
No problem. I have that page bookmarked and late at night I stare at it longingly... :lol:

_________________
Boredom Software


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group