Board index » delphi » Help on getting system information from memory

Help on getting system information from memory

Hi all,

Please does anyone know how to extract the Set Temp from memory that is
loaded in by the Autoexec or Config.sys in TP7.0
Any help would be appreciated as I have no idea where to start!!!

Also, does anyone know the $ command to send an ioerror if a string is typed
into a readln looking for an integer, just as {$I-} would send an ioerror
while using reset on a non-existant file and not run-time error.

Thanks again, Marcus.

--
SPAM foiling in effect - Remove NOSPAM@ from e-mail address to reply.
Thanks.

 

Re:Help on getting system information from memory


For your first problem, look at the GetEnv function.  For
your second problem, try writing a routine that will accept
only numerics.

Quote
Marcus wrote:

> Hi all,

> Please does anyone know how to extract the Set Temp from memory that is
> loaded in by the Autoexec or Config.sys in TP7.0
> Any help would be appreciated as I have no idea where to start!!!

> Also, does anyone know the $ command to send an ioerror if a string is typed
> into a readln looking for an integer, just as {$I-} would send an ioerror
> while using reset on a non-existant file and not run-time error.

> Thanks again, Marcus.

> --
> SPAM foiling in effect - Remove NOSPAM@ from e-mail address to reply.
> Thanks.

Re:Help on getting system information from memory


Quote
Loki wrote:

> >Please does anyone know how to extract the Set Temp from memory that is
> >loaded in by the Autoexec or Config.sys in TP7.0
> >Any help would be appreciated as I have no idea where to start!!!

> is it GetEnv ?
> I know GetEnv('comspec') gets the dos comspec from config.sys, s maybe it's
> the same

> >Also, does anyone know the $ command to send an ioerror if a string is
> typed
> >into a readln looking for an integer, just as {$I-} would send an ioerror
> >while using reset on a non-existant file and not run-time error.

> I use the VAL provedure
> var S: string;
>     aresult, errorcode: integer;
> begin

>   VAL(S, aresult, errorcode);

>   if errorcode <> 0 then {was an error, errorcode shows the position of the
> first error}

This method could be better than the $I- approach, since the string
could be adjusted before Val to have no leading and trailing blanks.

Anyway, it is not the ultimate in programming to use Val. I use normally
an "evaluate" function that evaluates a complete expression with +-*/
and () and many functions like sin ... exp etc. This is the stuff that
users like! Who has a pocket calculator besides a 300MHz PentiumII?

But keep this secret please.

Franz Glaser, Austria
http://members.eunet.at/meg-glaser

Re:Help on getting system information from memory


Quote
>Please does anyone know how to extract the Set Temp from memory that is
>loaded in by the Autoexec or Config.sys in TP7.0
>Any help would be appreciated as I have no idea where to start!!!

is it GetEnv ?
I know GetEnv('comspec') gets the dos comspec from config.sys, s maybe it's
the same

Quote
>Also, does anyone know the $ command to send an ioerror if a string is
typed
>into a readln looking for an integer, just as {$I-} would send an ioerror
>while using reset on a non-existant file and not run-time error.

I use the VAL provedure
var S: string;
    aresult, errorcode: integer;
begin

  VAL(S, aresult, errorcode);

  if errorcode <> 0 then {was an error, errorcode shows the position of the
first error}

Other Threads