Re: WBEMTime question
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 07/25/04
- Previous message: [MS] Scott McNairy: "Re: WMI Leaks?"
- In reply to: Nick Carroll: "WBEMTime question"
- Next in thread: Nick Carroll: "Re: WBEMTime question"
- Reply: Nick Carroll: "Re: WBEMTime question"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 25 Jul 2004 16:10:17 +0200
Nick Carroll wrote:
> I'm trying to parse datetime values from WMI in C++. I want to use
> WBEMTime, but it's not available for NT4 native, and my application needs to
> run on NT4. Also, it's not recommended for use by Microsoft (see
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wbemtime.asp).
> There is a scripting class to do the same operation (SWbemDateTime), but
> it's only available for XP and above.
>
> Is there any code which is available to do this, or do I have to roll my
> own? There is a spec for the format
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi
> /date_and_time_format.asp) which suggest using SWbemDateTime, which of
> course is not feasible for any developer making an application for anything
> earlier than Windows XP.
>
> Am I missing something obvious?
Hi
No, you will need to roll your own.
For a VBScript version, see the function ConvWMIDateTime here:
http://groups.google.com/groups?selm=%23d8Kd7VMEHA.1388%40TK2MSFTNGP09.phx.gbl
-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx
- Previous message: [MS] Scott McNairy: "Re: WMI Leaks?"
- In reply to: Nick Carroll: "WBEMTime question"
- Next in thread: Nick Carroll: "Re: WBEMTime question"
- Reply: Nick Carroll: "Re: WBEMTime question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|