Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Mar 27, 2017 7:31 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Unmount ANY USB stick upon inserting
PostPosted: Tue Jul 24, 2012 4:35 am 
Offline

Joined: Fri Jun 05, 2009 4:54 pm
Posts: 484
Location: London, England
Hi,
I purchased the MBS USB plugin but due to being a VERY part time RealStudio user I can not achieve my objective :(

I simply want an empty app which checks via a timer if a USB stick gets inserted - if so, then unmount it immediately.
Christian pointed out the three steps I need to take, but I am too dumb to combine them.

Could anyone help with example code, so that I can study the code and then learn from it?

Thank you all in advance.

_________________
RealStudio Professional Edition 2012 r2
Developing on OS X 10.8 (Mountain Lion)
Deploying on Windows XP / Vista / 7 / 8


Top
 Profile  
 
 Post subject: Re: Unmount ANY USB stick upon inserting
PostPosted: Tue Jul 24, 2012 8:08 am 
Offline
User avatar

Joined: Fri Nov 10, 2006 4:10 pm
Posts: 1855
Location: Michigan, USA
I have the MBS USB plugin. What are the three steps Christian suggested? :)

_________________
Windows 8 x64
Windows XP Pro SP3
Ubuntu 11.04 via Virtual Box
RS Enterprise 2012r1.1

Programming Tutorials & Free Projects: http://www.JasonTheAdams.com
"Christianity has not been tried and found wanting; it has been found difficult and not tried." - G.K. Chesterton


Top
 Profile  
 
 Post subject: Re: Unmount ANY USB stick upon inserting
PostPosted: Tue Jul 24, 2012 8:34 am 
Offline

Joined: Fri Jun 05, 2009 4:54 pm
Posts: 484
Location: London, England
Quote:
Well, the task you ask for is based on several smaller tasks.

Those plugin classes help you to get event when you an USB device is connected.
Next step is to get drive letter from the USB device. See here: https://www.mbsplugins.de/archive/2012- ... er_for_an_

Third is to eject it where we have WindowsEjectVolumeMBS function in our plugins.

_________________
RealStudio Professional Edition 2012 r2
Developing on OS X 10.8 (Mountain Lion)
Deploying on Windows XP / Vista / 7 / 8


Top
 Profile  
 
 Post subject: Re: Unmount ANY USB stick upon inserting
PostPosted: Tue Jul 24, 2012 9:02 am 
Offline
User avatar

Joined: Fri Nov 10, 2006 4:10 pm
Posts: 1855
Location: Michigan, USA
I see. So you only intend for this to work on Windows, right? Also, do you have the MBS Win plugin? It includes the WindowsWMIMBS class, which is required.

_________________
Windows 8 x64
Windows XP Pro SP3
Ubuntu 11.04 via Virtual Box
RS Enterprise 2012r1.1

Programming Tutorials & Free Projects: http://www.JasonTheAdams.com
"Christianity has not been tried and found wanting; it has been found difficult and not tried." - G.K. Chesterton


Top
 Profile  
 
 Post subject: Re: Unmount ANY USB stick upon inserting
PostPosted: Tue Jul 24, 2012 11:32 am 
Offline

Joined: Fri Jun 05, 2009 4:54 pm
Posts: 484
Location: London, England
Hi,
yes, I have paid for the plugin and only want it to run windows.

If I can get some example code, I can learn from it, but trying to put it all together from scratch is impossible for me :(

Thanks.

_________________
RealStudio Professional Edition 2012 r2
Developing on OS X 10.8 (Mountain Lion)
Deploying on Windows XP / Vista / 7 / 8


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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