[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Get Monitor Serial via WMI

Posted on 2005-04-17
16
Medium Priority
?
3,799 Views
Last Modified: 2008-01-09
Hi.

Has someone a code for Delphi to get the Monitor Serial via WMI
or something else used to get it?

Attached is an app that can get it, but it's VB code :(

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=59528&lngWId=1

Thanks.
0
Comment
Question by:visexpert
16 Comments
 
LVL 11

Accepted Solution

by:
shaneholmes earned 1500 total points
ID: 13802932
HEre are some components (free) with demos that can get it for you:

Search for
WMI Components
on torry www.torry.net
delphi 6 & 7 WMI component suite

Mitec SystemInfo Components, it's freeware but you should pay for the source code.
You can freely download it from http://www.mitec.cz/Downloads/MSIC.zip

sholmes
0
 

Author Comment

by:visexpert
ID: 13802963
How to get it remotely?
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 13802982
Remotely? That wasn't in your original question.

"Has someone a code for Delphi to get the Monitor Serial via WMI
or something else used to get it?"

<SMILE>

Sorry - dont have a clue!

sholmes
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:visexpert
ID: 13803008
Yes via WMI is enough. Do you think this demo is taken it from WMI?
0
 

Expert Comment

by:IElite
ID: 13803015
Both components in their descriptions mention info extracted using the WMI. Although, I haven't tested either of them. I suggest you look at them, maybe install the components and test the demo apps to see how they work and if they do wahat your looking to do.

sholmes
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 13803309
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 13803324
Here is also an exampl eof Using the WMI (delphi code), which uses the WbemScripting_TLB type library.

http://www.swissdelphicenter.ch/torry/showcode.php?id=2135

shaneholmes
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 13803336
NOTE:

You need the WbemScripting_TLB unit, which you can create by installing the type library (located in the  Windows\System32\wbem\wbemdisp.tlb

using the "Project|Import type library" menu option


shaneholmes
0
 

Author Comment

by:visexpert
ID: 13803543
Dear shaneholmes.

All i can see from this link is it fetching Processes, not Monitor Serial?
http://www.swissdelphicenter.ch/torry/showcode.php?id=2135
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 13805439
Sorry, my intentions (with my last two post) were to show you how they import  the type library and use that access the WMI - not one particularly region of it.

shaneholmes
0
 

Author Comment

by:visexpert
ID: 13808067
I see no simple demo that can show me how this is possible in Delphi.
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 13808409
No, its not a simple solution by any means. It will take some research and work to write this. Thats why i was pushing you towards components all ready written. If you decided to write your own, I was showing you where others have looked!

shaneholmes
0
 

Author Comment

by:visexpert
ID: 13810010
Is it possible to get similar Delphi demo get Monitor Serial?
http://www.swissdelphicenter.ch/torry/showcode.php?id=2135
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 13810253
I do not know. I have not seen any. Im sure someone has done it - I just dont know who or when.

Here is what i would do. Go to MSDN (microsoft's developer network pages) and get the SDK info on this WMI. Learn what the constants, and routines are for what you are trying to do. Then compare it with  that code in that Link:

http://www.swissdelphicenter.ch/torry/showcode.php?id=2135

Im sure it is just a matter of replacing it with the appropriate calls & constants for getting the monitor serial


Sorry I couldn't help you more

You could ask that this question be deleted if you like - i wont object to it.

You could also post the  question again. I wont respond to it.
Sometimes, experts see a response already, they stay away from it, cause they think that one expert might have already solved it, and therefore it would be a waste of their time attempting.


Good Luck!

shaneholmes

0
 

Author Comment

by:visexpert
ID: 13810580
0
 

Expert Comment

by:ben_tsai
ID: 15121687
The VB sample only get information from registry(HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY or HKLM\ENUM\Monitor).
You can use RegConnectRegistry to get it from remote site.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question