Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    16

    Unanswered: get os version, with a catch

    I'm trying to get the os version but here's the catch: This is a paradox 7 application and has to be run in winNT sp5 mode to work on XP. Now I'm trying to find out if the os is xp but checking the registry for current version returns 4.0 and so does the objectpal sysInfo function. Anyone know a way I could reliably verify that the os is windows XP? many thanks!

  2. #2
    Join Date
    Apr 2004
    Posts
    16
    ok, followup to this: does anyone know of a way to check if a registry key exists or to supress the error thrown by getRegistryValue if the key/value isn't present? And also (more questions ) is there any conceivable way to check what the xp desktop/windows "theme" being used is via objectpal?
    many thanks. (the primary reason for much of this is for display purposes).

  3. #3
    Join Date
    Aug 2003
    Location
    Bologna - Italy
    Posts
    209
    You can almost always catch and suppress errors if you use the try statement:

    try
    getRegistryValue(....)
    onfail
    message("Error reading keys")
    endtry.

    By the way, THERE IS NO WAY AT ALL OF KNOWING YOUR APP IS RUNNING UNDER COMPAT MODE.

    Compatibility mode is MEANT to trick te app into thinking it's running in another version of windows, and so almost all version info returned from system calls is false...

    I think that the only way you can detect this fact is by some strange low level mean, such as reading byte by byte some important system file searching for version info; don't use any system call in doing that, since ALL system calls are patched.

    For the info about the desktop theme in use, i think it's a bit difficult to get it but i remember seeing in Paradox (or in the registry...) some constants (values) like systemmetrics, which you can read to get the size of title bar, title bar controls, menus, toolbars, and even window borders...

    Bye!
    The only failure is not trying to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •