Run exe with SWPRUNCMD() / Error: Program too big to fit in memory. : Clipper
This is a discussion on Run exe with SWPRUNCMD() / Error: Program too big to fit in memory. within the Clipper forums in Programming Languages category; I try to run wget.exe with the help of the Blinker function "SWPRUNCMD". But I get the following error message: "Program too big to fit in memory". I use WinXP with 1GO of RAM. My function look like this: STATIC FUNCTION KursInfo() Local success,majerr,minerr Local rEcran := SaveScreen(0,0,23,79) // Save screen success = SWPRUNCMD("FOLDER\WGET http://raiffeisen2.inet.rolotec.ch/r...p?locale=de_CH -O FOLDER\EXPORT.TXT",300,"","") IF (!success) ? "Swap failed" majerr = SWPERRMAJ() minerr = SWPERRMIN() ? "Error code :", majerr, minerr ELSE ? "Swap succeeded" ? "Errorlevel :",SWPERRLEV() ENDIF Inkey(0) RestScreen(0,0,23,79,rEcran) // Restaure screen Return nil Do I have to change someting in CONFIG.INI or CONFIG.NT ? ...
| Clipper Clipper Programming |
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| "Program too big to fit in memory". I use WinXP with 1GO of RAM. My function look like this: STATIC FUNCTION KursInfo() Local success,majerr,minerr Local rEcran := SaveScreen(0,0,23,79) // Save screen success = SWPRUNCMD("FOLDER\WGET http://raiffeisen2.inet.rolotec.ch/r...p?locale=de_CH -O FOLDER\EXPORT.TXT",300,"","") IF (!success) ? "Swap failed" majerr = SWPERRMAJ() minerr = SWPERRMIN() ? "Error code :", majerr, minerr ELSE ? "Swap succeeded" ? "Errorlevel :",SWPERRLEV() ENDIF Inkey(0) RestScreen(0,0,23,79,rEcran) // Restaure screen Return nil Do I have to change someting in CONFIG.INI or CONFIG.NT ? Many thanks in advance for any help. Otto |
|
#2
| |||
| |||
| Otto > "Program too big to fit in memory". Means exactly what it says<g>, there's not enough memory (640K DOS) for the program to run in. Check the parameters of SwpRunCmd() IIRC you tell it not to reserve any memory for the program. Try running in a separate shell Eg Check the parameters/syntax as I'm just typing it in here swpruncmd( 'cmd.exe /s wget etc'...,,,) Your other option is to use Vouch32 and run it in a Windows session - ShellExecute() CYA Steve |
|
#3
| |||
| |||
| Dear Otto Haldi: "Otto Haldi" <ohaldi@chateau.ch> wrote in message news:ibsmg49je0038h0g31edajs567q6986g05@4ax.com... >I try to run wget.exe with the help of the Blinker function > "SWPRUNCMD". But I get the following error message: > "Program too big to fit in memory". > I use WinXP with 1GO of RAM. Just to add a little more to Stephen Quinn's response... RUN() invokes COMMAND.COIM which generates a DOS-limited shell, but is intelligent enough )I think) to load CMD.EXE which can probably run your non-DOS program. You might convert to xHarbour, which takes your Clipper 5.3 and Clipper Tools code and makes full Windows executables from it. Then you can call anything you want to. David A. Smith |
|
#4
| |||
| |||
| Otto What type of program is WGET (DOS 16/32 bit / Windows 16/32 bit app)?? CYA Steve |
|
#5
| |||
| |||
| On Sat, 01 Nov 2008 06:12:39 GMT, "Stephen Quinn" <stevejqNO@SPbigpond.AMnet.au> wrote: Hello Steve, >What type of program is WGET (DOS 16/32 bit / Windows 16/32 bit app)?? > I don't know but I think 32 bit. here the link: http://wget.addictivecode.org/Freque...e9aef90f0193db |
|
#6
| |||
| |||
| On Fri, 31 Oct 2008 23:26:28 GMT, "Stephen Quinn" <stevejqNO@SPbigpond.AMnet.au> wrote: Hello Stephen, Thanks for your help. >Try running in a separate shell >Eg Check the parameters/syntax as I'm just typing it in here > swpruncmd( 'cmd.exe /s wget etc'...,,,) > With the following solution work well: SWPRUNCMD("CMD.EXE /C _Wget.bat") The batch _Wget.bat: @ECHO OFF ECHO . ECHO . Dowload Notenkurse ECHO . CD WGET WGET http://raiffeisen2.inet.rolotec.ch/r...p?locale=de_CH -O ExpRai.txt >Your other option is to use Vouch32 and run it in a Windows session - >ShellExecute() > Ok I will have a look. |
|
#7
| |||
| |||
| On Fri, 31 Oct 2008 21:35:30 -0700, "N:dlzc D:aol T:com \(dlzc\)" <dlzc1@cox.net> wrote: >You might convert to xHarbour, which takes your Clipper 5.3 and >Clipper Tools code and makes full Windows executables from it. >Then you can call anything you want to. > You are right, I should move to xHarbour, I downloaded Harbour for about one Year, but didn't have had much success. |
|
#8
| |||
| |||
| Hi Otto I also run WGET in a dos shell, albeit without swpruncmd (I use the clipper ! command instead). However, I was originally running into the same problem as the one you described. I can't explain why, but the following worked for me. - Write the command to call wget into a batch file. - Call the batch file using the following syntax: ! ("CMD /Q /C " + cBatName) Hope this helps - let me know if you want sample code. RL On Nov 1, 8:09 am, Otto Haldi <oha...@chateau.ch> wrote: > I try to run wget.exe with the help of the Blinker function "SWPRUNCMD". But I get the following error message: > "Program too big to fit in memory". > I use WinXP with 1GO of RAM. > > My function look like this: > > STATIC FUNCTION KursInfo() > Local success,majerr,minerr > Local rEcran := SaveScreen(0,0,23,79) // Save screen > > success = SWPRUNCMD("FOLDER\WGEThttp://raiffeisen2.inet.rolotec.ch/raiffeisen2/currencies/exchangeRat...-O FOLDER\EXPORT.TXT",300,"","") > IF (!success) > ? "Swap failed" > majerr = SWPERRMAJ() > minerr = SWPERRMIN() > ? "Error code :", majerr, minerr > ELSE > ? "Swap succeeded" > ? "Errorlevel :",SWPERRLEV() > ENDIF > Inkey(0) > RestScreen(0,0,23,79,rEcran) // Restaure screen > Return nil > > Do I have to change someting in CONFIG.INI or CONFIG.NT ? > Many thanks in advance for any help. > Otto |
|
#9
| |||
| |||
| On Sat, 1 Nov 2008 03:41:40 -0700 (PDT), rl <rl@raluke.com> wrote: >I also run WGET in a dos shell, albeit without swpruncmd (I use the >clipper ! command instead). >However, I was originally running into the same problem as the one >you described. >I can't explain why, but the following worked for me. >- Write the command to call wget into a batch file. >- Call the batch file using the following syntax: > ! ("CMD /Q /C " + cBatName) >Hope this helps - > Thanks for your help but I will stay by the swpruncmd() solution. >let me know if you want sample code. > What kind of sample code ? Have you some codes how to read a downloaded html file ? Regards Otto |
|
#10
| |||
| |||
| On Fri, 31 Oct 2008 21:35:30 -0700, "N:dlzc D:aol T:com \(dlzc\)" <dlzc1@cox.net> wrote: >You might convert to xHarbour, which takes your Clipper 5.3 and >Clipper Tools code and makes full Windows executables from it. >Then you can call anything you want to. > where my I download the last version of xHarbour ? Is this the correct link ? http://sourceforge.net/project/downl...32-bcc-5-5.exe Regards Otto |


