![Avatar of visexpert](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
visexpert
asked on
Get Monitor Serial via WMI
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
![Avatar of shaneholmes](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
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
"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
![Avatar of visexpert](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
ASKER
Yes via WMI is enough. Do you think this demo is taken it from WMI?
![Avatar of IElite](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
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
sholmes
![Avatar of shaneholmes](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
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
http://www.swissdelphicenter.ch/torry/showcode.php?id=2135
shaneholmes
![Avatar of shaneholmes](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
NOTE:
You need the WbemScripting_TLB unit, which you can create by installing the type library (located in the Windows\System32\wbem\wbem disp.tlb
using the "Project|Import type library" menu option
shaneholmes
You need the WbemScripting_TLB unit, which you can create by installing the type library (located in the Windows\System32\wbem\wbem
using the "Project|Import type library" menu option
shaneholmes
![Avatar of visexpert](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
ASKER
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
All i can see from this link is it fetching Processes, not Monitor Serial?
http://www.swissdelphicenter.ch/torry/showcode.php?id=2135
![Avatar of shaneholmes](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
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
shaneholmes
![Avatar of visexpert](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
ASKER
I see no simple demo that can show me how this is possible in Delphi.
![Avatar of shaneholmes](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
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
shaneholmes
![Avatar of visexpert](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
ASKER
Is it possible to get similar Delphi demo get Monitor Serial?
http://www.swissdelphicenter.ch/torry/showcode.php?id=2135
http://www.swissdelphicenter.ch/torry/showcode.php?id=2135
![Avatar of shaneholmes](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
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
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
![Avatar of visexpert](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
ASKER
Can anyone change this program to Delphi?
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=59528&lngWId=1
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=59528&lngWId=1
![Avatar of ben_tsai](https://cdn.experts-exchange.com/images/experts-exchange/avatar-01-large.gif)
The VB sample only get information from registry(HKLM\SYSTEM\Curre ntControlS et\Enum\DI SPLAY or HKLM\ENUM\Monitor).
You can use RegConnectRegistry to get it from remote site.
You can use RegConnectRegistry to get it from remote site.
ASKER