Page 1 of 1
Get DirectX-Version
Posted: Mon Mar 04, 2002 10:02 am
by BackupUser
Broken on newest Windows
Restored from previous forum. Originally posted by Rings.
;GetDX-Version dsetup.dll is needed !
;
; The VB-Declares:
;Private Declare Function DirectXSetup Lib "dsetup.dll" Alias "DirectXSetupA" (ByVal hWnd As Long, ByVal lpszRootPath As String, ByVal dwFlags As Long) As Long
;Private Declare Function DirectXSetupGetVersion Lib "dsetup.dll" (dwVersion As Long, dwRevision As Long) As Long
;
lMajor.l=0
lMinor.l=0
dummy.l=0
If OpenDLL(0,"dsetup.dll"); Open the DLL
If DLLFunction(0,0,"DirectXSetupGetVersion") ; Register function
CallDLL2(0,@lMajor,@lMinor)
dummy.l=lMajor -$40000
MessageRequester("Info","DX-version: " + Str(lMajor) +" = "+Str(dummy),0)
EndIf
EndIf
;This is for Install DX !
;You may well need To change the string in the middle....
;R = DirectXSetup(MehWnd, "c:\windows\Temp\Dx\", 65560)
Getting better with a little help from my friends....thx Siggi
Posted: Mon Mar 04, 2002 2:40 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Coooool... DirectX for PureBasic
cya,
...Danilo
(registered PureBasic user)
Posted: Mon Mar 04, 2002 4:45 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
Sorry man,
I have Direct X on W98SE (on work) but no dsetup.dll
I also put a 'MessageRequester("Error","no DX found",0)' before the last 'EndIf' but nothing happens. That's strange...
The DirectX Diagnostic Tool says:
Operating System: Microsoft Windows 98(4.10, Build 2222)
DirectX Version : DirectX 8.0 (4.08.00.0400)
Notes: No problems found
DirectDraw Acceleration : Enabled
Direct3D Acceleration : Enabled
AGP Texture Acceleration: Enabled
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Posted: Mon Mar 04, 2002 5:09 pm
by BackupUser
Restored from previous forum. Originally posted by Rings.
yes, thats a trashy fast code-snippet.
I forgot to notice that you need the DLL-Lib from Mr.Skunk and the
dsetup.dll in the system-directory of you windows.
This sample is converted from a VB-Example.
See more(And the dsetup.dll) at
http://64.23.12.52//TUT_DX7_General.asp
Getting better with a little help from my friends....thx Siggi
Posted: Sat Feb 03, 2007 10:24 am
by PB
As of 3rd Feb 2007, the above tip no longer works (due to using an old lib
that is no longer available, and probably incompatible with PureBasic v4).
Anyone have another approach to doing it? I note that DSETUP.DLL is not
present on Windows XP Professional too.

Posted: Sat Feb 03, 2007 2:21 pm
by Heathen
PB wrote:As of 3rd Feb 2007, the above tip no longer works (due to using an old lib
that is no longer available, and probably incompatible with PureBasic v4).
Anyone have another approach to doing it? I note that DSETUP.DLL is not
present on Windows XP Professional too.

Hey PB, have you tried using the registery?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX
Code: Select all
4.02.0095 DirectX 1.0
4.03.00.1096 DirectX 2.0 / 2.0a
4.04.0068 / 69 DirectX 3.0 / 3.0a
Never Released DirectX 4.0
4.05.00.0155 DirectX 5.0
4.05.01.1721 / 1998 DirectX 5.0 (Released with Windows 98)
4.06.02.0436 DirectX 6.0
4.07.00.0700 DirectX 7.0
4.07.00.0716 DirectX 7.0a
4.08.00.0400 DirectX 8.0
4.08.01.0810
4.08.01.0881 DirectX 8.1
4.09.0000.0900 DirectX 9.0
4.09.0000.0901 DirectX 9.0a
4.09.0000.0902 DirectX 9.0b
Source:
http://www.vbgamer.com/msgboard/topic.asp?TOPIC_ID=210
Posted: Sat Feb 03, 2007 2:34 pm
by PB
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX
Okay, my Registry entry says 4.09.00.0904 which obviously relates to 9.0c,
but the problem is future versions would not be recognized. I was hoping
there'd be a string in the Registry saying "9.0c" somewhere.

Posted: Sat Feb 03, 2007 2:39 pm
by Heathen
PB wrote:> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX
Okay, my Registry entry says 4.09.00.0904 which obviously relates to 9.0c,
but the problem is future versions would not be recognized. I was hoping
there'd be a string in the Registry saying "9.0c" somewhere.

Yeah, that's true :/
Posted: Sat Feb 03, 2007 2:40 pm
by Kaeru Gaman
... future versions would not be recognized ...
where is the problem?
4.
09.00.
0904
Version - Build/release/whatever...
so check for >= 7 if you want to be sure to run with DX7