Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Detecting operating system?

Author
Message
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 3rd Nov 2003 05:06
I'm pretty sure DBPro alone can't do this, but has anyone made (or considered making) a DLL that allows DBPro to determine what operating system the program is running on? This would be useful for many reasons. For example, it has been mentioned that "Windowed - Full Screen" does not run well on XP, but does on 98, whereas "Full Screen Exclusive" runs better on XP. Suggestions?

Team EOD :: Programmer/Storyboard Assistant
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Nov 2003 05:10
I thought there was a function in dbp that returns the OS info...
double check as I am not sure. I know there is one that returns the DX version info

-RUST-
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 3rd Nov 2003 05:15
Hmm...

Searched for obvious phrases such as "Operating System", "OS", "Windows", and "Version" - even looked the whole way through the CORE commands list - nothing about operating system. Still open to ideas.

Team EOD :: Programmer/Storyboard Assistant
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Nov 2003 06:17
well, I can do it in VB but you can't use a vb dll so that's out. There has got to be a windows dll that you could call, or if someone has a C++ dll already you could use that, let me look at the win32API bible and see...

brb

-RUST-
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Nov 2003 06:28 Edited at: 3rd Nov 2003 06:28
OK there is a function GetVersion in kernel32 but it returns some numerics to id win 3.10 or 95.... still looking... ok GetVersionEx (also in kernel32) function seems a little better but you should find info on using it and what the parameters are - I know some win api's need a udt or structure passed in as an arg

here is the vb declaration
Declare Function GetVersionEx& Lib "kernel32" Alias "GetVersionExA"(_lpVersionInformation As OSVERSIONINFO)

hope this helps

-RUST-
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 3rd Nov 2003 06:44
I wish I could say it does, but frankly I'm not sure. I've never made a DLL before so I wouldn't no where to begin doing it...so that appears to be VB code, and DBPro, like you mentioned, can't take DLLs made with VB...hmm...

Team EOD :: Programmer/Storyboard Assistant
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Nov 2003 06:48
but you can use what I posted above

GetVersionEx from kernel32.dll

just call the dll in dbp

-RUST-
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 3rd Nov 2003 06:51
Oh...that'll work? Cool hehe

Team EOD :: Programmer/Storyboard Assistant
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Nov 2003 06:57
I am not sure but give it a shot
let me know how it goes

-RUST-
heartbone
23
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 3rd Nov 2003 08:02
Try this. It works for me.

The more you see, the more you know.
The more you know, the more you see.
Surreal Studio IanG
22
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Cyberspace...I think
Posted: 3rd Nov 2003 21:12 Edited at: 3rd Nov 2003 21:14
Nah there is something much easier, there is a .dll on
http://www.codingarea.co.uk/html/dll_s___plug-ins.html
its osversion
you need to download the constants and i recommend downloading the test program.
there is also a .dll for getting the direct x version as well.

Flick that switch...*BANG*...Not that one!
Surreal Studio IanG
22
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Cyberspace...I think
Posted: 3rd Nov 2003 21:12 Edited at: 3rd Nov 2003 21:14
hope it is some use

Flick that switch...*BANG*...Not that one!
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 3rd Nov 2003 21:25
Im sure you'll soon find out.


Avatar & Logo by Indi. Insert witty comment here...
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Nov 2003 21:51 Edited at: 3rd Nov 2003 21:54
you don't need a dll for getting DX version - it's a command in DBP.
Why download a dll when windows dll has what is needed already?

whatever works I guess.

EDIT: But TCA has some very useful dll's on that page!!

-RUST-
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 3rd Nov 2003 22:01
Quote: "you don't need a dll for getting DX version - it's a command in DBP."

What is it then ?

Quote: "But TCA has some very useful dll's on that page"

Indeed


Avatar & Logo by Indi. Insert witty comment here...
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Nov 2003 23:23 Edited at: 3rd Nov 2003 23:24
Hmm, well, i guess I stand corrected as I can't find a DX version command - I think I was confusing various Perform Checklist... commands for one that returned dx version, but I could swear I read it somwhere, maybe not in DBP - somwhere else - Oh well.

I apologize to the thread for the misinformation.

-RUST-
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 3rd Nov 2003 23:44
A dx version command would be useless anyway. If the required directx version isn't there the dbpro exe crashes. If it runs you have the correct version.

Login to post a reply

Server time is: 2026-07-26 16:03:35
Your offset time is: 2026-07-26 16:03:35