typedef struct hive_key hive_key;
+#include "libcli/util/pyerrors.h"
+
+
#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
if (!SWIG_Python_UnpackTuple(args,"Registry",0,0,0)) SWIG_fail;
result = reg_open_local(arg1,arg2);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
arg3 = (struct registry_key **)(argp3);
result = reg_get_predefined_key_by_name(arg1,(char const *)arg2,arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
arg2 = (char *)(buf2);
result = reg_key_del_abs(arg1,(char const *)arg2);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
arg3 = (struct registry_key **)(argp3);
result = reg_get_predefined_key(arg1,arg2,arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
arg2 = (char *)(buf2);
result = reg_diff_apply(arg1,(char const *)arg2);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
}
result = reg_generate_diff(arg1,arg2,(struct reg_diff_callbacks const *)arg3,arg4);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
}
result = reg_mount_hive(arg1,arg2,arg3,(char const **)arg4);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
arg3 = (char *)(buf3);
result = reg_mount_hive__SWIG_1(arg1,arg2,(char const *)arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
}
result = reg_open_hive(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
}
result = reg_open_ldb_file(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
arg2 = (char *)(buf2);
result = reg_create_directory(arg1,(char const *)arg2,arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
arg2 = (char *)(buf2);
result = reg_open_directory(arg1,(char const *)arg2,arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;
}
result = reg_open_samba(arg1,arg2,arg3,arg4,arg5,arg6);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;