View previous topic :: View next topic |
Author |
Message |
AjithSivakumar
Joined: 04 Jan 2008 Posts: 14
|
Posted: Thu May 01, 2008 5:19 pm Post subject: Floating point stack fault |
|
|
Hi,
I invoked a file using the START_PROCESS@('Notepad.EXE','filename')
When i tried to close the file I am getting the following errors
Runtime error from program:c:\myapplication.exe
Floating point stack fault
Floating point stack fault at address 0040d1a3
0040d170 PANELED [+0033]
0040ee80 SUB1 [+007d]
004061ec CHCCT [+0126]
00404f10 DEFSYS [+0061]
00409020 main [+015e]
eax=00000000 ebx=00003188 ecx=0361dcac
edx=7c90eb94 esi=0361fa7b edi=00000000
ebp=0361f9e8 esp=0361f9c0 IOPL=0
ds=0023 es=0023 fs=003b
gs=0000 cs=001b ss=0023
flgs=00010206 [NC EP NZ SN DN NV]
0040d1a3 fistp [ebp-0x18]
0040d1a6 wait
0040d1a7 fldcw [00416aa0]
It will be appreciated if any one can tell me what will be the reason.
Cheers,
Ajith
[/img] |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Thu May 01, 2008 6:25 pm Post subject: |
|
|
You should probably be using START_PPROCESS@ rather than START_PROCESS@.
Also make sure that it is called as a function returning a 32 bit INTEGER. |
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Thu May 01, 2008 6:51 pm Post subject: |
|
|
If your file that you wish to open has an extension that is registered on your PC, then calling USE_URL@ will open it appropriately.
For example if your file is fred.txt,
then
call use_url@('fred.txt') will open it in Notepad.
if it is fred.pdf
call use_url@('fred.pdf') will open in Adobe Acrobat Reader etc.
Works for .html, .doc, .xls or anything.
If the extension is not registered, then do so by opening it in Explorer one time and selecting the program to use. No doubt you can use the registry functions to set it if you understand them, and I don't.
Regards
Ian |
|
Back to top |
|
|
AjithSivakumar
Joined: 04 Jan 2008 Posts: 14
|
Posted: Fri May 02, 2008 10:47 am Post subject: |
|
|
Hi Paul,
I think i haven't mentioned my full requirement. Sorry for that. I think START_PPROCESS@ will wait for the created process to terminate. My application needs to wait for the created process to terminate.
Thanks in advance,
Ajith |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri May 02, 2008 11:32 am Post subject: |
|
|
You need to declare START_PROCESS@ as returning an INTEGER.
The default is REAL causing the stack fault.
Code: | INTEGER ret, START_PROCESS@
ret = START_PROCESS@(...
END |
|
|
Back to top |
|
|
AjithSivakumar
Joined: 04 Jan 2008 Posts: 14
|
Posted: Fri May 02, 2008 1:32 pm Post subject: |
|
|
Hi Paul,
Thanks a lot for that. It is now working fine.
Thank You,
Ajith |
|
Back to top |
|
|
|