Coverage for /root/GitHubProjects/impacket/impacket/dcerpc/v5/dcom/comev.py : 60%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
2#
3# This software is provided under under a slightly modified version
4# of the Apache Software License. See the accompanying LICENSE file
5# for more information.
6#
7# Author: Alberto Solino (@agsolino)
8#
9# Description:
10# [MS-COMEV]: Component Object Model Plus (COM+) Event System Protocol.
11# This was used as a way to test the DCOM runtime. Further
12# testing is needed to verify it is working as expected
13#
14# Best way to learn how to use these calls is to grab the protocol standard
15# so you understand what the call does, and then read the test case located
16# at https://github.com/SecureAuthCorp/impacket/tree/master/tests/SMB_RPC
17#
18# Since DCOM is like an OO RPC, instead of helper functions you will see the
19# classes described in the standards developed.
20# There are test cases for them too.
21#
22from __future__ import division
23from __future__ import print_function
24from impacket.dcerpc.v5.ndr import NDRSTRUCT, NDRENUM, NDRUniConformantVaryingArray
25from impacket.dcerpc.v5.dcomrt import DCOMCALL, DCOMANSWER, INTERFACE, PMInterfacePointer, IRemUnknown
26from impacket.dcerpc.v5.dcom.oaut import IDispatch, BSTR, VARIANT
27from impacket.dcerpc.v5.dtypes import INT, ULONG, LONG, BOOLEAN
28from impacket.dcerpc.v5.rpcrt import DCERPCException
29from impacket.dcerpc.v5.enum import Enum
30from impacket import hresult_errors
31from impacket.uuid import string_to_bin, uuidtup_to_bin
33class DCERPCSessionError(DCERPCException):
34 def __init__(self, error_string=None, error_code=None, packet=None):
35 DCERPCException.__init__(self, error_string, error_code, packet)
37 def __str__( self ):
38 if self.error_code in hresult_errors.ERROR_MESSAGES:
39 error_msg_short = hresult_errors.ERROR_MESSAGES[self.error_code][0]
40 error_msg_verbose = hresult_errors.ERROR_MESSAGES[self.error_code][1]
41 return 'COMEV SessionError: code: 0x%x - %s - %s' % (self.error_code, error_msg_short, error_msg_verbose)
42 else:
43 return 'COMEV SessionError: unknown error code: 0x%x' % self.error_code
45################################################################################
46# CONSTANTS
47################################################################################
48# 1.9 Standards Assignments
49CLSID_EventSystem = string_to_bin('4E14FBA2-2E22-11D1-9964-00C04FBBB345')
50CLSID_EventSystem2 = string_to_bin('99CC098F-A48A-4e9c-8E58-965C0AFC19D5')
51CLSID_EventClass = string_to_bin('cdbec9c0-7a68-11d1-88f9-0080c7d771bf')
52CLSID_EventSubscription = string_to_bin('7542e960-79c7-11d1-88f9-0080c7d771bf')
53GUID_DefaultAppPartition = string_to_bin('41E90F3E-56C1-4633-81C3-6E8BAC8BDD70')
54IID_IEventSystem = uuidtup_to_bin(('4E14FB9F-2E22-11D1-9964-00C04FBBB345','0.0'))
55IID_IEventSystem2 = uuidtup_to_bin(('99CC098F-A48A-4e9c-8E58-965C0AFC19D5','0.0'))
56IID_IEventSystemInitialize = uuidtup_to_bin(('a0e8f27a-888c-11d1-b763-00c04fb926af','0.0'))
57IID_IEventObjectCollection = uuidtup_to_bin(('f89ac270-d4eb-11d1-b682-00805fc79216','0.0'))
58IID_IEnumEventObject = uuidtup_to_bin(('F4A07D63-2E25-11D1-9964-00C04FBBB345','0.0'))
59IID_IEventSubscription = uuidtup_to_bin(('4A6B0E15-2E38-11D1-9965-00C04FBBB345','0.0'))
60IID_IEventSubscription2 = uuidtup_to_bin(('4A6B0E16-2E38-11D1-9965-00C04FBBB345','0.0'))
61IID_IEventSubscription3 = uuidtup_to_bin(('FBC1D17D-C498-43a0-81AF-423DDD530AF6','0.0'))
62IID_IEventClass = uuidtup_to_bin(('fb2b72a0-7a68-11d1-88f9-0080c7d771bf','0.0'))
63IID_IEventClass2 = uuidtup_to_bin(('fb2b72a1-7a68-11d1-88f9-0080c7d771bf','0.0'))
64IID_IEventClass3 = uuidtup_to_bin(('7FB7EA43-2D76-4ea8-8CD9-3DECC270295E','0.0'))
66error_status_t = ULONG
68# 2.2.2.2 Property Value Types
69class VARENUM(NDRENUM):
70 class enumItems(Enum):
71 VT_EMPTY = 0
72 VT_NULL = 1
73 VT_I2 = 2
74 VT_I4 = 3
75 VT_R4 = 4
76 VT_R8 = 5
77 VT_CY = 6
78 VT_DATE = 7
79 VT_BSTR = 8
80 VT_DISPATCH = 9
81 VT_ERROR = 0xa
82 VT_BOOL = 0xb
83 VT_VARIANT = 0xc
84 VT_UNKNOWN = 0xd
85 VT_DECIMAL = 0xe
86 VT_I1 = 0x10
87 VT_UI1 = 0x11
88 VT_UI2 = 0x12
89 VT_UI4 = 0x13
90 VT_I8 = 0x14
91 VT_UI8 = 0x15
92 VT_INT = 0x16
93 VT_UINT = 0x17
94 VT_VOID = 0x18
95 VT_HRESULT = 0x19
96 VT_PTR = 0x1a
97 VT_SAFEARRAY = 0x1b
98 VT_CARRAY = 0x1c
99 VT_USERDEFINED = 0x1d
100 VT_LPSTR = 0x1e
101 VT_LPWSTR = 0x1f
102 VT_RECORD = 0x24
103 VT_INT_PTR = 0x25
104 VT_UINT_PTR = 0x26
105 VT_ARRAY = 0x2000
106 VT_BYREF = 0x4000
108################################################################################
109# STRUCTURES
110################################################################################
111# 2.2.44 TYPEATTR
112class TYPEATTR(NDRSTRUCT):
113 structure = (
114 )
116class OBJECT_ARRAY(NDRUniConformantVaryingArray):
117 item = PMInterfacePointer
119################################################################################
120# RPC CALLS
121################################################################################
122# 3.1.4.1 IEventSystem
123# 3.1.4.1.1 Query (Opnum 7)
124class IEventSystem_Query(DCOMCALL):
125 opnum = 7
126 structure = (
127 ('progID', BSTR),
128 ('queryCriteria', BSTR),
129 )
131class IEventSystem_QueryResponse(DCOMANSWER):
132 structure = (
133 ('errorIndex', INT),
134 ('ppInterface', PMInterfacePointer),
135 ('ErrorCode', error_status_t),
136 )
138# 3.1.4.1.2 Store (Opnum 8)
139class IEventSystem_Store(DCOMCALL):
140 opnum = 8
141 structure = (
142 ('progID', BSTR),
143 ('pInterface', PMInterfacePointer),
144 )
146class IEventSystem_StoreResponse(DCOMANSWER):
147 structure = (
148 ('ErrorCode', error_status_t),
149 )
151# 3.1.4.1.3 Remove (Opnum 9)
152class IEventSystem_Remove(DCOMCALL):
153 opnum = 9
154 structure = (
155 ('progID', BSTR),
156 ('queryCriteria', BSTR),
157 )
159class IEventSystem_RemoveResponse(DCOMANSWER):
160 structure = (
161 ('errorIndex', INT),
162 ('ErrorCode', error_status_t),
163 )
165# 3.1.4.1.4 get_EventObjectChangeEventClassID (Opnum 10)
166class IEventSystem_get_EventObjectChangeEventClassID(DCOMCALL):
167 opnum = 10
168 structure = (
169 )
171class IEventSystem_get_EventObjectChangeEventClassIDResponse(DCOMANSWER):
172 structure = (
173 ('pbstrEventClassID', BSTR),
174 ('ErrorCode', error_status_t),
175 )
177# 3.1.4.1.5 QueryS (Opnum 11)
178class IEventSystem_QueryS(DCOMCALL):
179 opnum = 11
180 structure = (
181 ('progID', BSTR),
182 ('queryCriteria', BSTR),
183 )
185class IEventSystem_QuerySResponse(DCOMANSWER):
186 structure = (
187 ('pInterface', PMInterfacePointer),
188 ('ErrorCode', error_status_t),
189 )
191# 3.1.4.1.6 RemoveS (Opnum 12)
192class IEventSystem_RemoveS(DCOMCALL):
193 opnum = 12
194 structure = (
195 ('progID', BSTR),
196 ('queryCriteria', BSTR),
197 )
199class IEventSystem_RemoveSResponse(DCOMANSWER):
200 structure = (
201 ('ErrorCode', error_status_t),
202 )
204################################################################################
205# 3.1.4.2 IEventClass
206# 3.1.4.2.1 get_EventClassID (Opnum 7)
207class IEventClass_get_EventClassID(DCOMCALL):
208 opnum = 7
209 structure = (
210 )
212class IEventClass_get_EventClassIDResponse(DCOMANSWER):
213 structure = (
214 ('pbstrEventClassID', BSTR),
215 ('ErrorCode', error_status_t),
216 )
218# 3.1.4.2.2 put_EventClassID (Opnum 8)
219class IEventClass_put_EventClassID(DCOMCALL):
220 opnum = 8
221 structure = (
222 ('bstrEventClassID', BSTR),
223 )
225class IEventClass_put_EventClassIDResponse(DCOMANSWER):
226 structure = (
227 ('ErrorCode', error_status_t),
228 )
230# 3.1.4.2.3 get_EventClassName (Opnum 9)
231class IEventClass_get_EventClassName(DCOMCALL):
232 opnum = 9
233 structure = (
234 )
236class IEventClass_get_EventClassNameResponse(DCOMANSWER):
237 structure = (
238 ('pbstrEventClassName', BSTR),
239 ('ErrorCode', error_status_t),
240 )
242# 3.1.4.2.4 put_EventClassName (Opnum 10)
243class IEventClass_put_EventClassName(DCOMCALL):
244 opnum = 10
245 structure = (
246 ('bstrEventClassName', BSTR),
247 )
249class IEventClass_put_EventClassNameResponse(DCOMANSWER):
250 structure = (
251 ('ErrorCode', error_status_t),
252 )
254# 3.1.4.2.5 get_OwnerSID (Opnum 11)
255class IEventClass_get_OwnerSID(DCOMCALL):
256 opnum = 11
257 structure = (
258 )
260class IEventClass_get_OwnerSIDResponse(DCOMANSWER):
261 structure = (
262 ('pbstrOwnerSID', BSTR),
263 ('ErrorCode', error_status_t),
264 )
266# 3.1.4.2.6 put_OwnerSID (Opnum 12)
267class IEventClass_put_OwnerSID(DCOMCALL):
268 opnum = 12
269 structure = (
270 ('bstrOwnerSID', BSTR),
271 )
273class IEventClass_put_OwnerSIDResponse(DCOMANSWER):
274 structure = (
275 ('ErrorCode', error_status_t),
276 )
278# 3.1.4.2.7 get_FiringInterfaceID (Opnum 13)
279class IEventClass_get_FiringInterfaceID(DCOMCALL):
280 opnum = 13
281 structure = (
282 )
284class IEventClass_get_FiringInterfaceIDResponse(DCOMANSWER):
285 structure = (
286 ('pbstrFiringInterfaceID', BSTR),
287 ('ErrorCode', error_status_t),
288 )
290# 3.1.4.2.8 put_FiringInterfaceID (Opnum 14)
291class IEventClass_put_FiringInterfaceID(DCOMCALL):
292 opnum = 14
293 structure = (
294 ('bstrFiringInterfaceID', BSTR),
295 )
297class IEventClass_put_FiringInterfaceIDResponse(DCOMANSWER):
298 structure = (
299 ('ErrorCode', error_status_t),
300 )
302# 3.1.4.2.9 get_Description (Opnum 15)
303class IEventClass_get_Description(DCOMCALL):
304 opnum = 15
305 structure = (
306 )
308class IEventClass_get_DescriptionResponse(DCOMANSWER):
309 structure = (
310 ('pbstrDescription', BSTR),
311 ('ErrorCode', error_status_t),
312 )
314# 3.1.4.2.10 put_Description (Opnum 16)
315class IEventClass_put_Description(DCOMCALL):
316 opnum = 16
317 structure = (
318 ('bstrDescription', BSTR),
319 )
321class IEventClass_put_DescriptionResponse(DCOMANSWER):
322 structure = (
323 ('ErrorCode', error_status_t),
324 )
326# 3.1.4.2.11 get_TypeLib (Opnum 19)
327class IEventClass_get_TypeLib(DCOMCALL):
328 opnum = 19
329 structure = (
330 )
332class IEventClass_get_TypeLibResponse(DCOMANSWER):
333 structure = (
334 ('pbstrTypeLib', BSTR),
335 ('ErrorCode', error_status_t),
336 )
338# 3.1.4.2.12 put_TypeLib (Opnum 20)
339class IEventClass_put_TypeLib(DCOMCALL):
340 opnum = 20
341 structure = (
342 ('bstrTypeLib', BSTR),
343 )
345class IEventClass_put_TypeLibResponse(DCOMANSWER):
346 structure = (
347 ('ErrorCode', error_status_t),
348 )
350################################################################################
351# 3.1.4.3 IEventClass2
352# 3.1.4.3.1 get_PublisherID (Opnum 21)
353class IEventClass2_get_PublisherID(DCOMCALL):
354 opnum = 21
355 structure = (
356 )
358class IEventClass2_get_PublisherIDResponse(DCOMANSWER):
359 structure = (
360 ('pbstrSubscriptionID', BSTR),
361 ('ErrorCode', error_status_t),
362 )
364# 3.1.4.3.2 put_PublisherID (Opnum 22)
365class IEventClass2_put_PublisherID(DCOMCALL):
366 opnum = 22
367 structure = (
368 ('bstrPublisherID', BSTR),
369 )
371class IEventClass2_put_PublisherIDResponse(DCOMANSWER):
372 structure = (
373 ('ErrorCode', error_status_t),
374 )
376# 3.1.4.3.3 get_MultiInterfacePublisherFilterCLSID (Opnum 23)
377class IEventClass2_get_MultiInterfacePublisherFilterCLSID(DCOMCALL):
378 opnum = 23
379 structure = (
380 )
382class IEventClass2_get_MultiInterfacePublisherFilterCLSIDResponse(DCOMANSWER):
383 structure = (
384 ('pbstrPubFilCLSID', BSTR),
385 ('ErrorCode', error_status_t),
386 )
388# 3.1.4.3.4 put_MultiInterfacePublisherFilterCLSID (Opnum 24)
389class IEventClass2_put_MultiInterfacePublisherFilterCLSID(DCOMCALL):
390 opnum = 24
391 structure = (
392 ('bstrPubFilCLSID', BSTR),
393 )
395class IEventClass2_put_MultiInterfacePublisherFilterCLSIDResponse(DCOMANSWER):
396 structure = (
397 ('ErrorCode', error_status_t),
398 )
400# 3.1.4.3.5 get_AllowInprocActivation (Opnum 25)
401class IEventClass2_get_AllowInprocActivation(DCOMCALL):
402 opnum = 25
403 structure = (
404 )
406class IEventClass2_get_AllowInprocActivationResponse(DCOMANSWER):
407 structure = (
408 ('pfAllowInprocActivation', BOOLEAN),
409 ('ErrorCode', error_status_t),
410 )
412# 3.1.4.3.6 put_AllowInprocActivation (Opnum 26)
413class IEventClass2_put_AllowInprocActivation(DCOMCALL):
414 opnum = 26
415 structure = (
416 ('fAllowInprocActivation', BOOLEAN),
417 )
419class IEventClass2_put_AllowInprocActivationResponse(DCOMANSWER):
420 structure = (
421 ('ErrorCode', error_status_t),
422 )
424# 3.1.4.3.7 get_FireInParallel (Opnum 27)
425class IEventClass2_get_FireInParallel(DCOMCALL):
426 opnum = 27
427 structure = (
428 )
430class IEventClass2_get_FireInParallelResponse(DCOMANSWER):
431 structure = (
432 ('pfFireInParallel', BOOLEAN),
433 ('ErrorCode', error_status_t),
434 )
436# 3.1.4.3.8 put_FireInParallel (Opnum 28)
437class IEventClass2_put_FireInParallel(DCOMCALL):
438 opnum = 28
439 structure = (
440 ('pfFireInParallel', BOOLEAN),
441 )
443class IEventClass2_put_FireInParallelResponse(DCOMANSWER):
444 structure = (
445 ('ErrorCode', error_status_t),
446 )
448################################################################################
449# 3.1.4.4 IEventSubscription
450# 3.1.4.4.1 get_SubscriptionID (Opnum 7)
451class IEventSubscription_get_SubscriptionID(DCOMCALL):
452 opnum = 7
453 structure = (
454 )
456class IEventSubscription_get_SubscriptionIDResponse(DCOMANSWER):
457 structure = (
458 ('pbstrSubscriptionID', BSTR),
459 ('ErrorCode', error_status_t),
460 )
462# 3.1.4.4.2 put_SubscriptionID (Opnum 8)
463class IEventSubscription_put_SubscriptionID(DCOMCALL):
464 opnum = 8
465 structure = (
466 ('bstrSubscriptionID', BSTR),
467 )
469class IEventSubscription_put_SubscriptionIDResponse(DCOMANSWER):
470 structure = (
471 ('ErrorCode', error_status_t),
472 )
474# 3.1.4.4.3 get_SubscriptionName (Opnum 9)
475class IEventSubscription_get_SubscriptionName(DCOMCALL):
476 opnum = 9
477 structure = (
478 )
480class IEventSubscription_get_SubscriptionNameResponse(DCOMANSWER):
481 structure = (
482 ('pbstrSubscriptionName', BSTR),
483 ('ErrorCode', error_status_t),
484 )
486# 3.1.4.4.4 put_SubscriptionName (Opnum 10)
487class IEventSubscription_put_SubscriptionName(DCOMCALL):
488 opnum = 10
489 structure = (
490 ('strSubscriptionID', BSTR),
491 )
493class IEventSubscription_put_SubscriptionNameResponse(DCOMANSWER):
494 structure = (
495 ('ErrorCode', error_status_t),
496 )
498# 3.1.4.4.5 get_PublisherID (Opnum 11)
499class IEventSubscription_get_PublisherID(DCOMCALL):
500 opnum = 11
501 structure = (
502 )
504class IEventSubscription_get_PublisherIDResponse(DCOMANSWER):
505 structure = (
506 ('pbstrPublisherID', BSTR),
507 ('ErrorCode', error_status_t),
508 )
510# 3.1.4.4.6 put_PublisherID (Opnum 12)
511class IEventSubscription_put_PublisherID(DCOMCALL):
512 opnum = 12
513 structure = (
514 ('bstrPublisherID', BSTR),
515 )
517class IEventSubscription_put_PublisherIDResponse(DCOMANSWER):
518 structure = (
519 ('ErrorCode', error_status_t),
520 )
522# 3.1.4.4.7 get_EventClassID (Opnum 13)
523class IEventSubscription_get_EventClassID(DCOMCALL):
524 opnum = 13
525 structure = (
526 )
528class IEventSubscription_get_EventClassIDResponse(DCOMANSWER):
529 structure = (
530 ('pbstrEventClassID', BSTR),
531 ('ErrorCode', error_status_t),
532 )
534# 3.1.4.4.8 put_EventClassID (Opnum 14)
535class IEventSubscription_put_EventClassID(DCOMCALL):
536 opnum = 14
537 structure = (
538 ('bstrEventClassID', BSTR),
539 )
541class IEventSubscription_put_EventClassIDResponse(DCOMANSWER):
542 structure = (
543 ('ErrorCode', error_status_t),
544 )
546# 3.1.4.4.9 get_MethodName (Opnum 15)
547class IEventSubscription_get_MethodName(DCOMCALL):
548 opnum = 15
549 structure = (
550 )
552class IEventSubscription_get_MethodNameResponse(DCOMANSWER):
553 structure = (
554 ('pbstrMethodName', BSTR),
555 ('ErrorCode', error_status_t),
556 )
558# 3.1.4.4.10 put_MethodName (Opnum 16)
559class IEventSubscription_put_MethodName(DCOMCALL):
560 opnum = 16
561 structure = (
562 ('bstrMethodName', BSTR),
563 )
565class IEventSubscription_put_MethodNameResponse(DCOMANSWER):
566 structure = (
567 ('ErrorCode', error_status_t),
568 )
570# 3.1.4.4.11 get_SubscriberCLSID (Opnum 17)
571class IEventSubscription_get_SubscriberCLSID(DCOMCALL):
572 opnum = 17
573 structure = (
574 )
576class IEventSubscription_get_SubscriberCLSIDResponse(DCOMANSWER):
577 structure = (
578 ('pbstrSubscriberCLSID', BSTR),
579 ('ErrorCode', error_status_t),
580 )
582# 3.1.4.4.12 put_SubscriberCLSID (Opnum 18)
583class IEventSubscription_put_SubscriberCLSID(DCOMCALL):
584 opnum = 18
585 structure = (
586 ('bstrSubscriberCLSID', BSTR),
587 )
589class IEventSubscription_put_SubscriberCLSIDResponse(DCOMANSWER):
590 structure = (
591 ('ErrorCode', error_status_t),
592 )
594# 3.1.4.4.13 get_SubscriberInterface (Opnum 19)
595class IEventSubscription_get_SubscriberInterface(DCOMCALL):
596 opnum = 19
597 structure = (
598 )
600class IEventSubscription_get_SubscriberInterfaceResponse(DCOMANSWER):
601 structure = (
602 ('ppSubscriberInterface', PMInterfacePointer),
603 ('ErrorCode', error_status_t),
604 )
606# 3.1.4.4.14 put_SubscriberInterface (Opnum 20)
607class IEventSubscription_put_SubscriberInterface(DCOMCALL):
608 opnum = 20
609 structure = (
610 ('pSubscriberInterface', PMInterfacePointer),
611 )
613class IEventSubscription_put_SubscriberInterfaceResponse(DCOMANSWER):
614 structure = (
615 ('ErrorCode', error_status_t),
616 )
618# 3.1.4.4.15 get_PerUser (Opnum 21)
619class IEventSubscription_get_PerUser(DCOMCALL):
620 opnum = 21
621 structure = (
622 )
624class IEventSubscription_get_PerUserResponse(DCOMANSWER):
625 structure = (
626 ('pfPerUser', BOOLEAN),
627 ('ErrorCode', error_status_t),
628 )
630# 3.1.4.4.16 put_PerUser (Opnum 22)
631class IEventSubscription_put_PerUser(DCOMCALL):
632 opnum = 22
633 structure = (
634 ('fPerUser', BOOLEAN),
635 )
637class IEventSubscription_put_PerUserResponse(DCOMANSWER):
638 structure = (
639 ('ErrorCode', error_status_t),
640 )
642# 3.1.4.4.17 get_OwnerSID (Opnum 23)
643class IEventSubscription_get_OwnerSID(DCOMCALL):
644 opnum = 23
645 structure = (
646 )
648class IEventSubscription_get_OwnerSIDResponse(DCOMANSWER):
649 structure = (
650 ('pbstrOwnerSID', BSTR),
651 ('ErrorCode', error_status_t),
652 )
654# 3.1.4.4.18 put_OwnerSID (Opnum 24)
655class IEventSubscription_put_OwnerSID(DCOMCALL):
656 opnum = 24
657 structure = (
658 ('bstrOwnerSID', BSTR),
659 )
661class IEventSubscription_put_OwnerSIDResponse(DCOMANSWER):
662 structure = (
663 ('ErrorCode', error_status_t),
664 )
666# 3.1.4.4.19 get_Enabled (Opnum 25)
667class IEventSubscription_get_Enabled(DCOMCALL):
668 opnum = 25
669 structure = (
670 )
672class IEventSubscription_get_EnabledResponse(DCOMANSWER):
673 structure = (
674 ('pfEnabled', BOOLEAN),
675 ('ErrorCode', error_status_t),
676 )
678# 3.1.4.4.20 put_Enabled (Opnum 26)
679class IEventSubscription_put_Enabled(DCOMCALL):
680 opnum = 26
681 structure = (
682 ('fEnabled', BOOLEAN),
683 )
685class IEventSubscription_put_EnabledResponse(DCOMANSWER):
686 structure = (
687 ('ErrorCode', error_status_t),
688 )
690# 3.1.4.4.21 get_Description (Opnum 27)
691class IEventSubscription_get_Description(DCOMCALL):
692 opnum = 27
693 structure = (
694 )
696class IEventSubscription_get_DescriptionResponse(DCOMANSWER):
697 structure = (
698 ('pbstrDescription', BSTR),
699 ('ErrorCode', error_status_t),
700 )
702# 3.1.4.4.22 put_Description (Opnum 28)
703class IEventSubscription_put_Description(DCOMCALL):
704 opnum = 28
705 structure = (
706 ('bstrDescription', BSTR),
707 )
709class IEventSubscription_put_DescriptionResponse(DCOMANSWER):
710 structure = (
711 ('ErrorCode', error_status_t),
712 )
714# 3.1.4.4.23 get_MachineName (Opnum 29)
715class IEventSubscription_get_MachineName(DCOMCALL):
716 opnum = 29
717 structure = (
718 )
720class IEventSubscription_get_MachineNameResponse(DCOMANSWER):
721 structure = (
722 ('pbstrMachineName', BSTR),
723 ('ErrorCode', error_status_t),
724 )
726# 3.1.4.4.24 put_MachineName (Opnum 30)
727class IEventSubscription_put_MachineName(DCOMCALL):
728 opnum = 30
729 structure = (
730 ('bstrMachineName', BSTR),
731 )
733class IEventSubscription_put_MachineNameResponse(DCOMANSWER):
734 structure = (
735 ('ErrorCode', error_status_t),
736 )
738# 3.1.4.4.25 GetPublisherProperty (Opnum 31)
739class IEventSubscription_GetPublisherProperty(DCOMCALL):
740 opnum = 31
741 structure = (
742 ('bstrPropertyName', BSTR),
743 )
745class IEventSubscription_GetPublisherPropertyResponse(DCOMANSWER):
746 structure = (
747 ('propertyValue', VARIANT),
748 ('ErrorCode', error_status_t),
749 )
751# 3.1.4.4.26 PutPublisherProperty (Opnum 32)
752class IEventSubscription_PutPublisherProperty(DCOMCALL):
753 opnum = 32
754 structure = (
755 ('bstrPropertyName', BSTR),
756 ('propertyValue', VARIANT),
757 )
759class IEventSubscription_PutPublisherPropertyResponse(DCOMANSWER):
760 structure = (
761 ('ErrorCode', error_status_t),
762 )
764# 3.1.4.4.27 RemovePublisherProperty (Opnum 33)
765class IEventSubscription_RemovePublisherProperty(DCOMCALL):
766 opnum = 33
767 structure = (
768 ('bstrPropertyName', BSTR),
769 )
771class IEventSubscription_RemovePublisherPropertyResponse(DCOMANSWER):
772 structure = (
773 ('ErrorCode', error_status_t),
774 )
776# 3.1.4.4.28 GetPublisherPropertyCollection (Opnum 34)
777class IEventSubscription_GetPublisherPropertyCollection(DCOMCALL):
778 opnum = 34
779 structure = (
780 )
782class IEventSubscription_GetPublisherPropertyCollectionResponse(DCOMANSWER):
783 structure = (
784 ('collection', PMInterfacePointer),
785 ('ErrorCode', error_status_t),
786 )
788# 3.1.4.4.29 GetSubscriberProperty (Opnum 35)
789class IEventSubscription_GetSubscriberProperty(DCOMCALL):
790 opnum = 35
791 structure = (
792 ('bstrPropertyName', BSTR),
793 )
795class IEventSubscription_GetSubscriberPropertyResponse(DCOMANSWER):
796 structure = (
797 ('propertyValue', VARIANT),
798 ('ErrorCode', error_status_t),
799 )
801# 3.1.4.4.30 PutSubscriberProperty (Opnum 36)
802class IEventSubscription_PutSubscriberProperty(DCOMCALL):
803 opnum = 36
804 structure = (
805 ('bstrPropertyName', BSTR),
806 ('propertyValue', VARIANT),
807 )
809class IEventSubscription_PutSubscriberPropertyResponse(DCOMANSWER):
810 structure = (
811 ('ErrorCode', error_status_t),
812 )
814# 3.1.4.4.31 RemoveSubscriberProperty (Opnum 37)
815class IEventSubscription_RemoveSubscriberProperty(DCOMCALL):
816 opnum = 37
817 structure = (
818 ('bstrPropertyName', BSTR),
819 )
821class IEventSubscription_RemoveSubscriberPropertyResponse(DCOMANSWER):
822 structure = (
823 ('ErrorCode', error_status_t),
824 )
826# 3.1.4.4.32 GetSubscriberPropertyCollection (Opnum 38)
827class IEventSubscription_GetSubscriberPropertyCollection(DCOMCALL):
828 opnum = 38
829 structure = (
830 )
832class IEventSubscription_GetSubscriberPropertyCollectionResponse(DCOMANSWER):
833 structure = (
834 ('collection', PMInterfacePointer),
835 ('ErrorCode', error_status_t),
836 )
838# 3.1.4.4.33 get_InterfaceID (Opnum 39)
839class IEventSubscription_get_InterfaceID(DCOMCALL):
840 opnum = 39
841 structure = (
842 )
844class IEventSubscription_get_InterfaceIDResponse(DCOMANSWER):
845 structure = (
846 ('pbstrInterfaceID', BSTR),
847 ('ErrorCode', error_status_t),
848 )
850# 3.1.4.4.34 put_InterfaceID (Opnum 40)
851class IEventSubscription_put_InterfaceID(DCOMCALL):
852 opnum = 40
853 structure = (
854 ('bstrInterfaceID', BSTR),
855 )
857class IEventSubscription_put_InterfaceIDResponse(DCOMANSWER):
858 structure = (
859 ('ErrorCode', error_status_t),
860 )
862################################################################################
863# 3.1.4.5 IEnumEventObject
864# 3.1.4.5.1 Clone (Opnum 3)
865class IEnumEventObject_Clone(DCOMCALL):
866 opnum = 3
867 structure = (
868 )
870class IEnumEventObject_CloneResponse(DCOMANSWER):
871 structure = (
872 ('ppInterface', PMInterfacePointer),
873 ('ErrorCode', error_status_t),
874 )
876# 3.1.4.5.2 Next (Opnum 4)
877class IEnumEventObject_Next(DCOMCALL):
878 opnum = 4
879 structure = (
880 ('cReqElem', ULONG),
881 )
883class IEnumEventObject_NextResponse(DCOMANSWER):
884 structure = (
885 ('ppInterface', OBJECT_ARRAY),
886 ('cRetElem', ULONG),
887 ('ErrorCode', error_status_t),
888 )
890# 3.1.4.5.3 Reset (Opnum 5)
891class IEnumEventObject_Reset(DCOMCALL):
892 opnum = 5
893 structure = (
894 )
896class IEnumEventObject_ResetResponse(DCOMANSWER):
897 structure = (
898 ('ErrorCode', error_status_t),
899 )
901# 3.1.4.5.4 Skip (Opnum 6)
902class IEnumEventObject_Skip(DCOMCALL):
903 opnum = 6
904 structure = (
905 ('cSkipElem', ULONG),
906 )
908class IEnumEventObject_SkipResponse(DCOMANSWER):
909 structure = (
910 ('ErrorCode', error_status_t),
911 )
913################################################################################
914# 3.1.4.6 IEventObjectCollection
915# 3.1.4.6.1 get__NewEnum (Opnum 7)
916class IEventObjectCollection_get__NewEnum(DCOMCALL):
917 opnum = 7
918 structure = (
919 )
921class IEventObjectCollection_get__NewEnumResponse(DCOMANSWER):
922 structure = (
923 ('ppUnkEnum', PMInterfacePointer),
924 ('ErrorCode', error_status_t),
925 )
927# 3.1.4.6.2 get_Item (Opnum 8)
928class IEventObjectCollection_get_Item(DCOMCALL):
929 opnum = 8
930 structure = (
931 ('objectID', BSTR),
932 )
934class IEventObjectCollection_get_ItemResponse(DCOMANSWER):
935 structure = (
936 ('pItem', VARIANT),
937 ('ErrorCode', error_status_t),
938 )
940# 3.1.4.6.3 get_NewEnum (Opnum 9)
941class IEventObjectCollection_get_NewEnum(DCOMCALL):
942 opnum = 9
943 structure = (
944 )
946class IEventObjectCollection_get_NewEnumResponse(DCOMANSWER):
947 structure = (
948 ('ppEnum', PMInterfacePointer),
949 ('ErrorCode', error_status_t),
950 )
952# 3.1.4.6.4 get_Count (Opnum 10)
953class IEventObjectCollection_get_Count(DCOMCALL):
954 opnum = 10
955 structure = (
956 )
958class IEventObjectCollection_get_CountResponse(DCOMANSWER):
959 structure = (
960 ('pCount', LONG),
961 ('ErrorCode', error_status_t),
962 )
964# 3.1.4.6.5 Add (Opnum 11)
965class IEventObjectCollection_Add(DCOMCALL):
966 opnum = 11
967 structure = (
968 ('item', VARIANT),
969 ('objectID', BSTR),
970 )
972class IEventObjectCollection_AddResponse(DCOMANSWER):
973 structure = (
974 ('ErrorCode', error_status_t),
975 )
977# 3.1.4.6.6 Remove (Opnum 12)
978class IEventObjectCollection_Remove(DCOMCALL):
979 opnum = 12
980 structure = (
981 ('objectID', BSTR),
982 )
984class IEventObjectCollection_RemoveResponse(DCOMANSWER):
985 structure = (
986 ('ErrorCode', error_status_t),
987 )
989################################################################################
990# 3.1.4.7 IEventClass3
991# 3.1.4.7.1 get_EventClassPartitionID (Opnum 29)
992class IEventClass3_get_EventClassPartitionID(DCOMCALL):
993 opnum = 29
994 structure = (
995 )
997class IEventClass3_get_EventClassPartitionIDResponse(DCOMANSWER):
998 structure = (
999 ('pbstrEventClassPartitionID', BSTR),
1000 ('ErrorCode', error_status_t),
1001 )
1003# 3.1.4.7.2 put_EventClassPartitionID (Opnum 30)
1004class IEventClass3_put_EventClassPartitionID(DCOMCALL):
1005 opnum = 30
1006 structure = (
1007 ('bstrEventClassPartitionID', BSTR),
1008 )
1010class IEventClass3_put_EventClassPartitionIDResponse(DCOMANSWER):
1011 structure = (
1012 ('ErrorCode', error_status_t),
1013 )
1015# 3.1.4.7.3 get_EventClassApplicationID (Opnum 31)
1016class IEventClass3_get_EventClassApplicationID(DCOMCALL):
1017 opnum = 31
1018 structure = (
1019 )
1021class IEventClass3_get_EventClassApplicationIDResponse(DCOMANSWER):
1022 structure = (
1023 ('pbstrEventClassApplicationID', BSTR),
1024 ('ErrorCode', error_status_t),
1025 )
1027# 3.1.4.7.4 put_EventClassApplicationID (Opnum 32)
1028class IEventClass3_put_EventClassApplicationID(DCOMCALL):
1029 opnum = 32
1030 structure = (
1031 ('bstrEventClassApplicationID', BSTR),
1032 )
1034class IEventClass3_put_EventClassApplicationIDResponse(DCOMANSWER):
1035 structure = (
1036 ('ErrorCode', error_status_t),
1037 )
1039################################################################################
1040# 3.1.4.8 IEventSubscription2
1041# 3.1.4.8.1 get_FilterCriteria (Opnum 41)
1042class IEventSubscription2_get_FilterCriteria(DCOMCALL):
1043 opnum = 41
1044 structure = (
1045 )
1047class IEventSubscription2_get_FilterCriteriaResponse(DCOMANSWER):
1048 structure = (
1049 ('pbstrFilterCriteria', BSTR),
1050 ('ErrorCode', error_status_t),
1051 )
1053# 3.1.4.8.2 put_FilterCriteria (Opnum 42)
1054class IEventSubscription2_put_FilterCriteria(DCOMCALL):
1055 opnum = 42
1056 structure = (
1057 ('bstrFilterCriteria', BSTR),
1058 )
1060class IEventSubscription2_put_FilterCriteriaResponse(DCOMANSWER):
1061 structure = (
1062 ('ErrorCode', error_status_t),
1063 )
1065# 3.1.4.8.3 get_SubscriberMoniker (Opnum 43)
1066class IEventSubscription2_get_SubscriberMoniker(DCOMCALL):
1067 opnum = 43
1068 structure = (
1069 )
1071class IEventSubscription2_get_SubscriberMonikerResponse(DCOMANSWER):
1072 structure = (
1073 ('pbstrMoniker', BSTR),
1074 ('ErrorCode', error_status_t),
1075 )
1077# 3.1.4.8.4 put_SubscriberMoniker (Opnum 44)
1078class IEventSubscription2_put_SubscriberMoniker(DCOMCALL):
1079 opnum = 44
1080 structure = (
1081 ('bstrMoniker', BSTR),
1082 )
1084class IEventSubscription2_put_SubscriberMonikerResponse(DCOMANSWER):
1085 structure = (
1086 ('ErrorCode', error_status_t),
1087 )
1089################################################################################
1090# 3.1.4.9 IEventSubscription3
1091# 3.1.4.9.1 get_EventClassPartitionID (Opnum 45)
1092class IEventSubscription3_get_EventClassPartitionID(DCOMCALL):
1093 opnum = 45
1094 structure = (
1095 )
1097class IEventSubscription3_get_EventClassPartitionIDResponse(DCOMANSWER):
1098 structure = (
1099 ('pbstrEventClassPartitionID', BSTR),
1100 ('ErrorCode', error_status_t),
1101 )
1103# 3.1.4.9.2 put_EventClassPartitionID (Opnum 46)
1104class IEventSubscription3_put_EventClassPartitionID(DCOMCALL):
1105 opnum = 46
1106 structure = (
1107 ('bstrEventClassPartitionID', BSTR),
1108 )
1110class IEventSubscription3_put_EventClassPartitionIDResponse(DCOMANSWER):
1111 structure = (
1112 ('ErrorCode', error_status_t),
1113 )
1115# 3.1.4.9.3 get_EventClassApplicationID (Opnum 47)
1116class IEventSubscription3_get_EventClassApplicationID(DCOMCALL):
1117 opnum = 47
1118 structure = (
1119 )
1121class IEventSubscription3_get_EventClassApplicationIDResponse(DCOMANSWER):
1122 structure = (
1123 ('pbstrEventClassApplicationID', BSTR),
1124 ('ErrorCode', error_status_t),
1125 )
1127# 3.1.4.9.4 put_EventClassApplicationID (Opnum 48)
1128class IEventSubscription3_put_EventClassApplicationID(DCOMCALL):
1129 opnum = 48
1130 structure = (
1131 ('bstrEventClassPartitionID', BSTR),
1132 )
1134class IEventSubscription3_put_EventClassApplicationIDResponse(DCOMANSWER):
1135 structure = (
1136 ('ErrorCode', error_status_t),
1137 )
1139# 3.1.4.9.5 get_SubscriberPartitionID (Opnum 49)
1140class IEventSubscription3_get_SubscriberPartitionID(DCOMCALL):
1141 opnum = 49
1142 structure = (
1143 )
1145class IEventSubscription3_get_SubscriberPartitionIDResponse(DCOMANSWER):
1146 structure = (
1147 ('pbstrSubscriberPartitionID', BSTR),
1148 ('ErrorCode', error_status_t),
1149 )
1151# 3.1.4.9.6 put_SubscriberPartitionID (Opnum 50)
1152class IEventSubscription3_put_SubscriberPartitionID(DCOMCALL):
1153 opnum = 50
1154 structure = (
1155 ('bstrSubscriberPartitionID', BSTR),
1156 )
1158class IEventSubscription3_put_SubscriberPartitionIDResponse(DCOMANSWER):
1159 structure = (
1160 ('ErrorCode', error_status_t),
1161 )
1163# 3.1.4.9.7 get_SubscriberApplicationID (Opnum 51)
1164class IEventSubscription3_get_SubscriberApplicationID(DCOMCALL):
1165 opnum = 51
1166 structure = (
1167 )
1169class IEventSubscription3_get_SubscriberApplicationIDResponse(DCOMANSWER):
1170 structure = (
1171 ('pbstrSubscriberApplicationID', BSTR),
1172 ('ErrorCode', error_status_t),
1173 )
1175# 3.1.4.9.8 put_SubscriberApplicationID (Opnum 52)
1176class IEventSubscription3_put_SubscriberApplicationID(DCOMCALL):
1177 opnum = 52
1178 structure = (
1179 ('bstrSubscriberApplicationID', BSTR),
1180 )
1182class IEventSubscription3_put_SubscriberApplicationIDResponse(DCOMANSWER):
1183 structure = (
1184 ('ErrorCode', error_status_t),
1185 )
1187################################################################################
1188# 3.1.4.10 IEventSystem2
1189# 3.1.4.10.1 GetVersion (Opnum 13)
1190class IEventSystem2_GetVersion(DCOMCALL):
1191 opnum = 13
1192 structure = (
1193 )
1195class IEventSystem2_GetVersionResponse(DCOMANSWER):
1196 structure = (
1197 ('pnVersion', INT),
1198 ('ErrorCode', error_status_t),
1199 )
1201# 3.1.4.10.2 VerifyTransientSubscribers (Opnum 14)
1202class IEventSystem2_VerifyTransientSubscribers(DCOMCALL):
1203 opnum = 14
1204 structure = (
1205 )
1207class IEventSystem2_VerifyTransientSubscribersResponse(DCOMANSWER):
1208 structure = (
1209 ('ErrorCode', error_status_t),
1210 )
1212################################################################################
1213# 3.1.4.11 IEventSystemInitialize
1214# 3.1.4.11.1 SetCOMCatalogBehaviour (Opnum 3)
1215class IEventSystemInitialize_SetCOMCatalogBehaviour(DCOMCALL):
1216 opnum = 3
1217 structure = (
1218 ('bRetainSubKeys', BOOLEAN),
1219 )
1221class IEventSystemInitialize_SetCOMCatalogBehaviourResponse(DCOMANSWER):
1222 structure = (
1223 ('ErrorCode', error_status_t),
1224 )
1227################################################################################
1228# OPNUMs and their corresponding structures
1229################################################################################
1230OPNUMS = {
1231}
1233################################################################################
1234# HELPER FUNCTIONS AND INTERFACES
1235################################################################################
1236class IEventClass(IDispatch):
1237 def __init__(self, interface):
1238 IDispatch.__init__(self,interface)
1239 self._iid = IID_IEventClass
1241 def get_EventClassID(self):
1242 request = IEventClass_get_EventClassID()
1243 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1244 resp.dump()
1245 return resp
1247 def put_EventClassID(self,bstrEventClassID):
1248 request = IEventClass_put_EventClassID()
1249 request['bstrEventClassID'] = bstrEventClassID
1250 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1251 resp.dump()
1252 return resp
1254 def get_EventClassName(self):
1255 request = IEventClass_get_EventClassName()
1256 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1257 resp.dump()
1258 return resp
1260 def put_EventClassName(self, bstrEventClassName):
1261 request = IEventClass_put_EventClassName()
1262 request['bstrEventClassName'] = bstrEventClassName
1263 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1264 resp.dump()
1265 return resp
1267 def get_OwnerSID(self):
1268 request = IEventClass_get_OwnerSID()
1269 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1270 resp.dump()
1271 return resp
1273 def put_OwnerSID(self, bstrOwnerSID):
1274 request = IEventClass_put_OwnerSID()
1275 request['bstrOwnerSID'] = bstrOwnerSID
1276 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1277 resp.dump()
1278 return resp
1280 def get_FiringInterfaceID(self):
1281 request = IEventClass_get_FiringInterfaceID()
1282 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1283 resp.dump()
1284 return resp
1286 def put_FiringInterfaceID(self, bstrFiringInterfaceID):
1287 request = IEventClass_put_FiringInterfaceID()
1288 request['bstrFiringInterfaceID'] = bstrFiringInterfaceID
1289 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1290 resp.dump()
1291 return resp
1293 def get_Description(self):
1294 request = IEventClass_get_Description()
1295 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1296 resp.dump()
1297 return resp
1299 def put_Description(self, bstrDescription):
1300 request = IEventClass_put_Description()
1301 request['bstrDescription'] = bstrDescription
1302 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1303 resp.dump()
1304 return resp
1306 def get_TypeLib(self):
1307 request = IEventClass_get_TypeLib()
1308 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1309 resp.dump()
1310 return resp
1312 def put_TypeLib(self, bstrTypeLib):
1313 request = IEventClass_put_TypeLib()
1314 request['bstrTypeLib'] = bstrTypeLib
1315 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1316 resp.dump()
1317 return resp
1319class IEventClass2(IEventClass):
1320 def __init__(self, interface):
1321 IEventClass.__init__(self,interface)
1322 self._iid = IID_IEventClass2
1324 def get_PublisherID(self):
1325 request = IEventClass2_get_PublisherID()
1326 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1327 resp.dump()
1328 return resp
1330 def put_PublisherID(self, bstrPublisherID):
1331 request = IEventClass2_put_PublisherID()
1332 request['bstrPublisherID'] = bstrPublisherID
1333 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1334 resp.dump()
1335 return resp
1337 def get_MultiInterfacePublisherFilterCLSID(self):
1338 request = IEventClass2_get_MultiInterfacePublisherFilterCLSID()
1339 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1340 resp.dump()
1341 return resp
1343 def put_MultiInterfacePublisherFilterCLSID(self, bstrPubFilCLSID):
1344 request = IEventClass2_put_MultiInterfacePublisherFilterCLSID()
1345 request['bstrPubFilCLSID'] = bstrPubFilCLSID
1346 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1347 resp.dump()
1348 return resp
1350 def get_AllowInprocActivation(self):
1351 request = IEventClass2_get_AllowInprocActivation()
1352 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1353 resp.dump()
1354 return resp
1356 def put_AllowInprocActivation(self, fAllowInprocActivation):
1357 request = IEventClass2_put_AllowInprocActivation()
1358 request['fAllowInprocActivation '] = fAllowInprocActivation
1359 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1360 resp.dump()
1361 return resp
1363 def get_FireInParallel(self):
1364 request = IEventClass2_get_FireInParallel()
1365 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1366 resp.dump()
1367 return resp
1369 def put_FireInParallel(self, fFireInParallel):
1370 request = IEventClass2_put_FireInParallel()
1371 request['fFireInParallel '] = fFireInParallel
1372 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1373 resp.dump()
1374 return resp
1376class IEventClass3(IEventClass2):
1377 def __init__(self, interface):
1378 IEventClass2.__init__(self,interface)
1379 self._iid = IID_IEventClass3
1381 def get_EventClassPartitionID(self):
1382 request = IEventClass3_get_EventClassPartitionID()
1383 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1384 resp.dump()
1385 return resp
1387 def put_EventClassPartitionID(self, bstrEventClassPartitionID):
1388 request = IEventClass3_put_EventClassPartitionID()
1389 request['bstrEventClassPartitionID '] = bstrEventClassPartitionID
1390 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1391 resp.dump()
1392 return resp
1394 def get_EventClassApplicationID(self):
1395 request = IEventClass3_get_EventClassApplicationID()
1396 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1397 resp.dump()
1398 return resp
1400 def put_EventClassApplicationID(self, bstrEventClassApplicationID):
1401 request = IEventClass3_put_EventClassApplicationID()
1402 request['bstrEventClassApplicationID '] = bstrEventClassApplicationID
1403 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1404 resp.dump()
1405 return resp
1407class IEventSubscription(IDispatch):
1408 def __init__(self, interface):
1409 IDispatch.__init__(self,interface)
1410 self._iid = IID_IEventSubscription
1412 def get_SubscriptionID(self):
1413 request = IEventSubscription_get_SubscriptionID()
1414 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1415 resp.dump()
1416 return resp
1418 def put_SubscriptionID(self, bstrSubscriptionID):
1419 request = IEventSubscription_put_SubscriptionID()
1420 request['bstrSubscriptionID'] = bstrSubscriptionID
1421 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1422 resp.dump()
1423 return resp
1425 def get_SubscriptionName(self):
1426 request = IEventSubscription_get_SubscriptionName()
1427 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1428 return resp
1430 def put_SubscriptionName(self, bstrSubscriptionName):
1431 request = IEventSubscription_put_SubscriptionName()
1432 request['bstrSubscriptionName'] = bstrSubscriptionName
1433 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1434 resp.dump()
1435 return resp
1437 def get_PublisherID(self):
1438 request = IEventSubscription_get_PublisherID()
1439 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1440 resp.dump()
1441 return resp
1443 def put_PublisherID(self, bstrPublisherID):
1444 request = IEventSubscription_put_PublisherID()
1445 request['bstrPublisherID'] = bstrPublisherID
1446 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1447 resp.dump()
1448 return resp
1450 def get_EventClassID(self):
1451 request = IEventSubscription_get_EventClassID()
1452 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1453 resp.dump()
1454 return resp
1456 def put_EventClassID(self, pbstrEventClassID):
1457 request = IEventSubscription_put_EventClassID()
1458 request['pbstrEventClassID'] = pbstrEventClassID
1459 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1460 resp.dump()
1461 return resp
1463 def get_MethodName(self):
1464 request = IEventSubscription_get_MethodName()
1465 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1466 resp.dump()
1467 return resp
1469 def put_MethodName(self, bstrMethodName):
1470 request = IEventSubscription_put_MethodName()
1471 request['bstrMethodName'] = bstrMethodName
1472 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1473 resp.dump()
1474 return resp
1476 def get_SubscriberCLSID(self):
1477 request = IEventSubscription_get_SubscriberCLSID()
1478 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1479 resp.dump()
1480 return resp
1482 def put_SubscriberCLSID(self, bstrSubscriberCLSID):
1483 request = IEventSubscription_put_SubscriberCLSID()
1484 request['bstrSubscriberCLSID'] = bstrSubscriberCLSID
1485 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1486 resp.dump()
1487 return resp
1489 def get_SubscriberInterface(self):
1490 request = IEventSubscription_get_SubscriberInterface()
1491 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1492 resp.dump()
1493 return resp
1495 def put_SubscriberInterface(self, pSubscriberInterface):
1496 request = IEventSubscription_put_SubscriberInterface()
1497 request['pSubscriberInterface'] = pSubscriberInterface
1498 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1499 resp.dump()
1500 return resp
1502 def get_PerUser(self):
1503 request = IEventSubscription_get_PerUser()
1504 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1505 resp.dump()
1506 return resp
1508 def put_PerUser(self, fPerUser):
1509 request = IEventSubscription_put_PerUser()
1510 request['fPerUser'] = fPerUser
1511 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1512 resp.dump()
1513 return resp
1515 def get_OwnerSID(self):
1516 request = IEventSubscription_get_OwnerSID()
1517 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1518 resp.dump()
1519 return resp
1521 def put_OwnerSID(self, bstrOwnerSID):
1522 request = IEventSubscription_put_OwnerSID()
1523 request['bstrOwnerSID'] = bstrOwnerSID
1524 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1525 resp.dump()
1526 return resp
1528 def get_Enabled(self):
1529 request = IEventSubscription_get_Enabled()
1530 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1531 resp.dump()
1532 return resp
1534 def put_Enabled(self, fEnabled):
1535 request = IEventSubscription_put_Enabled()
1536 request['fEnabled'] = fEnabled
1537 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1538 resp.dump()
1539 return resp
1541 def get_Description(self):
1542 request = IEventSubscription_get_Description()
1543 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1544 resp.dump()
1545 return resp
1547 def put_Description(self, bstrDescription):
1548 request = IEventSubscription_put_Description()
1549 request['bstrDescription'] = bstrDescription
1550 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1551 resp.dump()
1552 return resp
1554 def get_MachineName(self):
1555 request = IEventSubscription_get_MachineName()
1556 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1557 resp.dump()
1558 return resp
1560 def put_MachineName(self, bstrMachineName):
1561 request = IEventSubscription_put_MachineName()
1562 request['bstrMachineName'] = bstrMachineName
1563 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1564 resp.dump()
1565 return resp
1567 def GetPublisherProperty(self):
1568 request = IEventSubscription_GetPublisherProperty()
1569 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1570 resp.dump()
1571 return resp
1573 def PutPublisherProperty(self, bstrPropertyName, propertyValue):
1574 request = IEventSubscription_PutPublisherProperty()
1575 request['bstrPropertyName'] = bstrPropertyName
1576 request['propertyValue'] = propertyValue
1577 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1578 resp.dump()
1579 return resp
1581 def RemovePublisherProperty(self, bstrPropertyName):
1582 request = IEventSubscription_RemovePublisherProperty()
1583 request['bstrPropertyName'] = bstrPropertyName
1584 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1585 resp.dump()
1586 return resp
1588 def GetPublisherPropertyCollection(self):
1589 request = IEventSubscription_GetPublisherPropertyCollection()
1590 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1591 resp.dump()
1592 return resp
1594 def GetSubscriberProperty(self):
1595 request = IEventSubscription_GetSubscriberProperty()
1596 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1597 resp.dump()
1598 return resp
1600 def PutSubscriberProperty(self, bstrPropertyName, propertyValue):
1601 request = IEventSubscription_PutSubscriberProperty()
1602 request['bstrPropertyName'] = bstrPropertyName
1603 request['propertyValue'] = propertyValue
1604 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1605 resp.dump()
1606 return resp
1608 def RemoveSubscriberProperty(self, bstrPropertyName):
1609 request = IEventSubscription_RemoveSubscriberProperty()
1610 request['bstrPropertyName'] = bstrPropertyName
1611 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1612 resp.dump()
1613 return resp
1615 def GetSubscriberPropertyCollection(self):
1616 request = IEventSubscription_GetSubscriberPropertyCollection()
1617 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1618 resp.dump()
1619 return resp
1621 def get_InterfaceID(self):
1622 request = IEventSubscription_get_InterfaceID()
1623 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1624 resp.dump()
1625 return resp
1627 def put_InterfaceID(self, bstrInterfaceID):
1628 request = IEventSubscription_put_InterfaceID()
1629 request['bstrInterfaceID'] = bstrInterfaceID
1630 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1631 resp.dump()
1632 return resp
1634class IEventSubscription2(IEventSubscription):
1635 def __init__(self, interface):
1636 IEventSubscription.__init__(self,interface)
1637 self._iid = IID_IEventSubscription2
1639 def get_FilterCriteria(self):
1640 request = IEventSubscription2_get_FilterCriteria()
1641 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1642 resp.dump()
1643 return resp
1645 def put_FilterCriteria(self, bstrFilterCriteria):
1646 request = IEventSubscription2_put_FilterCriteria()
1647 request['bstrFilterCriteria'] = bstrFilterCriteria
1648 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1649 resp.dump()
1650 return resp
1652 def get_SubscriberMoniker (self):
1653 request = IEventSubscription2_get_SubscriberMoniker ()
1654 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1655 resp.dump()
1656 return resp
1658 def put_SubscriberMoniker(self, bstrMoniker):
1659 request = IEventSubscription2_put_SubscriberMoniker()
1660 request['bstrMoniker'] = bstrMoniker
1661 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1662 resp.dump()
1663 return resp
1665class IEventSubscription3(IEventSubscription2):
1666 def __init__(self, interface):
1667 IEventSubscription2.__init__(self,interface)
1668 self._iid = IID_IEventSubscription3
1670 def get_EventClassPartitionID(self):
1671 request = IEventSubscription3_get_EventClassPartitionID()
1672 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1673 resp.dump()
1674 return resp
1676 def put_EventClassPartitionID(self, bstrEventClassPartitionID):
1677 request = IEventSubscription3_put_EventClassPartitionID()
1678 request['bstrEventClassPartitionID'] = bstrEventClassPartitionID
1679 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1680 resp.dump()
1681 return resp
1683 def get_EventClassApplicationID(self):
1684 request = IEventSubscription3_get_EventClassApplicationID()
1685 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1686 resp.dump()
1687 return resp
1689 def put_EventClassApplicationID(self, bstrEventClassApplicationID):
1690 request = IEventSubscription3_put_EventClassApplicationID()
1691 request['bstrEventClassApplicationID'] = bstrEventClassApplicationID
1692 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1693 resp.dump()
1694 return resp
1696 def get_SubscriberPartitionID(self):
1697 request = IEventSubscription3_get_SubscriberPartitionID()
1698 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1699 resp.dump()
1700 return resp
1702 def put_SubscriberPartitionID(self, bstrSubscriberPartitionID):
1703 request = IEventSubscription3_put_SubscriberPartitionID()
1704 request['bstrSubscriberPartitionID'] = bstrSubscriberPartitionID
1705 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1706 resp.dump()
1707 return resp
1709 def get_SubscriberApplicationID(self):
1710 request = IEventSubscription3_get_SubscriberApplicationID()
1711 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1712 resp.dump()
1713 return resp
1715 def put_SubscriberApplicationID(self, bstrSubscriberApplicationID):
1716 request = IEventSubscription3_put_SubscriberApplicationID()
1717 request['bstrSubscriberApplicationID'] = bstrSubscriberApplicationID
1718 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1719 resp.dump()
1720 return resp
1723class IEnumEventObject(IDispatch):
1724 def __init__(self, interface):
1725 IDispatch.__init__(self,interface)
1726 self._iid = IID_IEnumEventObject
1728 def Clone(self):
1729 request = IEnumEventObject_Clone()
1730 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1731 return IEnumEventObject(INTERFACE(self.get_cinstance(), ''.join(resp['ppInterface']['abData']), self.get_ipidRemUnknown(), target = self.get_target()))
1733 def Next(self, cReqElem):
1734 request = IEnumEventObject_Next()
1735 request['cReqElem'] = cReqElem
1736 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1737 interfaces = list()
1738 for interface in resp['ppInterface']:
1739 interfaces.append(IEventClass2(INTERFACE(self.get_cinstance(), ''.join(interface['abData']), self.get_ipidRemUnknown(), target = self.get_target())))
1740 return interfaces
1742 def Reset(self):
1743 request = IEnumEventObject_Reset()
1744 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1745 return resp
1747 def Skip(self, cSkipElem):
1748 request = IEnumEventObject_Skip()
1749 request['cSkipElem'] = cSkipElem
1750 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1751 return resp
1753class IEventObjectCollection(IDispatch):
1754 def __init__(self, interface):
1755 IDispatch.__init__(self,interface)
1756 self._iid = IID_IEventObjectCollection
1758 def get__NewEnum(self):
1759 request = IEventObjectCollection_get__NewEnum()
1760 resp = self.request(request, iid = self._iid , uuid = self.get_iPid())
1761 return IEnumEventObject(INTERFACE(self.get_cinstance(), ''.join(resp['ppEnum']['abData']), self.get_ipidRemUnknown(), target = self._get_target()))
1763 def get_Item(self, objectID):
1764 request = IEventObjectCollection_get_Item()
1765 request['objectID']['asData'] = objectID
1766 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1767 return resp
1769 def get_NewEnum(self):
1770 request = IEventObjectCollection_get_NewEnum()
1771 resp = self.request(request, iid = self._iid , uuid = self.get_iPid())
1772 return IEnumEventObject(INTERFACE(self.get_cinstance(), ''.join(resp['ppEnum']['abData']), self.get_ipidRemUnknown(), target = self.get_target()))
1774 def get_Count(self):
1775 request = IEventObjectCollection_get_Count()
1776 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1777 return resp
1779 def Add(self, item, objectID):
1780 request = IEventObjectCollection_Add()
1781 request['item'] = item
1782 request['objectID']['asData'] = objectID
1783 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1784 return resp
1786 def Remove(self, objectID):
1787 request = IEventObjectCollection_Remove()
1788 request['objectID']['asData'] = objectID
1789 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1790 return resp
1792class IEventSystem(IDispatch):
1793 def __init__(self, interface):
1794 IDispatch.__init__(self,interface)
1795 self._iid = IID_IEventSystem
1797 def Query(self, progID, queryCriteria):
1798 request = IEventSystem_Query()
1799 request['progID']['asData']=progID
1800 request['queryCriteria']['asData']=queryCriteria
1801 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1802 iInterface = IDispatch(INTERFACE(self.get_cinstance(), ''.join(resp['ppInterface']['abData']), self.get_ipidRemUnknown(), target = self.get_target()))
1803 return IEventObjectCollection(iInterface.RemQueryInterface(1, (IID_IEventObjectCollection,)))
1805 def Store(self, progID, pInterface):
1806 request = IEventSystem_Store()
1807 request['progID']['asData']=progID
1808 request['pInterface'] = pInterface
1809 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1810 return resp
1812 def Remove(self, progID, queryCriteria):
1813 request = IEventSystem_Remove()
1814 request['progID']['asData']=progID
1815 request['queryCriteria'] = queryCriteria
1816 resp = self.request(request, uuid = self.get_iPid())
1817 return resp
1819 def get_EventObjectChangeEventClassID(self):
1820 request = IEventSystem_get_EventObjectChangeEventClassID()
1821 resp = self.request(request, uuid = self.get_iPid())
1822 return resp
1824 def QueryS(self,progID, queryCriteria):
1825 request = IEventSystem_QueryS()
1826 request['progID']['asData']=progID
1827 request['queryCriteria']['asData']=queryCriteria
1828 resp = self.request(request, uuid = self.get_iPid())
1829 iInterface = IDispatch(INTERFACE(self.get_cinstance(), ''.join(resp['ppInterface']['abData']), self.get_ipidRemUnknown(), target = self.get_target()))
1830 return IEventObjectCollection(iInterface.RemQueryInterface(1, (IID_IEventObjectCollection,)))
1832 def RemoveS(self,progID, queryCriteria):
1833 request = IEventSystem_RemoveS()
1834 request['progID']['asData']=progID
1835 request['queryCriteria']['asData']=queryCriteria
1836 resp = self.request(request, uuid = self.get_iPid())
1837 return resp
1839class IEventSystem2(IEventSystem):
1840 def __init__(self, interface):
1841 IEventSystem.__init__(self,interface)
1842 self._iid = IID_IEventSystem2
1844 def GetVersion(self):
1845 request = IEventSystem2_GetVersion()
1846 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1847 return resp
1849 def VerifyTransientSubscribers(self):
1850 request = IEventSystem2_GetVersion()
1851 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1852 return resp
1854class IEventSystemInitialize(IRemUnknown):
1855 def __init__(self, interface):
1856 IRemUnknown.__init__(self,interface)
1857 self._iid = IID_IEventSystemInitialize
1859 def SetCOMCatalogBehaviour(self, bRetainSubKeys):
1860 request = IEventSystem2_GetVersion()
1861 request['bRetainSubKeys'] = bRetainSubKeys
1862 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1863 return resp