[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: OpSys query in XPL



CLD:Much appreciated:FW

On 6/13/06, mailto:cld@xxxxxxxx mailto:cld@xxxxxxxx wrote:
-------------- Original message ----------------------
From: "Fred Weiner" mailto:fw1948@xxxxxxxx
>  clear so clear; even more than I asked for. I had examined GETXYOS and was
> unable to understand *how* that code "queries" for which OPSYS is there. I
> want that intellectual nugget . . .

Fred:

Basically, GetXyOS "shells" to the OS (XyWrite's DOS command); issues the VER command, redirecting the output of that command to a file (VER>filename); loads the contents of the file to Save/Get 652 (so that it can be inspected in memory, without CAlling the file into a window); tests 652 for containment of the telltale string ("NT", "XP", etc.); and, finally, reconfigures S/G 652 so that it contains the appropriate 3-char OS identifier (along with a prefix, "XyOS=", which earmarks the contents of 652 as GetXyOS data, i.e., eliminates the possibility that the string was put there by another program that has nothing to do with ID'ing the OS).  That's it, in a nutshell.

--
Carl Distefano
mailto:cld@xxxxxxxx