If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > get os version, with a catch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-29-04, 15:50
cmose cmose is offline
Registered User
 
Join Date: Apr 2004
Posts: 16
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!
Reply With Quote
  #2 (permalink)  
Old 04-30-04, 09:27
cmose cmose is offline
Registered User
 
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).
Reply With Quote
  #3 (permalink)  
Old 05-20-04, 04:05
Shores Shores is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On