Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

skippyj777

Delphi version of Visual Basic's GetObject()

This topic is 6229 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to check the amount of video memory present on the video card. Here is the Visual Basic code that accomplishes this: Dim controllers As Object Dim controller As Object Dim ram As Variant Dim caption As Variant Set controllers = GetObject("WinMgmts:").InstancesOf("Win32_VideoController") MsgBox "Retrieved Win32_VideoController collection." For Each controller In controllers caption = controller.caption If IsNull(ram) Then MsgBox "Caption returned Null!" Else MsgBox "Caption = " & CStr(caption) End If ram = controller.AdapterRAM If IsNull(ram) Then MsgBox "AdapterRAM returned Null!" Else MsgBox "AdapterRAM = " & CStr(ram) End If Next My problem is getting the "controllers" object. I cannot figure out how to do this. I have tried CreateOleObject(), CreateObject(), and GetActiveObject() in various ways and none of them work. How does Visual Basic''s GetObject() work, and how can I create a Delphi version of it? -Josh

Share this post


Link to post
Share on other sites
Advertisement
Does anyone have any documentation on the GetObject call? What is the parameter that it takes and what does it do? What is the object or structure returned?

Share this post


Link to post
Share on other sites
Hmmm... after reading that MSDN page about GetObject, I am still lost as to how to use it. Activating a file? ActiveX and the such is beyond me at the moment.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!