Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21553/win32/src
Modified Files:
win32service.i
Log Message:
Return service dependencies as a list, add autoduck for QUERY_SERVICE_CONFIG tuple
Index: win32service.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32service.i,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** win32service.i 24 Feb 2007 00:21:03 -0000 1.11
--- win32service.i 14 Mar 2007 22:28:53 -0000 1.12
***************
*** 1028,1035 ****
// @pyswig tuple|QueryServiceConfig|Retrieves configuration parameters for a service
- // @rdesc Returns a tuple representing a QUERY_SERVICE_CONFIG struct:
- // (ServiceType, StartType, ErrorControl, BinaryPathName, LoadOrderGroup, TagId, Dependencies, ServiceStartName, DisplayName)
%native (QueryServiceConfig) MyQueryServiceConfig;
-
%{
static PyObject *MyQueryServiceConfig(PyObject *self, PyObject *args)
--- 1028,1032 ----
***************
*** 1070,1094 ****
}
! PyObject *obBinaryPathName = PyWinObject_FromTCHAR(config->lpBinaryPathName);
! PyObject *obLoadOrderGroup = PyWinObject_FromTCHAR(config->lpLoadOrderGroup);
! PyObject *obDependencies = PyWinObject_FromTCHAR(config->lpDependencies);
! PyObject *obServiceStartName = PyWinObject_FromTCHAR(config->lpServiceStartName);
! PyObject *obDisplayName = PyWinObject_FromTCHAR(config->lpDisplayName);
! PyObject *retval = Py_BuildValue("lllOOlOOO",
config->dwServiceType,
config->dwStartType,
config->dwErrorControl,
! obBinaryPathName,
! obLoadOrderGroup,
config->dwTagId,
! obDependencies,
! obServiceStartName,
! obDisplayName);
! Py_XDECREF(obBinaryPathName);
! Py_XDECREF(obLoadOrderGroup);
! Py_XDECREF(obDependencies);
! Py_XDECREF(obServiceStartName);
! Py_XDECREF(obDisplayName);
!
delete buffer;
return retval;
--- 1067,1090 ----
}
! // @rdesc Returns a tuple representing a QUERY_SERVICE_CONFIG struct:
! // @tupleitem 0|int|ServiceType|Combination of SERVICE_*_DRIVER or SERVICE_*_PROCESS constants
! // @tupleitem 1|int|StartType|One of SERVICE_*_START constants
! // @tupleitem 2|int|ErrorControl|One of SERVICE_ERROR_* constants
! // @tupleitem 3|<o PyUnicode>|BinaryPathName|Service's binary executable, can also contain command line args
! // @tupleitem 4|<o PyUnicode>|LoadOrderGroup|Loading group that service is a member of
! // @tupleitem 5|int|TagId|Order of service within its load order group
! // @tupleitem 6|[<o PyUnicode>,...]|Dependencies|Sequence of names of services on which this service depends
! // @tupleitem 7|<o PyUnicode>|ServiceStartName|Account name under which service will run
! // @tupleitem 8|<o PyUnicode>|DisplayName|Name of service
! PyObject *retval = Py_BuildValue("lllNNlNNN",
config->dwServiceType,
config->dwStartType,
config->dwErrorControl,
! PyWinObject_FromTCHAR(config->lpBinaryPathName),
! PyWinObject_FromTCHAR(config->lpLoadOrderGroup),
config->dwTagId,
! PyWinObject_FromMultipleString(config->lpDependencies),
! PyWinObject_FromTCHAR(config->lpServiceStartName),
! PyWinObject_FromTCHAR(config->lpDisplayName));
delete buffer;
return retval;
|