OS/2, eCS & ArcaOS - Technical > Programming

REXX: RxStartSession, what is wrong with this call?

<< < (2/3) > >>

Andreas Schnellbacher:
BTW: This has worked for me when I'd tested it this morning:

--- Code: ---CALL RxFuncAdd 'rxuinit','RXU','rxuinit'
CALL rxuinit
rcx = RxStartSession( 'oo.exe', '/a F:\Apps\NEPMD\myepm\macros "OPEN=DEFAULT;"')

--- End code ---
It really seems that the error is created by oo.exe.

Dariusz Piatkowski:
OK, so a bit of an update.

I added a whole bunch of DEBUG statements to oo.exe so that I can trace through what's going up and understand why the failure.

As it turns out the issue occurs when oo.exe calls DosQueryPathInfo API, which in turn fails.

1) here is the output of the modified oo.exe when oo.exe processes the very same CLI arguments


--- Code: ---[G:\tmp]oo.exe /a v:\photo "DEFAULTVIEW=XVIEW;"

DEBUG main => num of MAIN arguments passed:4
DEBUG main => arguments 0 is :oo.exe
DEBUG main => arguments 1 is :/a
DEBUG main => arguments 2 is :v:\photo
DEBUG main => arguments 3 is :DEFAULTVIEW=XVIEW;
DEBUG ParseArgs => num of arguments passed:4
DEBUG ParseArgs => num of characters in the EXE filename:9
DEBUG ParseArgs=> arguments 0 is :OO
DEBUG ParseArgs=> arguments 1 is :/a
DEBUG ParseArgs=> arguments 2 is :v:\photo
DEBUG ParseArgs=> arguments 3 is :DEFAULTVIEW=XVIEW;
DEBUG ParseArgs=> arguments 4 is :(null)
DEBUG ParseArgs => processing argument:0
DEBUG ParseObject => pArg:v:\photo
DEBUG ParseObject => pPath:
DEBUG ParseObject => DosQueryPathInfo API RC:0

--- End code ---

2) and here is the output of the modified oo.exe when oo.exe processes these arguments from within my REXX script:


--- Code: ---DEBUG main => num of MAIN arguments passed:4
DEBUG main => arguments 0 is :oo.exe
DEBUG main => arguments 1 is :/a
DEBUG main => arguments 2 is :v:\photo
DEBUG main => arguments 3 is :DEFAULTVIEW=XVIEW;
DEBUG ParseArgs => num of arguments passed:4
DEBUG ParseArgs => num of characters in the EXE filename:9
DEBUG ParseArgs=> arguments 0 is :OO
DEBUG ParseArgs=> arguments 1 is :/a
DEBUG ParseArgs=> arguments 2 is :v:\photo
DEBUG ParseArgs=> arguments 3 is :DEFAULTVIEW=XVIEW;
DEBUG ParseArgs=> arguments 4 is :(null)
DEBUG ParseArgs => processing argument:0
DEBUG ParseObject => pArg:v:\photo
DEBUG ParseObject => pPath:
DEBUG ParseObject => DosQueryPathInfo API RC:15
invalid or malformed path

--- End code ---

So clearly, the DosQueryPathInfo API call returns RC=15, which is weird because per the published CP Guide and Reference these are the valid RC values:

DosQueryPathInfo returns the following values:

0 NO_ERROR
3 ERROR_PATH_NOT_FOUND
32 ERROR_SHARING_VIOLATION
111 ERROR_BUFFER_OVERFLOW
124 ERROR_INVALID_LEVEL
206 ERROR_FILENAME_EXCED_RANGE
254 ERROR_INVALID_EA_NAME
255 ERROR_EA_LIST_INCONSISTENT

Sooo...somehow submitting oo.exe from within my REXX script causes this issue.

I will try the approach you took Andreas, which is to run just this RxStartSession call from a separate REXX script to see if the failure is still there. If not, that would imply something else in my REXX is contributing to this issue.

Dariusz Piatkowski:
Hi Lars!


--- Quote from: Lars on January 04, 2021, 02:12:33 pm ---If you insist on doing it that way, I'd try "double double" quotes in the arg string...

--- End quote ---

Hey, I'm all ears...what are you thinking in terms of other approaches I could take to mark a default view for a folder as XVIEW, basically "DEFAULTVIEW=XVIEW;"?

Thanks,
-Dariusz

Andreas Schnellbacher:
rc = 15 is ERROR_INVALID_DRIVE. So DosQueryPathInfo failed to find the drive of v:\photo. Note that the toolkit docs have a few flaws. Is it a network drive? But strange that your first code block works. I guess we need to see the whole script for more hints on that.

When you're already in a REXX script, why don't you just use the following?

--- Code: ---rcx = SysSetObjectData( 'v:\photo', 'DEFAULTVIEW=XVIEW;')

--- End code ---

Rich Walsh:

--- Quote from: Dariusz Piatkowski on January 04, 2021, 07:24:28 pm ---
--- Code: ---DEBUG ParseArgs => processing argument:0
DEBUG ParseObject => pArg:v:\photo
DEBUG ParseObject => pPath:
DEBUG ParseObject => DosQueryPathInfo API RC:15
invalid or malformed path

--- End code ---

--- End quote ---

I wouldn't claim to really understand what the above is saying, but shouldn't 'pPath:' be displaying "v:\photo"? If the path is null, rc=15 (ERROR_INVALID_DRIVE) would not be inappropriate.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version