Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 4th, 2004, 02:08 PM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,317 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 5 h 42 m 28 sec
Reputation Power: 109
Send a message via ICQ to christo Send a message via Yahoo to christo
DLL's, storing user options, and TOpenDialog

Hi chaps,

Just for the fun of it, I wrote my first ever Delphi app last week. It's a file uploader (see here) . I admit that it's just a wrapper for pscp.exe and there's lots missing, hence the following questions:

o Is there a more elegant way of calling pscp instead of using CreateProcess?. I would like to be able to use a dll instead and report upload progress through the application UI instead of a popup .exe screen. Any ideas on how this could be done?

o Users can only select multiple files at the moment. I have considered changing the function used here to "SelectDirectory" with a checkbox option to upload recursively. However, the ultimate solution would allow either a directory selection OR a multiple file selection. Is there a graceful way of calling a single dialog which would allow this?

o The app builds a remove path as /home/<username>. The user has the option of changing the path if required. A better plan would allow user options to save a 'default path', a 'pscp.exe location', a 'default hostname' etc and load it in every time the app runs. I intend to store this data on a user-based config file, but can't decide where to put it (assuming user is on WinXP). What's the usual protocol here?

I'll have plenny more naff questions over the next couple weeks

Cheers
christo
__________________
This is me: http://chris.uk.com

Reply With Quote
  #2  
Old July 5th, 2004, 01:23 AM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is online now
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,390 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 22 h 36 m 15 sec
Reputation Power: 4080
Let's see if I can answer your questions without looking at the source .

1. There's always ShellExecute() and WinExec().
http://msdn.microsoft.com/library/d...hellexecute.asp
http://msdn.microsoft.com/library/d...ase/winexec.asp
I think I posted some examples of ShellExecute in this forum a couple of weeks ago, so you should have some examples for reference .
As for part two, does pscp come with a DLL? If not, you can always try hiding the DOS window (Call ShellExecute() with SW_HIDE as the last argument)

2. I guess you'd have to write your own dialog then, instead of using the Windows standard dialog. The trouble is that the File Selection dialog that Windows provides doesn't allow directory selection .

3. Best (and most standard) place to put it would be the Windows Registry. Since you're just starting with Delphi and Windoze programming, don't worry about this yet. However, when you feel ready to muck about in the registry, simply look at the Delphi help for TRegistry, which encapsulates a lot of the registry manipulation functions.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Last edited by Scorpions4ever : July 5th, 2004 at 01:27 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > DLL's, storing user options, and TOpenDialog

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap