Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > swpruncmd() and winXP
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 14th March 05:51
rpc
External User
 
Posts: 1
Default swpruncmd() and winXP


Hi
I am using swpruncmd for the first time.Till now I used run command as
follows
I ran my prog like

e:\info4\myprog.exe

in the program I have

cPDataDir := "\info4\06\pt06"
cChgdir := "cd"+cPDataDir
run (cChgDir)
? FT_DEFAULT() + ":\" + CURDIR() + "\" // new path ->
e:\info4\06\pt06\

instead of above I changed my prog as follows

e:\info4\myprog.exe

Success := swpruncmd(cChgDir)
IF (!success)
? "Swap failed"
majerr = SWPERRMAJ()
minerr = SWPERRMIN()
? "Error codes :", majerr, minerr
clear all
clos all
quit
ELSE
? "Swap succeeded"
? "Errorlevel :", SWPERRLEV()
? FT_DEFAULT() + ":\" + CURDIR() + "\" // new path ->
e:\info4\
ENDIF

after running above I got

"Swap succeeded"
"Errorleve : 0"

but the path remaind at e:\info4\
Pls advice what mistake I am commiting
my os is w98

secondly I am planning to moving to winXP.I have heard it does not have
dos-prompt
facility.If it is so how do we compile and run applications compiled in
clipper ?

TIA
Rajeev Chavan
  Reply With Quote


  sponsored links


2 14th March 09:14
andreas moroder
External User
 
Posts: 1
Default swpruncmd() and winXP


rpc schrieb:

Because the "cd" is executed in a command shell that ends after the cd
This has no effect to the command line you clipper app is running.

Who told you that ?
I have Xp and are compiling and running clipper programs every day.

Bye
Andreas
  Reply With Quote
3 14th March 09:14
stephen quinn
External User
 
Posts: 1
Default swpruncmd() and winXP


Rajeev

Why are you using SwpRunCmd() to just change directories??
Why not use FT_CHDIR() that's in nanfor library.

When you swap out to another DOS session you get a NEW shell which the commands
you send are executed in, when finished running your commands that shell closes
and your back into you apps shell and any/all changes you made to the
environment disappear.

That's crap - it's the new 64bit versions of windows that don't have DOS.

HTH
Steve
  Reply With Quote
4 14th March 12:43
rpc
External User
 
Posts: 1
Default swpruncmd() and winXP


Hi Andreas and Stephen
Thanks for explanation.As I said I was using swpruncmd() for the first
time and thought using it for "cd" was the easiest.But as you have
adviced I will usr FT_CHDIR().

With Best Wishes
Rajeev Chavan
  Reply With Quote
5 22nd March 13:40
@hotmail.cow (flip the w)
External User
 
Posts: 1
Default swpruncmd() and winXP


I have an application that use swpruncmd() to send an FTP message via
the DOS prompt. It's working well under Win98 but fail under WinXP.

It's not back in focus after the DOS prompt is closed, the first app is
left in the task bar...

By the way, it's a full screen app.

Any idea, thanks.

J-P
  Reply With Quote
6 25th February 04:57
nicolas2008
programming
Mombu User
 
Join Date: Feb 2010
Location: Ukraine
Posts: 1
nicolas2008 is on a distinguished road
Default Re: swpruncmd() and winXP


Please help me!
I need to run a dos program with size 2Mb (on XP).
Can i do this using swpruncmd()?
Or maybe there is better way?

Sorry for my English.
Thank you.
nicolas2008 is offline   Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666