WqlEventQuery コンストラクタ (String, String, TimeSpan, String[])
アセンブリ: System.Management (system.management.dll 内)
構文
Public Sub New ( _ eventClassName As String, _ condition As String, _ groupWithinInterval As TimeSpan, _ groupByPropertyList As String() _ )
Dim eventClassName As String Dim condition As String Dim groupWithinInterval As TimeSpan Dim groupByPropertyList As String() Dim instance As New WqlEventQuery(eventClassName, condition, groupWithinInterval, groupByPropertyList)
public WqlEventQuery ( string eventClassName, string condition, TimeSpan groupWithinInterval, string[] groupByPropertyList )
public: WqlEventQuery ( String^ eventClassName, String^ condition, TimeSpan groupWithinInterval, array<String^>^ groupByPropertyList )
public WqlEventQuery ( String eventClassName, String condition, TimeSpan groupWithinInterval, String[] groupByPropertyList )
public function WqlEventQuery ( eventClassName : String, condition : String, groupWithinInterval : TimeSpan, groupByPropertyList : String[] )
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WqlEventQuery コンストラクタ (String, TimeSpan, String)
アセンブリ: System.Management (system.management.dll 内)
構文
Public Sub New ( _ eventClassName As String, _ withinInterval As TimeSpan, _ condition As String _ )
Dim eventClassName As String Dim withinInterval As TimeSpan Dim condition As String Dim instance As New WqlEventQuery(eventClassName, withinInterval, condition)
public function WqlEventQuery ( eventClassName : String, withinInterval : TimeSpan, condition : String )
次の例では、イベント クエリ "SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA Win32_Service" を作成します。これは、10 秒のポーリング間隔で、Win32_Service インスタンスの作成通知を送信します。
Imports System Imports System.Management Public Class EventSample Public Overloads Shared Function _ Main(ByVal args() As String) As Integer ' Requests notification of the creation ' of Win32_Service instances with a 10 second ' allowed latency. Dim t As New TimeSpan(0, 0, 10) Dim q As New WqlEventQuery("__InstanceCreationEvent", _ t, "TargetInstance isa ""Win32_Service""") MessageBox.Show(q.QueryString) End Function 'Main End Class 'EventSample
using System; using System.Management; public class EventSample { public static void Main(string[] args) { // Requests notification of the creation // of Win32_Service instances with // a 10 second allowed latency. WqlEventQuery q = new WqlEventQuery("__InstanceCreationEvent", new TimeSpan(0,0,10), "TargetInstance isa 'Win32_Service'"); Console.WriteLine(q.QueryString); return; } }
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WqlEventQuery コンストラクタ (String, TimeSpan, String, TimeSpan, String[], String)
アセンブリ: System.Management (system.management.dll 内)
構文
Public Sub New ( _ eventClassName As String, _ withinInterval As TimeSpan, _ condition As String, _ groupWithinInterval As TimeSpan, _ groupByPropertyList As String(), _ havingCondition As String _ )
Dim eventClassName As String Dim withinInterval As TimeSpan Dim condition As String Dim groupWithinInterval As TimeSpan Dim groupByPropertyList As String() Dim havingCondition As String Dim instance As New WqlEventQuery(eventClassName, withinInterval, condition, groupWithinInterval, groupByPropertyList, havingCondition)
public WqlEventQuery ( string eventClassName, TimeSpan withinInterval, string condition, TimeSpan groupWithinInterval, string[] groupByPropertyList, string havingCondition )
public: WqlEventQuery ( String^ eventClassName, TimeSpan withinInterval, String^ condition, TimeSpan groupWithinInterval, array<String^>^ groupByPropertyList, String^ havingCondition )
public WqlEventQuery ( String eventClassName, TimeSpan withinInterval, String condition, TimeSpan groupWithinInterval, String[] groupByPropertyList, String havingCondition )
public function WqlEventQuery ( eventClassName : String, withinInterval : TimeSpan, condition : String, groupWithinInterval : TimeSpan, groupByPropertyList : String[], havingCondition : String )
次の例では、イベント クエリ "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance ISA Win32_NTLogEvent GROUP WITHIN 600 BY TargetInstance.SourceName HAVING NumberOfEvents > 15" を作成します。これは、同じソースから受け取った Win32_NTLogEvent イベントの数が 15 を超えた場合にだけ、集約イベントを配信します。
Imports System Imports System.Management Public Class EventSample Public Overloads Shared Function _ Main(ByVal args() As String) As Integer ' Requests sending aggregated events ' if the number of events exceeds 15. Dim props() As String = {"TargetInstance.SourceName"} Dim t As New TimeSpan(0, 10, 0) Dim q As New WqlEventQuery("__InstanceCreationEvent", _ System.TimeSpan.MaxValue, _ "TargetInstance isa ""Win32_NTLogEvent""", _ t, _ props, _ "NumberOfEvents >15") MessageBox.Show(q.QueryString) End Function 'Main End Class 'EventSample
using System; using System.Management; public class EventSample { public static void Main(string[] args) { // Requests sending aggregated events // if the number of events exceeds 15. String[] props = {"TargetInstance.SourceName"}; WqlEventQuery q = new WqlEventQuery( "__InstanceCreationEvent", System.TimeSpan.MaxValue, "TargetInstance isa 'Win32_NTLogEvent'", new TimeSpan(0,10,0), props, "NumberOfEvents >15"); Console.WriteLine(q.QueryString); return; } }
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WqlEventQuery コンストラクタ (String, String, TimeSpan)
アセンブリ: System.Management (system.management.dll 内)
構文
Public Sub New ( _ eventClassName As String, _ condition As String, _ groupWithinInterval As TimeSpan _ )
Dim eventClassName As String Dim condition As String Dim groupWithinInterval As TimeSpan Dim instance As New WqlEventQuery(eventClassName, condition, groupWithinInterval)
public function WqlEventQuery ( eventClassName : String, condition : String, groupWithinInterval : TimeSpan )
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WqlEventQuery コンストラクタ (String)
アセンブリ: System.Management (system.management.dll 内)
構文
使用例
クエリを指定して WqlEventQuery を初期化してから、イベントを指定して WqlEventQuery を初期化する例を次に示します。
Imports System Imports System.Management Public Class EventSample Public Overloads Shared Function _ Main(ByVal args() As String) As Integer '' Full query string specified to the constructor Dim q As New WqlEventQuery( _ "SELECT * FROM Win32_ComputerShutdownEvent ") ' Only relevant event class name specified to the constructor ' Results in the same query as above Dim query As New WqlEventQuery("Win32_ComputerShutdownEvent ") MessageBox.Show(query.QueryString) End Function 'Main End Class 'EventSample
using System; using System.Management; public class EventSample { public static void Main(string[] args) { // Full query string specified to the constructor WqlEventQuery q = new WqlEventQuery("SELECT * FROM Win32_ComputerShutdownEvent"); // Only relevant event class name specified to the constructor // Results in the same query as above. WqlEventQuery query = new WqlEventQuery("Win32_ComputerShutdownEvent "); Console.WriteLine(query.QueryString); return; } }
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WqlEventQuery コンストラクタ (String, String)
アセンブリ: System.Management (system.management.dll 内)
構文
Dim eventClassName As String Dim condition As String Dim instance As New WqlEventQuery(eventClassName, condition)
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WqlEventQuery コンストラクタ (String, TimeSpan)
アセンブリ: System.Management (system.management.dll 内)
構文
Dim eventClassName As String Dim withinInterval As TimeSpan Dim instance As New WqlEventQuery(eventClassName, withinInterval)
イベントおよびイベントを受け取るまでの許容待機時間を指定する期間値を指定して、WqlEventQuery を初期化する例を次に示します。
Imports System Imports System.Management Public Class EventSample Public Overloads Shared Function _ Main(ByVal args() As String) As Integer ' Requests all instance creation events, ' with a specified latency of ' 10 seconds. The query created ' is "SELECT * FROM __InstanceCreationEvent WITHIN 10" Dim t As New TimeSpan(0, 0, 10) Dim q As New WqlEventQuery("__InstanceCreationEvent", t) MessageBox.Show(q.QueryString) End Function 'Main End Class 'EventSample
using System; using System.Management; public class EventSample { public static void Main(string[] args) { // Requests all instance creation events, // with a specified latency of // 10 seconds. The query created // is "SELECT * FROM __InstanceCreationEvent WITHIN 10" WqlEventQuery q = new WqlEventQuery("__InstanceCreationEvent" , new TimeSpan(0,0,10)); Console.WriteLine(q.QueryString); return; } }
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WqlEventQuery コンストラクタ
オーバーロードの一覧
名前 | 説明 |
---|---|
WqlEventQuery () | WqlEventQuery クラスの新しいインスタンスを初期化します。これは既定のコンストラクタです。 |
WqlEventQuery (String) | 指定したクエリ文字列またはイベント クラス名に基づいて、WqlEventQuery クラスの新しいインスタンスを初期化します。 |
WqlEventQuery (String, String) | 指定した条件を使用して、指定したイベント クラス名の WqlEventQuery クラスの新しいインスタンスを初期化します。 |
WqlEventQuery (String, TimeSpan) | 指定した待機時間を使用して、指定したイベント クラスの WqlEventQuery クラスの新しいインスタンスを初期化します。 |
WqlEventQuery (String, String, TimeSpan) | 指定したイベント クラス名、条件、およびグループ化間隔を使用して、WqlEventQuery クラスの新しいインスタンスを初期化します。 |
WqlEventQuery (String, TimeSpan, String) | 指定したイベント クラス名、ポーリング間隔、および条件を使用して、WqlEventQuery クラスの新しいインスタンスを初期化します。 |
WqlEventQuery (String, String, TimeSpan, String[]) | 指定したイベント クラス名、条件、グループ化間隔、およびグループ化プロパティを使用して、WqlEventQuery クラスの新しいインスタンスを初期化します。 |
WqlEventQuery (String, TimeSpan, String, TimeSpan, String[], String) | 指定したイベント クラス名、条件、グループ化間隔、グループ化プロパティ、および指定したイベント数を使用して、WqlEventQuery クラスの新しいインスタンスを初期化します。 |
WqlEventQuery コンストラクタ ()
アセンブリ: System.Management (system.management.dll 内)
構文
.NET Framework のセキュリティ
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Weblioに収録されているすべての辞書からWqlEventQuery コンストラクタを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からWqlEventQuery コンストラクタ を検索
- WqlEventQuery コンストラクタのページへのリンク