2
/* Python wrapper functions auto-generated by pidl */
6
#include "librpc/rpc/pyrpc.h"
7
#include "librpc/rpc/pyrpc_util.h"
8
#include "librpc/gen_ndr/ndr_wmi.h"
9
#include "librpc/gen_ndr/ndr_wmi_c.h"
11
#include "librpc/gen_ndr/orpc.h"
12
#include "librpc/gen_ndr/dcom.h"
13
#include "librpc/gen_ndr/misc.h"
14
staticforward PyTypeObject BSTR_Type;
15
staticforward PyTypeObject IWbemClassObject_InterfaceType;
17
staticforward PyTypeObject CIMSTRINGS_Type;
18
staticforward PyTypeObject IWbemServices_InterfaceType;
20
staticforward PyTypeObject IEnumWbemClassObject_InterfaceType;
22
staticforward PyTypeObject IWbemContext_InterfaceType;
24
staticforward PyTypeObject IWbemLevel1Login_InterfaceType;
26
staticforward PyTypeObject WBEMDATA_Type;
27
staticforward PyTypeObject WBEMDATA4_Type;
28
staticforward PyTypeObject WBEMDATA3_Type;
29
staticforward PyTypeObject WBEMDATA2_Type;
30
staticforward PyTypeObject WBEMDATA1_Type;
31
staticforward PyTypeObject WBEMDATA0_Type;
32
staticforward PyTypeObject IWbemWCOSmartEnum_InterfaceType;
34
staticforward PyTypeObject IWbemFetchSmartEnum_InterfaceType;
36
staticforward PyTypeObject IWbemCallResult_InterfaceType;
38
staticforward PyTypeObject IWbemObjectSink_InterfaceType;
40
void initwmi(void);static PyTypeObject *MInterfacePointer_Type;
41
static PyTypeObject *ORPCTHAT_Type;
42
static PyTypeObject *Object_Type;
43
static PyTypeObject *GUID_Type;
44
static PyTypeObject *ClientConnection_Type;
45
static PyTypeObject *ORPCTHIS_Type;
47
static PyObject *py_BSTR_get_flags(PyObject *obj, void *closure)
49
struct BSTR *object = (struct BSTR *)py_talloc_get_ptr(obj);
51
py_flags = PyInt_FromLong(object->flags);
55
static int py_BSTR_set_flags(PyObject *py_obj, PyObject *value, void *closure)
57
struct BSTR *object = (struct BSTR *)py_talloc_get_ptr(py_obj);
58
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
59
object->flags = PyInt_AsLong(value);
63
static PyObject *py_BSTR_get_data(PyObject *obj, void *closure)
65
struct BSTR *object = (struct BSTR *)py_talloc_get_ptr(obj);
67
if (object->data == NULL) {
71
py_data = PyUnicode_Decode(object->data, strlen(object->data), "utf-8", "ignore");
76
static int py_BSTR_set_data(PyObject *py_obj, PyObject *value, void *closure)
78
struct BSTR *object = (struct BSTR *)py_talloc_get_ptr(py_obj);
79
if (PyUnicode_Check(value)) {
80
object->data = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
81
} else if (PyString_Check(value)) {
82
object->data = PyString_AS_STRING(value);
84
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
90
static PyGetSetDef py_BSTR_getsetters[] = {
91
{ discard_const_p(char, "flags"), py_BSTR_get_flags, py_BSTR_set_flags },
92
{ discard_const_p(char, "data"), py_BSTR_get_data, py_BSTR_set_data },
96
static PyObject *py_BSTR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
98
return py_talloc_new(struct BSTR, type);
102
static PyTypeObject BSTR_Type = {
103
PyObject_HEAD_INIT(NULL) 0,
104
.tp_name = "wmi.BSTR",
105
.tp_getset = py_BSTR_getsetters,
107
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
108
.tp_basicsize = sizeof(py_talloc_Object),
109
.tp_new = py_BSTR_new,
113
static bool pack_py_Delete_args_in(PyObject *args, PyObject *kwargs, struct Delete *r)
115
PyObject *py_ORPCthis;
116
PyObject *py_wszName;
117
const char *kwnames[] = {
118
"ORPCthis", "wszName", NULL
121
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:Delete", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszName)) {
125
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
126
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
130
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
131
r->in.wszName = talloc_ptrtype(r, r->in.wszName);
132
if (PyUnicode_Check(py_wszName)) {
133
r->in.wszName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszName, "utf-8", "ignore"));
134
} else if (PyString_Check(py_wszName)) {
135
r->in.wszName = PyString_AS_STRING(py_wszName);
137
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszName)->tp_name);
143
static PyObject *unpack_py_Delete_args_out(struct Delete *r)
146
PyObject *py_ORPCthat;
147
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
148
result = py_ORPCthat;
149
if (!W_ERROR_IS_OK(r->out.result)) {
150
PyErr_SetWERROR(r->out.result);
157
const struct PyNdrRpcMethodDef py_ndr_IWbemClassObject_methods[] = {
158
{ "Delete", "S.Delete(ORPCthis, wszName) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Delete_r, (py_data_pack_fn)pack_py_Delete_args_in, (py_data_unpack_fn)unpack_py_Delete_args_out, 0, &ndr_table_IWbemClassObject },
162
static PyObject *interface_IWbemClassObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
164
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemClassObject);
167
static PyTypeObject IWbemClassObject_InterfaceType = {
168
PyObject_HEAD_INIT(NULL) 0,
169
.tp_name = "wmi.IWbemClassObject",
170
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
171
.tp_doc = "IWbemClassObject(binding, lp_ctx=None, credentials=None) -> connection\n"
173
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
174
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
175
"credentials should be a credentials.Credentials object.\n\n",
176
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
177
.tp_new = interface_IWbemClassObject_new,
181
static PyObject *py_CIMSTRINGS_get_count(PyObject *obj, void *closure)
183
struct CIMSTRINGS *object = (struct CIMSTRINGS *)py_talloc_get_ptr(obj);
185
py_count = PyInt_FromLong(object->count);
189
static int py_CIMSTRINGS_set_count(PyObject *py_obj, PyObject *value, void *closure)
191
struct CIMSTRINGS *object = (struct CIMSTRINGS *)py_talloc_get_ptr(py_obj);
192
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
193
object->count = PyInt_AsLong(value);
197
static PyObject *py_CIMSTRINGS_get_item(PyObject *obj, void *closure)
199
struct CIMSTRINGS *object = (struct CIMSTRINGS *)py_talloc_get_ptr(obj);
201
py_item = PyList_New(object->count);
202
if (py_item == NULL) {
207
for (item_cntr_0 = 0; item_cntr_0 < object->count; item_cntr_0++) {
209
py_item_0 = PyInt_FromLong(*object->item[item_cntr_0]);
210
PyList_SetItem(py_item, item_cntr_0, py_item_0);
216
static int py_CIMSTRINGS_set_item(PyObject *py_obj, PyObject *value, void *closure)
218
struct CIMSTRINGS *object = (struct CIMSTRINGS *)py_talloc_get_ptr(py_obj);
219
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
222
object->item = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->item, PyList_GET_SIZE(value));
223
if (!object->item) { return -1;; }
224
talloc_set_name_const(object->item, "ARRAY: object->item");
225
for (item_cntr_0 = 0; item_cntr_0 < PyList_GET_SIZE(value); item_cntr_0++) {
226
object->item[item_cntr_0] = talloc_ptrtype(object->item, object->item[item_cntr_0]);
227
PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, item_cntr_0), return -1;);
228
*object->item[item_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, item_cntr_0));
234
static PyGetSetDef py_CIMSTRINGS_getsetters[] = {
235
{ discard_const_p(char, "count"), py_CIMSTRINGS_get_count, py_CIMSTRINGS_set_count },
236
{ discard_const_p(char, "item"), py_CIMSTRINGS_get_item, py_CIMSTRINGS_set_item },
240
static PyObject *py_CIMSTRINGS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
242
return py_talloc_new(struct CIMSTRINGS, type);
246
static PyTypeObject CIMSTRINGS_Type = {
247
PyObject_HEAD_INIT(NULL) 0,
248
.tp_name = "wmi.CIMSTRINGS",
249
.tp_getset = py_CIMSTRINGS_getsetters,
251
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
252
.tp_basicsize = sizeof(py_talloc_Object),
253
.tp_new = py_CIMSTRINGS_new,
257
static bool pack_py_OpenNamespace_args_in(PyObject *args, PyObject *kwargs, struct OpenNamespace *r)
259
PyObject *py_ORPCthis;
260
PyObject *py_strNamespace;
263
PyObject *py_ppWorkingNamespace;
264
PyObject *py_ppResult;
265
const char *kwnames[] = {
266
"ORPCthis", "strNamespace", "lFlags", "pCtx", "ppWorkingNamespace", "ppResult", NULL
269
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:OpenNamespace", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strNamespace, &py_lFlags, &py_pCtx, &py_ppWorkingNamespace, &py_ppResult)) {
273
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
274
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
278
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
279
PY_CHECK_TYPE(&BSTR_Type, py_strNamespace, return false;);
280
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strNamespace)) == NULL) {
284
r->in.strNamespace = *(struct BSTR *)py_talloc_get_ptr(py_strNamespace);
285
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
286
r->in.lFlags = PyInt_AsLong(py_lFlags);
287
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
288
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
289
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
293
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
294
if (py_ppWorkingNamespace == Py_None) {
295
r->in.ppWorkingNamespace = NULL;
297
r->in.ppWorkingNamespace = NULL;
298
if (py_ppWorkingNamespace == Py_None) {
299
*r->in.ppWorkingNamespace = NULL;
301
*r->in.ppWorkingNamespace = NULL;
302
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppWorkingNamespace, return false;);
303
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppWorkingNamespace)) == NULL) {
307
*r->in.ppWorkingNamespace = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppWorkingNamespace);
310
if (py_ppResult == Py_None) {
311
r->in.ppResult = NULL;
313
r->in.ppResult = NULL;
314
if (py_ppResult == Py_None) {
315
*r->in.ppResult = NULL;
317
*r->in.ppResult = NULL;
318
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppResult, return false;);
319
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppResult)) == NULL) {
323
*r->in.ppResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppResult);
329
static PyObject *unpack_py_OpenNamespace_args_out(struct OpenNamespace *r)
332
PyObject *py_ORPCthat;
333
PyObject *py_ppWorkingNamespace;
334
PyObject *py_ppResult;
335
result = PyTuple_New(3);
336
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
337
PyTuple_SetItem(result, 0, py_ORPCthat);
338
if (r->out.ppWorkingNamespace == NULL) {
339
py_ppWorkingNamespace = Py_None;
340
Py_INCREF(py_ppWorkingNamespace);
342
if (*r->out.ppWorkingNamespace == NULL) {
343
py_ppWorkingNamespace = Py_None;
344
Py_INCREF(py_ppWorkingNamespace);
346
py_ppWorkingNamespace = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppWorkingNamespace, *r->out.ppWorkingNamespace);
349
PyTuple_SetItem(result, 1, py_ppWorkingNamespace);
350
if (r->out.ppResult == NULL) {
351
py_ppResult = Py_None;
352
Py_INCREF(py_ppResult);
354
if (*r->out.ppResult == NULL) {
355
py_ppResult = Py_None;
356
Py_INCREF(py_ppResult);
358
py_ppResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppResult, *r->out.ppResult);
361
PyTuple_SetItem(result, 2, py_ppResult);
362
if (!W_ERROR_IS_OK(r->out.result)) {
363
PyErr_SetWERROR(r->out.result);
370
static bool pack_py_CancelAsyncCall_args_in(PyObject *args, PyObject *kwargs, struct CancelAsyncCall *r)
372
PyObject *py_ORPCthis;
374
const char *kwnames[] = {
375
"ORPCthis", "pSink", NULL
378
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:CancelAsyncCall", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pSink)) {
382
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
383
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
387
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
388
r->in.pSink = talloc_ptrtype(r, r->in.pSink);
389
PY_CHECK_TYPE(MInterfacePointer_Type, py_pSink, return false;);
390
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pSink)) == NULL) {
394
r->in.pSink = (struct MInterfacePointer *)py_talloc_get_ptr(py_pSink);
398
static PyObject *unpack_py_CancelAsyncCall_args_out(struct CancelAsyncCall *r)
401
PyObject *py_ORPCthat;
402
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
403
result = py_ORPCthat;
404
if (!W_ERROR_IS_OK(r->out.result)) {
405
PyErr_SetWERROR(r->out.result);
412
static bool pack_py_QueryObjectSink_args_in(PyObject *args, PyObject *kwargs, struct QueryObjectSink *r)
414
PyObject *py_ORPCthis;
416
const char *kwnames[] = {
417
"ORPCthis", "lFlags", NULL
420
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:QueryObjectSink", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lFlags)) {
424
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
425
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
429
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
430
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
431
r->in.lFlags = PyInt_AsLong(py_lFlags);
435
static PyObject *unpack_py_QueryObjectSink_args_out(struct QueryObjectSink *r)
438
PyObject *py_ORPCthat;
439
PyObject *py_ppResponseHandler;
440
result = PyTuple_New(2);
441
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
442
PyTuple_SetItem(result, 0, py_ORPCthat);
443
if (*r->out.ppResponseHandler == NULL) {
444
py_ppResponseHandler = Py_None;
445
Py_INCREF(py_ppResponseHandler);
447
py_ppResponseHandler = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppResponseHandler, *r->out.ppResponseHandler);
449
PyTuple_SetItem(result, 1, py_ppResponseHandler);
450
if (!W_ERROR_IS_OK(r->out.result)) {
451
PyErr_SetWERROR(r->out.result);
458
static bool pack_py_GetObject_args_in(PyObject *args, PyObject *kwargs, struct GetObject *r)
460
PyObject *py_ORPCthis;
461
PyObject *py_strObjectPath;
464
PyObject *py_ppObject;
465
PyObject *py_ppCallResult;
466
const char *kwnames[] = {
467
"ORPCthis", "strObjectPath", "lFlags", "pCtx", "ppObject", "ppCallResult", NULL
470
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:GetObject", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_lFlags, &py_pCtx, &py_ppObject, &py_ppCallResult)) {
474
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
475
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
479
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
480
PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
481
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
485
r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
486
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
487
r->in.lFlags = PyInt_AsLong(py_lFlags);
488
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
489
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
490
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
494
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
495
if (py_ppObject == Py_None) {
496
r->in.ppObject = NULL;
498
r->in.ppObject = NULL;
499
if (py_ppObject == Py_None) {
500
*r->in.ppObject = NULL;
502
*r->in.ppObject = NULL;
503
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppObject, return false;);
504
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppObject)) == NULL) {
508
*r->in.ppObject = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppObject);
511
if (py_ppCallResult == Py_None) {
512
r->in.ppCallResult = NULL;
514
r->in.ppCallResult = NULL;
515
if (py_ppCallResult == Py_None) {
516
*r->in.ppCallResult = NULL;
518
*r->in.ppCallResult = NULL;
519
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
520
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
524
*r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
530
static PyObject *unpack_py_GetObject_args_out(struct GetObject *r)
533
PyObject *py_ORPCthat;
534
PyObject *py_ppObject;
535
PyObject *py_ppCallResult;
536
result = PyTuple_New(3);
537
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
538
PyTuple_SetItem(result, 0, py_ORPCthat);
539
if (r->out.ppObject == NULL) {
540
py_ppObject = Py_None;
541
Py_INCREF(py_ppObject);
543
if (*r->out.ppObject == NULL) {
544
py_ppObject = Py_None;
545
Py_INCREF(py_ppObject);
547
py_ppObject = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppObject, *r->out.ppObject);
550
PyTuple_SetItem(result, 1, py_ppObject);
551
if (r->out.ppCallResult == NULL) {
552
py_ppCallResult = Py_None;
553
Py_INCREF(py_ppCallResult);
555
if (*r->out.ppCallResult == NULL) {
556
py_ppCallResult = Py_None;
557
Py_INCREF(py_ppCallResult);
559
py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
562
PyTuple_SetItem(result, 2, py_ppCallResult);
563
if (!W_ERROR_IS_OK(r->out.result)) {
564
PyErr_SetWERROR(r->out.result);
571
static bool pack_py_GetObjectAsync_args_in(PyObject *args, PyObject *kwargs, struct GetObjectAsync *r)
573
PyObject *py_ORPCthis;
574
PyObject *py_strObjectPath;
577
PyObject *py_pResponseHandler;
578
const char *kwnames[] = {
579
"ORPCthis", "strObjectPath", "lFlags", "pCtx", "pResponseHandler", NULL
582
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:GetObjectAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
586
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
587
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
591
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
592
PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
593
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
597
r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
598
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
599
r->in.lFlags = PyInt_AsLong(py_lFlags);
600
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
601
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
602
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
606
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
607
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
608
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
609
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
613
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
617
static PyObject *unpack_py_GetObjectAsync_args_out(struct GetObjectAsync *r)
620
PyObject *py_ORPCthat;
621
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
622
result = py_ORPCthat;
623
if (!W_ERROR_IS_OK(r->out.result)) {
624
PyErr_SetWERROR(r->out.result);
631
static bool pack_py_PutClass_args_in(PyObject *args, PyObject *kwargs, struct PutClass *r)
633
PyObject *py_ORPCthis;
634
PyObject *py_pObject;
637
PyObject *py_ppCallResult;
638
const char *kwnames[] = {
639
"ORPCthis", "pObject", "lFlags", "pCtx", "ppCallResult", NULL
642
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:PutClass", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pObject, &py_lFlags, &py_pCtx, &py_ppCallResult)) {
646
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
647
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
651
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
652
r->in.pObject = talloc_ptrtype(r, r->in.pObject);
653
PY_CHECK_TYPE(MInterfacePointer_Type, py_pObject, return false;);
654
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pObject)) == NULL) {
658
r->in.pObject = (struct MInterfacePointer *)py_talloc_get_ptr(py_pObject);
659
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
660
r->in.lFlags = PyInt_AsLong(py_lFlags);
661
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
662
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
663
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
667
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
668
if (py_ppCallResult == Py_None) {
669
r->in.ppCallResult = NULL;
671
r->in.ppCallResult = NULL;
672
if (py_ppCallResult == Py_None) {
673
*r->in.ppCallResult = NULL;
675
*r->in.ppCallResult = NULL;
676
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
677
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
681
*r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
687
static PyObject *unpack_py_PutClass_args_out(struct PutClass *r)
690
PyObject *py_ORPCthat;
691
PyObject *py_ppCallResult;
692
result = PyTuple_New(2);
693
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
694
PyTuple_SetItem(result, 0, py_ORPCthat);
695
if (r->out.ppCallResult == NULL) {
696
py_ppCallResult = Py_None;
697
Py_INCREF(py_ppCallResult);
699
if (*r->out.ppCallResult == NULL) {
700
py_ppCallResult = Py_None;
701
Py_INCREF(py_ppCallResult);
703
py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
706
PyTuple_SetItem(result, 1, py_ppCallResult);
707
if (!W_ERROR_IS_OK(r->out.result)) {
708
PyErr_SetWERROR(r->out.result);
715
static bool pack_py_PutClassAsync_args_in(PyObject *args, PyObject *kwargs, struct PutClassAsync *r)
717
PyObject *py_ORPCthis;
718
PyObject *py_pObject;
721
PyObject *py_pResponseHandler;
722
const char *kwnames[] = {
723
"ORPCthis", "pObject", "lFlags", "pCtx", "pResponseHandler", NULL
726
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:PutClassAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pObject, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
730
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
731
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
735
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
736
r->in.pObject = talloc_ptrtype(r, r->in.pObject);
737
PY_CHECK_TYPE(MInterfacePointer_Type, py_pObject, return false;);
738
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pObject)) == NULL) {
742
r->in.pObject = (struct MInterfacePointer *)py_talloc_get_ptr(py_pObject);
743
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
744
r->in.lFlags = PyInt_AsLong(py_lFlags);
745
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
746
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
747
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
751
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
752
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
753
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
754
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
758
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
762
static PyObject *unpack_py_PutClassAsync_args_out(struct PutClassAsync *r)
765
PyObject *py_ORPCthat;
766
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
767
result = py_ORPCthat;
768
if (!W_ERROR_IS_OK(r->out.result)) {
769
PyErr_SetWERROR(r->out.result);
776
static bool pack_py_DeleteClass_args_in(PyObject *args, PyObject *kwargs, struct DeleteClass *r)
778
PyObject *py_ORPCthis;
779
PyObject *py_strClass;
782
PyObject *py_ppCallResult;
783
const char *kwnames[] = {
784
"ORPCthis", "strClass", "lFlags", "pCtx", "ppCallResult", NULL
787
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DeleteClass", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strClass, &py_lFlags, &py_pCtx, &py_ppCallResult)) {
791
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
792
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
796
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
797
PY_CHECK_TYPE(&BSTR_Type, py_strClass, return false;);
798
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strClass)) == NULL) {
802
r->in.strClass = *(struct BSTR *)py_talloc_get_ptr(py_strClass);
803
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
804
r->in.lFlags = PyInt_AsLong(py_lFlags);
805
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
806
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
807
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
811
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
812
if (py_ppCallResult == Py_None) {
813
r->in.ppCallResult = NULL;
815
r->in.ppCallResult = NULL;
816
if (py_ppCallResult == Py_None) {
817
*r->in.ppCallResult = NULL;
819
*r->in.ppCallResult = NULL;
820
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
821
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
825
*r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
831
static PyObject *unpack_py_DeleteClass_args_out(struct DeleteClass *r)
834
PyObject *py_ORPCthat;
835
PyObject *py_ppCallResult;
836
result = PyTuple_New(2);
837
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
838
PyTuple_SetItem(result, 0, py_ORPCthat);
839
if (r->out.ppCallResult == NULL) {
840
py_ppCallResult = Py_None;
841
Py_INCREF(py_ppCallResult);
843
if (*r->out.ppCallResult == NULL) {
844
py_ppCallResult = Py_None;
845
Py_INCREF(py_ppCallResult);
847
py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
850
PyTuple_SetItem(result, 1, py_ppCallResult);
851
if (!W_ERROR_IS_OK(r->out.result)) {
852
PyErr_SetWERROR(r->out.result);
859
static bool pack_py_DeleteClassAsync_args_in(PyObject *args, PyObject *kwargs, struct DeleteClassAsync *r)
861
PyObject *py_ORPCthis;
862
PyObject *py_strClass;
865
PyObject *py_pResponseHandler;
866
const char *kwnames[] = {
867
"ORPCthis", "strClass", "lFlags", "pCtx", "pResponseHandler", NULL
870
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DeleteClassAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strClass, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
874
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
875
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
879
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
880
PY_CHECK_TYPE(&BSTR_Type, py_strClass, return false;);
881
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strClass)) == NULL) {
885
r->in.strClass = *(struct BSTR *)py_talloc_get_ptr(py_strClass);
886
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
887
r->in.lFlags = PyInt_AsLong(py_lFlags);
888
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
889
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
890
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
894
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
895
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
896
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
897
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
901
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
905
static PyObject *unpack_py_DeleteClassAsync_args_out(struct DeleteClassAsync *r)
908
PyObject *py_ORPCthat;
909
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
910
result = py_ORPCthat;
911
if (!W_ERROR_IS_OK(r->out.result)) {
912
PyErr_SetWERROR(r->out.result);
919
static bool pack_py_CreateClassEnum_args_in(PyObject *args, PyObject *kwargs, struct CreateClassEnum *r)
921
PyObject *py_ORPCthis;
922
PyObject *py_strSuperclass;
925
const char *kwnames[] = {
926
"ORPCthis", "strSuperclass", "lFlags", "pCtx", NULL
929
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:CreateClassEnum", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strSuperclass, &py_lFlags, &py_pCtx)) {
933
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
934
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
938
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
939
PY_CHECK_TYPE(&BSTR_Type, py_strSuperclass, return false;);
940
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strSuperclass)) == NULL) {
944
r->in.strSuperclass = *(struct BSTR *)py_talloc_get_ptr(py_strSuperclass);
945
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
946
r->in.lFlags = PyInt_AsLong(py_lFlags);
947
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
948
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
949
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
953
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
957
static PyObject *unpack_py_CreateClassEnum_args_out(struct CreateClassEnum *r)
960
PyObject *py_ORPCthat;
962
result = PyTuple_New(2);
963
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
964
PyTuple_SetItem(result, 0, py_ORPCthat);
965
if (*r->out.ppEnum == NULL) {
967
Py_INCREF(py_ppEnum);
969
py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
971
PyTuple_SetItem(result, 1, py_ppEnum);
972
if (!W_ERROR_IS_OK(r->out.result)) {
973
PyErr_SetWERROR(r->out.result);
980
static bool pack_py_CreateClassEnumAsync_args_in(PyObject *args, PyObject *kwargs, struct CreateClassEnumAsync *r)
982
PyObject *py_ORPCthis;
983
PyObject *py_strSuperclass;
986
PyObject *py_pResponseHandler;
987
const char *kwnames[] = {
988
"ORPCthis", "strSuperclass", "lFlags", "pCtx", "pResponseHandler", NULL
991
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:CreateClassEnumAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strSuperclass, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
995
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
996
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1000
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1001
PY_CHECK_TYPE(&BSTR_Type, py_strSuperclass, return false;);
1002
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strSuperclass)) == NULL) {
1006
r->in.strSuperclass = *(struct BSTR *)py_talloc_get_ptr(py_strSuperclass);
1007
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1008
r->in.lFlags = PyInt_AsLong(py_lFlags);
1009
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1010
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1011
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1015
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1016
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
1017
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
1018
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
1022
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
1026
static PyObject *unpack_py_CreateClassEnumAsync_args_out(struct CreateClassEnumAsync *r)
1029
PyObject *py_ORPCthat;
1030
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1031
result = py_ORPCthat;
1032
if (!W_ERROR_IS_OK(r->out.result)) {
1033
PyErr_SetWERROR(r->out.result);
1040
static bool pack_py_PutInstance_args_in(PyObject *args, PyObject *kwargs, struct PutInstance *r)
1042
PyObject *py_ORPCthis;
1044
PyObject *py_lFlags;
1046
PyObject *py_ppCallResult;
1047
const char *kwnames[] = {
1048
"ORPCthis", "pInst", "lFlags", "pCtx", "ppCallResult", NULL
1051
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:PutInstance", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pInst, &py_lFlags, &py_pCtx, &py_ppCallResult)) {
1055
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1056
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1060
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1061
r->in.pInst = talloc_ptrtype(r, r->in.pInst);
1062
PY_CHECK_TYPE(MInterfacePointer_Type, py_pInst, return false;);
1063
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pInst)) == NULL) {
1067
r->in.pInst = (struct MInterfacePointer *)py_talloc_get_ptr(py_pInst);
1068
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1069
r->in.lFlags = PyInt_AsLong(py_lFlags);
1070
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1071
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1072
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1076
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1077
if (py_ppCallResult == Py_None) {
1078
r->in.ppCallResult = NULL;
1080
r->in.ppCallResult = NULL;
1081
if (py_ppCallResult == Py_None) {
1082
*r->in.ppCallResult = NULL;
1084
*r->in.ppCallResult = NULL;
1085
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
1086
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
1090
*r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
1096
static PyObject *unpack_py_PutInstance_args_out(struct PutInstance *r)
1099
PyObject *py_ORPCthat;
1100
PyObject *py_ppCallResult;
1101
result = PyTuple_New(2);
1102
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1103
PyTuple_SetItem(result, 0, py_ORPCthat);
1104
if (r->out.ppCallResult == NULL) {
1105
py_ppCallResult = Py_None;
1106
Py_INCREF(py_ppCallResult);
1108
if (*r->out.ppCallResult == NULL) {
1109
py_ppCallResult = Py_None;
1110
Py_INCREF(py_ppCallResult);
1112
py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
1115
PyTuple_SetItem(result, 1, py_ppCallResult);
1116
if (!W_ERROR_IS_OK(r->out.result)) {
1117
PyErr_SetWERROR(r->out.result);
1124
static bool pack_py_PutInstanceAsync_args_in(PyObject *args, PyObject *kwargs, struct PutInstanceAsync *r)
1126
PyObject *py_ORPCthis;
1128
PyObject *py_lFlags;
1130
PyObject *py_pResponseHandler;
1131
const char *kwnames[] = {
1132
"ORPCthis", "pInst", "lFlags", "pCtx", "pResponseHandler", NULL
1135
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:PutInstanceAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pInst, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
1139
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1140
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1144
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1145
r->in.pInst = talloc_ptrtype(r, r->in.pInst);
1146
PY_CHECK_TYPE(MInterfacePointer_Type, py_pInst, return false;);
1147
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pInst)) == NULL) {
1151
r->in.pInst = (struct MInterfacePointer *)py_talloc_get_ptr(py_pInst);
1152
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1153
r->in.lFlags = PyInt_AsLong(py_lFlags);
1154
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1155
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1156
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1160
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1161
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
1162
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
1163
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
1167
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
1171
static PyObject *unpack_py_PutInstanceAsync_args_out(struct PutInstanceAsync *r)
1174
PyObject *py_ORPCthat;
1175
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1176
result = py_ORPCthat;
1177
if (!W_ERROR_IS_OK(r->out.result)) {
1178
PyErr_SetWERROR(r->out.result);
1185
static bool pack_py_DeleteInstance_args_in(PyObject *args, PyObject *kwargs, struct DeleteInstance *r)
1187
PyObject *py_ORPCthis;
1188
PyObject *py_strObjectPath;
1189
PyObject *py_lFlags;
1191
PyObject *py_ppCallResult;
1192
const char *kwnames[] = {
1193
"ORPCthis", "strObjectPath", "lFlags", "pCtx", "ppCallResult", NULL
1196
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DeleteInstance", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_lFlags, &py_pCtx, &py_ppCallResult)) {
1200
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1201
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1205
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1206
PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
1207
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
1211
r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
1212
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1213
r->in.lFlags = PyInt_AsLong(py_lFlags);
1214
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1215
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1216
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1220
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1221
if (py_ppCallResult == Py_None) {
1222
r->in.ppCallResult = NULL;
1224
r->in.ppCallResult = NULL;
1225
if (py_ppCallResult == Py_None) {
1226
*r->in.ppCallResult = NULL;
1228
*r->in.ppCallResult = NULL;
1229
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
1230
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
1234
*r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
1240
static PyObject *unpack_py_DeleteInstance_args_out(struct DeleteInstance *r)
1243
PyObject *py_ORPCthat;
1244
PyObject *py_ppCallResult;
1245
result = PyTuple_New(2);
1246
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1247
PyTuple_SetItem(result, 0, py_ORPCthat);
1248
if (r->out.ppCallResult == NULL) {
1249
py_ppCallResult = Py_None;
1250
Py_INCREF(py_ppCallResult);
1252
if (*r->out.ppCallResult == NULL) {
1253
py_ppCallResult = Py_None;
1254
Py_INCREF(py_ppCallResult);
1256
py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
1259
PyTuple_SetItem(result, 1, py_ppCallResult);
1260
if (!W_ERROR_IS_OK(r->out.result)) {
1261
PyErr_SetWERROR(r->out.result);
1268
static bool pack_py_DeleteInstanceAsync_args_in(PyObject *args, PyObject *kwargs, struct DeleteInstanceAsync *r)
1270
PyObject *py_ORPCthis;
1271
PyObject *py_strObjectPath;
1272
PyObject *py_lFlags;
1274
PyObject *py_pResponseHandler;
1275
const char *kwnames[] = {
1276
"ORPCthis", "strObjectPath", "lFlags", "pCtx", "pResponseHandler", NULL
1279
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DeleteInstanceAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
1283
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1284
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1288
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1289
PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
1290
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
1294
r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
1295
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1296
r->in.lFlags = PyInt_AsLong(py_lFlags);
1297
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1298
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1299
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1303
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1304
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
1305
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
1306
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
1310
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
1314
static PyObject *unpack_py_DeleteInstanceAsync_args_out(struct DeleteInstanceAsync *r)
1317
PyObject *py_ORPCthat;
1318
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1319
result = py_ORPCthat;
1320
if (!W_ERROR_IS_OK(r->out.result)) {
1321
PyErr_SetWERROR(r->out.result);
1328
static bool pack_py_CreateInstanceEnum_args_in(PyObject *args, PyObject *kwargs, struct CreateInstanceEnum *r)
1330
PyObject *py_ORPCthis;
1331
PyObject *py_strFilter;
1332
PyObject *py_lFlags;
1334
const char *kwnames[] = {
1335
"ORPCthis", "strFilter", "lFlags", "pCtx", NULL
1338
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:CreateInstanceEnum", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strFilter, &py_lFlags, &py_pCtx)) {
1342
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1343
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1347
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1348
PY_CHECK_TYPE(&BSTR_Type, py_strFilter, return false;);
1349
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strFilter)) == NULL) {
1353
r->in.strFilter = *(struct BSTR *)py_talloc_get_ptr(py_strFilter);
1354
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1355
r->in.lFlags = PyInt_AsLong(py_lFlags);
1356
if (py_pCtx == Py_None) {
1360
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1361
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1365
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1370
static PyObject *unpack_py_CreateInstanceEnum_args_out(struct CreateInstanceEnum *r)
1373
PyObject *py_ORPCthat;
1374
PyObject *py_ppEnum;
1375
result = PyTuple_New(2);
1376
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1377
PyTuple_SetItem(result, 0, py_ORPCthat);
1378
if (*r->out.ppEnum == NULL) {
1379
py_ppEnum = Py_None;
1380
Py_INCREF(py_ppEnum);
1382
py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
1384
PyTuple_SetItem(result, 1, py_ppEnum);
1385
if (!W_ERROR_IS_OK(r->out.result)) {
1386
PyErr_SetWERROR(r->out.result);
1393
static bool pack_py_CreateInstanceEnumAsync_args_in(PyObject *args, PyObject *kwargs, struct CreateInstanceEnumAsync *r)
1395
PyObject *py_ORPCthis;
1396
PyObject *py_strSuperClass;
1397
PyObject *py_lFlags;
1399
PyObject *py_pResponseHandler;
1400
const char *kwnames[] = {
1401
"ORPCthis", "strSuperClass", "lFlags", "pCtx", "pResponseHandler", NULL
1404
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:CreateInstanceEnumAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strSuperClass, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
1408
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1409
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1413
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1414
PY_CHECK_TYPE(&BSTR_Type, py_strSuperClass, return false;);
1415
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strSuperClass)) == NULL) {
1419
r->in.strSuperClass = *(struct BSTR *)py_talloc_get_ptr(py_strSuperClass);
1420
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1421
r->in.lFlags = PyInt_AsLong(py_lFlags);
1422
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1423
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1424
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1428
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1429
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
1430
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
1431
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
1435
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
1439
static PyObject *unpack_py_CreateInstanceEnumAsync_args_out(struct CreateInstanceEnumAsync *r)
1442
PyObject *py_ORPCthat;
1443
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1444
result = py_ORPCthat;
1445
if (!W_ERROR_IS_OK(r->out.result)) {
1446
PyErr_SetWERROR(r->out.result);
1453
static bool pack_py_ExecQuery_args_in(PyObject *args, PyObject *kwargs, struct ExecQuery *r)
1455
PyObject *py_ORPCthis;
1456
PyObject *py_strQueryLanguage;
1457
PyObject *py_strQuery;
1458
PyObject *py_lFlags;
1460
const char *kwnames[] = {
1461
"ORPCthis", "strQueryLanguage", "strQuery", "lFlags", "pCtx", NULL
1464
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:ExecQuery", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strQueryLanguage, &py_strQuery, &py_lFlags, &py_pCtx)) {
1468
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1469
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1473
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1474
PY_CHECK_TYPE(&BSTR_Type, py_strQueryLanguage, return false;);
1475
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQueryLanguage)) == NULL) {
1479
r->in.strQueryLanguage = *(struct BSTR *)py_talloc_get_ptr(py_strQueryLanguage);
1480
PY_CHECK_TYPE(&BSTR_Type, py_strQuery, return false;);
1481
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQuery)) == NULL) {
1485
r->in.strQuery = *(struct BSTR *)py_talloc_get_ptr(py_strQuery);
1486
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1487
r->in.lFlags = PyInt_AsLong(py_lFlags);
1488
if (py_pCtx == Py_None) {
1492
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1493
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1497
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1502
static PyObject *unpack_py_ExecQuery_args_out(struct ExecQuery *r)
1505
PyObject *py_ORPCthat;
1506
PyObject *py_ppEnum;
1507
result = PyTuple_New(2);
1508
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1509
PyTuple_SetItem(result, 0, py_ORPCthat);
1510
if (*r->out.ppEnum == NULL) {
1511
py_ppEnum = Py_None;
1512
Py_INCREF(py_ppEnum);
1514
py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
1516
PyTuple_SetItem(result, 1, py_ppEnum);
1517
if (!W_ERROR_IS_OK(r->out.result)) {
1518
PyErr_SetWERROR(r->out.result);
1525
static bool pack_py_ExecQueryAsync_args_in(PyObject *args, PyObject *kwargs, struct ExecQueryAsync *r)
1527
PyObject *py_ORPCthis;
1528
PyObject *py_strQueryLanguage;
1529
PyObject *py_strQuery;
1530
PyObject *py_lFlags;
1532
PyObject *py_pResponseHandler;
1533
const char *kwnames[] = {
1534
"ORPCthis", "strQueryLanguage", "strQuery", "lFlags", "pCtx", "pResponseHandler", NULL
1537
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:ExecQueryAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strQueryLanguage, &py_strQuery, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
1541
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1542
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1546
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1547
PY_CHECK_TYPE(&BSTR_Type, py_strQueryLanguage, return false;);
1548
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQueryLanguage)) == NULL) {
1552
r->in.strQueryLanguage = *(struct BSTR *)py_talloc_get_ptr(py_strQueryLanguage);
1553
PY_CHECK_TYPE(&BSTR_Type, py_strQuery, return false;);
1554
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQuery)) == NULL) {
1558
r->in.strQuery = *(struct BSTR *)py_talloc_get_ptr(py_strQuery);
1559
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1560
r->in.lFlags = PyInt_AsLong(py_lFlags);
1561
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1562
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1563
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1567
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1568
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
1569
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
1570
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
1574
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
1578
static PyObject *unpack_py_ExecQueryAsync_args_out(struct ExecQueryAsync *r)
1581
PyObject *py_ORPCthat;
1582
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1583
result = py_ORPCthat;
1584
if (!W_ERROR_IS_OK(r->out.result)) {
1585
PyErr_SetWERROR(r->out.result);
1592
static bool pack_py_ExecNotificationQuery_args_in(PyObject *args, PyObject *kwargs, struct ExecNotificationQuery *r)
1594
PyObject *py_ORPCthis;
1595
PyObject *py_strQueryLanguage;
1596
PyObject *py_strQuery;
1597
PyObject *py_lFlags;
1599
const char *kwnames[] = {
1600
"ORPCthis", "strQueryLanguage", "strQuery", "lFlags", "pCtx", NULL
1603
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:ExecNotificationQuery", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strQueryLanguage, &py_strQuery, &py_lFlags, &py_pCtx)) {
1607
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1608
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1612
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1613
PY_CHECK_TYPE(&BSTR_Type, py_strQueryLanguage, return false;);
1614
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQueryLanguage)) == NULL) {
1618
r->in.strQueryLanguage = *(struct BSTR *)py_talloc_get_ptr(py_strQueryLanguage);
1619
PY_CHECK_TYPE(&BSTR_Type, py_strQuery, return false;);
1620
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQuery)) == NULL) {
1624
r->in.strQuery = *(struct BSTR *)py_talloc_get_ptr(py_strQuery);
1625
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1626
r->in.lFlags = PyInt_AsLong(py_lFlags);
1627
if (py_pCtx == Py_None) {
1631
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1632
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1636
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1641
static PyObject *unpack_py_ExecNotificationQuery_args_out(struct ExecNotificationQuery *r)
1644
PyObject *py_ORPCthat;
1645
PyObject *py_ppEnum;
1646
result = PyTuple_New(2);
1647
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1648
PyTuple_SetItem(result, 0, py_ORPCthat);
1649
if (*r->out.ppEnum == NULL) {
1650
py_ppEnum = Py_None;
1651
Py_INCREF(py_ppEnum);
1653
py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
1655
PyTuple_SetItem(result, 1, py_ppEnum);
1656
if (!W_ERROR_IS_OK(r->out.result)) {
1657
PyErr_SetWERROR(r->out.result);
1664
static bool pack_py_ExecNotificationQueryAsync_args_in(PyObject *args, PyObject *kwargs, struct ExecNotificationQueryAsync *r)
1666
PyObject *py_ORPCthis;
1667
PyObject *py_strQueryLanguage;
1668
PyObject *py_strQuery;
1669
PyObject *py_lFlags;
1671
PyObject *py_pResponseHandler;
1672
const char *kwnames[] = {
1673
"ORPCthis", "strQueryLanguage", "strQuery", "lFlags", "pCtx", "pResponseHandler", NULL
1676
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:ExecNotificationQueryAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strQueryLanguage, &py_strQuery, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
1680
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1681
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1685
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1686
PY_CHECK_TYPE(&BSTR_Type, py_strQueryLanguage, return false;);
1687
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQueryLanguage)) == NULL) {
1691
r->in.strQueryLanguage = *(struct BSTR *)py_talloc_get_ptr(py_strQueryLanguage);
1692
PY_CHECK_TYPE(&BSTR_Type, py_strQuery, return false;);
1693
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQuery)) == NULL) {
1697
r->in.strQuery = *(struct BSTR *)py_talloc_get_ptr(py_strQuery);
1698
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1699
r->in.lFlags = PyInt_AsLong(py_lFlags);
1700
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1701
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1702
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1706
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1707
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
1708
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
1709
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
1713
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
1717
static PyObject *unpack_py_ExecNotificationQueryAsync_args_out(struct ExecNotificationQueryAsync *r)
1720
PyObject *py_ORPCthat;
1721
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1722
result = py_ORPCthat;
1723
if (!W_ERROR_IS_OK(r->out.result)) {
1724
PyErr_SetWERROR(r->out.result);
1731
static bool pack_py_ExecMethod_args_in(PyObject *args, PyObject *kwargs, struct ExecMethod *r)
1733
PyObject *py_ORPCthis;
1734
PyObject *py_strObjectPath;
1735
PyObject *py_strMethodName;
1736
PyObject *py_lFlags;
1738
PyObject *py_pInParams;
1739
PyObject *py_ppOutParams;
1740
PyObject *py_ppCallResult;
1741
const char *kwnames[] = {
1742
"ORPCthis", "strObjectPath", "strMethodName", "lFlags", "pCtx", "pInParams", "ppOutParams", "ppCallResult", NULL
1745
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:ExecMethod", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_strMethodName, &py_lFlags, &py_pCtx, &py_pInParams, &py_ppOutParams, &py_ppCallResult)) {
1749
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1750
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1754
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1755
PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
1756
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
1760
r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
1761
PY_CHECK_TYPE(&BSTR_Type, py_strMethodName, return false;);
1762
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strMethodName)) == NULL) {
1766
r->in.strMethodName = *(struct BSTR *)py_talloc_get_ptr(py_strMethodName);
1767
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1768
r->in.lFlags = PyInt_AsLong(py_lFlags);
1769
if (py_pCtx == Py_None) {
1773
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1774
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1778
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1780
if (py_pInParams == Py_None) {
1781
r->in.pInParams = NULL;
1783
r->in.pInParams = NULL;
1784
PY_CHECK_TYPE(MInterfacePointer_Type, py_pInParams, return false;);
1785
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pInParams)) == NULL) {
1789
r->in.pInParams = (struct MInterfacePointer *)py_talloc_get_ptr(py_pInParams);
1791
if (py_ppOutParams == Py_None) {
1792
r->in.ppOutParams = NULL;
1794
r->in.ppOutParams = NULL;
1795
if (py_ppOutParams == Py_None) {
1796
*r->in.ppOutParams = NULL;
1798
*r->in.ppOutParams = NULL;
1799
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppOutParams, return false;);
1800
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppOutParams)) == NULL) {
1804
*r->in.ppOutParams = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppOutParams);
1807
if (py_ppCallResult == Py_None) {
1808
r->in.ppCallResult = NULL;
1810
r->in.ppCallResult = NULL;
1811
if (py_ppCallResult == Py_None) {
1812
*r->in.ppCallResult = NULL;
1814
*r->in.ppCallResult = NULL;
1815
PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
1816
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
1820
*r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
1826
static PyObject *unpack_py_ExecMethod_args_out(struct ExecMethod *r)
1829
PyObject *py_ORPCthat;
1830
PyObject *py_ppOutParams;
1831
PyObject *py_ppCallResult;
1832
result = PyTuple_New(3);
1833
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1834
PyTuple_SetItem(result, 0, py_ORPCthat);
1835
if (r->out.ppOutParams == NULL) {
1836
py_ppOutParams = Py_None;
1837
Py_INCREF(py_ppOutParams);
1839
if (*r->out.ppOutParams == NULL) {
1840
py_ppOutParams = Py_None;
1841
Py_INCREF(py_ppOutParams);
1843
py_ppOutParams = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppOutParams, *r->out.ppOutParams);
1846
PyTuple_SetItem(result, 1, py_ppOutParams);
1847
if (r->out.ppCallResult == NULL) {
1848
py_ppCallResult = Py_None;
1849
Py_INCREF(py_ppCallResult);
1851
if (*r->out.ppCallResult == NULL) {
1852
py_ppCallResult = Py_None;
1853
Py_INCREF(py_ppCallResult);
1855
py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
1858
PyTuple_SetItem(result, 2, py_ppCallResult);
1859
if (!W_ERROR_IS_OK(r->out.result)) {
1860
PyErr_SetWERROR(r->out.result);
1867
static bool pack_py_ExecMethodAsync_args_in(PyObject *args, PyObject *kwargs, struct ExecMethodAsync *r)
1869
PyObject *py_ORPCthis;
1870
PyObject *py_strObjectPath;
1871
PyObject *py_strMethodName;
1872
PyObject *py_lFlags;
1874
PyObject *py_pInParams;
1875
PyObject *py_pResponseHandler;
1876
const char *kwnames[] = {
1877
"ORPCthis", "strObjectPath", "strMethodName", "lFlags", "pCtx", "pInParams", "pResponseHandler", NULL
1880
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:ExecMethodAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_strMethodName, &py_lFlags, &py_pCtx, &py_pInParams, &py_pResponseHandler)) {
1884
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
1885
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
1889
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
1890
PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
1891
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
1895
r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
1896
PY_CHECK_TYPE(&BSTR_Type, py_strMethodName, return false;);
1897
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strMethodName)) == NULL) {
1901
r->in.strMethodName = *(struct BSTR *)py_talloc_get_ptr(py_strMethodName);
1902
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
1903
r->in.lFlags = PyInt_AsLong(py_lFlags);
1904
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
1905
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
1906
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
1910
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
1911
r->in.pInParams = talloc_ptrtype(r, r->in.pInParams);
1912
PY_CHECK_TYPE(MInterfacePointer_Type, py_pInParams, return false;);
1913
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pInParams)) == NULL) {
1917
r->in.pInParams = (struct MInterfacePointer *)py_talloc_get_ptr(py_pInParams);
1918
r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
1919
PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
1920
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
1924
r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
1928
static PyObject *unpack_py_ExecMethodAsync_args_out(struct ExecMethodAsync *r)
1931
PyObject *py_ORPCthat;
1932
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
1933
result = py_ORPCthat;
1934
if (!W_ERROR_IS_OK(r->out.result)) {
1935
PyErr_SetWERROR(r->out.result);
1942
const struct PyNdrRpcMethodDef py_ndr_IWbemServices_methods[] = {
1943
{ "OpenNamespace", "S.OpenNamespace(ORPCthis, strNamespace, lFlags, pCtx, ppWorkingNamespace, ppResult) -> (ORPCthat, ppWorkingNamespace, ppResult)", (py_dcerpc_call_fn)dcerpc_OpenNamespace_r, (py_data_pack_fn)pack_py_OpenNamespace_args_in, (py_data_unpack_fn)unpack_py_OpenNamespace_args_out, 0, &ndr_table_IWbemServices },
1944
{ "CancelAsyncCall", "S.CancelAsyncCall(ORPCthis, pSink) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_CancelAsyncCall_r, (py_data_pack_fn)pack_py_CancelAsyncCall_args_in, (py_data_unpack_fn)unpack_py_CancelAsyncCall_args_out, 1, &ndr_table_IWbemServices },
1945
{ "QueryObjectSink", "S.QueryObjectSink(ORPCthis, lFlags) -> (ORPCthat, ppResponseHandler)", (py_dcerpc_call_fn)dcerpc_QueryObjectSink_r, (py_data_pack_fn)pack_py_QueryObjectSink_args_in, (py_data_unpack_fn)unpack_py_QueryObjectSink_args_out, 2, &ndr_table_IWbemServices },
1946
{ "GetObject", "S.GetObject(ORPCthis, strObjectPath, lFlags, pCtx, ppObject, ppCallResult) -> (ORPCthat, ppObject, ppCallResult)", (py_dcerpc_call_fn)dcerpc_GetObject_r, (py_data_pack_fn)pack_py_GetObject_args_in, (py_data_unpack_fn)unpack_py_GetObject_args_out, 3, &ndr_table_IWbemServices },
1947
{ "GetObjectAsync", "S.GetObjectAsync(ORPCthis, strObjectPath, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_GetObjectAsync_r, (py_data_pack_fn)pack_py_GetObjectAsync_args_in, (py_data_unpack_fn)unpack_py_GetObjectAsync_args_out, 4, &ndr_table_IWbemServices },
1948
{ "PutClass", "S.PutClass(ORPCthis, pObject, lFlags, pCtx, ppCallResult) -> (ORPCthat, ppCallResult)", (py_dcerpc_call_fn)dcerpc_PutClass_r, (py_data_pack_fn)pack_py_PutClass_args_in, (py_data_unpack_fn)unpack_py_PutClass_args_out, 5, &ndr_table_IWbemServices },
1949
{ "PutClassAsync", "S.PutClassAsync(ORPCthis, pObject, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_PutClassAsync_r, (py_data_pack_fn)pack_py_PutClassAsync_args_in, (py_data_unpack_fn)unpack_py_PutClassAsync_args_out, 6, &ndr_table_IWbemServices },
1950
{ "DeleteClass", "S.DeleteClass(ORPCthis, strClass, lFlags, pCtx, ppCallResult) -> (ORPCthat, ppCallResult)", (py_dcerpc_call_fn)dcerpc_DeleteClass_r, (py_data_pack_fn)pack_py_DeleteClass_args_in, (py_data_unpack_fn)unpack_py_DeleteClass_args_out, 7, &ndr_table_IWbemServices },
1951
{ "DeleteClassAsync", "S.DeleteClassAsync(ORPCthis, strClass, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_DeleteClassAsync_r, (py_data_pack_fn)pack_py_DeleteClassAsync_args_in, (py_data_unpack_fn)unpack_py_DeleteClassAsync_args_out, 8, &ndr_table_IWbemServices },
1952
{ "CreateClassEnum", "S.CreateClassEnum(ORPCthis, strSuperclass, lFlags, pCtx) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_CreateClassEnum_r, (py_data_pack_fn)pack_py_CreateClassEnum_args_in, (py_data_unpack_fn)unpack_py_CreateClassEnum_args_out, 9, &ndr_table_IWbemServices },
1953
{ "CreateClassEnumAsync", "S.CreateClassEnumAsync(ORPCthis, strSuperclass, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_CreateClassEnumAsync_r, (py_data_pack_fn)pack_py_CreateClassEnumAsync_args_in, (py_data_unpack_fn)unpack_py_CreateClassEnumAsync_args_out, 10, &ndr_table_IWbemServices },
1954
{ "PutInstance", "S.PutInstance(ORPCthis, pInst, lFlags, pCtx, ppCallResult) -> (ORPCthat, ppCallResult)", (py_dcerpc_call_fn)dcerpc_PutInstance_r, (py_data_pack_fn)pack_py_PutInstance_args_in, (py_data_unpack_fn)unpack_py_PutInstance_args_out, 11, &ndr_table_IWbemServices },
1955
{ "PutInstanceAsync", "S.PutInstanceAsync(ORPCthis, pInst, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_PutInstanceAsync_r, (py_data_pack_fn)pack_py_PutInstanceAsync_args_in, (py_data_unpack_fn)unpack_py_PutInstanceAsync_args_out, 12, &ndr_table_IWbemServices },
1956
{ "DeleteInstance", "S.DeleteInstance(ORPCthis, strObjectPath, lFlags, pCtx, ppCallResult) -> (ORPCthat, ppCallResult)", (py_dcerpc_call_fn)dcerpc_DeleteInstance_r, (py_data_pack_fn)pack_py_DeleteInstance_args_in, (py_data_unpack_fn)unpack_py_DeleteInstance_args_out, 13, &ndr_table_IWbemServices },
1957
{ "DeleteInstanceAsync", "S.DeleteInstanceAsync(ORPCthis, strObjectPath, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_DeleteInstanceAsync_r, (py_data_pack_fn)pack_py_DeleteInstanceAsync_args_in, (py_data_unpack_fn)unpack_py_DeleteInstanceAsync_args_out, 14, &ndr_table_IWbemServices },
1958
{ "CreateInstanceEnum", "S.CreateInstanceEnum(ORPCthis, strFilter, lFlags, pCtx) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_CreateInstanceEnum_r, (py_data_pack_fn)pack_py_CreateInstanceEnum_args_in, (py_data_unpack_fn)unpack_py_CreateInstanceEnum_args_out, 15, &ndr_table_IWbemServices },
1959
{ "CreateInstanceEnumAsync", "S.CreateInstanceEnumAsync(ORPCthis, strSuperClass, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_CreateInstanceEnumAsync_r, (py_data_pack_fn)pack_py_CreateInstanceEnumAsync_args_in, (py_data_unpack_fn)unpack_py_CreateInstanceEnumAsync_args_out, 16, &ndr_table_IWbemServices },
1960
{ "ExecQuery", "S.ExecQuery(ORPCthis, strQueryLanguage, strQuery, lFlags, pCtx) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_ExecQuery_r, (py_data_pack_fn)pack_py_ExecQuery_args_in, (py_data_unpack_fn)unpack_py_ExecQuery_args_out, 17, &ndr_table_IWbemServices },
1961
{ "ExecQueryAsync", "S.ExecQueryAsync(ORPCthis, strQueryLanguage, strQuery, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_ExecQueryAsync_r, (py_data_pack_fn)pack_py_ExecQueryAsync_args_in, (py_data_unpack_fn)unpack_py_ExecQueryAsync_args_out, 18, &ndr_table_IWbemServices },
1962
{ "ExecNotificationQuery", "S.ExecNotificationQuery(ORPCthis, strQueryLanguage, strQuery, lFlags, pCtx) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_ExecNotificationQuery_r, (py_data_pack_fn)pack_py_ExecNotificationQuery_args_in, (py_data_unpack_fn)unpack_py_ExecNotificationQuery_args_out, 19, &ndr_table_IWbemServices },
1963
{ "ExecNotificationQueryAsync", "S.ExecNotificationQueryAsync(ORPCthis, strQueryLanguage, strQuery, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_ExecNotificationQueryAsync_r, (py_data_pack_fn)pack_py_ExecNotificationQueryAsync_args_in, (py_data_unpack_fn)unpack_py_ExecNotificationQueryAsync_args_out, 20, &ndr_table_IWbemServices },
1964
{ "ExecMethod", "S.ExecMethod(ORPCthis, strObjectPath, strMethodName, lFlags, pCtx, pInParams, ppOutParams, ppCallResult) -> (ORPCthat, ppOutParams, ppCallResult)", (py_dcerpc_call_fn)dcerpc_ExecMethod_r, (py_data_pack_fn)pack_py_ExecMethod_args_in, (py_data_unpack_fn)unpack_py_ExecMethod_args_out, 21, &ndr_table_IWbemServices },
1965
{ "ExecMethodAsync", "S.ExecMethodAsync(ORPCthis, strObjectPath, strMethodName, lFlags, pCtx, pInParams, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_ExecMethodAsync_r, (py_data_pack_fn)pack_py_ExecMethodAsync_args_in, (py_data_unpack_fn)unpack_py_ExecMethodAsync_args_out, 22, &ndr_table_IWbemServices },
1969
static PyObject *interface_IWbemServices_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1971
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemServices);
1974
static PyTypeObject IWbemServices_InterfaceType = {
1975
PyObject_HEAD_INIT(NULL) 0,
1976
.tp_name = "wmi.IWbemServices",
1977
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
1978
.tp_doc = "IWbemServices(binding, lp_ctx=None, credentials=None) -> connection\n"
1980
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
1981
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
1982
"credentials should be a credentials.Credentials object.\n\n",
1983
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1984
.tp_new = interface_IWbemServices_new,
1988
static bool pack_py_Reset_args_in(PyObject *args, PyObject *kwargs, struct Reset *r)
1990
PyObject *py_ORPCthis;
1991
const char *kwnames[] = {
1995
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Reset", discard_const_p(char *, kwnames), &py_ORPCthis)) {
1999
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2000
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2004
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2008
static PyObject *unpack_py_Reset_args_out(struct Reset *r)
2011
PyObject *py_ORPCthat;
2012
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2013
result = py_ORPCthat;
2014
if (!W_ERROR_IS_OK(r->out.result)) {
2015
PyErr_SetWERROR(r->out.result);
2022
static bool pack_py_IEnumWbemClassObject_Next_args_in(PyObject *args, PyObject *kwargs, struct IEnumWbemClassObject_Next *r)
2024
PyObject *py_ORPCthis;
2025
PyObject *py_lTimeout;
2026
PyObject *py_uCount;
2027
const char *kwnames[] = {
2028
"ORPCthis", "lTimeout", "uCount", NULL
2031
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:IEnumWbemClassObject_Next", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout, &py_uCount)) {
2035
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2036
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2040
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2041
PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
2042
r->in.lTimeout = PyInt_AsLong(py_lTimeout);
2043
PY_CHECK_TYPE(&PyInt_Type, py_uCount, return false;);
2044
r->in.uCount = PyInt_AsLong(py_uCount);
2048
static PyObject *unpack_py_IEnumWbemClassObject_Next_args_out(struct IEnumWbemClassObject_Next *r)
2051
PyObject *py_ORPCthat;
2052
PyObject *py_apObjects;
2053
result = PyTuple_New(2);
2054
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2055
PyTuple_SetItem(result, 0, py_ORPCthat);
2056
py_apObjects = PyList_New(*r->out.puReturned);
2057
if (py_apObjects == NULL) {
2061
int apObjects_cntr_1;
2062
for (apObjects_cntr_1 = 0; apObjects_cntr_1 < *r->out.puReturned; apObjects_cntr_1++) {
2063
PyObject *py_apObjects_1;
2064
if (r->out.apObjects[apObjects_cntr_1] == NULL) {
2065
py_apObjects_1 = Py_None;
2066
Py_INCREF(py_apObjects_1);
2068
py_apObjects_1 = py_talloc_reference_ex(MInterfacePointer_Type, r->out.apObjects[apObjects_cntr_1], r->out.apObjects[apObjects_cntr_1]);
2070
PyList_SetItem(py_apObjects, apObjects_cntr_1, py_apObjects_1);
2073
PyTuple_SetItem(result, 1, py_apObjects);
2074
if (!W_ERROR_IS_OK(r->out.result)) {
2075
PyErr_SetWERROR(r->out.result);
2082
static bool pack_py_NextAsync_args_in(PyObject *args, PyObject *kwargs, struct NextAsync *r)
2084
PyObject *py_ORPCthis;
2085
PyObject *py_uCount;
2087
const char *kwnames[] = {
2088
"ORPCthis", "uCount", "pSink", NULL
2091
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:NextAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_uCount, &py_pSink)) {
2095
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2096
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2100
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2101
PY_CHECK_TYPE(&PyInt_Type, py_uCount, return false;);
2102
r->in.uCount = PyInt_AsLong(py_uCount);
2103
r->in.pSink = talloc_ptrtype(r, r->in.pSink);
2104
PY_CHECK_TYPE(MInterfacePointer_Type, py_pSink, return false;);
2105
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pSink)) == NULL) {
2109
r->in.pSink = (struct MInterfacePointer *)py_talloc_get_ptr(py_pSink);
2113
static PyObject *unpack_py_NextAsync_args_out(struct NextAsync *r)
2116
PyObject *py_ORPCthat;
2117
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2118
result = py_ORPCthat;
2119
if (!W_ERROR_IS_OK(r->out.result)) {
2120
PyErr_SetWERROR(r->out.result);
2127
static bool pack_py_IEnumWbemClassObject_Clone_args_in(PyObject *args, PyObject *kwargs, struct IEnumWbemClassObject_Clone *r)
2129
PyObject *py_ORPCthis;
2130
const char *kwnames[] = {
2134
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:IEnumWbemClassObject_Clone", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2138
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2139
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2143
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2147
static PyObject *unpack_py_IEnumWbemClassObject_Clone_args_out(struct IEnumWbemClassObject_Clone *r)
2150
PyObject *py_ORPCthat;
2151
PyObject *py_ppEnum;
2152
result = PyTuple_New(2);
2153
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2154
PyTuple_SetItem(result, 0, py_ORPCthat);
2155
if (*r->out.ppEnum == NULL) {
2156
py_ppEnum = Py_None;
2157
Py_INCREF(py_ppEnum);
2159
py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
2161
PyTuple_SetItem(result, 1, py_ppEnum);
2162
if (!W_ERROR_IS_OK(r->out.result)) {
2163
PyErr_SetWERROR(r->out.result);
2170
static bool pack_py_Skip_args_in(PyObject *args, PyObject *kwargs, struct Skip *r)
2172
PyObject *py_ORPCthis;
2173
PyObject *py_lTimeout;
2174
PyObject *py_nCount;
2175
const char *kwnames[] = {
2176
"ORPCthis", "lTimeout", "nCount", NULL
2179
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:Skip", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout, &py_nCount)) {
2183
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2184
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2188
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2189
PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
2190
r->in.lTimeout = PyInt_AsLong(py_lTimeout);
2191
PY_CHECK_TYPE(&PyInt_Type, py_nCount, return false;);
2192
r->in.nCount = PyInt_AsLong(py_nCount);
2196
static PyObject *unpack_py_Skip_args_out(struct Skip *r)
2199
PyObject *py_ORPCthat;
2200
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2201
result = py_ORPCthat;
2202
if (!W_ERROR_IS_OK(r->out.result)) {
2203
PyErr_SetWERROR(r->out.result);
2210
const struct PyNdrRpcMethodDef py_ndr_IEnumWbemClassObject_methods[] = {
2211
{ "Reset", "S.Reset(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Reset_r, (py_data_pack_fn)pack_py_Reset_args_in, (py_data_unpack_fn)unpack_py_Reset_args_out, 0, &ndr_table_IEnumWbemClassObject },
2212
{ "Next", "S.Next(ORPCthis, lTimeout, uCount) -> (ORPCthat, apObjects)", (py_dcerpc_call_fn)dcerpc_IEnumWbemClassObject_Next_r, (py_data_pack_fn)pack_py_IEnumWbemClassObject_Next_args_in, (py_data_unpack_fn)unpack_py_IEnumWbemClassObject_Next_args_out, 1, &ndr_table_IEnumWbemClassObject },
2213
{ "NextAsync", "S.NextAsync(ORPCthis, uCount, pSink) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_NextAsync_r, (py_data_pack_fn)pack_py_NextAsync_args_in, (py_data_unpack_fn)unpack_py_NextAsync_args_out, 2, &ndr_table_IEnumWbemClassObject },
2214
{ "Clone", "S.Clone(ORPCthis) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_IEnumWbemClassObject_Clone_r, (py_data_pack_fn)pack_py_IEnumWbemClassObject_Clone_args_in, (py_data_unpack_fn)unpack_py_IEnumWbemClassObject_Clone_args_out, 3, &ndr_table_IEnumWbemClassObject },
2215
{ "Skip", "S.Skip(ORPCthis, lTimeout, nCount) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Skip_r, (py_data_pack_fn)pack_py_Skip_args_in, (py_data_unpack_fn)unpack_py_Skip_args_out, 4, &ndr_table_IEnumWbemClassObject },
2219
static PyObject *interface_IEnumWbemClassObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2221
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IEnumWbemClassObject);
2224
static PyTypeObject IEnumWbemClassObject_InterfaceType = {
2225
PyObject_HEAD_INIT(NULL) 0,
2226
.tp_name = "wmi.IEnumWbemClassObject",
2227
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
2228
.tp_doc = "IEnumWbemClassObject(binding, lp_ctx=None, credentials=None) -> connection\n"
2230
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
2231
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
2232
"credentials should be a credentials.Credentials object.\n\n",
2233
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2234
.tp_new = interface_IEnumWbemClassObject_new,
2238
static bool pack_py_Clone_args_in(PyObject *args, PyObject *kwargs, struct Clone *r)
2240
PyObject *py_ORPCthis;
2241
const char *kwnames[] = {
2245
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Clone", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2249
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2250
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2254
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2258
static PyObject *unpack_py_Clone_args_out(struct Clone *r)
2261
PyObject *py_ORPCthat;
2262
PyObject *py_ppNewCopy;
2263
result = PyTuple_New(2);
2264
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2265
PyTuple_SetItem(result, 0, py_ORPCthat);
2266
if (*r->out.ppNewCopy == NULL) {
2267
py_ppNewCopy = Py_None;
2268
Py_INCREF(py_ppNewCopy);
2270
py_ppNewCopy = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppNewCopy, *r->out.ppNewCopy);
2272
PyTuple_SetItem(result, 1, py_ppNewCopy);
2273
if (!W_ERROR_IS_OK(r->out.result)) {
2274
PyErr_SetWERROR(r->out.result);
2281
static bool pack_py_GetNames_args_in(PyObject *args, PyObject *kwargs, struct GetNames *r)
2283
PyObject *py_ORPCthis;
2284
const char *kwnames[] = {
2288
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GetNames", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2292
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2293
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2297
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2301
static PyObject *unpack_py_GetNames_args_out(struct GetNames *r)
2304
PyObject *py_ORPCthat;
2305
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2306
result = py_ORPCthat;
2307
if (!W_ERROR_IS_OK(r->out.result)) {
2308
PyErr_SetWERROR(r->out.result);
2315
static bool pack_py_BeginEnumeration_args_in(PyObject *args, PyObject *kwargs, struct BeginEnumeration *r)
2317
PyObject *py_ORPCthis;
2318
PyObject *py_lFlags;
2319
const char *kwnames[] = {
2320
"ORPCthis", "lFlags", NULL
2323
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:BeginEnumeration", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lFlags)) {
2327
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2328
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2332
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2333
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
2334
r->in.lFlags = PyInt_AsLong(py_lFlags);
2338
static PyObject *unpack_py_BeginEnumeration_args_out(struct BeginEnumeration *r)
2341
PyObject *py_ORPCthat;
2342
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2343
result = py_ORPCthat;
2344
if (!W_ERROR_IS_OK(r->out.result)) {
2345
PyErr_SetWERROR(r->out.result);
2352
static bool pack_py_Next_args_in(PyObject *args, PyObject *kwargs, struct Next *r)
2354
PyObject *py_ORPCthis;
2355
const char *kwnames[] = {
2359
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Next", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2363
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2364
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2368
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2372
static PyObject *unpack_py_Next_args_out(struct Next *r)
2375
PyObject *py_ORPCthat;
2376
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2377
result = py_ORPCthat;
2378
if (!W_ERROR_IS_OK(r->out.result)) {
2379
PyErr_SetWERROR(r->out.result);
2386
static bool pack_py_EndEnumeration_args_in(PyObject *args, PyObject *kwargs, struct EndEnumeration *r)
2388
PyObject *py_ORPCthis;
2389
const char *kwnames[] = {
2393
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:EndEnumeration", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2397
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2398
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2402
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2406
static PyObject *unpack_py_EndEnumeration_args_out(struct EndEnumeration *r)
2409
PyObject *py_ORPCthat;
2410
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2411
result = py_ORPCthat;
2412
if (!W_ERROR_IS_OK(r->out.result)) {
2413
PyErr_SetWERROR(r->out.result);
2420
static bool pack_py_SetValue_args_in(PyObject *args, PyObject *kwargs, struct SetValue *r)
2422
PyObject *py_ORPCthis;
2423
const char *kwnames[] = {
2427
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:SetValue", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2431
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2432
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2436
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2440
static PyObject *unpack_py_SetValue_args_out(struct SetValue *r)
2443
PyObject *py_ORPCthat;
2444
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2445
result = py_ORPCthat;
2446
if (!W_ERROR_IS_OK(r->out.result)) {
2447
PyErr_SetWERROR(r->out.result);
2454
static bool pack_py_GetValue_args_in(PyObject *args, PyObject *kwargs, struct GetValue *r)
2456
PyObject *py_ORPCthis;
2457
const char *kwnames[] = {
2461
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GetValue", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2465
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2466
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2470
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2474
static PyObject *unpack_py_GetValue_args_out(struct GetValue *r)
2477
PyObject *py_ORPCthat;
2478
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2479
result = py_ORPCthat;
2480
if (!W_ERROR_IS_OK(r->out.result)) {
2481
PyErr_SetWERROR(r->out.result);
2488
static bool pack_py_DeleteValue_args_in(PyObject *args, PyObject *kwargs, struct DeleteValue *r)
2490
PyObject *py_ORPCthis;
2491
const char *kwnames[] = {
2495
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:DeleteValue", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2499
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2500
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2504
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2508
static PyObject *unpack_py_DeleteValue_args_out(struct DeleteValue *r)
2511
PyObject *py_ORPCthat;
2512
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2513
result = py_ORPCthat;
2514
if (!W_ERROR_IS_OK(r->out.result)) {
2515
PyErr_SetWERROR(r->out.result);
2522
static bool pack_py_DeleteAll_args_in(PyObject *args, PyObject *kwargs, struct DeleteAll *r)
2524
PyObject *py_ORPCthis;
2525
const char *kwnames[] = {
2529
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:DeleteAll", discard_const_p(char *, kwnames), &py_ORPCthis)) {
2533
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2534
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2538
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2542
static PyObject *unpack_py_DeleteAll_args_out(struct DeleteAll *r)
2545
PyObject *py_ORPCthat;
2546
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2547
result = py_ORPCthat;
2548
if (!W_ERROR_IS_OK(r->out.result)) {
2549
PyErr_SetWERROR(r->out.result);
2556
const struct PyNdrRpcMethodDef py_ndr_IWbemContext_methods[] = {
2557
{ "Clone", "S.Clone(ORPCthis) -> (ORPCthat, ppNewCopy)", (py_dcerpc_call_fn)dcerpc_Clone_r, (py_data_pack_fn)pack_py_Clone_args_in, (py_data_unpack_fn)unpack_py_Clone_args_out, 0, &ndr_table_IWbemContext },
2558
{ "GetNames", "S.GetNames(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_GetNames_r, (py_data_pack_fn)pack_py_GetNames_args_in, (py_data_unpack_fn)unpack_py_GetNames_args_out, 1, &ndr_table_IWbemContext },
2559
{ "BeginEnumeration", "S.BeginEnumeration(ORPCthis, lFlags) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_BeginEnumeration_r, (py_data_pack_fn)pack_py_BeginEnumeration_args_in, (py_data_unpack_fn)unpack_py_BeginEnumeration_args_out, 2, &ndr_table_IWbemContext },
2560
{ "Next", "S.Next(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Next_r, (py_data_pack_fn)pack_py_Next_args_in, (py_data_unpack_fn)unpack_py_Next_args_out, 3, &ndr_table_IWbemContext },
2561
{ "EndEnumeration", "S.EndEnumeration(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_EndEnumeration_r, (py_data_pack_fn)pack_py_EndEnumeration_args_in, (py_data_unpack_fn)unpack_py_EndEnumeration_args_out, 4, &ndr_table_IWbemContext },
2562
{ "SetValue", "S.SetValue(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_SetValue_r, (py_data_pack_fn)pack_py_SetValue_args_in, (py_data_unpack_fn)unpack_py_SetValue_args_out, 5, &ndr_table_IWbemContext },
2563
{ "GetValue", "S.GetValue(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_GetValue_r, (py_data_pack_fn)pack_py_GetValue_args_in, (py_data_unpack_fn)unpack_py_GetValue_args_out, 6, &ndr_table_IWbemContext },
2564
{ "DeleteValue", "S.DeleteValue(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_DeleteValue_r, (py_data_pack_fn)pack_py_DeleteValue_args_in, (py_data_unpack_fn)unpack_py_DeleteValue_args_out, 7, &ndr_table_IWbemContext },
2565
{ "DeleteAll", "S.DeleteAll(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_DeleteAll_r, (py_data_pack_fn)pack_py_DeleteAll_args_in, (py_data_unpack_fn)unpack_py_DeleteAll_args_out, 8, &ndr_table_IWbemContext },
2569
static PyObject *interface_IWbemContext_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2571
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemContext);
2574
static PyTypeObject IWbemContext_InterfaceType = {
2575
PyObject_HEAD_INIT(NULL) 0,
2576
.tp_name = "wmi.IWbemContext",
2577
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
2578
.tp_doc = "IWbemContext(binding, lp_ctx=None, credentials=None) -> connection\n"
2580
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
2581
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
2582
"credentials should be a credentials.Credentials object.\n\n",
2583
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2584
.tp_new = interface_IWbemContext_new,
2588
static bool pack_py_EstablishPosition_args_in(PyObject *args, PyObject *kwargs, struct EstablishPosition *r)
2590
PyObject *py_ORPCthis;
2591
PyObject *py_wszLocaleList;
2592
PyObject *py_dwNumLocales;
2593
const char *kwnames[] = {
2594
"ORPCthis", "wszLocaleList", "dwNumLocales", NULL
2597
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:EstablishPosition", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszLocaleList, &py_dwNumLocales)) {
2601
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2602
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2606
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2607
if (py_wszLocaleList == Py_None) {
2608
r->in.wszLocaleList = NULL;
2610
r->in.wszLocaleList = NULL;
2611
if (PyUnicode_Check(py_wszLocaleList)) {
2612
r->in.wszLocaleList = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszLocaleList, "utf-8", "ignore"));
2613
} else if (PyString_Check(py_wszLocaleList)) {
2614
r->in.wszLocaleList = PyString_AS_STRING(py_wszLocaleList);
2616
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszLocaleList)->tp_name);
2620
PY_CHECK_TYPE(&PyInt_Type, py_dwNumLocales, return false;);
2621
r->in.dwNumLocales = PyInt_AsLong(py_dwNumLocales);
2625
static PyObject *unpack_py_EstablishPosition_args_out(struct EstablishPosition *r)
2628
PyObject *py_ORPCthat;
2629
PyObject *py_reserved;
2630
result = PyTuple_New(2);
2631
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2632
PyTuple_SetItem(result, 0, py_ORPCthat);
2633
py_reserved = PyInt_FromLong(*r->out.reserved);
2634
PyTuple_SetItem(result, 1, py_reserved);
2635
if (!W_ERROR_IS_OK(r->out.result)) {
2636
PyErr_SetWERROR(r->out.result);
2643
static bool pack_py_RequestChallenge_args_in(PyObject *args, PyObject *kwargs, struct RequestChallenge *r)
2645
PyObject *py_ORPCthis;
2646
PyObject *py_wszNetworkResource;
2647
PyObject *py_wszUser;
2648
const char *kwnames[] = {
2649
"ORPCthis", "wszNetworkResource", "wszUser", NULL
2652
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:RequestChallenge", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszNetworkResource, &py_wszUser)) {
2656
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2657
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2661
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2662
if (py_wszNetworkResource == Py_None) {
2663
r->in.wszNetworkResource = NULL;
2665
r->in.wszNetworkResource = NULL;
2666
if (PyUnicode_Check(py_wszNetworkResource)) {
2667
r->in.wszNetworkResource = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszNetworkResource, "utf-8", "ignore"));
2668
} else if (PyString_Check(py_wszNetworkResource)) {
2669
r->in.wszNetworkResource = PyString_AS_STRING(py_wszNetworkResource);
2671
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszNetworkResource)->tp_name);
2675
if (py_wszUser == Py_None) {
2676
r->in.wszUser = NULL;
2678
r->in.wszUser = NULL;
2679
if (PyUnicode_Check(py_wszUser)) {
2680
r->in.wszUser = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszUser, "utf-8", "ignore"));
2681
} else if (PyString_Check(py_wszUser)) {
2682
r->in.wszUser = PyString_AS_STRING(py_wszUser);
2684
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszUser)->tp_name);
2691
static PyObject *unpack_py_RequestChallenge_args_out(struct RequestChallenge *r)
2694
PyObject *py_ORPCthat;
2696
result = PyTuple_New(2);
2697
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2698
PyTuple_SetItem(result, 0, py_ORPCthat);
2699
py_Nonce = PyList_New(16);
2700
if (py_Nonce == NULL) {
2705
for (Nonce_cntr_1 = 0; Nonce_cntr_1 < 16; Nonce_cntr_1++) {
2706
PyObject *py_Nonce_1;
2707
py_Nonce_1 = PyInt_FromLong(r->out.Nonce[Nonce_cntr_1]);
2708
PyList_SetItem(py_Nonce, Nonce_cntr_1, py_Nonce_1);
2711
PyTuple_SetItem(result, 1, py_Nonce);
2712
if (!W_ERROR_IS_OK(r->out.result)) {
2713
PyErr_SetWERROR(r->out.result);
2720
static bool pack_py_WBEMLogin_args_in(PyObject *args, PyObject *kwargs, struct WBEMLogin *r)
2722
PyObject *py_ORPCthis;
2723
PyObject *py_wszPreferredLocale;
2724
PyObject *py_AccessToken;
2725
PyObject *py_lFlags;
2727
const char *kwnames[] = {
2728
"ORPCthis", "wszPreferredLocale", "AccessToken", "lFlags", "pCtx", NULL
2731
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:WBEMLogin", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszPreferredLocale, &py_AccessToken, &py_lFlags, &py_pCtx)) {
2735
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2736
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2740
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2741
if (py_wszPreferredLocale == Py_None) {
2742
r->in.wszPreferredLocale = NULL;
2744
r->in.wszPreferredLocale = NULL;
2745
if (PyUnicode_Check(py_wszPreferredLocale)) {
2746
r->in.wszPreferredLocale = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszPreferredLocale, "utf-8", "ignore"));
2747
} else if (PyString_Check(py_wszPreferredLocale)) {
2748
r->in.wszPreferredLocale = PyString_AS_STRING(py_wszPreferredLocale);
2750
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszPreferredLocale)->tp_name);
2754
if (py_AccessToken == Py_None) {
2755
r->in.AccessToken = NULL;
2757
r->in.AccessToken = NULL;
2758
PY_CHECK_TYPE(&PyList_Type, py_AccessToken, return false;);
2760
int AccessToken_cntr_1;
2761
r->in.AccessToken = talloc_array_ptrtype(r, r->in.AccessToken, PyList_GET_SIZE(py_AccessToken));
2762
if (!r->in.AccessToken) { return false;; }
2763
talloc_set_name_const(r->in.AccessToken, "ARRAY: r->in.AccessToken");
2764
for (AccessToken_cntr_1 = 0; AccessToken_cntr_1 < PyList_GET_SIZE(py_AccessToken); AccessToken_cntr_1++) {
2765
PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_AccessToken, AccessToken_cntr_1), return false;);
2766
r->in.AccessToken[AccessToken_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(py_AccessToken, AccessToken_cntr_1));
2770
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
2771
r->in.lFlags = PyInt_AsLong(py_lFlags);
2772
r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
2773
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
2774
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
2778
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
2782
static PyObject *unpack_py_WBEMLogin_args_out(struct WBEMLogin *r)
2785
PyObject *py_ORPCthat;
2786
PyObject *py_ppNamespace;
2787
result = PyTuple_New(2);
2788
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2789
PyTuple_SetItem(result, 0, py_ORPCthat);
2790
if (*r->out.ppNamespace == NULL) {
2791
py_ppNamespace = Py_None;
2792
Py_INCREF(py_ppNamespace);
2794
py_ppNamespace = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppNamespace, *r->out.ppNamespace);
2796
PyTuple_SetItem(result, 1, py_ppNamespace);
2797
if (!W_ERROR_IS_OK(r->out.result)) {
2798
PyErr_SetWERROR(r->out.result);
2805
static bool pack_py_NTLMLogin_args_in(PyObject *args, PyObject *kwargs, struct NTLMLogin *r)
2807
PyObject *py_ORPCthis;
2808
PyObject *py_wszNetworkResource;
2809
PyObject *py_wszPreferredLocale;
2810
PyObject *py_lFlags;
2812
const char *kwnames[] = {
2813
"ORPCthis", "wszNetworkResource", "wszPreferredLocale", "lFlags", "pCtx", NULL
2816
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:NTLMLogin", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszNetworkResource, &py_wszPreferredLocale, &py_lFlags, &py_pCtx)) {
2820
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
2821
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
2825
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
2826
if (py_wszNetworkResource == Py_None) {
2827
r->in.wszNetworkResource = NULL;
2829
r->in.wszNetworkResource = NULL;
2830
if (PyUnicode_Check(py_wszNetworkResource)) {
2831
r->in.wszNetworkResource = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszNetworkResource, "utf-8", "ignore"));
2832
} else if (PyString_Check(py_wszNetworkResource)) {
2833
r->in.wszNetworkResource = PyString_AS_STRING(py_wszNetworkResource);
2835
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszNetworkResource)->tp_name);
2839
if (py_wszPreferredLocale == Py_None) {
2840
r->in.wszPreferredLocale = NULL;
2842
r->in.wszPreferredLocale = NULL;
2843
if (PyUnicode_Check(py_wszPreferredLocale)) {
2844
r->in.wszPreferredLocale = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszPreferredLocale, "utf-8", "ignore"));
2845
} else if (PyString_Check(py_wszPreferredLocale)) {
2846
r->in.wszPreferredLocale = PyString_AS_STRING(py_wszPreferredLocale);
2848
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszPreferredLocale)->tp_name);
2852
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
2853
r->in.lFlags = PyInt_AsLong(py_lFlags);
2854
if (py_pCtx == Py_None) {
2858
PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
2859
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
2863
r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
2868
static PyObject *unpack_py_NTLMLogin_args_out(struct NTLMLogin *r)
2871
PyObject *py_ORPCthat;
2872
PyObject *py_ppNamespace;
2873
result = PyTuple_New(2);
2874
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
2875
PyTuple_SetItem(result, 0, py_ORPCthat);
2876
if (*r->out.ppNamespace == NULL) {
2877
py_ppNamespace = Py_None;
2878
Py_INCREF(py_ppNamespace);
2880
py_ppNamespace = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppNamespace, *r->out.ppNamespace);
2882
PyTuple_SetItem(result, 1, py_ppNamespace);
2883
if (!W_ERROR_IS_OK(r->out.result)) {
2884
PyErr_SetWERROR(r->out.result);
2891
const struct PyNdrRpcMethodDef py_ndr_IWbemLevel1Login_methods[] = {
2892
{ "EstablishPosition", "S.EstablishPosition(ORPCthis, wszLocaleList, dwNumLocales) -> (ORPCthat, reserved)", (py_dcerpc_call_fn)dcerpc_EstablishPosition_r, (py_data_pack_fn)pack_py_EstablishPosition_args_in, (py_data_unpack_fn)unpack_py_EstablishPosition_args_out, 0, &ndr_table_IWbemLevel1Login },
2893
{ "RequestChallenge", "S.RequestChallenge(ORPCthis, wszNetworkResource, wszUser) -> (ORPCthat, Nonce)", (py_dcerpc_call_fn)dcerpc_RequestChallenge_r, (py_data_pack_fn)pack_py_RequestChallenge_args_in, (py_data_unpack_fn)unpack_py_RequestChallenge_args_out, 1, &ndr_table_IWbemLevel1Login },
2894
{ "WBEMLogin", "S.WBEMLogin(ORPCthis, wszPreferredLocale, AccessToken, lFlags, pCtx) -> (ORPCthat, ppNamespace)", (py_dcerpc_call_fn)dcerpc_WBEMLogin_r, (py_data_pack_fn)pack_py_WBEMLogin_args_in, (py_data_unpack_fn)unpack_py_WBEMLogin_args_out, 2, &ndr_table_IWbemLevel1Login },
2895
{ "NTLMLogin", "S.NTLMLogin(ORPCthis, wszNetworkResource, wszPreferredLocale, lFlags, pCtx) -> (ORPCthat, ppNamespace)", (py_dcerpc_call_fn)dcerpc_NTLMLogin_r, (py_data_pack_fn)pack_py_NTLMLogin_args_in, (py_data_unpack_fn)unpack_py_NTLMLogin_args_out, 3, &ndr_table_IWbemLevel1Login },
2899
static PyObject *interface_IWbemLevel1Login_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2901
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemLevel1Login);
2904
static PyTypeObject IWbemLevel1Login_InterfaceType = {
2905
PyObject_HEAD_INIT(NULL) 0,
2906
.tp_name = "wmi.IWbemLevel1Login",
2907
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
2908
.tp_doc = "IWbemLevel1Login(binding, lp_ctx=None, credentials=None) -> connection\n"
2910
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
2911
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
2912
"credentials should be a credentials.Credentials object.\n\n",
2913
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2914
.tp_new = interface_IWbemLevel1Login_new,
2918
static PyObject *py_WBEMDATA_get_size(PyObject *obj, void *closure)
2920
struct WBEMDATA *object = (struct WBEMDATA *)py_talloc_get_ptr(obj);
2922
py_size = PyInt_FromLong(object->size);
2926
static int py_WBEMDATA_set_size(PyObject *py_obj, PyObject *value, void *closure)
2928
struct WBEMDATA *object = (struct WBEMDATA *)py_talloc_get_ptr(py_obj);
2929
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2930
object->size = PyInt_AsLong(value);
2934
static PyObject *py_WBEMDATA_get_data(PyObject *obj, void *closure)
2936
struct WBEMDATA *object = (struct WBEMDATA *)py_talloc_get_ptr(obj);
2938
py_data = PyList_New(object->size);
2939
if (py_data == NULL) {
2944
for (data_cntr_0 = 0; data_cntr_0 < object->size; data_cntr_0++) {
2945
PyObject *py_data_0;
2946
py_data_0 = PyInt_FromLong(object->data[data_cntr_0]);
2947
PyList_SetItem(py_data, data_cntr_0, py_data_0);
2953
static int py_WBEMDATA_set_data(PyObject *py_obj, PyObject *value, void *closure)
2955
struct WBEMDATA *object = (struct WBEMDATA *)py_talloc_get_ptr(py_obj);
2956
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2959
object->data = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
2960
if (!object->data) { return -1;; }
2961
talloc_set_name_const(object->data, "ARRAY: object->data");
2962
for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
2963
PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, data_cntr_0), return -1;);
2964
object->data[data_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, data_cntr_0));
2970
static PyGetSetDef py_WBEMDATA_getsetters[] = {
2971
{ discard_const_p(char, "size"), py_WBEMDATA_get_size, py_WBEMDATA_set_size },
2972
{ discard_const_p(char, "data"), py_WBEMDATA_get_data, py_WBEMDATA_set_data },
2976
static PyObject *py_WBEMDATA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2978
return py_talloc_new(struct WBEMDATA, type);
2982
static PyTypeObject WBEMDATA_Type = {
2983
PyObject_HEAD_INIT(NULL) 0,
2984
.tp_name = "wmi.WBEMDATA",
2985
.tp_getset = py_WBEMDATA_getsetters,
2987
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2988
.tp_basicsize = sizeof(py_talloc_Object),
2989
.tp_new = py_WBEMDATA_new,
2993
static PyObject *py_WBEMDATA4_get_data_size(PyObject *obj, void *closure)
2995
struct WBEMDATA4 *object = (struct WBEMDATA4 *)py_talloc_get_ptr(obj);
2996
PyObject *py_data_size;
2997
py_data_size = PyInt_FromLong(object->data_size);
2998
return py_data_size;
3001
static int py_WBEMDATA4_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
3003
struct WBEMDATA4 *object = (struct WBEMDATA4 *)py_talloc_get_ptr(py_obj);
3004
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3005
object->data_size = PyInt_AsLong(value);
3009
static PyObject *py_WBEMDATA4_get_wtype(PyObject *obj, void *closure)
3011
struct WBEMDATA4 *object = (struct WBEMDATA4 *)py_talloc_get_ptr(obj);
3013
py_wtype = PyInt_FromLong(object->wtype);
3017
static int py_WBEMDATA4_set_wtype(PyObject *py_obj, PyObject *value, void *closure)
3019
struct WBEMDATA4 *object = (struct WBEMDATA4 *)py_talloc_get_ptr(py_obj);
3020
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3021
object->wtype = PyInt_AsLong(value);
3025
static PyGetSetDef py_WBEMDATA4_getsetters[] = {
3026
{ discard_const_p(char, "data_size"), py_WBEMDATA4_get_data_size, py_WBEMDATA4_set_data_size },
3027
{ discard_const_p(char, "wtype"), py_WBEMDATA4_get_wtype, py_WBEMDATA4_set_wtype },
3031
static PyObject *py_WBEMDATA4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3033
return py_talloc_new(struct WBEMDATA4, type);
3037
static PyTypeObject WBEMDATA4_Type = {
3038
PyObject_HEAD_INIT(NULL) 0,
3039
.tp_name = "wmi.WBEMDATA4",
3040
.tp_getset = py_WBEMDATA4_getsetters,
3042
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3043
.tp_basicsize = sizeof(py_talloc_Object),
3044
.tp_new = py_WBEMDATA4_new,
3048
static PyObject *py_WBEMDATA3_get_data(PyObject *obj, void *closure)
3050
struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(obj);
3052
if (object->data == NULL) {
3056
py_data = py_talloc_reference_ex(&WBEMDATA4_Type, object->data, object->data);
3061
static int py_WBEMDATA3_set_data(PyObject *py_obj, PyObject *value, void *closure)
3063
struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(py_obj);
3064
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
3065
if (value == Py_None) {
3066
object->data = NULL;
3068
object->data = NULL;
3069
PY_CHECK_TYPE(&WBEMDATA4_Type, value, return -1;);
3070
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
3074
object->data = (struct WBEMDATA4 *)py_talloc_get_ptr(value);
3079
static PyObject *py_WBEMDATA3_get_data_size(PyObject *obj, void *closure)
3081
struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(obj);
3082
PyObject *py_data_size;
3083
py_data_size = PyInt_FromLong(object->data_size);
3084
return py_data_size;
3087
static int py_WBEMDATA3_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
3089
struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(py_obj);
3090
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3091
object->data_size = PyInt_AsLong(value);
3095
static PyObject *py_WBEMDATA3_get_wtype(PyObject *obj, void *closure)
3097
struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(obj);
3099
py_wtype = PyInt_FromLong(object->wtype);
3103
static int py_WBEMDATA3_set_wtype(PyObject *py_obj, PyObject *value, void *closure)
3105
struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(py_obj);
3106
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3107
object->wtype = PyInt_AsLong(value);
3111
static PyGetSetDef py_WBEMDATA3_getsetters[] = {
3112
{ discard_const_p(char, "data"), py_WBEMDATA3_get_data, py_WBEMDATA3_set_data },
3113
{ discard_const_p(char, "data_size"), py_WBEMDATA3_get_data_size, py_WBEMDATA3_set_data_size },
3114
{ discard_const_p(char, "wtype"), py_WBEMDATA3_get_wtype, py_WBEMDATA3_set_wtype },
3118
static PyObject *py_WBEMDATA3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3120
return py_talloc_new(struct WBEMDATA3, type);
3124
static PyTypeObject WBEMDATA3_Type = {
3125
PyObject_HEAD_INIT(NULL) 0,
3126
.tp_name = "wmi.WBEMDATA3",
3127
.tp_getset = py_WBEMDATA3_getsetters,
3129
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3130
.tp_basicsize = sizeof(py_talloc_Object),
3131
.tp_new = py_WBEMDATA3_new,
3135
static PyObject *py_WBEMDATA2_get_data(PyObject *obj, void *closure)
3137
struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(obj);
3139
if (object->data == NULL) {
3143
py_data = PyList_New(object->obj_num);
3144
if (py_data == NULL) {
3149
for (data_cntr_1 = 0; data_cntr_1 < object->obj_num; data_cntr_1++) {
3150
PyObject *py_data_1;
3151
py_data_1 = py_talloc_reference_ex(&WBEMDATA3_Type, object->data, &object->data[data_cntr_1]);
3152
PyList_SetItem(py_data, data_cntr_1, py_data_1);
3159
static int py_WBEMDATA2_set_data(PyObject *py_obj, PyObject *value, void *closure)
3161
struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(py_obj);
3162
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
3163
if (value == Py_None) {
3164
object->data = NULL;
3166
object->data = NULL;
3167
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3170
object->data = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
3171
if (!object->data) { return -1;; }
3172
talloc_set_name_const(object->data, "ARRAY: object->data");
3173
for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
3174
PY_CHECK_TYPE(&WBEMDATA3_Type, PyList_GET_ITEM(value, data_cntr_1), return -1;);
3175
if (talloc_reference(object->data, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, data_cntr_1))) == NULL) {
3179
object->data[data_cntr_1] = *(struct WBEMDATA3 *)py_talloc_get_ptr(PyList_GET_ITEM(value, data_cntr_1));
3186
static PyObject *py_WBEMDATA2_get_data_size(PyObject *obj, void *closure)
3188
struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(obj);
3189
PyObject *py_data_size;
3190
py_data_size = PyInt_FromLong(object->data_size);
3191
return py_data_size;
3194
static int py_WBEMDATA2_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
3196
struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(py_obj);
3197
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3198
object->data_size = PyInt_AsLong(value);
3202
static PyObject *py_WBEMDATA2_get_obj_num(PyObject *obj, void *closure)
3204
struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(obj);
3205
PyObject *py_obj_num;
3206
py_obj_num = PyInt_FromLong(object->obj_num);
3210
static int py_WBEMDATA2_set_obj_num(PyObject *py_obj, PyObject *value, void *closure)
3212
struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(py_obj);
3213
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3214
object->obj_num = PyInt_AsLong(value);
3218
static PyGetSetDef py_WBEMDATA2_getsetters[] = {
3219
{ discard_const_p(char, "data"), py_WBEMDATA2_get_data, py_WBEMDATA2_set_data },
3220
{ discard_const_p(char, "data_size"), py_WBEMDATA2_get_data_size, py_WBEMDATA2_set_data_size },
3221
{ discard_const_p(char, "obj_num"), py_WBEMDATA2_get_obj_num, py_WBEMDATA2_set_obj_num },
3225
static PyObject *py_WBEMDATA2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3227
return py_talloc_new(struct WBEMDATA2, type);
3231
static PyTypeObject WBEMDATA2_Type = {
3232
PyObject_HEAD_INIT(NULL) 0,
3233
.tp_name = "wmi.WBEMDATA2",
3234
.tp_getset = py_WBEMDATA2_getsetters,
3236
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3237
.tp_basicsize = sizeof(py_talloc_Object),
3238
.tp_new = py_WBEMDATA2_new,
3242
static PyObject *py_WBEMDATA1_get_data(PyObject *obj, void *closure)
3244
struct WBEMDATA1 *object = (struct WBEMDATA1 *)py_talloc_get_ptr(obj);
3246
if (object->data == NULL) {
3250
py_data = py_talloc_reference_ex(&WBEMDATA2_Type, object->data, object->data);
3255
static int py_WBEMDATA1_set_data(PyObject *py_obj, PyObject *value, void *closure)
3257
struct WBEMDATA1 *object = (struct WBEMDATA1 *)py_talloc_get_ptr(py_obj);
3258
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
3259
if (value == Py_None) {
3260
object->data = NULL;
3262
object->data = NULL;
3263
PY_CHECK_TYPE(&WBEMDATA2_Type, value, return -1;);
3264
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
3268
object->data = (struct WBEMDATA2 *)py_talloc_get_ptr(value);
3273
static PyObject *py_WBEMDATA1_get_data_size(PyObject *obj, void *closure)
3275
struct WBEMDATA1 *object = (struct WBEMDATA1 *)py_talloc_get_ptr(obj);
3276
PyObject *py_data_size;
3277
py_data_size = PyInt_FromLong(object->data_size);
3278
return py_data_size;
3281
static int py_WBEMDATA1_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
3283
struct WBEMDATA1 *object = (struct WBEMDATA1 *)py_talloc_get_ptr(py_obj);
3284
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3285
object->data_size = PyInt_AsLong(value);
3289
static PyGetSetDef py_WBEMDATA1_getsetters[] = {
3290
{ discard_const_p(char, "data"), py_WBEMDATA1_get_data, py_WBEMDATA1_set_data },
3291
{ discard_const_p(char, "data_size"), py_WBEMDATA1_get_data_size, py_WBEMDATA1_set_data_size },
3295
static PyObject *py_WBEMDATA1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3297
return py_talloc_new(struct WBEMDATA1, type);
3301
static PyTypeObject WBEMDATA1_Type = {
3302
PyObject_HEAD_INIT(NULL) 0,
3303
.tp_name = "wmi.WBEMDATA1",
3304
.tp_getset = py_WBEMDATA1_getsetters,
3306
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3307
.tp_basicsize = sizeof(py_talloc_Object),
3308
.tp_new = py_WBEMDATA1_new,
3312
static PyObject *py_WBEMDATA0_get_u1_0(PyObject *obj, void *closure)
3314
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
3316
py_u1_0 = PyInt_FromLong(object->u1_0);
3320
static int py_WBEMDATA0_set_u1_0(PyObject *py_obj, PyObject *value, void *closure)
3322
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
3323
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3324
object->u1_0 = PyInt_AsLong(value);
3328
static PyObject *py_WBEMDATA0_get_signature(PyObject *obj, void *closure)
3330
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
3331
PyObject *py_signature;
3332
py_signature = PyLong_FromLongLong(object->signature);
3333
return py_signature;
3336
static int py_WBEMDATA0_set_signature(PyObject *py_obj, PyObject *value, void *closure)
3338
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
3339
if (PyLong_Check(value)) {
3340
object->signature = PyLong_AsLongLong(value);
3341
} else if (PyInt_Check(value)) {
3342
object->signature = PyInt_AsLong(value);
3344
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3345
PyInt_Type.tp_name, PyLong_Type.tp_name);
3351
static PyObject *py_WBEMDATA0_get_data(PyObject *obj, void *closure)
3353
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
3355
if (object->data == NULL) {
3359
py_data = py_talloc_reference_ex(&WBEMDATA1_Type, object->data, object->data);
3364
static int py_WBEMDATA0_set_data(PyObject *py_obj, PyObject *value, void *closure)
3366
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
3367
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
3368
if (value == Py_None) {
3369
object->data = NULL;
3371
object->data = NULL;
3372
PY_CHECK_TYPE(&WBEMDATA1_Type, value, return -1;);
3373
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
3377
object->data = (struct WBEMDATA1 *)py_talloc_get_ptr(value);
3382
static PyObject *py_WBEMDATA0_get_data_size(PyObject *obj, void *closure)
3384
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
3385
PyObject *py_data_size;
3386
py_data_size = PyInt_FromLong(object->data_size);
3387
return py_data_size;
3390
static int py_WBEMDATA0_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
3392
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
3393
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3394
object->data_size = PyInt_AsLong(value);
3398
static PyObject *py_WBEMDATA0_get_u2_0(PyObject *obj, void *closure)
3400
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
3402
py_u2_0 = PyInt_FromLong(object->u2_0);
3406
static int py_WBEMDATA0_set_u2_0(PyObject *py_obj, PyObject *value, void *closure)
3408
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
3409
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3410
object->u2_0 = PyInt_AsLong(value);
3414
static PyObject *py_WBEMDATA0_get_ver_major(PyObject *obj, void *closure)
3416
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
3417
PyObject *py_ver_major;
3418
py_ver_major = PyInt_FromLong(object->ver_major);
3419
return py_ver_major;
3422
static int py_WBEMDATA0_set_ver_major(PyObject *py_obj, PyObject *value, void *closure)
3424
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
3425
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3426
object->ver_major = PyInt_AsLong(value);
3430
static PyObject *py_WBEMDATA0_get_ver_minor(PyObject *obj, void *closure)
3432
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
3433
PyObject *py_ver_minor;
3434
py_ver_minor = PyInt_FromLong(object->ver_minor);
3435
return py_ver_minor;
3438
static int py_WBEMDATA0_set_ver_minor(PyObject *py_obj, PyObject *value, void *closure)
3440
struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
3441
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3442
object->ver_minor = PyInt_AsLong(value);
3446
static PyGetSetDef py_WBEMDATA0_getsetters[] = {
3447
{ discard_const_p(char, "u1_0"), py_WBEMDATA0_get_u1_0, py_WBEMDATA0_set_u1_0 },
3448
{ discard_const_p(char, "signature"), py_WBEMDATA0_get_signature, py_WBEMDATA0_set_signature },
3449
{ discard_const_p(char, "data"), py_WBEMDATA0_get_data, py_WBEMDATA0_set_data },
3450
{ discard_const_p(char, "data_size"), py_WBEMDATA0_get_data_size, py_WBEMDATA0_set_data_size },
3451
{ discard_const_p(char, "u2_0"), py_WBEMDATA0_get_u2_0, py_WBEMDATA0_set_u2_0 },
3452
{ discard_const_p(char, "ver_major"), py_WBEMDATA0_get_ver_major, py_WBEMDATA0_set_ver_major },
3453
{ discard_const_p(char, "ver_minor"), py_WBEMDATA0_get_ver_minor, py_WBEMDATA0_set_ver_minor },
3457
static PyObject *py_WBEMDATA0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3459
return py_talloc_new(struct WBEMDATA0, type);
3463
static PyTypeObject WBEMDATA0_Type = {
3464
PyObject_HEAD_INIT(NULL) 0,
3465
.tp_name = "wmi.WBEMDATA0",
3466
.tp_getset = py_WBEMDATA0_getsetters,
3468
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3469
.tp_basicsize = sizeof(py_talloc_Object),
3470
.tp_new = py_WBEMDATA0_new,
3474
static bool pack_py_IWbemWCOSmartEnum_Next_args_in(PyObject *args, PyObject *kwargs, struct IWbemWCOSmartEnum_Next *r)
3476
PyObject *py_ORPCthis;
3478
PyObject *py_lTimeOut;
3479
PyObject *py_uCount;
3480
PyObject *py_unknown;
3482
const char *kwnames[] = {
3483
"ORPCthis", "gEWCO", "lTimeOut", "uCount", "unknown", "gWCO", NULL
3486
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:IWbemWCOSmartEnum_Next", discard_const_p(char *, kwnames), &py_ORPCthis, &py_gEWCO, &py_lTimeOut, &py_uCount, &py_unknown, &py_gWCO)) {
3490
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3491
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3495
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3496
r->in.gEWCO = talloc_ptrtype(r, r->in.gEWCO);
3497
PY_CHECK_TYPE(GUID_Type, py_gEWCO, return false;);
3498
if (talloc_reference(r, py_talloc_get_mem_ctx(py_gEWCO)) == NULL) {
3502
r->in.gEWCO = (struct GUID *)py_talloc_get_ptr(py_gEWCO);
3503
PY_CHECK_TYPE(&PyInt_Type, py_lTimeOut, return false;);
3504
r->in.lTimeOut = PyInt_AsLong(py_lTimeOut);
3505
PY_CHECK_TYPE(&PyInt_Type, py_uCount, return false;);
3506
r->in.uCount = PyInt_AsLong(py_uCount);
3507
PY_CHECK_TYPE(&PyInt_Type, py_unknown, return false;);
3508
r->in.unknown = PyInt_AsLong(py_unknown);
3509
r->in.gWCO = talloc_ptrtype(r, r->in.gWCO);
3510
PY_CHECK_TYPE(GUID_Type, py_gWCO, return false;);
3511
if (talloc_reference(r, py_talloc_get_mem_ctx(py_gWCO)) == NULL) {
3515
r->in.gWCO = (struct GUID *)py_talloc_get_ptr(py_gWCO);
3519
static PyObject *unpack_py_IWbemWCOSmartEnum_Next_args_out(struct IWbemWCOSmartEnum_Next *r)
3522
PyObject *py_ORPCthat;
3523
PyObject *py_puReturned;
3526
result = PyTuple_New(4);
3527
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3528
PyTuple_SetItem(result, 0, py_ORPCthat);
3529
py_puReturned = PyInt_FromLong(*r->out.puReturned);
3530
PyTuple_SetItem(result, 1, py_puReturned);
3531
py_pSize = PyInt_FromLong(*r->out.pSize);
3532
PyTuple_SetItem(result, 2, py_pSize);
3533
if (*r->out.pData == NULL) {
3535
Py_INCREF(py_pData);
3537
py_pData = PyList_New(*r->out.pSize);
3538
if (py_pData == NULL) {
3543
for (pData_cntr_2 = 0; pData_cntr_2 < *r->out.pSize; pData_cntr_2++) {
3544
PyObject *py_pData_2;
3545
py_pData_2 = PyInt_FromLong(*r->out.pData[pData_cntr_2]);
3546
PyList_SetItem(py_pData, pData_cntr_2, py_pData_2);
3550
PyTuple_SetItem(result, 3, py_pData);
3551
if (!W_ERROR_IS_OK(r->out.result)) {
3552
PyErr_SetWERROR(r->out.result);
3559
const struct PyNdrRpcMethodDef py_ndr_IWbemWCOSmartEnum_methods[] = {
3560
{ "Next", "S.Next(ORPCthis, gEWCO, lTimeOut, uCount, unknown, gWCO) -> (ORPCthat, puReturned, pSize, pData)", (py_dcerpc_call_fn)dcerpc_IWbemWCOSmartEnum_Next_r, (py_data_pack_fn)pack_py_IWbemWCOSmartEnum_Next_args_in, (py_data_unpack_fn)unpack_py_IWbemWCOSmartEnum_Next_args_out, 0, &ndr_table_IWbemWCOSmartEnum },
3564
static PyObject *interface_IWbemWCOSmartEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3566
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemWCOSmartEnum);
3569
static PyTypeObject IWbemWCOSmartEnum_InterfaceType = {
3570
PyObject_HEAD_INIT(NULL) 0,
3571
.tp_name = "wmi.IWbemWCOSmartEnum",
3572
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
3573
.tp_doc = "IWbemWCOSmartEnum(binding, lp_ctx=None, credentials=None) -> connection\n"
3575
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
3576
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
3577
"credentials should be a credentials.Credentials object.\n\n",
3578
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3579
.tp_new = interface_IWbemWCOSmartEnum_new,
3583
static bool pack_py_Fetch_args_in(PyObject *args, PyObject *kwargs, struct Fetch *r)
3585
PyObject *py_ORPCthis;
3586
const char *kwnames[] = {
3590
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Fetch", discard_const_p(char *, kwnames), &py_ORPCthis)) {
3594
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3595
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3599
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3603
static PyObject *unpack_py_Fetch_args_out(struct Fetch *r)
3606
PyObject *py_ORPCthat;
3607
PyObject *py_ppEnum;
3608
result = PyTuple_New(2);
3609
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3610
PyTuple_SetItem(result, 0, py_ORPCthat);
3611
if (*r->out.ppEnum == NULL) {
3612
py_ppEnum = Py_None;
3613
Py_INCREF(py_ppEnum);
3615
py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
3617
PyTuple_SetItem(result, 1, py_ppEnum);
3618
if (!W_ERROR_IS_OK(r->out.result)) {
3619
PyErr_SetWERROR(r->out.result);
3626
static bool pack_py_Test_args_in(PyObject *args, PyObject *kwargs, struct Test *r)
3628
PyObject *py_ORPCthis;
3629
const char *kwnames[] = {
3633
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Test", discard_const_p(char *, kwnames), &py_ORPCthis)) {
3637
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3638
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3642
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3646
static PyObject *unpack_py_Test_args_out(struct Test *r)
3649
PyObject *py_ORPCthat;
3650
PyObject *py_ppEnum;
3651
result = PyTuple_New(2);
3652
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3653
PyTuple_SetItem(result, 0, py_ORPCthat);
3654
if (*r->out.ppEnum == NULL) {
3655
py_ppEnum = Py_None;
3656
Py_INCREF(py_ppEnum);
3658
py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
3660
PyTuple_SetItem(result, 1, py_ppEnum);
3661
if (!W_ERROR_IS_OK(r->out.result)) {
3662
PyErr_SetWERROR(r->out.result);
3669
const struct PyNdrRpcMethodDef py_ndr_IWbemFetchSmartEnum_methods[] = {
3670
{ "Fetch", "S.Fetch(ORPCthis) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_Fetch_r, (py_data_pack_fn)pack_py_Fetch_args_in, (py_data_unpack_fn)unpack_py_Fetch_args_out, 0, &ndr_table_IWbemFetchSmartEnum },
3671
{ "Test", "S.Test(ORPCthis) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_Test_r, (py_data_pack_fn)pack_py_Test_args_in, (py_data_unpack_fn)unpack_py_Test_args_out, 1, &ndr_table_IWbemFetchSmartEnum },
3675
static PyObject *interface_IWbemFetchSmartEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3677
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemFetchSmartEnum);
3680
static PyTypeObject IWbemFetchSmartEnum_InterfaceType = {
3681
PyObject_HEAD_INIT(NULL) 0,
3682
.tp_name = "wmi.IWbemFetchSmartEnum",
3683
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
3684
.tp_doc = "IWbemFetchSmartEnum(binding, lp_ctx=None, credentials=None) -> connection\n"
3686
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
3687
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
3688
"credentials should be a credentials.Credentials object.\n\n",
3689
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3690
.tp_new = interface_IWbemFetchSmartEnum_new,
3694
static bool pack_py_GetResultObject_args_in(PyObject *args, PyObject *kwargs, struct GetResultObject *r)
3696
PyObject *py_ORPCthis;
3697
PyObject *py_lTimeout;
3698
const char *kwnames[] = {
3699
"ORPCthis", "lTimeout", NULL
3702
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GetResultObject", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout)) {
3706
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3707
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3711
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3712
PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
3713
r->in.lTimeout = PyInt_AsLong(py_lTimeout);
3717
static PyObject *unpack_py_GetResultObject_args_out(struct GetResultObject *r)
3720
PyObject *py_ORPCthat;
3721
PyObject *py_ppResultObject;
3722
result = PyTuple_New(2);
3723
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3724
PyTuple_SetItem(result, 0, py_ORPCthat);
3725
if (*r->out.ppResultObject == NULL) {
3726
py_ppResultObject = Py_None;
3727
Py_INCREF(py_ppResultObject);
3729
py_ppResultObject = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppResultObject, *r->out.ppResultObject);
3731
PyTuple_SetItem(result, 1, py_ppResultObject);
3732
if (!W_ERROR_IS_OK(r->out.result)) {
3733
PyErr_SetWERROR(r->out.result);
3740
static bool pack_py_GetResultString_args_in(PyObject *args, PyObject *kwargs, struct GetResultString *r)
3742
PyObject *py_ORPCthis;
3743
PyObject *py_lTimeout;
3744
const char *kwnames[] = {
3745
"ORPCthis", "lTimeout", NULL
3748
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GetResultString", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout)) {
3752
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3753
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3757
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3758
PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
3759
r->in.lTimeout = PyInt_AsLong(py_lTimeout);
3763
static PyObject *unpack_py_GetResultString_args_out(struct GetResultString *r)
3766
PyObject *py_ORPCthat;
3767
PyObject *py_pstrResultString;
3768
result = PyTuple_New(2);
3769
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3770
PyTuple_SetItem(result, 0, py_ORPCthat);
3771
py_pstrResultString = py_talloc_reference_ex(&BSTR_Type, r->out.pstrResultString, r->out.pstrResultString);
3772
PyTuple_SetItem(result, 1, py_pstrResultString);
3773
if (!W_ERROR_IS_OK(r->out.result)) {
3774
PyErr_SetWERROR(r->out.result);
3781
static bool pack_py_GetResultServices_args_in(PyObject *args, PyObject *kwargs, struct GetResultServices *r)
3783
PyObject *py_ORPCthis;
3784
PyObject *py_lTimeout;
3785
const char *kwnames[] = {
3786
"ORPCthis", "lTimeout", NULL
3789
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GetResultServices", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout)) {
3793
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3794
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3798
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3799
PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
3800
r->in.lTimeout = PyInt_AsLong(py_lTimeout);
3804
static PyObject *unpack_py_GetResultServices_args_out(struct GetResultServices *r)
3807
PyObject *py_ORPCthat;
3808
PyObject *py_ppServices;
3809
result = PyTuple_New(2);
3810
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3811
PyTuple_SetItem(result, 0, py_ORPCthat);
3812
if (*r->out.ppServices == NULL) {
3813
py_ppServices = Py_None;
3814
Py_INCREF(py_ppServices);
3816
py_ppServices = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppServices, *r->out.ppServices);
3818
PyTuple_SetItem(result, 1, py_ppServices);
3819
if (!W_ERROR_IS_OK(r->out.result)) {
3820
PyErr_SetWERROR(r->out.result);
3827
static bool pack_py_GetCallStatus_args_in(PyObject *args, PyObject *kwargs, struct GetCallStatus *r)
3829
PyObject *py_ORPCthis;
3830
PyObject *py_lTimeout;
3831
const char *kwnames[] = {
3832
"ORPCthis", "lTimeout", NULL
3835
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GetCallStatus", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout)) {
3839
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3840
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3844
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3845
PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
3846
r->in.lTimeout = PyInt_AsLong(py_lTimeout);
3850
static PyObject *unpack_py_GetCallStatus_args_out(struct GetCallStatus *r)
3853
PyObject *py_ORPCthat;
3854
PyObject *py_plStatus;
3855
result = PyTuple_New(2);
3856
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3857
PyTuple_SetItem(result, 0, py_ORPCthat);
3858
py_plStatus = PyInt_FromLong(*r->out.plStatus);
3859
PyTuple_SetItem(result, 1, py_plStatus);
3860
if (!W_ERROR_IS_OK(r->out.result)) {
3861
PyErr_SetWERROR(r->out.result);
3868
const struct PyNdrRpcMethodDef py_ndr_IWbemCallResult_methods[] = {
3869
{ "GetResultObject", "S.GetResultObject(ORPCthis, lTimeout) -> (ORPCthat, ppResultObject)", (py_dcerpc_call_fn)dcerpc_GetResultObject_r, (py_data_pack_fn)pack_py_GetResultObject_args_in, (py_data_unpack_fn)unpack_py_GetResultObject_args_out, 0, &ndr_table_IWbemCallResult },
3870
{ "GetResultString", "S.GetResultString(ORPCthis, lTimeout) -> (ORPCthat, pstrResultString)", (py_dcerpc_call_fn)dcerpc_GetResultString_r, (py_data_pack_fn)pack_py_GetResultString_args_in, (py_data_unpack_fn)unpack_py_GetResultString_args_out, 1, &ndr_table_IWbemCallResult },
3871
{ "GetResultServices", "S.GetResultServices(ORPCthis, lTimeout) -> (ORPCthat, ppServices)", (py_dcerpc_call_fn)dcerpc_GetResultServices_r, (py_data_pack_fn)pack_py_GetResultServices_args_in, (py_data_unpack_fn)unpack_py_GetResultServices_args_out, 2, &ndr_table_IWbemCallResult },
3872
{ "GetCallStatus", "S.GetCallStatus(ORPCthis, lTimeout) -> (ORPCthat, plStatus)", (py_dcerpc_call_fn)dcerpc_GetCallStatus_r, (py_data_pack_fn)pack_py_GetCallStatus_args_in, (py_data_unpack_fn)unpack_py_GetCallStatus_args_out, 3, &ndr_table_IWbemCallResult },
3876
static PyObject *interface_IWbemCallResult_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3878
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemCallResult);
3881
static PyTypeObject IWbemCallResult_InterfaceType = {
3882
PyObject_HEAD_INIT(NULL) 0,
3883
.tp_name = "wmi.IWbemCallResult",
3884
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
3885
.tp_doc = "IWbemCallResult(binding, lp_ctx=None, credentials=None) -> connection\n"
3887
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
3888
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
3889
"credentials should be a credentials.Credentials object.\n\n",
3890
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3891
.tp_new = interface_IWbemCallResult_new,
3895
static bool pack_py_SetStatus_args_in(PyObject *args, PyObject *kwargs, struct SetStatus *r)
3897
PyObject *py_ORPCthis;
3898
PyObject *py_lFlags;
3899
PyObject *py_hResult;
3900
PyObject *py_strParam;
3901
PyObject *py_pObjParam;
3902
const char *kwnames[] = {
3903
"ORPCthis", "lFlags", "hResult", "strParam", "pObjParam", NULL
3906
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SetStatus", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lFlags, &py_hResult, &py_strParam, &py_pObjParam)) {
3910
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3911
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3915
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3916
PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
3917
r->in.lFlags = PyInt_AsLong(py_lFlags);
3918
r->in.hResult = W_ERROR(PyInt_AsLong(py_hResult));
3919
PY_CHECK_TYPE(&BSTR_Type, py_strParam, return false;);
3920
if (talloc_reference(r, py_talloc_get_mem_ctx(py_strParam)) == NULL) {
3924
r->in.strParam = *(struct BSTR *)py_talloc_get_ptr(py_strParam);
3925
r->in.pObjParam = talloc_ptrtype(r, r->in.pObjParam);
3926
PY_CHECK_TYPE(MInterfacePointer_Type, py_pObjParam, return false;);
3927
if (talloc_reference(r, py_talloc_get_mem_ctx(py_pObjParam)) == NULL) {
3931
r->in.pObjParam = (struct MInterfacePointer *)py_talloc_get_ptr(py_pObjParam);
3935
static PyObject *unpack_py_SetStatus_args_out(struct SetStatus *r)
3938
PyObject *py_ORPCthat;
3939
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3940
result = py_ORPCthat;
3941
if (!W_ERROR_IS_OK(r->out.result)) {
3942
PyErr_SetWERROR(r->out.result);
3949
static bool pack_py_Indicate_args_in(PyObject *args, PyObject *kwargs, struct Indicate *r)
3951
PyObject *py_ORPCthis;
3952
PyObject *py_apObjArray;
3953
const char *kwnames[] = {
3954
"ORPCthis", "apObjArray", NULL
3957
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:Indicate", discard_const_p(char *, kwnames), &py_ORPCthis, &py_apObjArray)) {
3961
PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
3962
if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
3966
r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
3967
PY_CHECK_TYPE(&PyList_Type, py_apObjArray, return false;);
3968
r->in.lObjectCount = PyList_GET_SIZE(py_apObjArray);
3969
r->in.apObjArray = talloc_ptrtype(r, r->in.apObjArray);
3970
PY_CHECK_TYPE(&PyList_Type, py_apObjArray, return false;);
3972
int apObjArray_cntr_1;
3973
r->in.apObjArray = talloc_array_ptrtype(r, r->in.apObjArray, PyList_GET_SIZE(py_apObjArray));
3974
if (!r->in.apObjArray) { return false;; }
3975
talloc_set_name_const(r->in.apObjArray, "ARRAY: r->in.apObjArray");
3976
for (apObjArray_cntr_1 = 0; apObjArray_cntr_1 < PyList_GET_SIZE(py_apObjArray); apObjArray_cntr_1++) {
3977
if (PyList_GET_ITEM(py_apObjArray, apObjArray_cntr_1) == Py_None) {
3978
r->in.apObjArray[apObjArray_cntr_1] = NULL;
3980
r->in.apObjArray[apObjArray_cntr_1] = NULL;
3981
PY_CHECK_TYPE(MInterfacePointer_Type, PyList_GET_ITEM(py_apObjArray, apObjArray_cntr_1), return false;);
3982
if (talloc_reference(r->in.apObjArray, py_talloc_get_mem_ctx(PyList_GET_ITEM(py_apObjArray, apObjArray_cntr_1))) == NULL) {
3986
r->in.apObjArray[apObjArray_cntr_1] = (struct MInterfacePointer *)py_talloc_get_ptr(PyList_GET_ITEM(py_apObjArray, apObjArray_cntr_1));
3993
static PyObject *unpack_py_Indicate_args_out(struct Indicate *r)
3996
PyObject *py_ORPCthat;
3997
py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
3998
result = py_ORPCthat;
3999
if (!W_ERROR_IS_OK(r->out.result)) {
4000
PyErr_SetWERROR(r->out.result);
4007
const struct PyNdrRpcMethodDef py_ndr_IWbemObjectSink_methods[] = {
4008
{ "SetStatus", "S.SetStatus(ORPCthis, lFlags, hResult, strParam, pObjParam) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_SetStatus_r, (py_data_pack_fn)pack_py_SetStatus_args_in, (py_data_unpack_fn)unpack_py_SetStatus_args_out, 0, &ndr_table_IWbemObjectSink },
4009
{ "Indicate", "S.Indicate(ORPCthis, apObjArray) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Indicate_r, (py_data_pack_fn)pack_py_Indicate_args_in, (py_data_unpack_fn)unpack_py_Indicate_args_out, 1, &ndr_table_IWbemObjectSink },
4013
static PyObject *interface_IWbemObjectSink_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4015
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemObjectSink);
4018
static PyTypeObject IWbemObjectSink_InterfaceType = {
4019
PyObject_HEAD_INIT(NULL) 0,
4020
.tp_name = "wmi.IWbemObjectSink",
4021
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
4022
.tp_doc = "IWbemObjectSink(binding, lp_ctx=None, credentials=None) -> connection\n"
4024
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
4025
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
4026
"credentials should be a credentials.Credentials object.\n\n",
4027
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4028
.tp_new = interface_IWbemObjectSink_new,
4031
static PyMethodDef wmi_methods[] = {
4032
{ NULL, NULL, 0, NULL }
4038
PyObject *dep_talloc;
4039
PyObject *dep_samba_dcerpc_misc;
4040
PyObject *dep_samba_dcerpc_base;
4041
PyObject *dep_samba_dcerpc_dcom;
4042
PyObject *dep_samba_dcerpc_orpc;
4044
dep_talloc = PyImport_ImportModule("talloc");
4045
if (dep_talloc == NULL)
4048
dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
4049
if (dep_samba_dcerpc_misc == NULL)
4052
dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
4053
if (dep_samba_dcerpc_base == NULL)
4056
dep_samba_dcerpc_dcom = PyImport_ImportModule("samba.dcerpc.dcom");
4057
if (dep_samba_dcerpc_dcom == NULL)
4060
dep_samba_dcerpc_orpc = PyImport_ImportModule("samba.dcerpc.orpc");
4061
if (dep_samba_dcerpc_orpc == NULL)
4064
MInterfacePointer_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_orpc, "MInterfacePointer");
4065
if (MInterfacePointer_Type == NULL)
4068
ORPCTHAT_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_orpc, "ORPCTHAT");
4069
if (ORPCTHAT_Type == NULL)
4072
Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
4073
if (Object_Type == NULL)
4076
GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
4077
if (GUID_Type == NULL)
4080
ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
4081
if (ClientConnection_Type == NULL)
4084
ORPCTHIS_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_orpc, "ORPCTHIS");
4085
if (ORPCTHIS_Type == NULL)
4088
BSTR_Type.tp_base = Object_Type;
4090
IWbemClassObject_InterfaceType.tp_base = ClientConnection_Type;
4092
CIMSTRINGS_Type.tp_base = Object_Type;
4094
IWbemServices_InterfaceType.tp_base = ClientConnection_Type;
4096
IEnumWbemClassObject_InterfaceType.tp_base = ClientConnection_Type;
4098
IWbemContext_InterfaceType.tp_base = ClientConnection_Type;
4100
IWbemLevel1Login_InterfaceType.tp_base = ClientConnection_Type;
4102
WBEMDATA_Type.tp_base = Object_Type;
4104
WBEMDATA4_Type.tp_base = Object_Type;
4106
WBEMDATA3_Type.tp_base = Object_Type;
4108
WBEMDATA2_Type.tp_base = Object_Type;
4110
WBEMDATA1_Type.tp_base = Object_Type;
4112
WBEMDATA0_Type.tp_base = Object_Type;
4114
IWbemWCOSmartEnum_InterfaceType.tp_base = ClientConnection_Type;
4116
IWbemFetchSmartEnum_InterfaceType.tp_base = ClientConnection_Type;
4118
IWbemCallResult_InterfaceType.tp_base = ClientConnection_Type;
4120
IWbemObjectSink_InterfaceType.tp_base = ClientConnection_Type;
4122
if (PyType_Ready(&BSTR_Type) < 0)
4124
if (PyType_Ready(&IWbemClassObject_InterfaceType) < 0)
4126
if (PyType_Ready(&CIMSTRINGS_Type) < 0)
4128
if (PyType_Ready(&IWbemServices_InterfaceType) < 0)
4130
if (PyType_Ready(&IEnumWbemClassObject_InterfaceType) < 0)
4132
if (PyType_Ready(&IWbemContext_InterfaceType) < 0)
4134
if (PyType_Ready(&IWbemLevel1Login_InterfaceType) < 0)
4136
if (PyType_Ready(&WBEMDATA_Type) < 0)
4138
if (PyType_Ready(&WBEMDATA4_Type) < 0)
4140
if (PyType_Ready(&WBEMDATA3_Type) < 0)
4142
if (PyType_Ready(&WBEMDATA2_Type) < 0)
4144
if (PyType_Ready(&WBEMDATA1_Type) < 0)
4146
if (PyType_Ready(&WBEMDATA0_Type) < 0)
4148
if (PyType_Ready(&IWbemWCOSmartEnum_InterfaceType) < 0)
4150
if (PyType_Ready(&IWbemFetchSmartEnum_InterfaceType) < 0)
4152
if (PyType_Ready(&IWbemCallResult_InterfaceType) < 0)
4154
if (PyType_Ready(&IWbemObjectSink_InterfaceType) < 0)
4156
if (!PyInterface_AddNdrRpcMethods(&IWbemClassObject_InterfaceType, py_ndr_IWbemClassObject_methods))
4159
if (!PyInterface_AddNdrRpcMethods(&IWbemServices_InterfaceType, py_ndr_IWbemServices_methods))
4162
if (!PyInterface_AddNdrRpcMethods(&IEnumWbemClassObject_InterfaceType, py_ndr_IEnumWbemClassObject_methods))
4165
if (!PyInterface_AddNdrRpcMethods(&IWbemContext_InterfaceType, py_ndr_IWbemContext_methods))
4168
if (!PyInterface_AddNdrRpcMethods(&IWbemLevel1Login_InterfaceType, py_ndr_IWbemLevel1Login_methods))
4171
if (!PyInterface_AddNdrRpcMethods(&IWbemWCOSmartEnum_InterfaceType, py_ndr_IWbemWCOSmartEnum_methods))
4174
if (!PyInterface_AddNdrRpcMethods(&IWbemFetchSmartEnum_InterfaceType, py_ndr_IWbemFetchSmartEnum_methods))
4177
if (!PyInterface_AddNdrRpcMethods(&IWbemCallResult_InterfaceType, py_ndr_IWbemCallResult_methods))
4180
if (!PyInterface_AddNdrRpcMethods(&IWbemObjectSink_InterfaceType, py_ndr_IWbemObjectSink_methods))
4183
#ifdef PY_BSTR_PATCH
4184
PY_BSTR_PATCH(&BSTR_Type);
4186
#ifdef PY_IWBEMCLASSOBJECT_PATCH
4187
PY_IWBEMCLASSOBJECT_PATCH(&IWbemClassObject_InterfaceType);
4189
#ifdef PY_CIMSTRINGS_PATCH
4190
PY_CIMSTRINGS_PATCH(&CIMSTRINGS_Type);
4192
#ifdef PY_IWBEMSERVICES_PATCH
4193
PY_IWBEMSERVICES_PATCH(&IWbemServices_InterfaceType);
4195
#ifdef PY_IENUMWBEMCLASSOBJECT_PATCH
4196
PY_IENUMWBEMCLASSOBJECT_PATCH(&IEnumWbemClassObject_InterfaceType);
4198
#ifdef PY_IWBEMCONTEXT_PATCH
4199
PY_IWBEMCONTEXT_PATCH(&IWbemContext_InterfaceType);
4201
#ifdef PY_IWBEMLEVEL1LOGIN_PATCH
4202
PY_IWBEMLEVEL1LOGIN_PATCH(&IWbemLevel1Login_InterfaceType);
4204
#ifdef PY_WBEMDATA_PATCH
4205
PY_WBEMDATA_PATCH(&WBEMDATA_Type);
4207
#ifdef PY_WBEMDATA4_PATCH
4208
PY_WBEMDATA4_PATCH(&WBEMDATA4_Type);
4210
#ifdef PY_WBEMDATA3_PATCH
4211
PY_WBEMDATA3_PATCH(&WBEMDATA3_Type);
4213
#ifdef PY_WBEMDATA2_PATCH
4214
PY_WBEMDATA2_PATCH(&WBEMDATA2_Type);
4216
#ifdef PY_WBEMDATA1_PATCH
4217
PY_WBEMDATA1_PATCH(&WBEMDATA1_Type);
4219
#ifdef PY_WBEMDATA0_PATCH
4220
PY_WBEMDATA0_PATCH(&WBEMDATA0_Type);
4222
#ifdef PY_IWBEMWCOSMARTENUM_PATCH
4223
PY_IWBEMWCOSMARTENUM_PATCH(&IWbemWCOSmartEnum_InterfaceType);
4225
#ifdef PY_IWBEMFETCHSMARTENUM_PATCH
4226
PY_IWBEMFETCHSMARTENUM_PATCH(&IWbemFetchSmartEnum_InterfaceType);
4228
#ifdef PY_IWBEMCALLRESULT_PATCH
4229
PY_IWBEMCALLRESULT_PATCH(&IWbemCallResult_InterfaceType);
4231
#ifdef PY_IWBEMOBJECTSINK_PATCH
4232
PY_IWBEMOBJECTSINK_PATCH(&IWbemObjectSink_InterfaceType);
4235
m = Py_InitModule3("wmi", wmi_methods, "wmi DCE/RPC");
4239
PyModule_AddObject(m, "WBEM_E_PROVIDER_LOAD_FAILURE", PyInt_FromLong(WBEM_E_PROVIDER_LOAD_FAILURE));
4240
PyModule_AddObject(m, "WBEM_S_PENDING", PyInt_FromLong(WBEM_S_PENDING));
4241
PyModule_AddObject(m, "CIM_ARR_UINT16", PyInt_FromLong(CIM_ARR_UINT16));
4242
PyModule_AddObject(m, "WBEM_E_NONDECORATED_OBJECT", PyInt_FromLong(WBEM_E_NONDECORATED_OBJECT));
4243
PyModule_AddObject(m, "WBEM_E_RESERVED_001", PyInt_FromLong(WBEM_E_RESERVED_001));
4244
PyModule_AddObject(m, "WBEM_E_SERVER_TOO_BUSY", PyInt_FromLong(WBEM_E_SERVER_TOO_BUSY));
4245
PyModule_AddObject(m, "WBEM_E_FAILED", PyInt_FromLong(WBEM_E_FAILED));
4246
PyModule_AddObject(m, "WBEM_S_POSTHOOK_WITH_NEW", PyInt_FromLong(WBEM_S_POSTHOOK_WITH_NEW));
4247
PyModule_AddObject(m, "WBEM_FLAVOR_ORIGIN_PROPAGATED", PyInt_FromLong(WBEM_FLAVOR_ORIGIN_PROPAGATED));
4248
PyModule_AddObject(m, "WBEM_E_MISSING_AGGREGATION_LIST", PyInt_FromLong(WBEM_E_MISSING_AGGREGATION_LIST));
4249
PyModule_AddObject(m, "WBEM_NO_ERROR", PyInt_FromLong(WBEM_NO_ERROR));
4250
PyModule_AddObject(m, "WBEM_E_UNSUPPORTED_LOCALE", PyInt_FromLong(WBEM_E_UNSUPPORTED_LOCALE));
4251
PyModule_AddObject(m, "WBEM_S_ACCESS_DENIED", PyInt_FromLong(WBEM_S_ACCESS_DENIED));
4252
PyModule_AddObject(m, "CIM_ARR_UINT32", PyInt_FromLong(CIM_ARR_UINT32));
4253
PyModule_AddObject(m, "CIM_UINT16", PyInt_FromLong(CIM_UINT16));
4254
PyModule_AddObject(m, "WBEM_E_INVALID_OBJECT", PyInt_FromLong(WBEM_E_INVALID_OBJECT));
4255
PyModule_AddObject(m, "WBEM_E_CANNOT_BE_SINGLETON", PyInt_FromLong(WBEM_E_CANNOT_BE_SINGLETON));
4256
PyModule_AddObject(m, "WBEM_S_DIFFERENT", PyInt_FromLong(WBEM_S_DIFFERENT));
4257
PyModule_AddObject(m, "WBEM_E_NO_KEY", PyInt_FromLong(WBEM_E_NO_KEY));
4258
PyModule_AddObject(m, "WBEM_E_UNKNOWN_PACKET_TYPE", PyInt_FromLong(WBEM_E_UNKNOWN_PACKET_TYPE));
4259
PyModule_AddObject(m, "WBEM_E_OUT_OF_DISK_SPACE", PyInt_FromLong(WBEM_E_OUT_OF_DISK_SPACE));
4260
PyModule_AddObject(m, "WBEM_E_SHUTTING_DOWN", PyInt_FromLong(WBEM_E_SHUTTING_DOWN));
4261
PyModule_AddObject(m, "WTYPE_SCHEMA", PyInt_FromLong(WTYPE_SCHEMA));
4262
PyModule_AddObject(m, "WBEM_E_RERUN_COMMAND", PyInt_FromLong(WBEM_E_RERUN_COMMAND));
4263
PyModule_AddObject(m, "CIM_SINT16", PyInt_FromLong(CIM_SINT16));
4264
PyModule_AddObject(m, "CIM_FLAG_ARRAY", PyInt_FromLong(CIM_FLAG_ARRAY));
4265
PyModule_AddObject(m, "CIM_REAL32", PyInt_FromLong(CIM_REAL32));
4266
PyModule_AddObject(m, "WBEM_E_UNEXPECTED", PyInt_FromLong(WBEM_E_UNEXPECTED));
4267
PyModule_AddObject(m, "WBEM_E_INVALID_OPERATION", PyInt_FromLong(WBEM_E_INVALID_OPERATION));
4268
PyModule_AddObject(m, "WBEM_E_PROPERTY_NOT_AN_OBJECT", PyInt_FromLong(WBEM_E_PROPERTY_NOT_AN_OBJECT));
4269
PyModule_AddObject(m, "WBEM_S_DUPLICATE_OBJECTS", PyInt_FromLong(WBEM_S_DUPLICATE_OBJECTS));
4270
PyModule_AddObject(m, "WBEM_MASK_RESERVED_FLAGS", PyInt_FromLong(WBEM_MASK_RESERVED_FLAGS));
4271
PyModule_AddObject(m, "WBEM_E_PROVIDER_TIMED_OUT", PyInt_FromLong(WBEM_E_PROVIDER_TIMED_OUT));
4272
PyModule_AddObject(m, "CIM_ARR_SINT16", PyInt_FromLong(CIM_ARR_SINT16));
4273
PyModule_AddObject(m, "WBEM_E_PROVIDER_NOT_FOUND", PyInt_FromLong(WBEM_E_PROVIDER_NOT_FOUND));
4274
PyModule_AddObject(m, "RPC_S_CALL_FAILED", PyInt_FromLong(RPC_S_CALL_FAILED));
4275
PyModule_AddObject(m, "WBEM_E_INVALID_HANDLE_REQUEST", PyInt_FromLong(WBEM_E_INVALID_HANDLE_REQUEST));
4276
PyModule_AddObject(m, "WBEM_E_NONCONSECUTIVE_PARAMETER_IDS", PyInt_FromLong(WBEM_E_NONCONSECUTIVE_PARAMETER_IDS));
4277
PyModule_AddObject(m, "CIM_ARR_BOOLEAN", PyInt_FromLong(CIM_ARR_BOOLEAN));
4278
PyModule_AddObject(m, "CIM_SINT8", PyInt_FromLong(CIM_SINT8));
4279
PyModule_AddObject(m, "CIM_ILLEGAL", PyInt_FromLong(CIM_ILLEGAL));
4280
PyModule_AddObject(m, "WBEM_E_INVALID_CONTEXT", PyInt_FromLong(WBEM_E_INVALID_CONTEXT));
4281
PyModule_AddObject(m, "WBEM_E_ENCRYPTED_CONNECTION_REQUIRED", PyInt_FromLong(WBEM_E_ENCRYPTED_CONNECTION_REQUIRED));
4282
PyModule_AddObject(m, "WBEM_E_QUOTA_VIOLATION", PyInt_FromLong(WBEM_E_QUOTA_VIOLATION));
4283
PyModule_AddObject(m, "CIM_REAL64", PyInt_FromLong(CIM_REAL64));
4284
PyModule_AddObject(m, "WTYPE_CLASS", PyInt_FromLong(WTYPE_CLASS));
4285
PyModule_AddObject(m, "WBEM_S_RESET_TO_DEFAULT", PyInt_FromLong(WBEM_S_RESET_TO_DEFAULT));
4286
PyModule_AddObject(m, "WBEM_FLAG_ENSURE_LOCATABLE", PyInt_FromLong(WBEM_FLAG_ENSURE_LOCATABLE));
4287
PyModule_AddObject(m, "CIM_ARR_UINT8", PyInt_FromLong(CIM_ARR_UINT8));
4288
PyModule_AddObject(m, "CIM_REFERENCE", PyInt_FromLong(CIM_REFERENCE));
4289
PyModule_AddObject(m, "WBEM_E_VETO_DELETE", PyInt_FromLong(WBEM_E_VETO_DELETE));
4290
PyModule_AddObject(m, "WBEM_E_REFRESHER_BUSY", PyInt_FromLong(WBEM_E_REFRESHER_BUSY));
4291
PyModule_AddObject(m, "WBEM_E_AMBIGUOUS_OPERATION", PyInt_FromLong(WBEM_E_AMBIGUOUS_OPERATION));
4292
PyModule_AddObject(m, "WBEM_E_INVALID_PARAMETER", PyInt_FromLong(WBEM_E_INVALID_PARAMETER));
4293
PyModule_AddObject(m, "WBEM_E_PROPERTY_NAME_TOO_WIDE", PyInt_FromLong(WBEM_E_PROPERTY_NAME_TOO_WIDE));
4294
PyModule_AddObject(m, "WBEM_E_CONNECTION_FAILED", PyInt_FromLong(WBEM_E_CONNECTION_FAILED));
4295
PyModule_AddObject(m, "CIM_EMPTY", PyInt_FromLong(CIM_EMPTY));
4296
PyModule_AddObject(m, "WBEM_E_INVALID_QUALIFIER_TYPE", PyInt_FromLong(WBEM_E_INVALID_QUALIFIER_TYPE));
4297
PyModule_AddObject(m, "WBEM_NO_WAIT", NULL);
4298
PyModule_AddObject(m, "WBEM_E_QUERY_NOT_IMPLEMENTED", PyInt_FromLong(WBEM_E_QUERY_NOT_IMPLEMENTED));
4299
PyModule_AddObject(m, "WBEM_E_INCOMPLETE_CLASS", PyInt_FromLong(WBEM_E_INCOMPLETE_CLASS));
4300
PyModule_AddObject(m, "WBEM_E_OUT_OF_MEMORY", PyInt_FromLong(WBEM_E_OUT_OF_MEMORY));
4301
PyModule_AddObject(m, "WBEM_E_INVALID_ASSOCIATION", PyInt_FromLong(WBEM_E_INVALID_ASSOCIATION));
4302
PyModule_AddObject(m, "WBEM_E_AMENDED_OBJECT", PyInt_FromLong(WBEM_E_AMENDED_OBJECT));
4303
PyModule_AddObject(m, "WBEM_E_PROVIDER_FAILURE", PyInt_FromLong(WBEM_E_PROVIDER_FAILURE));
4304
PyModule_AddObject(m, "WBEM_E_OVERRIDE_NOT_ALLOWED", PyInt_FromLong(WBEM_E_OVERRIDE_NOT_ALLOWED));
4305
PyModule_AddObject(m, "WBEM_E_UPDATE_PROPAGATED_METHOD", PyInt_FromLong(WBEM_E_UPDATE_PROPAGATED_METHOD));
4306
PyModule_AddObject(m, "WBEM_FLAG_RETURN_ERROR_OBJECT", PyInt_FromLong(WBEM_FLAG_RETURN_ERROR_OBJECT));
4307
PyModule_AddObject(m, "WBEM_E_MISSING_PARAMETER_ID", PyInt_FromLong(WBEM_E_MISSING_PARAMETER_ID));
4308
PyModule_AddObject(m, "WBEM_E_NOT_SUPPORTED", PyInt_FromLong(WBEM_E_NOT_SUPPORTED));
4309
PyModule_AddObject(m, "WBEM_E_LOCAL_CREDENTIALS", PyInt_FromLong(WBEM_E_LOCAL_CREDENTIALS));
4310
PyModule_AddObject(m, "CIM_ARR_REAL32", PyInt_FromLong(CIM_ARR_REAL32));
4311
PyModule_AddObject(m, "WBEM_S_NO_MORE_DATA", PyInt_FromLong(WBEM_S_NO_MORE_DATA));
4312
PyModule_AddObject(m, "WBEM_S_NO_POSTHOOK", PyInt_FromLong(WBEM_S_NO_POSTHOOK));
4313
PyModule_AddObject(m, "WBEM_E_INVALID_OPERATOR", PyInt_FromLong(WBEM_E_INVALID_OPERATOR));
4314
PyModule_AddObject(m, "WBEM_E_PRIVILEGE_NOT_HELD", PyInt_FromLong(WBEM_E_PRIVILEGE_NOT_HELD));
4315
PyModule_AddObject(m, "WBEM_E_INVALID_PROPERTY", PyInt_FromLong(WBEM_E_INVALID_PROPERTY));
4316
PyModule_AddObject(m, "WBEM_E_UNKNOWN_OBJECT_TYPE", PyInt_FromLong(WBEM_E_UNKNOWN_OBJECT_TYPE));
4317
PyModule_AddObject(m, "CIM_SINT64", PyInt_FromLong(CIM_SINT64));
4318
PyModule_AddObject(m, "WBEM_FLAG_RETURN_WBEM_COMPLETE", PyInt_FromLong(WBEM_FLAG_RETURN_WBEM_COMPLETE));
4319
PyModule_AddObject(m, "WBEM_E_INVALID_SYNTAX", PyInt_FromLong(WBEM_E_INVALID_SYNTAX));
4320
PyModule_AddObject(m, "WBEM_E_DATABASE_VER_MISMATCH", PyInt_FromLong(WBEM_E_DATABASE_VER_MISMATCH));
4321
PyModule_AddObject(m, "WBEM_E_TIMED_OUT", PyInt_FromLong(WBEM_E_TIMED_OUT));
4322
PyModule_AddObject(m, "WBEM_E_INVALID_QUERY", PyInt_FromLong(WBEM_E_INVALID_QUERY));
4323
PyModule_AddObject(m, "WBEM_FLAVOR_AMENDED", PyInt_FromLong(WBEM_FLAVOR_AMENDED));
4324
PyModule_AddObject(m, "WBEM_E_INVALID_CLASS", PyInt_FromLong(WBEM_E_INVALID_CLASS));
4325
PyModule_AddObject(m, "WBEM_E_CLIENT_TOO_SLOW", PyInt_FromLong(WBEM_E_CLIENT_TOO_SLOW));
4326
PyModule_AddObject(m, "WCF_CLASS_PART_INTERNAL", PyInt_FromLong(WCF_CLASS_PART_INTERNAL));
4327
PyModule_AddObject(m, "WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE", PyInt_FromLong(WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE));
4328
PyModule_AddObject(m, "WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE", PyInt_FromLong(WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE));
4329
PyModule_AddObject(m, "WBEM_S_POSTHOOK_WITH_OLD", PyInt_FromLong(WBEM_S_POSTHOOK_WITH_OLD));
4330
PyModule_AddObject(m, "WBEM_E_READ_ONLY", PyInt_FromLong(WBEM_E_READ_ONLY));
4331
PyModule_AddObject(m, "WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED", PyInt_FromLong(WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED));
4332
PyModule_AddObject(m, "WBEM_E_MARSHAL_INVALID_SIGNATURE", PyInt_FromLong(WBEM_E_MARSHAL_INVALID_SIGNATURE));
4333
PyModule_AddObject(m, "WBEM_E_INVALID_PROVIDER_REGISTRATION", PyInt_FromLong(WBEM_E_INVALID_PROVIDER_REGISTRATION));
4334
PyModule_AddObject(m, "WBEM_FLAG_SEND_ONLY_SELECTED", PyInt_FromLong(WBEM_FLAG_SEND_ONLY_SELECTED));
4335
PyModule_AddObject(m, "WBEM_FLAG_DIRECT_READ", PyInt_FromLong(WBEM_FLAG_DIRECT_READ));
4336
PyModule_AddObject(m, "WBEM_E_FATAL_TRANSPORT_ERROR", PyInt_FromLong(WBEM_E_FATAL_TRANSPORT_ERROR));
4337
PyModule_AddObject(m, "CIM_STRING", PyInt_FromLong(CIM_STRING));
4338
PyModule_AddObject(m, "WBEM_E_INVALID_CIM_TYPE", PyInt_FromLong(WBEM_E_INVALID_CIM_TYPE));
4339
PyModule_AddObject(m, "CIM_UINT64", PyInt_FromLong(CIM_UINT64));
4340
PyModule_AddObject(m, "WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS", PyInt_FromLong(WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS));
4341
PyModule_AddObject(m, "WBEM_FLAG_DONT_SEND_STATUS", PyInt_FromLong(WBEM_FLAG_DONT_SEND_STATUS));
4342
PyModule_AddObject(m, "WBEM_FLAG_USE_AMENDED_QUALIFIERS", PyInt_FromLong(WBEM_FLAG_USE_AMENDED_QUALIFIERS));
4343
PyModule_AddObject(m, "WBEM_E_INVALID_METHOD", PyInt_FromLong(WBEM_E_INVALID_METHOD));
4344
PyModule_AddObject(m, "WBEM_RETURN_WHEN_COMPLETE", PyInt_FromLong(WBEM_RETURN_WHEN_COMPLETE));
4345
PyModule_AddObject(m, "WBEM_E_NO_SCHEMA", PyInt_FromLong(WBEM_E_NO_SCHEMA));
4346
PyModule_AddObject(m, "WBEM_E_INVALID_NAMESPACE", PyInt_FromLong(WBEM_E_INVALID_NAMESPACE));
4347
PyModule_AddObject(m, "CIM_ARR_SINT64", PyInt_FromLong(CIM_ARR_SINT64));
4348
PyModule_AddObject(m, "CIM_ARR_REFERENCE", PyInt_FromLong(CIM_ARR_REFERENCE));
4349
PyModule_AddObject(m, "WBEM_E_HANDLE_OUT_OF_DATE", PyInt_FromLong(WBEM_E_HANDLE_OUT_OF_DATE));
4350
PyModule_AddObject(m, "WBEM_E_PROVIDER_DISABLED", PyInt_FromLong(WBEM_E_PROVIDER_DISABLED));
4351
PyModule_AddObject(m, "WBEM_S_PARTIAL_RESULTS", PyInt_FromLong(WBEM_S_PARTIAL_RESULTS));
4352
PyModule_AddObject(m, "WBEM_E_QUEUE_OVERFLOW", PyInt_FromLong(WBEM_E_QUEUE_OVERFLOW));
4353
PyModule_AddObject(m, "WBEM_E_PROVIDER_SUSPENDED", PyInt_FromLong(WBEM_E_PROVIDER_SUSPENDED));
4354
PyModule_AddObject(m, "WBEM_E_CIRCULAR_REFERENCE", PyInt_FromLong(WBEM_E_CIRCULAR_REFERENCE));
4355
PyModule_AddObject(m, "WCF_CLASS", PyInt_FromLong(WCF_CLASS));
4356
PyModule_AddObject(m, "WBEM_S_OPERATION_CANCELLED", PyInt_FromLong(WBEM_S_OPERATION_CANCELLED));
4357
PyModule_AddObject(m, "WBEM_FLAG_FORWARD_ONLY", PyInt_FromLong(WBEM_FLAG_FORWARD_ONLY));
4358
PyModule_AddObject(m, "WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY", PyInt_FromLong(WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY));
4359
PyModule_AddObject(m, "WBEM_E_ALREADY_EXISTS", PyInt_FromLong(WBEM_E_ALREADY_EXISTS));
4360
PyModule_AddObject(m, "WBEM_E_INVALID_QUALIFIER", PyInt_FromLong(WBEM_E_INVALID_QUALIFIER));
4361
PyModule_AddObject(m, "CIM_ARR_SINT32", PyInt_FromLong(CIM_ARR_SINT32));
4362
PyModule_AddObject(m, "WBEM_E_TOO_MUCH_DATA", PyInt_FromLong(WBEM_E_TOO_MUCH_DATA));
4363
PyModule_AddObject(m, "WBEM_RETURN_IMMEDIATELY", PyInt_FromLong(WBEM_RETURN_IMMEDIATELY));
4364
PyModule_AddObject(m, "WBEM_E_INVALID_PARAMETER_ID", PyInt_FromLong(WBEM_E_INVALID_PARAMETER_ID));
4365
PyModule_AddObject(m, "WBEM_FLAG_STRONG_VALIDATION", PyInt_FromLong(WBEM_FLAG_STRONG_VALIDATION));
4366
PyModule_AddObject(m, "WBEM_E_VALUE_OUT_OF_RANGE", PyInt_FromLong(WBEM_E_VALUE_OUT_OF_RANGE));
4367
PyModule_AddObject(m, "CIM_UINT8", PyInt_FromLong(CIM_UINT8));
4368
PyModule_AddObject(m, "WBEM_E_MISSING_GROUP_WITHIN", PyInt_FromLong(WBEM_E_MISSING_GROUP_WITHIN));
4369
PyModule_AddObject(m, "WBEM_E_PROVIDER_NOT_REGISTERED", PyInt_FromLong(WBEM_E_PROVIDER_NOT_REGISTERED));
4370
PyModule_AddObject(m, "CIM_CHAR16", PyInt_FromLong(CIM_CHAR16));
4371
PyModule_AddObject(m, "WBEM_E_ILLEGAL_NULL", PyInt_FromLong(WBEM_E_ILLEGAL_NULL));
4372
PyModule_AddObject(m, "WBEM_E_TOO_MANY_PROPERTIES", PyInt_FromLong(WBEM_E_TOO_MANY_PROPERTIES));
4373
PyModule_AddObject(m, "WBEM_S_SOURCE_NOT_AVAILABLE", PyInt_FromLong(WBEM_S_SOURCE_NOT_AVAILABLE));
4374
PyModule_AddObject(m, "WBEM_E_NOT_FOUND", PyInt_FromLong(WBEM_E_NOT_FOUND));
4375
PyModule_AddObject(m, "CIM_ARR_SINT8", PyInt_FromLong(CIM_ARR_SINT8));
4376
PyModule_AddObject(m, "WBEM_E_PROPAGATED_QUALIFIER", PyInt_FromLong(WBEM_E_PROPAGATED_QUALIFIER));
4377
PyModule_AddObject(m, "WBEM_E_ILLEGAL_OPERATION", PyInt_FromLong(WBEM_E_ILLEGAL_OPERATION));
4378
PyModule_AddObject(m, "CIM_ARR_CHAR16", PyInt_FromLong(CIM_ARR_CHAR16));
4379
PyModule_AddObject(m, "WBEM_E_UNSUPPORTED_PUT_EXTENSION", PyInt_FromLong(WBEM_E_UNSUPPORTED_PUT_EXTENSION));
4380
PyModule_AddObject(m, "DEFAULT_FLAG_EMPTY", PyInt_FromLong(DEFAULT_FLAG_EMPTY));
4381
PyModule_AddObject(m, "WBEM_FLAG_BIDIRECTIONAL", PyInt_FromLong(WBEM_FLAG_BIDIRECTIONAL));
4382
PyModule_AddObject(m, "WBEM_S_POSTHOOK_WITH_BOTH", PyInt_FromLong(WBEM_S_POSTHOOK_WITH_BOTH));
4383
PyModule_AddObject(m, "WBEM_E_TRANSPORT_FAILURE", PyInt_FromLong(WBEM_E_TRANSPORT_FAILURE));
4384
PyModule_AddObject(m, "WBEM_E_AGGREGATING_BY_OBJECT", PyInt_FromLong(WBEM_E_AGGREGATING_BY_OBJECT));
4385
PyModule_AddObject(m, "WBEM_E_MARSHAL_VERSION_MISMATCH", PyInt_FromLong(WBEM_E_MARSHAL_VERSION_MISMATCH));
4386
PyModule_AddObject(m, "WBEM_S_POSTHOOK_WITH_STATUS", PyInt_FromLong(WBEM_S_POSTHOOK_WITH_STATUS));
4387
PyModule_AddObject(m, "WBEM_S_SAME", PyInt_FromLong(WBEM_S_SAME));
4388
PyModule_AddObject(m, "WBEM_E_BUFFER_TOO_SMALL", PyInt_FromLong(WBEM_E_BUFFER_TOO_SMALL));
4389
PyModule_AddObject(m, "WBEM_E_SYNCHRONIZATION_REQUIRED", PyInt_FromLong(WBEM_E_SYNCHRONIZATION_REQUIRED));
4390
PyModule_AddObject(m, "WBEM_FLAG_RETURN_IMMEDIATELY", PyInt_FromLong(WBEM_FLAG_RETURN_IMMEDIATELY));
4391
PyModule_AddObject(m, "WBEM_E_UNPARSABLE_QUERY", PyInt_FromLong(WBEM_E_UNPARSABLE_QUERY));
4392
PyModule_AddObject(m, "CIM_BOOLEAN", PyInt_FromLong(CIM_BOOLEAN));
4393
PyModule_AddObject(m, "WTYPE_OBJECT", PyInt_FromLong(WTYPE_OBJECT));
4394
PyModule_AddObject(m, "WBEM_E_QUALIFIER_NAME_TOO_WIDE", PyInt_FromLong(WBEM_E_QUALIFIER_NAME_TOO_WIDE));
4395
PyModule_AddObject(m, "WBEM_S_REDO_PREHOOK_WITH_ORIGINAL_OBJECT", PyInt_FromLong(WBEM_S_REDO_PREHOOK_WITH_ORIGINAL_OBJECT));
4396
PyModule_AddObject(m, "WBEM_S_ALREADY_EXISTS", PyInt_FromLong(WBEM_S_ALREADY_EXISTS));
4397
PyModule_AddObject(m, "CIM_ARR_UINT64", PyInt_FromLong(CIM_ARR_UINT64));
4398
PyModule_AddObject(m, "WBEM_E_INVALID_LOCALE", PyInt_FromLong(WBEM_E_INVALID_LOCALE));
4399
PyModule_AddObject(m, "WBEM_E_NOT_AVAILABLE", PyInt_FromLong(WBEM_E_NOT_AVAILABLE));
4400
PyModule_AddObject(m, "WBEM_S_NO_ERROR", PyInt_FromLong(WBEM_S_NO_ERROR));
4401
PyModule_AddObject(m, "WBEM_E_INITIALIZATION_FAILURE", PyInt_FromLong(WBEM_E_INITIALIZATION_FAILURE));
4402
PyModule_AddObject(m, "WBEM_E_CLASS_HAS_INSTANCES", PyInt_FromLong(WBEM_E_CLASS_HAS_INSTANCES));
4403
PyModule_AddObject(m, "WBEM_E_INVALID_DUPLICATE_PARAMETER", PyInt_FromLong(WBEM_E_INVALID_DUPLICATE_PARAMETER));
4404
PyModule_AddObject(m, "WBEM_E_PROPAGATED_PROPERTY", PyInt_FromLong(WBEM_E_PROPAGATED_PROPERTY));
4405
PyModule_AddObject(m, "WBEM_FLAG_NO_ERROR_OBJECT", PyInt_FromLong(WBEM_FLAG_NO_ERROR_OBJECT));
4406
PyModule_AddObject(m, "WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING", PyInt_FromLong(WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING));
4407
PyModule_AddObject(m, "WBEM_E_UNSUPPORTED_PARAMETER", PyInt_FromLong(WBEM_E_UNSUPPORTED_PARAMETER));
4408
PyModule_AddObject(m, "WBEM_E_METHOD_NAME_TOO_WIDE", PyInt_FromLong(WBEM_E_METHOD_NAME_TOO_WIDE));
4409
PyModule_AddObject(m, "CIM_OBJECT", PyInt_FromLong(CIM_OBJECT));
4410
PyModule_AddObject(m, "WBEM_E_INVALID_PROPERTY_TYPE", PyInt_FromLong(WBEM_E_INVALID_PROPERTY_TYPE));
4411
PyModule_AddObject(m, "CIM_TYPEMASK", PyInt_FromLong(CIM_TYPEMASK));
4412
PyModule_AddObject(m, "WBEM_INFINITE", NULL);
4413
PyModule_AddObject(m, "WBEM_E_INVALID_METHOD_PARAMETERS", PyInt_FromLong(WBEM_E_INVALID_METHOD_PARAMETERS));
4414
PyModule_AddObject(m, "WBEM_E_CANNOT_BE_ABSTRACT", PyInt_FromLong(WBEM_E_CANNOT_BE_ABSTRACT));
4415
PyModule_AddObject(m, "WBEM_E_NULL_SECURITY_DESCRIPTOR", PyInt_FromLong(WBEM_E_NULL_SECURITY_DESCRIPTOR));
4416
PyModule_AddObject(m, "WBEM_E_CLASS_NAME_TOO_WIDE", PyInt_FromLong(WBEM_E_CLASS_NAME_TOO_WIDE));
4417
PyModule_AddObject(m, "WBEM_E_CRITICAL_ERROR", PyInt_FromLong(WBEM_E_CRITICAL_ERROR));
4418
PyModule_AddObject(m, "WBEM_E_INVALID_FLAVOR", PyInt_FromLong(WBEM_E_INVALID_FLAVOR));
4419
PyModule_AddObject(m, "WBEM_E_RESERVED_002", PyInt_FromLong(WBEM_E_RESERVED_002));
4420
PyModule_AddObject(m, "WBEM_E_TYPE_MISMATCH", PyInt_FromLong(WBEM_E_TYPE_MISMATCH));
4421
PyModule_AddObject(m, "WBEM_E_INVALID_SUPERCLASS", PyInt_FromLong(WBEM_E_INVALID_SUPERCLASS));
4422
PyModule_AddObject(m, "WBEM_E_PROPAGATED_METHOD", PyInt_FromLong(WBEM_E_PROPAGATED_METHOD));
4423
PyModule_AddObject(m, "WBEM_S_FALSE", PyInt_FromLong(WBEM_S_FALSE));
4424
PyModule_AddObject(m, "WBEM_E_SYSTEM_PROPERTY", PyInt_FromLong(WBEM_E_SYSTEM_PROPERTY));
4425
PyModule_AddObject(m, "WBEM_E_ACCESS_DENIED", PyInt_FromLong(WBEM_E_ACCESS_DENIED));
4426
PyModule_AddObject(m, "CIM_DATETIME", PyInt_FromLong(CIM_DATETIME));
4427
PyModule_AddObject(m, "CIM_SINT32", PyInt_FromLong(CIM_SINT32));
4428
PyModule_AddObject(m, "WBEM_FLAVOR_ORIGIN_SYSTEM", PyInt_FromLong(WBEM_FLAVOR_ORIGIN_SYSTEM));
4429
PyModule_AddObject(m, "WBEM_E_METHOD_DISABLED", PyInt_FromLong(WBEM_E_METHOD_DISABLED));
4430
PyModule_AddObject(m, "CIM_ARR_DATETIME", PyInt_FromLong(CIM_ARR_DATETIME));
4431
PyModule_AddObject(m, "CIM_UINT32", PyInt_FromLong(CIM_UINT32));
4432
PyModule_AddObject(m, "WBEM_E_CLASS_HAS_CHILDREN", PyInt_FromLong(WBEM_E_CLASS_HAS_CHILDREN));
4433
PyModule_AddObject(m, "WBEM_E_NOT_EVENT_CLASS", PyInt_FromLong(WBEM_E_NOT_EVENT_CLASS));
4434
PyModule_AddObject(m, "WBEM_E_UPDATE_TYPE_MISMATCH", PyInt_FromLong(WBEM_E_UPDATE_TYPE_MISMATCH));
4435
PyModule_AddObject(m, "CIM_ARR_OBJECT", PyInt_FromLong(CIM_ARR_OBJECT));
4436
PyModule_AddObject(m, "WBEM_E_VETO_PUT", PyInt_FromLong(WBEM_E_VETO_PUT));
4437
PyModule_AddObject(m, "DEFAULT_FLAG_INHERITED", PyInt_FromLong(DEFAULT_FLAG_INHERITED));
4438
PyModule_AddObject(m, "WBEM_E_CANNOT_BE_KEY", PyInt_FromLong(WBEM_E_CANNOT_BE_KEY));
4439
PyModule_AddObject(m, "WBEM_E_CALL_CANCELLED", PyInt_FromLong(WBEM_E_CALL_CANCELLED));
4440
PyModule_AddObject(m, "WBEM_E_INVALID_OBJECT_PATH", PyInt_FromLong(WBEM_E_INVALID_OBJECT_PATH));
4441
PyModule_AddObject(m, "WBEM_E_INVALID_STREAM", PyInt_FromLong(WBEM_E_INVALID_STREAM));
4442
PyModule_AddObject(m, "CIM_ARR_STRING", PyInt_FromLong(CIM_ARR_STRING));
4443
PyModule_AddObject(m, "CIM_ARR_REAL64", PyInt_FromLong(CIM_ARR_REAL64));
4444
PyModule_AddObject(m, "WBEM_E_INVALID_QUERY_TYPE", PyInt_FromLong(WBEM_E_INVALID_QUERY_TYPE));
4445
PyModule_AddObject(m, "WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE", PyInt_FromLong(WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE));
4446
PyModule_AddObject(m, "WCF_DECORATIONS", PyInt_FromLong(WCF_DECORATIONS));
4447
PyModule_AddObject(m, "WBEM_FLAVOR_NOT_OVERRIDABLE", PyInt_FromLong(WBEM_FLAVOR_NOT_OVERRIDABLE));
4448
PyModule_AddObject(m, "WCF_INSTANCE", PyInt_FromLong(WCF_INSTANCE));
4449
PyModule_AddObject(m, "WBEM_S_TIMEDOUT", PyInt_FromLong(WBEM_S_TIMEDOUT));
4450
PyModule_AddObject(m, "WBEM_E_PARAMETER_ID_ON_RETVAL", PyInt_FromLong(WBEM_E_PARAMETER_ID_ON_RETVAL));
4451
PyModule_AddObject(m, "WBEM_E_PROVIDER_NOT_CAPABLE", PyInt_FromLong(WBEM_E_PROVIDER_NOT_CAPABLE));
4452
PyModule_AddObject(m, "WBEM_E_UNSUPPORTED_CLASS_UPDATE", PyInt_FromLong(WBEM_E_UNSUPPORTED_CLASS_UPDATE));
4453
PyModule_AddObject(m, "WBEM_E_PROVIDER_ALREADY_REGISTERED", PyInt_FromLong(WBEM_E_PROVIDER_ALREADY_REGISTERED));
4454
PyModule_AddObject(m, "WBEM_E_METHOD_NOT_IMPLEMENTED", PyInt_FromLong(WBEM_E_METHOD_NOT_IMPLEMENTED));
4455
PyModule_AddObject(m, "WBEM_FLAG_SEND_STATUS", PyInt_FromLong(WBEM_FLAG_SEND_STATUS));
4456
Py_INCREF((PyObject *)(void *)&BSTR_Type);
4457
PyModule_AddObject(m, "BSTR", (PyObject *)(void *)&BSTR_Type);
4458
Py_INCREF((PyObject *)(void *)&IWbemClassObject_InterfaceType);
4459
PyModule_AddObject(m, "IWbemClassObject", (PyObject *)(void *)&IWbemClassObject_InterfaceType);
4460
Py_INCREF((PyObject *)(void *)&CIMSTRINGS_Type);
4461
PyModule_AddObject(m, "CIMSTRINGS", (PyObject *)(void *)&CIMSTRINGS_Type);
4462
Py_INCREF((PyObject *)(void *)&IWbemServices_InterfaceType);
4463
PyModule_AddObject(m, "IWbemServices", (PyObject *)(void *)&IWbemServices_InterfaceType);
4464
Py_INCREF((PyObject *)(void *)&IEnumWbemClassObject_InterfaceType);
4465
PyModule_AddObject(m, "IEnumWbemClassObject", (PyObject *)(void *)&IEnumWbemClassObject_InterfaceType);
4466
Py_INCREF((PyObject *)(void *)&IWbemContext_InterfaceType);
4467
PyModule_AddObject(m, "IWbemContext", (PyObject *)(void *)&IWbemContext_InterfaceType);
4468
Py_INCREF((PyObject *)(void *)&IWbemLevel1Login_InterfaceType);
4469
PyModule_AddObject(m, "IWbemLevel1Login", (PyObject *)(void *)&IWbemLevel1Login_InterfaceType);
4470
Py_INCREF((PyObject *)(void *)&WBEMDATA_Type);
4471
PyModule_AddObject(m, "WBEMDATA", (PyObject *)(void *)&WBEMDATA_Type);
4472
Py_INCREF((PyObject *)(void *)&WBEMDATA4_Type);
4473
PyModule_AddObject(m, "WBEMDATA4", (PyObject *)(void *)&WBEMDATA4_Type);
4474
Py_INCREF((PyObject *)(void *)&WBEMDATA3_Type);
4475
PyModule_AddObject(m, "WBEMDATA3", (PyObject *)(void *)&WBEMDATA3_Type);
4476
Py_INCREF((PyObject *)(void *)&WBEMDATA2_Type);
4477
PyModule_AddObject(m, "WBEMDATA2", (PyObject *)(void *)&WBEMDATA2_Type);
4478
Py_INCREF((PyObject *)(void *)&WBEMDATA1_Type);
4479
PyModule_AddObject(m, "WBEMDATA1", (PyObject *)(void *)&WBEMDATA1_Type);
4480
Py_INCREF((PyObject *)(void *)&WBEMDATA0_Type);
4481
PyModule_AddObject(m, "WBEMDATA0", (PyObject *)(void *)&WBEMDATA0_Type);
4482
Py_INCREF((PyObject *)(void *)&IWbemWCOSmartEnum_InterfaceType);
4483
PyModule_AddObject(m, "IWbemWCOSmartEnum", (PyObject *)(void *)&IWbemWCOSmartEnum_InterfaceType);
4484
Py_INCREF((PyObject *)(void *)&IWbemFetchSmartEnum_InterfaceType);
4485
PyModule_AddObject(m, "IWbemFetchSmartEnum", (PyObject *)(void *)&IWbemFetchSmartEnum_InterfaceType);
4486
Py_INCREF((PyObject *)(void *)&IWbemCallResult_InterfaceType);
4487
PyModule_AddObject(m, "IWbemCallResult", (PyObject *)(void *)&IWbemCallResult_InterfaceType);
4488
Py_INCREF((PyObject *)(void *)&IWbemObjectSink_InterfaceType);
4489
PyModule_AddObject(m, "IWbemObjectSink", (PyObject *)(void *)&IWbemObjectSink_InterfaceType);
4490
#ifdef PY_MOD_WMI_PATCH
4491
PY_MOD_WMI_PATCH(m);