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# Impacket - Collection of Python classes for working with network protocols.
2#
3# SECUREAUTH LABS. Copyright (C) 2018 SecureAuth Corporation. All rights reserved.
4#
5# This software is provided under a slightly modified version
6# of the Apache Software License. See the accompanying LICENSE file
7# for more information.
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#
22# Author:
23# Alberto Solino (@agsolino)
24#
25from __future__ import division
26from __future__ import print_function
27from impacket.dcerpc.v5.ndr import NDRSTRUCT, NDRENUM, NDRUniConformantVaryingArray
28from impacket.dcerpc.v5.dcomrt import DCOMCALL, DCOMANSWER, INTERFACE, PMInterfacePointer, IRemUnknown
29from impacket.dcerpc.v5.dcom.oaut import IDispatch, BSTR, VARIANT
30from impacket.dcerpc.v5.dtypes import INT, ULONG, LONG, BOOLEAN
31from impacket.dcerpc.v5.rpcrt import DCERPCException
32from impacket.dcerpc.v5.enum import Enum
33from impacket import hresult_errors
34from impacket.uuid import string_to_bin, uuidtup_to_bin
36class DCERPCSessionError(DCERPCException):
37 def __init__(self, error_string=None, error_code=None, packet=None):
38 DCERPCException.__init__(self, error_string, error_code, packet)
40 def __str__( self ):
41 if self.error_code in hresult_errors.ERROR_MESSAGES:
42 error_msg_short = hresult_errors.ERROR_MESSAGES[self.error_code][0]
43 error_msg_verbose = hresult_errors.ERROR_MESSAGES[self.error_code][1]
44 return 'COMEV SessionError: code: 0x%x - %s - %s' % (self.error_code, error_msg_short, error_msg_verbose)
45 else:
46 return 'COMEV SessionError: unknown error code: 0x%x' % self.error_code
48################################################################################
49# CONSTANTS
50################################################################################
51# 1.9 Standards Assignments
52CLSID_EventSystem = string_to_bin('4E14FBA2-2E22-11D1-9964-00C04FBBB345')
53CLSID_EventSystem2 = string_to_bin('99CC098F-A48A-4e9c-8E58-965C0AFC19D5')
54CLSID_EventClass = string_to_bin('cdbec9c0-7a68-11d1-88f9-0080c7d771bf')
55CLSID_EventSubscription = string_to_bin('7542e960-79c7-11d1-88f9-0080c7d771bf')
56GUID_DefaultAppPartition = string_to_bin('41E90F3E-56C1-4633-81C3-6E8BAC8BDD70')
57IID_IEventSystem = uuidtup_to_bin(('4E14FB9F-2E22-11D1-9964-00C04FBBB345','0.0'))
58IID_IEventSystem2 = uuidtup_to_bin(('99CC098F-A48A-4e9c-8E58-965C0AFC19D5','0.0'))
59IID_IEventSystemInitialize = uuidtup_to_bin(('a0e8f27a-888c-11d1-b763-00c04fb926af','0.0'))
60IID_IEventObjectCollection = uuidtup_to_bin(('f89ac270-d4eb-11d1-b682-00805fc79216','0.0'))
61IID_IEnumEventObject = uuidtup_to_bin(('F4A07D63-2E25-11D1-9964-00C04FBBB345','0.0'))
62IID_IEventSubscription = uuidtup_to_bin(('4A6B0E15-2E38-11D1-9965-00C04FBBB345','0.0'))
63IID_IEventSubscription2 = uuidtup_to_bin(('4A6B0E16-2E38-11D1-9965-00C04FBBB345','0.0'))
64IID_IEventSubscription3 = uuidtup_to_bin(('FBC1D17D-C498-43a0-81AF-423DDD530AF6','0.0'))
65IID_IEventClass = uuidtup_to_bin(('fb2b72a0-7a68-11d1-88f9-0080c7d771bf','0.0'))
66IID_IEventClass2 = uuidtup_to_bin(('fb2b72a1-7a68-11d1-88f9-0080c7d771bf','0.0'))
67IID_IEventClass3 = uuidtup_to_bin(('7FB7EA43-2D76-4ea8-8CD9-3DECC270295E','0.0'))
69error_status_t = ULONG
71# 2.2.2.2 Property Value Types
72class VARENUM(NDRENUM):
73 class enumItems(Enum):
74 VT_EMPTY = 0
75 VT_NULL = 1
76 VT_I2 = 2
77 VT_I4 = 3
78 VT_R4 = 4
79 VT_R8 = 5
80 VT_CY = 6
81 VT_DATE = 7
82 VT_BSTR = 8
83 VT_DISPATCH = 9
84 VT_ERROR = 0xa
85 VT_BOOL = 0xb
86 VT_VARIANT = 0xc
87 VT_UNKNOWN = 0xd
88 VT_DECIMAL = 0xe
89 VT_I1 = 0x10
90 VT_UI1 = 0x11
91 VT_UI2 = 0x12
92 VT_UI4 = 0x13
93 VT_I8 = 0x14
94 VT_UI8 = 0x15
95 VT_INT = 0x16
96 VT_UINT = 0x17
97 VT_VOID = 0x18
98 VT_HRESULT = 0x19
99 VT_PTR = 0x1a
100 VT_SAFEARRAY = 0x1b
101 VT_CARRAY = 0x1c
102 VT_USERDEFINED = 0x1d
103 VT_LPSTR = 0x1e
104 VT_LPWSTR = 0x1f
105 VT_RECORD = 0x24
106 VT_INT_PTR = 0x25
107 VT_UINT_PTR = 0x26
108 VT_ARRAY = 0x2000
109 VT_BYREF = 0x4000
111################################################################################
112# STRUCTURES
113################################################################################
114# 2.2.44 TYPEATTR
115class TYPEATTR(NDRSTRUCT):
116 structure = (
117 )
119class OBJECT_ARRAY(NDRUniConformantVaryingArray):
120 item = PMInterfacePointer
122################################################################################
123# RPC CALLS
124################################################################################
125# 3.1.4.1 IEventSystem
126# 3.1.4.1.1 Query (Opnum 7)
127class IEventSystem_Query(DCOMCALL):
128 opnum = 7
129 structure = (
130 ('progID', BSTR),
131 ('queryCriteria', BSTR),
132 )
134class IEventSystem_QueryResponse(DCOMANSWER):
135 structure = (
136 ('errorIndex', INT),
137 ('ppInterface', PMInterfacePointer),
138 ('ErrorCode', error_status_t),
139 )
141# 3.1.4.1.2 Store (Opnum 8)
142class IEventSystem_Store(DCOMCALL):
143 opnum = 8
144 structure = (
145 ('progID', BSTR),
146 ('pInterface', PMInterfacePointer),
147 )
149class IEventSystem_StoreResponse(DCOMANSWER):
150 structure = (
151 ('ErrorCode', error_status_t),
152 )
154# 3.1.4.1.3 Remove (Opnum 9)
155class IEventSystem_Remove(DCOMCALL):
156 opnum = 9
157 structure = (
158 ('progID', BSTR),
159 ('queryCriteria', BSTR),
160 )
162class IEventSystem_RemoveResponse(DCOMANSWER):
163 structure = (
164 ('errorIndex', INT),
165 ('ErrorCode', error_status_t),
166 )
168# 3.1.4.1.4 get_EventObjectChangeEventClassID (Opnum 10)
169class IEventSystem_get_EventObjectChangeEventClassID(DCOMCALL):
170 opnum = 10
171 structure = (
172 )
174class IEventSystem_get_EventObjectChangeEventClassIDResponse(DCOMANSWER):
175 structure = (
176 ('pbstrEventClassID', BSTR),
177 ('ErrorCode', error_status_t),
178 )
180# 3.1.4.1.5 QueryS (Opnum 11)
181class IEventSystem_QueryS(DCOMCALL):
182 opnum = 11
183 structure = (
184 ('progID', BSTR),
185 ('queryCriteria', BSTR),
186 )
188class IEventSystem_QuerySResponse(DCOMANSWER):
189 structure = (
190 ('pInterface', PMInterfacePointer),
191 ('ErrorCode', error_status_t),
192 )
194# 3.1.4.1.6 RemoveS (Opnum 12)
195class IEventSystem_RemoveS(DCOMCALL):
196 opnum = 12
197 structure = (
198 ('progID', BSTR),
199 ('queryCriteria', BSTR),
200 )
202class IEventSystem_RemoveSResponse(DCOMANSWER):
203 structure = (
204 ('ErrorCode', error_status_t),
205 )
207################################################################################
208# 3.1.4.2 IEventClass
209# 3.1.4.2.1 get_EventClassID (Opnum 7)
210class IEventClass_get_EventClassID(DCOMCALL):
211 opnum = 7
212 structure = (
213 )
215class IEventClass_get_EventClassIDResponse(DCOMANSWER):
216 structure = (
217 ('pbstrEventClassID', BSTR),
218 ('ErrorCode', error_status_t),
219 )
221# 3.1.4.2.2 put_EventClassID (Opnum 8)
222class IEventClass_put_EventClassID(DCOMCALL):
223 opnum = 8
224 structure = (
225 ('bstrEventClassID', BSTR),
226 )
228class IEventClass_put_EventClassIDResponse(DCOMANSWER):
229 structure = (
230 ('ErrorCode', error_status_t),
231 )
233# 3.1.4.2.3 get_EventClassName (Opnum 9)
234class IEventClass_get_EventClassName(DCOMCALL):
235 opnum = 9
236 structure = (
237 )
239class IEventClass_get_EventClassNameResponse(DCOMANSWER):
240 structure = (
241 ('pbstrEventClassName', BSTR),
242 ('ErrorCode', error_status_t),
243 )
245# 3.1.4.2.4 put_EventClassName (Opnum 10)
246class IEventClass_put_EventClassName(DCOMCALL):
247 opnum = 10
248 structure = (
249 ('bstrEventClassName', BSTR),
250 )
252class IEventClass_put_EventClassNameResponse(DCOMANSWER):
253 structure = (
254 ('ErrorCode', error_status_t),
255 )
257# 3.1.4.2.5 get_OwnerSID (Opnum 11)
258class IEventClass_get_OwnerSID(DCOMCALL):
259 opnum = 11
260 structure = (
261 )
263class IEventClass_get_OwnerSIDResponse(DCOMANSWER):
264 structure = (
265 ('pbstrOwnerSID', BSTR),
266 ('ErrorCode', error_status_t),
267 )
269# 3.1.4.2.6 put_OwnerSID (Opnum 12)
270class IEventClass_put_OwnerSID(DCOMCALL):
271 opnum = 12
272 structure = (
273 ('bstrOwnerSID', BSTR),
274 )
276class IEventClass_put_OwnerSIDResponse(DCOMANSWER):
277 structure = (
278 ('ErrorCode', error_status_t),
279 )
281# 3.1.4.2.7 get_FiringInterfaceID (Opnum 13)
282class IEventClass_get_FiringInterfaceID(DCOMCALL):
283 opnum = 13
284 structure = (
285 )
287class IEventClass_get_FiringInterfaceIDResponse(DCOMANSWER):
288 structure = (
289 ('pbstrFiringInterfaceID', BSTR),
290 ('ErrorCode', error_status_t),
291 )
293# 3.1.4.2.8 put_FiringInterfaceID (Opnum 14)
294class IEventClass_put_FiringInterfaceID(DCOMCALL):
295 opnum = 14
296 structure = (
297 ('bstrFiringInterfaceID', BSTR),
298 )
300class IEventClass_put_FiringInterfaceIDResponse(DCOMANSWER):
301 structure = (
302 ('ErrorCode', error_status_t),
303 )
305# 3.1.4.2.9 get_Description (Opnum 15)
306class IEventClass_get_Description(DCOMCALL):
307 opnum = 15
308 structure = (
309 )
311class IEventClass_get_DescriptionResponse(DCOMANSWER):
312 structure = (
313 ('pbstrDescription', BSTR),
314 ('ErrorCode', error_status_t),
315 )
317# 3.1.4.2.10 put_Description (Opnum 16)
318class IEventClass_put_Description(DCOMCALL):
319 opnum = 16
320 structure = (
321 ('bstrDescription', BSTR),
322 )
324class IEventClass_put_DescriptionResponse(DCOMANSWER):
325 structure = (
326 ('ErrorCode', error_status_t),
327 )
329# 3.1.4.2.11 get_TypeLib (Opnum 19)
330class IEventClass_get_TypeLib(DCOMCALL):
331 opnum = 19
332 structure = (
333 )
335class IEventClass_get_TypeLibResponse(DCOMANSWER):
336 structure = (
337 ('pbstrTypeLib', BSTR),
338 ('ErrorCode', error_status_t),
339 )
341# 3.1.4.2.12 put_TypeLib (Opnum 20)
342class IEventClass_put_TypeLib(DCOMCALL):
343 opnum = 20
344 structure = (
345 ('bstrTypeLib', BSTR),
346 )
348class IEventClass_put_TypeLibResponse(DCOMANSWER):
349 structure = (
350 ('ErrorCode', error_status_t),
351 )
353################################################################################
354# 3.1.4.3 IEventClass2
355# 3.1.4.3.1 get_PublisherID (Opnum 21)
356class IEventClass2_get_PublisherID(DCOMCALL):
357 opnum = 21
358 structure = (
359 )
361class IEventClass2_get_PublisherIDResponse(DCOMANSWER):
362 structure = (
363 ('pbstrSubscriptionID', BSTR),
364 ('ErrorCode', error_status_t),
365 )
367# 3.1.4.3.2 put_PublisherID (Opnum 22)
368class IEventClass2_put_PublisherID(DCOMCALL):
369 opnum = 22
370 structure = (
371 ('bstrPublisherID', BSTR),
372 )
374class IEventClass2_put_PublisherIDResponse(DCOMANSWER):
375 structure = (
376 ('ErrorCode', error_status_t),
377 )
379# 3.1.4.3.3 get_MultiInterfacePublisherFilterCLSID (Opnum 23)
380class IEventClass2_get_MultiInterfacePublisherFilterCLSID(DCOMCALL):
381 opnum = 23
382 structure = (
383 )
385class IEventClass2_get_MultiInterfacePublisherFilterCLSIDResponse(DCOMANSWER):
386 structure = (
387 ('pbstrPubFilCLSID', BSTR),
388 ('ErrorCode', error_status_t),
389 )
391# 3.1.4.3.4 put_MultiInterfacePublisherFilterCLSID (Opnum 24)
392class IEventClass2_put_MultiInterfacePublisherFilterCLSID(DCOMCALL):
393 opnum = 24
394 structure = (
395 ('bstrPubFilCLSID', BSTR),
396 )
398class IEventClass2_put_MultiInterfacePublisherFilterCLSIDResponse(DCOMANSWER):
399 structure = (
400 ('ErrorCode', error_status_t),
401 )
403# 3.1.4.3.5 get_AllowInprocActivation (Opnum 25)
404class IEventClass2_get_AllowInprocActivation(DCOMCALL):
405 opnum = 25
406 structure = (
407 )
409class IEventClass2_get_AllowInprocActivationResponse(DCOMANSWER):
410 structure = (
411 ('pfAllowInprocActivation', BOOLEAN),
412 ('ErrorCode', error_status_t),
413 )
415# 3.1.4.3.6 put_AllowInprocActivation (Opnum 26)
416class IEventClass2_put_AllowInprocActivation(DCOMCALL):
417 opnum = 26
418 structure = (
419 ('fAllowInprocActivation', BOOLEAN),
420 )
422class IEventClass2_put_AllowInprocActivationResponse(DCOMANSWER):
423 structure = (
424 ('ErrorCode', error_status_t),
425 )
427# 3.1.4.3.7 get_FireInParallel (Opnum 27)
428class IEventClass2_get_FireInParallel(DCOMCALL):
429 opnum = 27
430 structure = (
431 )
433class IEventClass2_get_FireInParallelResponse(DCOMANSWER):
434 structure = (
435 ('pfFireInParallel', BOOLEAN),
436 ('ErrorCode', error_status_t),
437 )
439# 3.1.4.3.8 put_FireInParallel (Opnum 28)
440class IEventClass2_put_FireInParallel(DCOMCALL):
441 opnum = 28
442 structure = (
443 ('pfFireInParallel', BOOLEAN),
444 )
446class IEventClass2_put_FireInParallelResponse(DCOMANSWER):
447 structure = (
448 ('ErrorCode', error_status_t),
449 )
451################################################################################
452# 3.1.4.4 IEventSubscription
453# 3.1.4.4.1 get_SubscriptionID (Opnum 7)
454class IEventSubscription_get_SubscriptionID(DCOMCALL):
455 opnum = 7
456 structure = (
457 )
459class IEventSubscription_get_SubscriptionIDResponse(DCOMANSWER):
460 structure = (
461 ('pbstrSubscriptionID', BSTR),
462 ('ErrorCode', error_status_t),
463 )
465# 3.1.4.4.2 put_SubscriptionID (Opnum 8)
466class IEventSubscription_put_SubscriptionID(DCOMCALL):
467 opnum = 8
468 structure = (
469 ('bstrSubscriptionID', BSTR),
470 )
472class IEventSubscription_put_SubscriptionIDResponse(DCOMANSWER):
473 structure = (
474 ('ErrorCode', error_status_t),
475 )
477# 3.1.4.4.3 get_SubscriptionName (Opnum 9)
478class IEventSubscription_get_SubscriptionName(DCOMCALL):
479 opnum = 9
480 structure = (
481 )
483class IEventSubscription_get_SubscriptionNameResponse(DCOMANSWER):
484 structure = (
485 ('pbstrSubscriptionName', BSTR),
486 ('ErrorCode', error_status_t),
487 )
489# 3.1.4.4.4 put_SubscriptionName (Opnum 10)
490class IEventSubscription_put_SubscriptionName(DCOMCALL):
491 opnum = 10
492 structure = (
493 ('strSubscriptionID', BSTR),
494 )
496class IEventSubscription_put_SubscriptionNameResponse(DCOMANSWER):
497 structure = (
498 ('ErrorCode', error_status_t),
499 )
501# 3.1.4.4.5 get_PublisherID (Opnum 11)
502class IEventSubscription_get_PublisherID(DCOMCALL):
503 opnum = 11
504 structure = (
505 )
507class IEventSubscription_get_PublisherIDResponse(DCOMANSWER):
508 structure = (
509 ('pbstrPublisherID', BSTR),
510 ('ErrorCode', error_status_t),
511 )
513# 3.1.4.4.6 put_PublisherID (Opnum 12)
514class IEventSubscription_put_PublisherID(DCOMCALL):
515 opnum = 12
516 structure = (
517 ('bstrPublisherID', BSTR),
518 )
520class IEventSubscription_put_PublisherIDResponse(DCOMANSWER):
521 structure = (
522 ('ErrorCode', error_status_t),
523 )
525# 3.1.4.4.7 get_EventClassID (Opnum 13)
526class IEventSubscription_get_EventClassID(DCOMCALL):
527 opnum = 13
528 structure = (
529 )
531class IEventSubscription_get_EventClassIDResponse(DCOMANSWER):
532 structure = (
533 ('pbstrEventClassID', BSTR),
534 ('ErrorCode', error_status_t),
535 )
537# 3.1.4.4.8 put_EventClassID (Opnum 14)
538class IEventSubscription_put_EventClassID(DCOMCALL):
539 opnum = 14
540 structure = (
541 ('bstrEventClassID', BSTR),
542 )
544class IEventSubscription_put_EventClassIDResponse(DCOMANSWER):
545 structure = (
546 ('ErrorCode', error_status_t),
547 )
549# 3.1.4.4.9 get_MethodName (Opnum 15)
550class IEventSubscription_get_MethodName(DCOMCALL):
551 opnum = 15
552 structure = (
553 )
555class IEventSubscription_get_MethodNameResponse(DCOMANSWER):
556 structure = (
557 ('pbstrMethodName', BSTR),
558 ('ErrorCode', error_status_t),
559 )
561# 3.1.4.4.10 put_MethodName (Opnum 16)
562class IEventSubscription_put_MethodName(DCOMCALL):
563 opnum = 16
564 structure = (
565 ('bstrMethodName', BSTR),
566 )
568class IEventSubscription_put_MethodNameResponse(DCOMANSWER):
569 structure = (
570 ('ErrorCode', error_status_t),
571 )
573# 3.1.4.4.11 get_SubscriberCLSID (Opnum 17)
574class IEventSubscription_get_SubscriberCLSID(DCOMCALL):
575 opnum = 17
576 structure = (
577 )
579class IEventSubscription_get_SubscriberCLSIDResponse(DCOMANSWER):
580 structure = (
581 ('pbstrSubscriberCLSID', BSTR),
582 ('ErrorCode', error_status_t),
583 )
585# 3.1.4.4.12 put_SubscriberCLSID (Opnum 18)
586class IEventSubscription_put_SubscriberCLSID(DCOMCALL):
587 opnum = 18
588 structure = (
589 ('bstrSubscriberCLSID', BSTR),
590 )
592class IEventSubscription_put_SubscriberCLSIDResponse(DCOMANSWER):
593 structure = (
594 ('ErrorCode', error_status_t),
595 )
597# 3.1.4.4.13 get_SubscriberInterface (Opnum 19)
598class IEventSubscription_get_SubscriberInterface(DCOMCALL):
599 opnum = 19
600 structure = (
601 )
603class IEventSubscription_get_SubscriberInterfaceResponse(DCOMANSWER):
604 structure = (
605 ('ppSubscriberInterface', PMInterfacePointer),
606 ('ErrorCode', error_status_t),
607 )
609# 3.1.4.4.14 put_SubscriberInterface (Opnum 20)
610class IEventSubscription_put_SubscriberInterface(DCOMCALL):
611 opnum = 20
612 structure = (
613 ('pSubscriberInterface', PMInterfacePointer),
614 )
616class IEventSubscription_put_SubscriberInterfaceResponse(DCOMANSWER):
617 structure = (
618 ('ErrorCode', error_status_t),
619 )
621# 3.1.4.4.15 get_PerUser (Opnum 21)
622class IEventSubscription_get_PerUser(DCOMCALL):
623 opnum = 21
624 structure = (
625 )
627class IEventSubscription_get_PerUserResponse(DCOMANSWER):
628 structure = (
629 ('pfPerUser', BOOLEAN),
630 ('ErrorCode', error_status_t),
631 )
633# 3.1.4.4.16 put_PerUser (Opnum 22)
634class IEventSubscription_put_PerUser(DCOMCALL):
635 opnum = 22
636 structure = (
637 ('fPerUser', BOOLEAN),
638 )
640class IEventSubscription_put_PerUserResponse(DCOMANSWER):
641 structure = (
642 ('ErrorCode', error_status_t),
643 )
645# 3.1.4.4.17 get_OwnerSID (Opnum 23)
646class IEventSubscription_get_OwnerSID(DCOMCALL):
647 opnum = 23
648 structure = (
649 )
651class IEventSubscription_get_OwnerSIDResponse(DCOMANSWER):
652 structure = (
653 ('pbstrOwnerSID', BSTR),
654 ('ErrorCode', error_status_t),
655 )
657# 3.1.4.4.18 put_OwnerSID (Opnum 24)
658class IEventSubscription_put_OwnerSID(DCOMCALL):
659 opnum = 24
660 structure = (
661 ('bstrOwnerSID', BSTR),
662 )
664class IEventSubscription_put_OwnerSIDResponse(DCOMANSWER):
665 structure = (
666 ('ErrorCode', error_status_t),
667 )
669# 3.1.4.4.19 get_Enabled (Opnum 25)
670class IEventSubscription_get_Enabled(DCOMCALL):
671 opnum = 25
672 structure = (
673 )
675class IEventSubscription_get_EnabledResponse(DCOMANSWER):
676 structure = (
677 ('pfEnabled', BOOLEAN),
678 ('ErrorCode', error_status_t),
679 )
681# 3.1.4.4.20 put_Enabled (Opnum 26)
682class IEventSubscription_put_Enabled(DCOMCALL):
683 opnum = 26
684 structure = (
685 ('fEnabled', BOOLEAN),
686 )
688class IEventSubscription_put_EnabledResponse(DCOMANSWER):
689 structure = (
690 ('ErrorCode', error_status_t),
691 )
693# 3.1.4.4.21 get_Description (Opnum 27)
694class IEventSubscription_get_Description(DCOMCALL):
695 opnum = 27
696 structure = (
697 )
699class IEventSubscription_get_DescriptionResponse(DCOMANSWER):
700 structure = (
701 ('pbstrDescription', BSTR),
702 ('ErrorCode', error_status_t),
703 )
705# 3.1.4.4.22 put_Description (Opnum 28)
706class IEventSubscription_put_Description(DCOMCALL):
707 opnum = 28
708 structure = (
709 ('bstrDescription', BSTR),
710 )
712class IEventSubscription_put_DescriptionResponse(DCOMANSWER):
713 structure = (
714 ('ErrorCode', error_status_t),
715 )
717# 3.1.4.4.23 get_MachineName (Opnum 29)
718class IEventSubscription_get_MachineName(DCOMCALL):
719 opnum = 29
720 structure = (
721 )
723class IEventSubscription_get_MachineNameResponse(DCOMANSWER):
724 structure = (
725 ('pbstrMachineName', BSTR),
726 ('ErrorCode', error_status_t),
727 )
729# 3.1.4.4.24 put_MachineName (Opnum 30)
730class IEventSubscription_put_MachineName(DCOMCALL):
731 opnum = 30
732 structure = (
733 ('bstrMachineName', BSTR),
734 )
736class IEventSubscription_put_MachineNameResponse(DCOMANSWER):
737 structure = (
738 ('ErrorCode', error_status_t),
739 )
741# 3.1.4.4.25 GetPublisherProperty (Opnum 31)
742class IEventSubscription_GetPublisherProperty(DCOMCALL):
743 opnum = 31
744 structure = (
745 ('bstrPropertyName', BSTR),
746 )
748class IEventSubscription_GetPublisherPropertyResponse(DCOMANSWER):
749 structure = (
750 ('propertyValue', VARIANT),
751 ('ErrorCode', error_status_t),
752 )
754# 3.1.4.4.26 PutPublisherProperty (Opnum 32)
755class IEventSubscription_PutPublisherProperty(DCOMCALL):
756 opnum = 32
757 structure = (
758 ('bstrPropertyName', BSTR),
759 ('propertyValue', VARIANT),
760 )
762class IEventSubscription_PutPublisherPropertyResponse(DCOMANSWER):
763 structure = (
764 ('ErrorCode', error_status_t),
765 )
767# 3.1.4.4.27 RemovePublisherProperty (Opnum 33)
768class IEventSubscription_RemovePublisherProperty(DCOMCALL):
769 opnum = 33
770 structure = (
771 ('bstrPropertyName', BSTR),
772 )
774class IEventSubscription_RemovePublisherPropertyResponse(DCOMANSWER):
775 structure = (
776 ('ErrorCode', error_status_t),
777 )
779# 3.1.4.4.28 GetPublisherPropertyCollection (Opnum 34)
780class IEventSubscription_GetPublisherPropertyCollection(DCOMCALL):
781 opnum = 34
782 structure = (
783 )
785class IEventSubscription_GetPublisherPropertyCollectionResponse(DCOMANSWER):
786 structure = (
787 ('collection', PMInterfacePointer),
788 ('ErrorCode', error_status_t),
789 )
791# 3.1.4.4.29 GetSubscriberProperty (Opnum 35)
792class IEventSubscription_GetSubscriberProperty(DCOMCALL):
793 opnum = 35
794 structure = (
795 ('bstrPropertyName', BSTR),
796 )
798class IEventSubscription_GetSubscriberPropertyResponse(DCOMANSWER):
799 structure = (
800 ('propertyValue', VARIANT),
801 ('ErrorCode', error_status_t),
802 )
804# 3.1.4.4.30 PutSubscriberProperty (Opnum 36)
805class IEventSubscription_PutSubscriberProperty(DCOMCALL):
806 opnum = 36
807 structure = (
808 ('bstrPropertyName', BSTR),
809 ('propertyValue', VARIANT),
810 )
812class IEventSubscription_PutSubscriberPropertyResponse(DCOMANSWER):
813 structure = (
814 ('ErrorCode', error_status_t),
815 )
817# 3.1.4.4.31 RemoveSubscriberProperty (Opnum 37)
818class IEventSubscription_RemoveSubscriberProperty(DCOMCALL):
819 opnum = 37
820 structure = (
821 ('bstrPropertyName', BSTR),
822 )
824class IEventSubscription_RemoveSubscriberPropertyResponse(DCOMANSWER):
825 structure = (
826 ('ErrorCode', error_status_t),
827 )
829# 3.1.4.4.32 GetSubscriberPropertyCollection (Opnum 38)
830class IEventSubscription_GetSubscriberPropertyCollection(DCOMCALL):
831 opnum = 38
832 structure = (
833 )
835class IEventSubscription_GetSubscriberPropertyCollectionResponse(DCOMANSWER):
836 structure = (
837 ('collection', PMInterfacePointer),
838 ('ErrorCode', error_status_t),
839 )
841# 3.1.4.4.33 get_InterfaceID (Opnum 39)
842class IEventSubscription_get_InterfaceID(DCOMCALL):
843 opnum = 39
844 structure = (
845 )
847class IEventSubscription_get_InterfaceIDResponse(DCOMANSWER):
848 structure = (
849 ('pbstrInterfaceID', BSTR),
850 ('ErrorCode', error_status_t),
851 )
853# 3.1.4.4.34 put_InterfaceID (Opnum 40)
854class IEventSubscription_put_InterfaceID(DCOMCALL):
855 opnum = 40
856 structure = (
857 ('bstrInterfaceID', BSTR),
858 )
860class IEventSubscription_put_InterfaceIDResponse(DCOMANSWER):
861 structure = (
862 ('ErrorCode', error_status_t),
863 )
865################################################################################
866# 3.1.4.5 IEnumEventObject
867# 3.1.4.5.1 Clone (Opnum 3)
868class IEnumEventObject_Clone(DCOMCALL):
869 opnum = 3
870 structure = (
871 )
873class IEnumEventObject_CloneResponse(DCOMANSWER):
874 structure = (
875 ('ppInterface', PMInterfacePointer),
876 ('ErrorCode', error_status_t),
877 )
879# 3.1.4.5.2 Next (Opnum 4)
880class IEnumEventObject_Next(DCOMCALL):
881 opnum = 4
882 structure = (
883 ('cReqElem', ULONG),
884 )
886class IEnumEventObject_NextResponse(DCOMANSWER):
887 structure = (
888 ('ppInterface', OBJECT_ARRAY),
889 ('cRetElem', ULONG),
890 ('ErrorCode', error_status_t),
891 )
893# 3.1.4.5.3 Reset (Opnum 5)
894class IEnumEventObject_Reset(DCOMCALL):
895 opnum = 5
896 structure = (
897 )
899class IEnumEventObject_ResetResponse(DCOMANSWER):
900 structure = (
901 ('ErrorCode', error_status_t),
902 )
904# 3.1.4.5.4 Skip (Opnum 6)
905class IEnumEventObject_Skip(DCOMCALL):
906 opnum = 6
907 structure = (
908 ('cSkipElem', ULONG),
909 )
911class IEnumEventObject_SkipResponse(DCOMANSWER):
912 structure = (
913 ('ErrorCode', error_status_t),
914 )
916################################################################################
917# 3.1.4.6 IEventObjectCollection
918# 3.1.4.6.1 get__NewEnum (Opnum 7)
919class IEventObjectCollection_get__NewEnum(DCOMCALL):
920 opnum = 7
921 structure = (
922 )
924class IEventObjectCollection_get__NewEnumResponse(DCOMANSWER):
925 structure = (
926 ('ppUnkEnum', PMInterfacePointer),
927 ('ErrorCode', error_status_t),
928 )
930# 3.1.4.6.2 get_Item (Opnum 8)
931class IEventObjectCollection_get_Item(DCOMCALL):
932 opnum = 8
933 structure = (
934 ('objectID', BSTR),
935 )
937class IEventObjectCollection_get_ItemResponse(DCOMANSWER):
938 structure = (
939 ('pItem', VARIANT),
940 ('ErrorCode', error_status_t),
941 )
943# 3.1.4.6.3 get_NewEnum (Opnum 9)
944class IEventObjectCollection_get_NewEnum(DCOMCALL):
945 opnum = 9
946 structure = (
947 )
949class IEventObjectCollection_get_NewEnumResponse(DCOMANSWER):
950 structure = (
951 ('ppEnum', PMInterfacePointer),
952 ('ErrorCode', error_status_t),
953 )
955# 3.1.4.6.4 get_Count (Opnum 10)
956class IEventObjectCollection_get_Count(DCOMCALL):
957 opnum = 10
958 structure = (
959 )
961class IEventObjectCollection_get_CountResponse(DCOMANSWER):
962 structure = (
963 ('pCount', LONG),
964 ('ErrorCode', error_status_t),
965 )
967# 3.1.4.6.5 Add (Opnum 11)
968class IEventObjectCollection_Add(DCOMCALL):
969 opnum = 11
970 structure = (
971 ('item', VARIANT),
972 ('objectID', BSTR),
973 )
975class IEventObjectCollection_AddResponse(DCOMANSWER):
976 structure = (
977 ('ErrorCode', error_status_t),
978 )
980# 3.1.4.6.6 Remove (Opnum 12)
981class IEventObjectCollection_Remove(DCOMCALL):
982 opnum = 12
983 structure = (
984 ('objectID', BSTR),
985 )
987class IEventObjectCollection_RemoveResponse(DCOMANSWER):
988 structure = (
989 ('ErrorCode', error_status_t),
990 )
992################################################################################
993# 3.1.4.7 IEventClass3
994# 3.1.4.7.1 get_EventClassPartitionID (Opnum 29)
995class IEventClass3_get_EventClassPartitionID(DCOMCALL):
996 opnum = 29
997 structure = (
998 )
1000class IEventClass3_get_EventClassPartitionIDResponse(DCOMANSWER):
1001 structure = (
1002 ('pbstrEventClassPartitionID', BSTR),
1003 ('ErrorCode', error_status_t),
1004 )
1006# 3.1.4.7.2 put_EventClassPartitionID (Opnum 30)
1007class IEventClass3_put_EventClassPartitionID(DCOMCALL):
1008 opnum = 30
1009 structure = (
1010 ('bstrEventClassPartitionID', BSTR),
1011 )
1013class IEventClass3_put_EventClassPartitionIDResponse(DCOMANSWER):
1014 structure = (
1015 ('ErrorCode', error_status_t),
1016 )
1018# 3.1.4.7.3 get_EventClassApplicationID (Opnum 31)
1019class IEventClass3_get_EventClassApplicationID(DCOMCALL):
1020 opnum = 31
1021 structure = (
1022 )
1024class IEventClass3_get_EventClassApplicationIDResponse(DCOMANSWER):
1025 structure = (
1026 ('pbstrEventClassApplicationID', BSTR),
1027 ('ErrorCode', error_status_t),
1028 )
1030# 3.1.4.7.4 put_EventClassApplicationID (Opnum 32)
1031class IEventClass3_put_EventClassApplicationID(DCOMCALL):
1032 opnum = 32
1033 structure = (
1034 ('bstrEventClassApplicationID', BSTR),
1035 )
1037class IEventClass3_put_EventClassApplicationIDResponse(DCOMANSWER):
1038 structure = (
1039 ('ErrorCode', error_status_t),
1040 )
1042################################################################################
1043# 3.1.4.8 IEventSubscription2
1044# 3.1.4.8.1 get_FilterCriteria (Opnum 41)
1045class IEventSubscription2_get_FilterCriteria(DCOMCALL):
1046 opnum = 41
1047 structure = (
1048 )
1050class IEventSubscription2_get_FilterCriteriaResponse(DCOMANSWER):
1051 structure = (
1052 ('pbstrFilterCriteria', BSTR),
1053 ('ErrorCode', error_status_t),
1054 )
1056# 3.1.4.8.2 put_FilterCriteria (Opnum 42)
1057class IEventSubscription2_put_FilterCriteria(DCOMCALL):
1058 opnum = 42
1059 structure = (
1060 ('bstrFilterCriteria', BSTR),
1061 )
1063class IEventSubscription2_put_FilterCriteriaResponse(DCOMANSWER):
1064 structure = (
1065 ('ErrorCode', error_status_t),
1066 )
1068# 3.1.4.8.3 get_SubscriberMoniker (Opnum 43)
1069class IEventSubscription2_get_SubscriberMoniker(DCOMCALL):
1070 opnum = 43
1071 structure = (
1072 )
1074class IEventSubscription2_get_SubscriberMonikerResponse(DCOMANSWER):
1075 structure = (
1076 ('pbstrMoniker', BSTR),
1077 ('ErrorCode', error_status_t),
1078 )
1080# 3.1.4.8.4 put_SubscriberMoniker (Opnum 44)
1081class IEventSubscription2_put_SubscriberMoniker(DCOMCALL):
1082 opnum = 44
1083 structure = (
1084 ('bstrMoniker', BSTR),
1085 )
1087class IEventSubscription2_put_SubscriberMonikerResponse(DCOMANSWER):
1088 structure = (
1089 ('ErrorCode', error_status_t),
1090 )
1092################################################################################
1093# 3.1.4.9 IEventSubscription3
1094# 3.1.4.9.1 get_EventClassPartitionID (Opnum 45)
1095class IEventSubscription3_get_EventClassPartitionID(DCOMCALL):
1096 opnum = 45
1097 structure = (
1098 )
1100class IEventSubscription3_get_EventClassPartitionIDResponse(DCOMANSWER):
1101 structure = (
1102 ('pbstrEventClassPartitionID', BSTR),
1103 ('ErrorCode', error_status_t),
1104 )
1106# 3.1.4.9.2 put_EventClassPartitionID (Opnum 46)
1107class IEventSubscription3_put_EventClassPartitionID(DCOMCALL):
1108 opnum = 46
1109 structure = (
1110 ('bstrEventClassPartitionID', BSTR),
1111 )
1113class IEventSubscription3_put_EventClassPartitionIDResponse(DCOMANSWER):
1114 structure = (
1115 ('ErrorCode', error_status_t),
1116 )
1118# 3.1.4.9.3 get_EventClassApplicationID (Opnum 47)
1119class IEventSubscription3_get_EventClassApplicationID(DCOMCALL):
1120 opnum = 47
1121 structure = (
1122 )
1124class IEventSubscription3_get_EventClassApplicationIDResponse(DCOMANSWER):
1125 structure = (
1126 ('pbstrEventClassApplicationID', BSTR),
1127 ('ErrorCode', error_status_t),
1128 )
1130# 3.1.4.9.4 put_EventClassApplicationID (Opnum 48)
1131class IEventSubscription3_put_EventClassApplicationID(DCOMCALL):
1132 opnum = 48
1133 structure = (
1134 ('bstrEventClassPartitionID', BSTR),
1135 )
1137class IEventSubscription3_put_EventClassApplicationIDResponse(DCOMANSWER):
1138 structure = (
1139 ('ErrorCode', error_status_t),
1140 )
1142# 3.1.4.9.5 get_SubscriberPartitionID (Opnum 49)
1143class IEventSubscription3_get_SubscriberPartitionID(DCOMCALL):
1144 opnum = 49
1145 structure = (
1146 )
1148class IEventSubscription3_get_SubscriberPartitionIDResponse(DCOMANSWER):
1149 structure = (
1150 ('pbstrSubscriberPartitionID', BSTR),
1151 ('ErrorCode', error_status_t),
1152 )
1154# 3.1.4.9.6 put_SubscriberPartitionID (Opnum 50)
1155class IEventSubscription3_put_SubscriberPartitionID(DCOMCALL):
1156 opnum = 50
1157 structure = (
1158 ('bstrSubscriberPartitionID', BSTR),
1159 )
1161class IEventSubscription3_put_SubscriberPartitionIDResponse(DCOMANSWER):
1162 structure = (
1163 ('ErrorCode', error_status_t),
1164 )
1166# 3.1.4.9.7 get_SubscriberApplicationID (Opnum 51)
1167class IEventSubscription3_get_SubscriberApplicationID(DCOMCALL):
1168 opnum = 51
1169 structure = (
1170 )
1172class IEventSubscription3_get_SubscriberApplicationIDResponse(DCOMANSWER):
1173 structure = (
1174 ('pbstrSubscriberApplicationID', BSTR),
1175 ('ErrorCode', error_status_t),
1176 )
1178# 3.1.4.9.8 put_SubscriberApplicationID (Opnum 52)
1179class IEventSubscription3_put_SubscriberApplicationID(DCOMCALL):
1180 opnum = 52
1181 structure = (
1182 ('bstrSubscriberApplicationID', BSTR),
1183 )
1185class IEventSubscription3_put_SubscriberApplicationIDResponse(DCOMANSWER):
1186 structure = (
1187 ('ErrorCode', error_status_t),
1188 )
1190################################################################################
1191# 3.1.4.10 IEventSystem2
1192# 3.1.4.10.1 GetVersion (Opnum 13)
1193class IEventSystem2_GetVersion(DCOMCALL):
1194 opnum = 13
1195 structure = (
1196 )
1198class IEventSystem2_GetVersionResponse(DCOMANSWER):
1199 structure = (
1200 ('pnVersion', INT),
1201 ('ErrorCode', error_status_t),
1202 )
1204# 3.1.4.10.2 VerifyTransientSubscribers (Opnum 14)
1205class IEventSystem2_VerifyTransientSubscribers(DCOMCALL):
1206 opnum = 14
1207 structure = (
1208 )
1210class IEventSystem2_VerifyTransientSubscribersResponse(DCOMANSWER):
1211 structure = (
1212 ('ErrorCode', error_status_t),
1213 )
1215################################################################################
1216# 3.1.4.11 IEventSystemInitialize
1217# 3.1.4.11.1 SetCOMCatalogBehaviour (Opnum 3)
1218class IEventSystemInitialize_SetCOMCatalogBehaviour(DCOMCALL):
1219 opnum = 3
1220 structure = (
1221 ('bRetainSubKeys', BOOLEAN),
1222 )
1224class IEventSystemInitialize_SetCOMCatalogBehaviourResponse(DCOMANSWER):
1225 structure = (
1226 ('ErrorCode', error_status_t),
1227 )
1230################################################################################
1231# OPNUMs and their corresponding structures
1232################################################################################
1233OPNUMS = {
1234}
1236################################################################################
1237# HELPER FUNCTIONS AND INTERFACES
1238################################################################################
1239class IEventClass(IDispatch):
1240 def __init__(self, interface):
1241 IDispatch.__init__(self,interface)
1242 self._iid = IID_IEventClass
1244 def get_EventClassID(self):
1245 request = IEventClass_get_EventClassID()
1246 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1247 resp.dump()
1248 return resp
1250 def put_EventClassID(self,bstrEventClassID):
1251 request = IEventClass_put_EventClassID()
1252 request['bstrEventClassID'] = bstrEventClassID
1253 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1254 resp.dump()
1255 return resp
1257 def get_EventClassName(self):
1258 request = IEventClass_get_EventClassName()
1259 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1260 resp.dump()
1261 return resp
1263 def put_EventClassName(self, bstrEventClassName):
1264 request = IEventClass_put_EventClassName()
1265 request['bstrEventClassName'] = bstrEventClassName
1266 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1267 resp.dump()
1268 return resp
1270 def get_OwnerSID(self):
1271 request = IEventClass_get_OwnerSID()
1272 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1273 resp.dump()
1274 return resp
1276 def put_OwnerSID(self, bstrOwnerSID):
1277 request = IEventClass_put_OwnerSID()
1278 request['bstrOwnerSID'] = bstrOwnerSID
1279 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1280 resp.dump()
1281 return resp
1283 def get_FiringInterfaceID(self):
1284 request = IEventClass_get_FiringInterfaceID()
1285 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1286 resp.dump()
1287 return resp
1289 def put_FiringInterfaceID(self, bstrFiringInterfaceID):
1290 request = IEventClass_put_FiringInterfaceID()
1291 request['bstrFiringInterfaceID'] = bstrFiringInterfaceID
1292 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1293 resp.dump()
1294 return resp
1296 def get_Description(self):
1297 request = IEventClass_get_Description()
1298 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1299 resp.dump()
1300 return resp
1302 def put_Description(self, bstrDescription):
1303 request = IEventClass_put_Description()
1304 request['bstrDescription'] = bstrDescription
1305 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1306 resp.dump()
1307 return resp
1309 def get_TypeLib(self):
1310 request = IEventClass_get_TypeLib()
1311 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1312 resp.dump()
1313 return resp
1315 def put_TypeLib(self, bstrTypeLib):
1316 request = IEventClass_put_TypeLib()
1317 request['bstrTypeLib'] = bstrTypeLib
1318 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1319 resp.dump()
1320 return resp
1322class IEventClass2(IEventClass):
1323 def __init__(self, interface):
1324 IEventClass.__init__(self,interface)
1325 self._iid = IID_IEventClass2
1327 def get_PublisherID(self):
1328 request = IEventClass2_get_PublisherID()
1329 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1330 resp.dump()
1331 return resp
1333 def put_PublisherID(self, bstrPublisherID):
1334 request = IEventClass2_put_PublisherID()
1335 request['bstrPublisherID'] = bstrPublisherID
1336 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1337 resp.dump()
1338 return resp
1340 def get_MultiInterfacePublisherFilterCLSID(self):
1341 request = IEventClass2_get_MultiInterfacePublisherFilterCLSID()
1342 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1343 resp.dump()
1344 return resp
1346 def put_MultiInterfacePublisherFilterCLSID(self, bstrPubFilCLSID):
1347 request = IEventClass2_put_MultiInterfacePublisherFilterCLSID()
1348 request['bstrPubFilCLSID'] = bstrPubFilCLSID
1349 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1350 resp.dump()
1351 return resp
1353 def get_AllowInprocActivation(self):
1354 request = IEventClass2_get_AllowInprocActivation()
1355 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1356 resp.dump()
1357 return resp
1359 def put_AllowInprocActivation(self, fAllowInprocActivation):
1360 request = IEventClass2_put_AllowInprocActivation()
1361 request['fAllowInprocActivation '] = fAllowInprocActivation
1362 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1363 resp.dump()
1364 return resp
1366 def get_FireInParallel(self):
1367 request = IEventClass2_get_FireInParallel()
1368 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1369 resp.dump()
1370 return resp
1372 def put_FireInParallel(self, fFireInParallel):
1373 request = IEventClass2_put_FireInParallel()
1374 request['fFireInParallel '] = fFireInParallel
1375 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1376 resp.dump()
1377 return resp
1379class IEventClass3(IEventClass2):
1380 def __init__(self, interface):
1381 IEventClass2.__init__(self,interface)
1382 self._iid = IID_IEventClass3
1384 def get_EventClassPartitionID(self):
1385 request = IEventClass3_get_EventClassPartitionID()
1386 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1387 resp.dump()
1388 return resp
1390 def put_EventClassPartitionID(self, bstrEventClassPartitionID):
1391 request = IEventClass3_put_EventClassPartitionID()
1392 request['bstrEventClassPartitionID '] = bstrEventClassPartitionID
1393 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1394 resp.dump()
1395 return resp
1397 def get_EventClassApplicationID(self):
1398 request = IEventClass3_get_EventClassApplicationID()
1399 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1400 resp.dump()
1401 return resp
1403 def put_EventClassApplicationID(self, bstrEventClassApplicationID):
1404 request = IEventClass3_put_EventClassApplicationID()
1405 request['bstrEventClassApplicationID '] = bstrEventClassApplicationID
1406 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1407 resp.dump()
1408 return resp
1410class IEventSubscription(IDispatch):
1411 def __init__(self, interface):
1412 IDispatch.__init__(self,interface)
1413 self._iid = IID_IEventSubscription
1415 def get_SubscriptionID(self):
1416 request = IEventSubscription_get_SubscriptionID()
1417 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1418 resp.dump()
1419 return resp
1421 def put_SubscriptionID(self, bstrSubscriptionID):
1422 request = IEventSubscription_put_SubscriptionID()
1423 request['bstrSubscriptionID'] = bstrSubscriptionID
1424 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1425 resp.dump()
1426 return resp
1428 def get_SubscriptionName(self):
1429 request = IEventSubscription_get_SubscriptionName()
1430 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1431 return resp
1433 def put_SubscriptionName(self, bstrSubscriptionName):
1434 request = IEventSubscription_put_SubscriptionName()
1435 request['bstrSubscriptionName'] = bstrSubscriptionName
1436 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1437 resp.dump()
1438 return resp
1440 def get_PublisherID(self):
1441 request = IEventSubscription_get_PublisherID()
1442 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1443 resp.dump()
1444 return resp
1446 def put_PublisherID(self, bstrPublisherID):
1447 request = IEventSubscription_put_PublisherID()
1448 request['bstrPublisherID'] = bstrPublisherID
1449 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1450 resp.dump()
1451 return resp
1453 def get_EventClassID(self):
1454 request = IEventSubscription_get_EventClassID()
1455 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1456 resp.dump()
1457 return resp
1459 def put_EventClassID(self, pbstrEventClassID):
1460 request = IEventSubscription_put_EventClassID()
1461 request['pbstrEventClassID'] = pbstrEventClassID
1462 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1463 resp.dump()
1464 return resp
1466 def get_MethodName(self):
1467 request = IEventSubscription_get_MethodName()
1468 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1469 resp.dump()
1470 return resp
1472 def put_MethodName(self, bstrMethodName):
1473 request = IEventSubscription_put_MethodName()
1474 request['bstrMethodName'] = bstrMethodName
1475 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1476 resp.dump()
1477 return resp
1479 def get_SubscriberCLSID(self):
1480 request = IEventSubscription_get_SubscriberCLSID()
1481 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1482 resp.dump()
1483 return resp
1485 def put_SubscriberCLSID(self, bstrSubscriberCLSID):
1486 request = IEventSubscription_put_SubscriberCLSID()
1487 request['bstrSubscriberCLSID'] = bstrSubscriberCLSID
1488 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1489 resp.dump()
1490 return resp
1492 def get_SubscriberInterface(self):
1493 request = IEventSubscription_get_SubscriberInterface()
1494 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1495 resp.dump()
1496 return resp
1498 def put_SubscriberInterface(self, pSubscriberInterface):
1499 request = IEventSubscription_put_SubscriberInterface()
1500 request['pSubscriberInterface'] = pSubscriberInterface
1501 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1502 resp.dump()
1503 return resp
1505 def get_PerUser(self):
1506 request = IEventSubscription_get_PerUser()
1507 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1508 resp.dump()
1509 return resp
1511 def put_PerUser(self, fPerUser):
1512 request = IEventSubscription_put_PerUser()
1513 request['fPerUser'] = fPerUser
1514 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1515 resp.dump()
1516 return resp
1518 def get_OwnerSID(self):
1519 request = IEventSubscription_get_OwnerSID()
1520 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1521 resp.dump()
1522 return resp
1524 def put_OwnerSID(self, bstrOwnerSID):
1525 request = IEventSubscription_put_OwnerSID()
1526 request['bstrOwnerSID'] = bstrOwnerSID
1527 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1528 resp.dump()
1529 return resp
1531 def get_Enabled(self):
1532 request = IEventSubscription_get_Enabled()
1533 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1534 resp.dump()
1535 return resp
1537 def put_Enabled(self, fEnabled):
1538 request = IEventSubscription_put_Enabled()
1539 request['fEnabled'] = fEnabled
1540 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1541 resp.dump()
1542 return resp
1544 def get_Description(self):
1545 request = IEventSubscription_get_Description()
1546 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1547 resp.dump()
1548 return resp
1550 def put_Description(self, bstrDescription):
1551 request = IEventSubscription_put_Description()
1552 request['bstrDescription'] = bstrDescription
1553 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1554 resp.dump()
1555 return resp
1557 def get_MachineName(self):
1558 request = IEventSubscription_get_MachineName()
1559 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1560 resp.dump()
1561 return resp
1563 def put_MachineName(self, bstrMachineName):
1564 request = IEventSubscription_put_MachineName()
1565 request['bstrMachineName'] = bstrMachineName
1566 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1567 resp.dump()
1568 return resp
1570 def GetPublisherProperty(self):
1571 request = IEventSubscription_GetPublisherProperty()
1572 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1573 resp.dump()
1574 return resp
1576 def PutPublisherProperty(self, bstrPropertyName, propertyValue):
1577 request = IEventSubscription_PutPublisherProperty()
1578 request['bstrPropertyName'] = bstrPropertyName
1579 request['propertyValue'] = propertyValue
1580 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1581 resp.dump()
1582 return resp
1584 def RemovePublisherProperty(self, bstrPropertyName):
1585 request = IEventSubscription_RemovePublisherProperty()
1586 request['bstrPropertyName'] = bstrPropertyName
1587 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1588 resp.dump()
1589 return resp
1591 def GetPublisherPropertyCollection(self):
1592 request = IEventSubscription_GetPublisherPropertyCollection()
1593 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1594 resp.dump()
1595 return resp
1597 def GetSubscriberProperty(self):
1598 request = IEventSubscription_GetSubscriberProperty()
1599 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1600 resp.dump()
1601 return resp
1603 def PutSubscriberProperty(self, bstrPropertyName, propertyValue):
1604 request = IEventSubscription_PutSubscriberProperty()
1605 request['bstrPropertyName'] = bstrPropertyName
1606 request['propertyValue'] = propertyValue
1607 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1608 resp.dump()
1609 return resp
1611 def RemoveSubscriberProperty(self, bstrPropertyName):
1612 request = IEventSubscription_RemoveSubscriberProperty()
1613 request['bstrPropertyName'] = bstrPropertyName
1614 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1615 resp.dump()
1616 return resp
1618 def GetSubscriberPropertyCollection(self):
1619 request = IEventSubscription_GetSubscriberPropertyCollection()
1620 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1621 resp.dump()
1622 return resp
1624 def get_InterfaceID(self):
1625 request = IEventSubscription_get_InterfaceID()
1626 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1627 resp.dump()
1628 return resp
1630 def put_InterfaceID(self, bstrInterfaceID):
1631 request = IEventSubscription_put_InterfaceID()
1632 request['bstrInterfaceID'] = bstrInterfaceID
1633 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1634 resp.dump()
1635 return resp
1637class IEventSubscription2(IEventSubscription):
1638 def __init__(self, interface):
1639 IEventSubscription.__init__(self,interface)
1640 self._iid = IID_IEventSubscription2
1642 def get_FilterCriteria(self):
1643 request = IEventSubscription2_get_FilterCriteria()
1644 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1645 resp.dump()
1646 return resp
1648 def put_FilterCriteria(self, bstrFilterCriteria):
1649 request = IEventSubscription2_put_FilterCriteria()
1650 request['bstrFilterCriteria'] = bstrFilterCriteria
1651 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1652 resp.dump()
1653 return resp
1655 def get_SubscriberMoniker (self):
1656 request = IEventSubscription2_get_SubscriberMoniker ()
1657 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1658 resp.dump()
1659 return resp
1661 def put_SubscriberMoniker(self, bstrMoniker):
1662 request = IEventSubscription2_put_SubscriberMoniker()
1663 request['bstrMoniker'] = bstrMoniker
1664 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1665 resp.dump()
1666 return resp
1668class IEventSubscription3(IEventSubscription2):
1669 def __init__(self, interface):
1670 IEventSubscription2.__init__(self,interface)
1671 self._iid = IID_IEventSubscription3
1673 def get_EventClassPartitionID(self):
1674 request = IEventSubscription3_get_EventClassPartitionID()
1675 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1676 resp.dump()
1677 return resp
1679 def put_EventClassPartitionID(self, bstrEventClassPartitionID):
1680 request = IEventSubscription3_put_EventClassPartitionID()
1681 request['bstrEventClassPartitionID'] = bstrEventClassPartitionID
1682 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1683 resp.dump()
1684 return resp
1686 def get_EventClassApplicationID(self):
1687 request = IEventSubscription3_get_EventClassApplicationID()
1688 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1689 resp.dump()
1690 return resp
1692 def put_EventClassApplicationID(self, bstrEventClassApplicationID):
1693 request = IEventSubscription3_put_EventClassApplicationID()
1694 request['bstrEventClassApplicationID'] = bstrEventClassApplicationID
1695 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1696 resp.dump()
1697 return resp
1699 def get_SubscriberPartitionID(self):
1700 request = IEventSubscription3_get_SubscriberPartitionID()
1701 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1702 resp.dump()
1703 return resp
1705 def put_SubscriberPartitionID(self, bstrSubscriberPartitionID):
1706 request = IEventSubscription3_put_SubscriberPartitionID()
1707 request['bstrSubscriberPartitionID'] = bstrSubscriberPartitionID
1708 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1709 resp.dump()
1710 return resp
1712 def get_SubscriberApplicationID(self):
1713 request = IEventSubscription3_get_SubscriberApplicationID()
1714 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1715 resp.dump()
1716 return resp
1718 def put_SubscriberApplicationID(self, bstrSubscriberApplicationID):
1719 request = IEventSubscription3_put_SubscriberApplicationID()
1720 request['bstrSubscriberApplicationID'] = bstrSubscriberApplicationID
1721 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1722 resp.dump()
1723 return resp
1726class IEnumEventObject(IDispatch):
1727 def __init__(self, interface):
1728 IDispatch.__init__(self,interface)
1729 self._iid = IID_IEnumEventObject
1731 def Clone(self):
1732 request = IEnumEventObject_Clone()
1733 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1734 return IEnumEventObject(INTERFACE(self.get_cinstance(), ''.join(resp['ppInterface']['abData']), self.get_ipidRemUnknown(), target = self.get_target()))
1736 def Next(self, cReqElem):
1737 request = IEnumEventObject_Next()
1738 request['cReqElem'] = cReqElem
1739 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1740 interfaces = list()
1741 for interface in resp['ppInterface']:
1742 interfaces.append(IEventClass2(INTERFACE(self.get_cinstance(), ''.join(interface['abData']), self.get_ipidRemUnknown(), target = self.get_target())))
1743 return interfaces
1745 def Reset(self):
1746 request = IEnumEventObject_Reset()
1747 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1748 return resp
1750 def Skip(self, cSkipElem):
1751 request = IEnumEventObject_Skip()
1752 request['cSkipElem'] = cSkipElem
1753 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1754 return resp
1756class IEventObjectCollection(IDispatch):
1757 def __init__(self, interface):
1758 IDispatch.__init__(self,interface)
1759 self._iid = IID_IEventObjectCollection
1761 def get__NewEnum(self):
1762 request = IEventObjectCollection_get__NewEnum()
1763 resp = self.request(request, iid = self._iid , uuid = self.get_iPid())
1764 return IEnumEventObject(INTERFACE(self.get_cinstance(), ''.join(resp['ppEnum']['abData']), self.get_ipidRemUnknown(), target = self._get_target()))
1766 def get_Item(self, objectID):
1767 request = IEventObjectCollection_get_Item()
1768 request['objectID']['asData'] = objectID
1769 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1770 return resp
1772 def get_NewEnum(self):
1773 request = IEventObjectCollection_get_NewEnum()
1774 resp = self.request(request, iid = self._iid , uuid = self.get_iPid())
1775 return IEnumEventObject(INTERFACE(self.get_cinstance(), ''.join(resp['ppEnum']['abData']), self.get_ipidRemUnknown(), target = self.get_target()))
1777 def get_Count(self):
1778 request = IEventObjectCollection_get_Count()
1779 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1780 return resp
1782 def Add(self, item, objectID):
1783 request = IEventObjectCollection_Add()
1784 request['item'] = item
1785 request['objectID']['asData'] = objectID
1786 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1787 return resp
1789 def Remove(self, objectID):
1790 request = IEventObjectCollection_Remove()
1791 request['objectID']['asData'] = objectID
1792 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1793 return resp
1795class IEventSystem(IDispatch):
1796 def __init__(self, interface):
1797 IDispatch.__init__(self,interface)
1798 self._iid = IID_IEventSystem
1800 def Query(self, progID, queryCriteria):
1801 request = IEventSystem_Query()
1802 request['progID']['asData']=progID
1803 request['queryCriteria']['asData']=queryCriteria
1804 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1805 iInterface = IDispatch(INTERFACE(self.get_cinstance(), ''.join(resp['ppInterface']['abData']), self.get_ipidRemUnknown(), target = self.get_target()))
1806 return IEventObjectCollection(iInterface.RemQueryInterface(1, (IID_IEventObjectCollection,)))
1808 def Store(self, progID, pInterface):
1809 request = IEventSystem_Store()
1810 request['progID']['asData']=progID
1811 request['pInterface'] = pInterface
1812 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1813 return resp
1815 def Remove(self, progID, queryCriteria):
1816 request = IEventSystem_Remove()
1817 request['progID']['asData']=progID
1818 request['queryCriteria'] = queryCriteria
1819 resp = self.request(request, uuid = self.get_iPid())
1820 return resp
1822 def get_EventObjectChangeEventClassID(self):
1823 request = IEventSystem_get_EventObjectChangeEventClassID()
1824 resp = self.request(request, uuid = self.get_iPid())
1825 return resp
1827 def QueryS(self,progID, queryCriteria):
1828 request = IEventSystem_QueryS()
1829 request['progID']['asData']=progID
1830 request['queryCriteria']['asData']=queryCriteria
1831 resp = self.request(request, uuid = self.get_iPid())
1832 iInterface = IDispatch(INTERFACE(self.get_cinstance(), ''.join(resp['ppInterface']['abData']), self.get_ipidRemUnknown(), target = self.get_target()))
1833 return IEventObjectCollection(iInterface.RemQueryInterface(1, (IID_IEventObjectCollection,)))
1835 def RemoveS(self,progID, queryCriteria):
1836 request = IEventSystem_RemoveS()
1837 request['progID']['asData']=progID
1838 request['queryCriteria']['asData']=queryCriteria
1839 resp = self.request(request, uuid = self.get_iPid())
1840 return resp
1842class IEventSystem2(IEventSystem):
1843 def __init__(self, interface):
1844 IEventSystem.__init__(self,interface)
1845 self._iid = IID_IEventSystem2
1847 def GetVersion(self):
1848 request = IEventSystem2_GetVersion()
1849 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1850 return resp
1852 def VerifyTransientSubscribers(self):
1853 request = IEventSystem2_GetVersion()
1854 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1855 return resp
1857class IEventSystemInitialize(IRemUnknown):
1858 def __init__(self, interface):
1859 IRemUnknown.__init__(self,interface)
1860 self._iid = IID_IEventSystemInitialize
1862 def SetCOMCatalogBehaviour(self, bRetainSubKeys):
1863 request = IEventSystem2_GetVersion()
1864 request['bRetainSubKeys'] = bRetainSubKeys
1865 resp = self.request(request, iid = self._iid, uuid = self.get_iPid())
1866 return resp