Click here to Skip to main content
15,904,023 members
Home / Discussions / COM
   

COM

 
GeneralRe: Access violation in ADODB::Connection Pin
Dyrl21-Feb-06 8:48
Dyrl21-Feb-06 8:48 
GeneralRe: Access violation in ADODB::Connection Pin
lparsonson21-Feb-06 22:39
lparsonson21-Feb-06 22:39 
QuestionAcitveX component, "off form", like the timer Pin
david_reynolds19-Feb-06 14:37
david_reynolds19-Feb-06 14:37 
Questionhow to load xml schema from resource? Pin
dolph_loe19-Feb-06 10:32
dolph_loe19-Feb-06 10:32 
Questionocx replace Pin
mahmoodi18-Feb-06 20:29
mahmoodi18-Feb-06 20:29 
QuestionBindToStorage HRESULT fails while using IPropertyBag2 Pin
nripun18-Feb-06 3:48
nripun18-Feb-06 3:48 
AnswerRe: BindToStorage HRESULT fails while using IPropertyBag2 Pin
mbue18-Feb-06 21:18
mbue18-Feb-06 21:18 
QuestionEvent Notification using Windows MAnagement Instrumentation Pin
abhiramsss17-Feb-06 1:14
abhiramsss17-Feb-06 1:14 
hi all

iam working on WMI . iam trying to write an application for Event notification.

Iam usimg Win32_Process class, and ExecNotificationQuery for WQl query.

Iam trying to display a message when a new process is created.


my WQL query is

hres = pSvc->ExecNotificationQuery(
bstr_t("WQL"),
bstr_t("SELECT * FROM __InstanceCreationEvent WITHIN 5 WHERE TargetInstance ISA 'Win32_Process' And (TargetInstance.Name = 'notepad.exe' OR TargetInstance.Name = 'calc.exe' ) "),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumerator);


if iam not wrong ,After executing this query TargetInstance will be Instance of WIn32_process class.


and now iam trying extract data usoing this statement

hr = pclsObj->Get(L("TargetInstance.Name"), 0, &vtProp, 0, 0);

but iam not able to get value of Name property of Win32_Process class into vtProp where vtProp is of type VARIANT.

IWbemClassObject->Get( LPCWSTR wszName,LONG lFlags, VARIANT* pVal,CIMTYPE* pvtType, LONG* plFlavor) is used to retrieves Specified property value.

but here iam using it for getting value fron an istance i.e TargetInstance.Name. Is it the correct way to do if not please help me in extracting value of Name Property.

Please help me in solving this .

Thanks in advance






abhi
AnswerRe: Event Notification using Windows MAnagement Instrumentation Pin
oshah20-Feb-06 3:11
oshah20-Feb-06 3:11 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
abhiramsss21-Mar-06 21:18
abhiramsss21-Mar-06 21:18 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
oshah22-Mar-06 1:03
oshah22-Mar-06 1:03 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
abhiramsss2-Apr-06 23:37
abhiramsss2-Apr-06 23:37 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
abhiramsss5-Apr-06 19:21
abhiramsss5-Apr-06 19:21 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
abhiramsss22-May-06 19:17
abhiramsss22-May-06 19:17 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
oshah23-May-06 6:42
oshah23-May-06 6:42 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
abhiramsss28-May-06 23:36
abhiramsss28-May-06 23:36 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
oshah29-May-06 6:54
oshah29-May-06 6:54 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
abhiramsss30-May-06 20:48
abhiramsss30-May-06 20:48 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
abhiramsss12-Jun-06 21:03
abhiramsss12-Jun-06 21:03 
GeneralRe: Event Notification using Windows MAnagement Instrumentation Pin
abhiramsss26-Jun-06 18:18
abhiramsss26-Jun-06 18:18 
GeneralWindows MAnagement Instrumentation Pin
abhiramsss7-Nov-06 14:32
abhiramsss7-Nov-06 14:32 
QuestionService Objects Pin
waxie16-Feb-06 22:05
waxie16-Feb-06 22:05 
QuestionHow to realize my own shell format? Pin
Jerry New16-Feb-06 15:20
Jerry New16-Feb-06 15:20 
AnswerRe: How to realize my own shell format? Pin
QuickDeveloper16-Feb-06 21:43
QuickDeveloper16-Feb-06 21:43 
AnswerRe: How to realize my own shell format? Pin
mbue18-Feb-06 21:35
mbue18-Feb-06 21:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.