2025-04-27 07:49:33 -04:00

97 lines
3.9 KiB
Plaintext

[!if CLASS_SPECIFIED]
#pragma namespace ("\\\\.\\[!output ESCAPED_NAMESPACE]")
[!else]
#pragma namespace ("\\\\.\\root\\default")
[!endif]
instance of __Win32Provider as $[!output SHORT_NAME]
{
Name = "[!output SHORT_NAME]" ; //Name is the key property for __Provider objects.
//vendor|provider|version is the suggested format
//to prevent name collisions.
ClsId = "{[!output CLSID_REGISTRY_FORMAT]}" ; //provider GUID
DefaultMachineName = NULL; //NULL for local machine
ClientLoadableCLSID = NULL; //reserved
ImpersonationLevel = 0; //reserved
InitializationReentrancy = 0; //Set of flags that provide information about serialization:
//0 = all initialization of this provider must be serialized
//1 = all initializations of this provider in the same namespace must be serialized
//2 = no initialization serialization is necessary
InitializeAsAdminFirst = FALSE; //Request to be fully initialized as "Admin" before
//initializations begin for users
PerLocaleInitialization = FALSE; //Indicates whether the provider is initialized for each
//locale if a user connects to the same namespace more
//than once using different locales.
PerUserInitialization = FALSE; //Indicates whether the provider is initialized once for each actual
//Windows NT/Windows 2000 NTLM user making requests of the provider.
//If set to FALSE, the provider is initialized once for all users
Pure = TRUE; //A pure provider exists only to service requests from
//applications and WMI. Most providers are pure providers
//Non-pure providers transition to the role of client after they have
//finished servicing requests.
UnloadTimeout = NULL; //Currently ignored
//Use __CacheControl class in the root namespace to control provider unloading
//A string in the DMTF date/time format that specifies how long WMI
//allows the provider to remain idle before it is unloaded.
} ;
[!if EXTRINSIC]
instance of __EventProviderRegistration
{
provider = $[!output SHORT_NAME];
[!if CLASS_SPECIFIED]
EventQueryList = { "select * from [!output WMICLASSNAME]" }; //all event notifications
//for [!output WMICLASSNAME] are supplied
[!else]
//TODO: put name of your extrinsic event class below
//EventQueryList = { "select * from <MyExtrinsicEvent>" };
//TODO: remove the line below once you have defined EventQueryList for your class
EventQueryList = {};
[!endif]
};
[!endif]
[!if INTRINSIC]
instance of __EventProviderRegistration
{
provider = $[!output SHORT_NAME];
[!if CLASS_SPECIFIED]
//TODO: modify query list below if you are not planning to provide all types of intrinsic events from this provider
EventQueryList = { "select * from __InstanceCreationEvent where TargetInstance isa \"[!output WMICLASSNAME]\"",
"select * from __InstanceModificationEvent where TargetInstance isa \"[!output WMICLASSNAME]\"",
"select * from __InstanceDeletionEvent where TargetInstance isa \"[!output WMICLASSNAME]\""
};
[!else]
//TODO: put name of your class below and modify query list below if you are not planning to provide all types of intrinsic events from this provider
//EventQueryList = {"select * from __InstanceCreationEvent where TargetInstance isa \"<MyClass>\"",
// "select * from __InstanceModificationEvent where TargetInstance isa \"<MyClass>\"",
// "select * from __InstanceDeletionEvent where TargetInstance isa \"<MyClass>\""
// };
//TODO: remove the line below once you have defined EventQueryList for your class
EventQueryList = {};
[!endif]
};
[!endif]