Jump to content


Photo

Osinfo Dll


  • Please log in to reply
4 replies to this topic

#1 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 09 April 2007 - 10:59 PM

OsInfo DLL

This is a very quick DLL I made. It is able to find the version numbers of the operating system. I was forced to write it in PureBasic, because nothing works with Windows Vista, including just about every C++ compiler I tried. This DLL uses the simple command "GetVersionEx". It retrieves the information from the OSVERSIONINFOEX structure.

Please ignore the constants in the help file. I originally was going to make this into an extension, but decided against it, and the constants were never removed from the help file. You can, however, look at the constants to get an understanding about what the numbers mean, but the constants themselves will not return any value.

Download it here:
http://technosoftnet...s/OsInfoDLL.zip

Here is the source code:
; ------------------------------------------------
; - Programmer:   Roach                          -
; - Date:         04/09/07                       -
; - Project:      OsInfo.DLL                     -
; - Version:      1.0                            -
; - Description:  Return information about the   -
; -               user's operating system        -
; ------------------------------------------------

ProcedureDLL.f getMajorVer()
   osvi.OSVERSIONINFOEX
   osvi\dwOSVersionInfoSize = SizeOf(osvi)
   GetVersionEx_(@osvi)
   ProcedureReturn osvi\dwMajorVersion
EndProcedure

ProcedureDLL.f getMinorVer()
   osvi.OSVERSIONINFOEX
   osvi\dwOSVersionInfoSize = SizeOf(osvi)
   GetVersionEx_(@osvi)
   ProcedureReturn osvi\dwMinorVersion
EndProcedure

ProcedureDLL.f getBuildNum()
   osvi.OSVERSIONINFO
   osvi\dwOSVersionInfoSize = SizeOf(osvi)
   GetVersionEx_(@osvi)
   ProcedureReturn osvi\dwBuildNumber
EndProcedure

ProcedureDLL.f getPlatformId()
   osvi.OSVERSIONINFO
   osvi\dwOSVersionInfoSize = SizeOf(osvi)
   GetVersionEx_(@osvi)
   ProcedureReturn osvi\dwPlatformId
EndProcedure

Peace,
Roach

Edited by Roach, 13 April 2007 - 09:27 PM.

  • 0
Posted ImagePosted Image

#2 WadeMcGillis

WadeMcGillis

    wademcgillis.com

  • GMC Member
  • 971 posts

Posted 27 August 2007 - 09:31 PM

This will help me, but, I do not have Game Maker 7, and it will take about an hour for me to download it. Is there any chance you can send me a list of the constants in the .gmk?

I don't know what the results I am getting mean. I have Windows 98:

Build Number: 67766222
Major Version: 0
Minor Version: 0
Platform Id: 1

None of the above mean Windows 98, I checked in the help file. I use Gm5.3a
  • 0

#3 GameOver Game's

GameOver Game's

    www.gameovergames.co.nr

  • New Member
  • 205 posts

Posted 09 January 2008 - 11:17 PM

link is broken!
  • 0

#4 mindbreaker

mindbreaker

    GMC Member

  • New Member
  • 457 posts

Posted 11 January 2008 - 01:55 AM

link is broken!


the source code is in the first post....
  • 0

#5 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 13 January 2008 - 07:05 PM

But to compile DLLs in PureBasic it costs $99.
You could use mine instead, or PM Roach.
  • 0

Chris Matthews, Co-Leader of Digital X