WEDF_VisibleWindow (Industry 8.1)
7/8/2014
Review the syntax, members, and examples of the WEDF_VisibleWindow WMI provider class for Windows Embedded 8.1 Industry (Industry 8.1).
This class gets a list of all currently active windows that are on a device and are able to be blocked by Dialog Filter.
Syntax
class WEDF_VisibleWindow {
[key] uint32 id;
string title;
string processName;
sint32 controlType[];
string controlName[];
string actionList[];
[Static] uint32 GetVisibleWindow(
[Out, EmbeddedInstance("WEDF_VisibleWindow")] string cmdletOutput[]
);
};
Members
The following tables list the methods and properties that belong to this class.
Methods
Method |
Description |
---|---|
Gets an array of WEDF_VisibleWindow objects that represents the windows that are currently visible on a device and can be blocked by Dialog Filter. |
Properties
Property |
Data type |
Qualifiers |
Description |
---|---|---|---|
id |
uint32 |
[key] |
A unique identifier for the visible window object. |
title |
string |
[required] |
The title of the window. |
processName |
string |
[required] |
The full path of the process that created the window (for example, “C:\Program Files\Internet Explorer\iexplore.exe”). |
controlType |
string [] |
A list of the types of all immediate child controls in the window. For more information about control types, see Control Type Identifiers. |
|
controlName |
string [] |
A list of the names of all immediate child controls in the window. |
|
actionList |
string [] |
[required] |
A list of valid actions that can be performed on the window. |
Remarks
WEDF_VisibleWindow only returns entries for windows that have the desktop as a parent.
The id property is an enumerated integer. For example, if there are five visible windows, the id values of the returned objects will range from 0 to 4. If you block a window by using the WEDF_BlockedWindow class, you must use an id value that does not conflict with an already existing WEDF_BlockedWindow entry.
Example
The following example demonstrates how to use the Windows Management Instrumentation (WMI) provider in a Windows PowerShell script to get a list of windows that are currently visible on your device and that Dialog Filter can block.
$COMPUTER = "localhost"
$NAMESPACE = "root\standardcimv2\embedded"
# Define common parameters
$CommonParams = @{"namespace"=$NAMESPACE; "computer"=$COMPUTER}
# Create handle to the class instance so we can call the static methods
$classVisibleWindow = [wmiclass]"\\$COMPUTER\${NAMESPACE}:WEDF_VisibleWindow"
# Get a list of all visible windows that can be blocked by Dialog Filter
$VisibleWindowList = Get-WmiObject -class WEDF_VisibleWindow @CommonParams
# Display the data for each open window
foreach ($visibleWindow in $visibleWindowList) {
Write-Host "`nWindow Title: $($visibleWindow.title)"
Write-Host " Process Name: $($visibleWindow.processName)"
Write-Host " Action List: $($visibleWindow.actionList)"
Write-Host " Control Names: $($visibleWindow.controlName)"
Write-Host " Control Types: $($visibleWindow.controlType)"
}
See Also
Reference
Dialog Filter WMI provider reference