pywin32-checkins Mailing List for Python for Windows Extensions (Page 125)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
| 2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
| 2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
| 2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
| 2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
| 2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
| 2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
| 2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
| 2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
| 2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
| 2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Mark H. <mha...@us...> - 2004-10-06 05:08:44
|
Update of /cvsroot/pywin32/pywin32/isapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15886/isapi Log Message: Directory /cvsroot/pywin32/pywin32/isapi added to the repository |
|
From: Mark H. <mha...@us...> - 2004-10-06 02:07:39
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15630 Modified Files: PyIDirectorySearch.i Log Message: Freeing a column upon failure caused problems in later calls. Index: PyIDirectorySearch.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyIDirectorySearch.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIDirectorySearch.i 24 Sep 2004 07:25:12 -0000 1.1 --- PyIDirectorySearch.i 6 Oct 2004 02:07:29 -0000 1.2 *************** *** 144,149 **** ret = Py_BuildValue("NiN", PyWinObject_FromWCHAR(col.pszAttrName), col.dwADsType, values); } } - _swig_self->FreeColumn(&col); PyWinObject_FreeWCHAR(szName); return ret; --- 144,149 ---- ret = Py_BuildValue("NiN", PyWinObject_FromWCHAR(col.pszAttrName), col.dwADsType, values); } + _swig_self->FreeColumn(&col); } PyWinObject_FreeWCHAR(szName); return ret; |
|
From: Mark H. <mha...@us...> - 2004-10-06 02:05:02
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15226 Modified Files: search.py Log Message: Show how to extract a SID, and remove a workaround for a fixed bug in the framework. Index: search.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos/search.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** search.py 24 Sep 2004 07:31:16 -0000 1.1 --- search.py 6 Oct 2004 02:04:49 -0000 1.2 *************** *** 2,6 **** from win32com.adsi.adsicon import * from win32com.adsi import adsicon ! import pythoncom, pywintypes options = None # set to optparse options object --- 2,6 ---- from win32com.adsi.adsicon import * from win32com.adsi import adsicon ! import pythoncom, pywintypes, win32security options = None # set to optparse options object *************** *** 19,26 **** --- 19,30 ---- return pywintypes.IID(b, True) + def _sid_from_buffer(b): + return str(pywintypes.SID(b)) + _null_converter = lambda x: x converters = { 'objectGUID' : _guid_from_buffer, + 'objectSid' : _sid_from_buffer, 'instanceType' : getADsTypeName, } *************** *** 82,87 **** try: data = gc.GetColumn(h, a) - # for some reason we don't get a valid name in this case. - data = a, data[1], data[2] print_attribute(data) except adsi.error, details: --- 86,89 ---- |
|
From: Mark H. <mha...@us...> - 2004-10-06 02:02:30
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14735 Modified Files: pyscript.py Log Message: Register the WSH shell extensions for .pys files, and move the registration to the new 'finalize_register'/DllMain technique Index: pyscript.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/client/pyscript.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pyscript.py 29 May 2002 23:12:34 -0000 1.6 --- pyscript.py 6 Oct 2004 02:02:11 -0000 1.7 *************** *** 408,426 **** self.rexec_env = None ! def Register(klass=PyScript): import sys ! ret = win32com.server.register.UseCommandLine(klass) ! if '--unregister' not in sys.argv and \ ! '--unregister_info' not in sys.argv: ! # If we are registering, do our extra stuff. ! win32com.server.register._set_subkeys(klass._reg_progid_ + "\\OLEScript", {}) # Just a CreateKey ! # Basic Registration for wsh. ! win32com.server.register._set_string(".pys", "pysFile") ! win32com.server.register._set_string("pysFile\\ScriptEngine", klass._reg_progid_) ! print "Registration of %s complete." % (klass._reg_desc_,) return ret ! if __name__=='__main__': Register() \ No newline at end of file --- 408,428 ---- self.rexec_env = None ! ! def DllRegisterServer(): ! klass=PyScript ! win32com.server.register._set_subkeys(klass._reg_progid_ + "\\OLEScript", {}) # Just a CreateKey ! # Basic Registration for wsh. ! win32com.server.register._set_string(".pys", "pysFile") ! win32com.server.register._set_string("pysFile\\ScriptEngine", klass._reg_progid_) ! guid_wsh_shellex = "{60254CA5-953B-11CF-8C96-00AA00B8708C}" ! win32com.server.register._set_string("pysFile\\ShellEx\\DropHandler", guid_wsh_shellex) ! win32com.server.register._set_string("pysFile\\ShellEx\\PropertySheetHandlers\\WSHProps", guid_wsh_shellex) def Register(klass=PyScript): import sys ! ret = win32com.server.register.UseCommandLine(klass, ! finalize_register=DllRegisterServer) return ret ! if __name__=='__main__': Register() \ No newline at end of file |
|
From: Mark H. <mha...@us...> - 2004-10-06 01:59:11
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14266 Modified Files: winerror.py Log Message: ActiveDirectory error constants. Index: winerror.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/winerror.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** winerror.py 2 Jul 2003 03:39:12 -0000 1.2 --- winerror.py 6 Oct 2004 01:58:55 -0000 1.3 *************** *** 10,17 **** --- 10,24 ---- # up to here... + FACILITY_WINDOWS_CE = 24 FACILITY_WINDOWS = 8 + FACILITY_URT = 19 + FACILITY_UMI = 22 + FACILITY_SXS = 23 FACILITY_STORAGE = 3 + FACILITY_STATE_MANAGEMENT = 34 FACILITY_SSPI = 9 + FACILITY_SCARD = 16 FACILITY_SETUPAPI = 15 + FACILITY_SECURITY = 9 FACILITY_RPC = 1 FACILITY_WIN32 = 7 *************** *** 1489,1490 **** --- 1496,1877 ---- SPAPI_E_INVALID_FILTER_DRIVER = -2146500052 SPAPI_E_ERROR_NOT_INSTALLED = -2146496512 + + # Directory storage + ERROR_DS_NOT_INSTALLED = 8200 + ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY = 8201 + ERROR_DS_NO_ATTRIBUTE_OR_VALUE = 8202 + ERROR_DS_INVALID_ATTRIBUTE_SYNTAX = 8203 + ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED = 8204 + ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS = 8205 + ERROR_DS_BUSY = 8206 + ERROR_DS_UNAVAILABLE = 8207 + ERROR_DS_NO_RIDS_ALLOCATED = 8208 + ERROR_DS_NO_MORE_RIDS = 8209 + ERROR_DS_INCORRECT_ROLE_OWNER = 8210 + ERROR_DS_RIDMGR_INIT_ERROR = 8211 + ERROR_DS_OBJ_CLASS_VIOLATION = 8212 + ERROR_DS_CANT_ON_NON_LEAF = 8213 + ERROR_DS_CANT_ON_RDN = 8214 + ERROR_DS_CANT_MOD_OBJ_CLASS = 8215 + ERROR_DS_CROSS_DOM_MOVE_ERROR = 8216 + ERROR_DS_GC_NOT_AVAILABLE = 8217 + ERROR_SHARED_POLICY = 8218 + ERROR_POLICY_OBJECT_NOT_FOUND = 8219 + ERROR_POLICY_ONLY_IN_DS = 8220 + ERROR_PROMOTION_ACTIVE = 8221 + ERROR_NO_PROMOTION_ACTIVE = 8222 + ERROR_DS_OPERATIONS_ERROR = 8224 + ERROR_DS_PROTOCOL_ERROR = 8225 + ERROR_DS_TIMELIMIT_EXCEEDED = 8226 + ERROR_DS_SIZELIMIT_EXCEEDED = 8227 + ERROR_DS_ADMIN_LIMIT_EXCEEDED = 8228 + ERROR_DS_COMPARE_FALSE = 8229 + ERROR_DS_COMPARE_TRUE = 8230 + ERROR_DS_AUTH_METHOD_NOT_SUPPORTED = 8231 + ERROR_DS_STRONG_AUTH_REQUIRED = 8232 + ERROR_DS_INAPPROPRIATE_AUTH = 8233 + ERROR_DS_AUTH_UNKNOWN = 8234 + ERROR_DS_REFERRAL = 8235 + ERROR_DS_UNAVAILABLE_CRIT_EXTENSION = 8236 + ERROR_DS_CONFIDENTIALITY_REQUIRED = 8237 + ERROR_DS_INAPPROPRIATE_MATCHING = 8238 + ERROR_DS_CONSTRAINT_VIOLATION = 8239 + ERROR_DS_NO_SUCH_OBJECT = 8240 + ERROR_DS_ALIAS_PROBLEM = 8241 + ERROR_DS_INVALID_DN_SYNTAX = 8242 + ERROR_DS_IS_LEAF = 8243 + ERROR_DS_ALIAS_DEREF_PROBLEM = 8244 + ERROR_DS_UNWILLING_TO_PERFORM = 8245 + ERROR_DS_LOOP_DETECT = 8246 + ERROR_DS_NAMING_VIOLATION = 8247 + ERROR_DS_OBJECT_RESULTS_TOO_LARGE = 8248 + ERROR_DS_AFFECTS_MULTIPLE_DSAS = 8249 + ERROR_DS_SERVER_DOWN = 8250 + ERROR_DS_LOCAL_ERROR = 8251 + ERROR_DS_ENCODING_ERROR = 8252 + ERROR_DS_DECODING_ERROR = 8253 + ERROR_DS_FILTER_UNKNOWN = 8254 + ERROR_DS_PARAM_ERROR = 8255 + ERROR_DS_NOT_SUPPORTED = 8256 + ERROR_DS_NO_RESULTS_RETURNED = 8257 + ERROR_DS_CONTROL_NOT_FOUND = 8258 + ERROR_DS_CLIENT_LOOP = 8259 + ERROR_DS_REFERRAL_LIMIT_EXCEEDED = 8260 + ERROR_DS_SORT_CONTROL_MISSING = 8261 + ERROR_DS_OFFSET_RANGE_ERROR = 8262 + ERROR_DS_ROOT_MUST_BE_NC = 8301 + ERROR_DS_ADD_REPLICA_INHIBITED = 8302 + ERROR_DS_ATT_NOT_DEF_IN_SCHEMA = 8303 + ERROR_DS_MAX_OBJ_SIZE_EXCEEDED = 8304 + ERROR_DS_OBJ_STRING_NAME_EXISTS = 8305 + ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA = 8306 + ERROR_DS_RDN_DOESNT_MATCH_SCHEMA = 8307 + ERROR_DS_NO_REQUESTED_ATTS_FOUND = 8308 + ERROR_DS_USER_BUFFER_TO_SMALL = 8309 + ERROR_DS_ATT_IS_NOT_ON_OBJ = 8310 + ERROR_DS_ILLEGAL_MOD_OPERATION = 8311 + ERROR_DS_OBJ_TOO_LARGE = 8312 + ERROR_DS_BAD_INSTANCE_TYPE = 8313 + ERROR_DS_MASTERDSA_REQUIRED = 8314 + ERROR_DS_OBJECT_CLASS_REQUIRED = 8315 + ERROR_DS_MISSING_REQUIRED_ATT = 8316 + ERROR_DS_ATT_NOT_DEF_FOR_CLASS = 8317 + ERROR_DS_ATT_ALREADY_EXISTS = 8318 + ERROR_DS_CANT_ADD_ATT_VALUES = 8320 + ERROR_DS_SINGLE_VALUE_CONSTRAINT = 8321 + ERROR_DS_RANGE_CONSTRAINT = 8322 + ERROR_DS_ATT_VAL_ALREADY_EXISTS = 8323 + ERROR_DS_CANT_REM_MISSING_ATT = 8324 + ERROR_DS_CANT_REM_MISSING_ATT_VAL = 8325 + ERROR_DS_ROOT_CANT_BE_SUBREF = 8326 + ERROR_DS_NO_CHAINING = 8327 + ERROR_DS_NO_CHAINED_EVAL = 8328 + ERROR_DS_NO_PARENT_OBJECT = 8329 + ERROR_DS_PARENT_IS_AN_ALIAS = 8330 + ERROR_DS_CANT_MIX_MASTER_AND_REPS = 8331 + ERROR_DS_CHILDREN_EXIST = 8332 + ERROR_DS_OBJ_NOT_FOUND = 8333 + ERROR_DS_ALIASED_OBJ_MISSING = 8334 + ERROR_DS_BAD_NAME_SYNTAX = 8335 + ERROR_DS_ALIAS_POINTS_TO_ALIAS = 8336 + ERROR_DS_CANT_DEREF_ALIAS = 8337 + ERROR_DS_OUT_OF_SCOPE = 8338 + ERROR_DS_OBJECT_BEING_REMOVED = 8339 + ERROR_DS_CANT_DELETE_DSA_OBJ = 8340 + ERROR_DS_GENERIC_ERROR = 8341 + ERROR_DS_DSA_MUST_BE_INT_MASTER = 8342 + ERROR_DS_CLASS_NOT_DSA = 8343 + ERROR_DS_INSUFF_ACCESS_RIGHTS = 8344 + ERROR_DS_ILLEGAL_SUPERIOR = 8345 + ERROR_DS_ATTRIBUTE_OWNED_BY_SAM = 8346 + ERROR_DS_NAME_TOO_MANY_PARTS = 8347 + ERROR_DS_NAME_TOO_LONG = 8348 + ERROR_DS_NAME_VALUE_TOO_LONG = 8349 + ERROR_DS_NAME_UNPARSEABLE = 8350 + ERROR_DS_NAME_TYPE_UNKNOWN = 8351 + ERROR_DS_NOT_AN_OBJECT = 8352 + ERROR_DS_SEC_DESC_TOO_SHORT = 8353 + ERROR_DS_SEC_DESC_INVALID = 8354 + ERROR_DS_NO_DELETED_NAME = 8355 + ERROR_DS_SUBREF_MUST_HAVE_PARENT = 8356 + ERROR_DS_NCNAME_MUST_BE_NC = 8357 + ERROR_DS_CANT_ADD_SYSTEM_ONLY = 8358 + ERROR_DS_CLASS_MUST_BE_CONCRETE = 8359 + ERROR_DS_INVALID_DMD = 8360 + ERROR_DS_OBJ_GUID_EXISTS = 8361 + ERROR_DS_NOT_ON_BACKLINK = 8362 + ERROR_DS_NO_CROSSREF_FOR_NC = 8363 + ERROR_DS_SHUTTING_DOWN = 8364 + ERROR_DS_UNKNOWN_OPERATION = 8365 + ERROR_DS_INVALID_ROLE_OWNER = 8366 + ERROR_DS_COULDNT_CONTACT_FSMO = 8367 + ERROR_DS_CROSS_NC_DN_RENAME = 8368 + ERROR_DS_CANT_MOD_SYSTEM_ONLY = 8369 + ERROR_DS_REPLICATOR_ONLY = 8370 + ERROR_DS_OBJ_CLASS_NOT_DEFINED = 8371 + ERROR_DS_OBJ_CLASS_NOT_SUBCLASS = 8372 + ERROR_DS_NAME_REFERENCE_INVALID = 8373 + ERROR_DS_CROSS_REF_EXISTS = 8374 + ERROR_DS_CANT_DEL_MASTER_CROSSREF = 8375 + ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD = 8376 + ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX = 8377 + ERROR_DS_DUP_RDN = 8378 + ERROR_DS_DUP_OID = 8379 + ERROR_DS_DUP_MAPI_ID = 8380 + ERROR_DS_DUP_SCHEMA_ID_GUID = 8381 + ERROR_DS_DUP_LDAP_DISPLAY_NAME = 8382 + ERROR_DS_SEMANTIC_ATT_TEST = 8383 + ERROR_DS_SYNTAX_MISMATCH = 8384 + ERROR_DS_EXISTS_IN_MUST_HAVE = 8385 + ERROR_DS_EXISTS_IN_MAY_HAVE = 8386 + ERROR_DS_NONEXISTENT_MAY_HAVE = 8387 + ERROR_DS_NONEXISTENT_MUST_HAVE = 8388 + ERROR_DS_AUX_CLS_TEST_FAIL = 8389 + ERROR_DS_NONEXISTENT_POSS_SUP = 8390 + ERROR_DS_SUB_CLS_TEST_FAIL = 8391 + ERROR_DS_BAD_RDN_ATT_ID_SYNTAX = 8392 + ERROR_DS_EXISTS_IN_AUX_CLS = 8393 + ERROR_DS_EXISTS_IN_SUB_CLS = 8394 + ERROR_DS_EXISTS_IN_POSS_SUP = 8395 + ERROR_DS_RECALCSCHEMA_FAILED = 8396 + ERROR_DS_TREE_DELETE_NOT_FINISHED = 8397 + ERROR_DS_CANT_DELETE = 8398 + ERROR_DS_ATT_SCHEMA_REQ_ID = 8399 + ERROR_DS_BAD_ATT_SCHEMA_SYNTAX = 8400 + ERROR_DS_CANT_CACHE_ATT = 8401 + ERROR_DS_CANT_CACHE_CLASS = 8402 + ERROR_DS_CANT_REMOVE_ATT_CACHE = 8403 + ERROR_DS_CANT_REMOVE_CLASS_CACHE = 8404 + ERROR_DS_CANT_RETRIEVE_DN = 8405 + ERROR_DS_MISSING_SUPREF = 8406 + ERROR_DS_CANT_RETRIEVE_INSTANCE = 8407 + ERROR_DS_CODE_INCONSISTENCY = 8408 + ERROR_DS_DATABASE_ERROR = 8409 + ERROR_DS_GOVERNSID_MISSING = 8410 + ERROR_DS_MISSING_EXPECTED_ATT = 8411 + ERROR_DS_NCNAME_MISSING_CR_REF = 8412 + ERROR_DS_SECURITY_CHECKING_ERROR = 8413 + ERROR_DS_SCHEMA_NOT_LOADED = 8414 + ERROR_DS_SCHEMA_ALLOC_FAILED = 8415 + ERROR_DS_ATT_SCHEMA_REQ_SYNTAX = 8416 + ERROR_DS_GCVERIFY_ERROR = 8417 + ERROR_DS_DRA_SCHEMA_MISMATCH = 8418 + ERROR_DS_CANT_FIND_DSA_OBJ = 8419 + ERROR_DS_CANT_FIND_EXPECTED_NC = 8420 + ERROR_DS_CANT_FIND_NC_IN_CACHE = 8421 + ERROR_DS_CANT_RETRIEVE_CHILD = 8422 + ERROR_DS_SECURITY_ILLEGAL_MODIFY = 8423 + ERROR_DS_CANT_REPLACE_HIDDEN_REC = 8424 + ERROR_DS_BAD_HIERARCHY_FILE = 8425 + ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED = 8426 + ERROR_DS_CONFIG_PARAM_MISSING = 8427 + ERROR_DS_COUNTING_AB_INDICES_FAILED = 8428 + ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED = 8429 + ERROR_DS_INTERNAL_FAILURE = 8430 + ERROR_DS_UNKNOWN_ERROR = 8431 + ERROR_DS_ROOT_REQUIRES_CLASS_TOP = 8432 + ERROR_DS_REFUSING_FSMO_ROLES = 8433 + ERROR_DS_MISSING_FSMO_SETTINGS = 8434 + ERROR_DS_UNABLE_TO_SURRENDER_ROLES = 8435 + ERROR_DS_DRA_GENERIC = 8436 + ERROR_DS_DRA_INVALID_PARAMETER = 8437 + ERROR_DS_DRA_BUSY = 8438 + ERROR_DS_DRA_BAD_DN = 8439 + ERROR_DS_DRA_BAD_NC = 8440 + ERROR_DS_DRA_DN_EXISTS = 8441 + ERROR_DS_DRA_INTERNAL_ERROR = 8442 + ERROR_DS_DRA_INCONSISTENT_DIT = 8443 + ERROR_DS_DRA_CONNECTION_FAILED = 8444 + ERROR_DS_DRA_BAD_INSTANCE_TYPE = 8445 + ERROR_DS_DRA_OUT_OF_MEM = 8446 + ERROR_DS_DRA_MAIL_PROBLEM = 8447 + ERROR_DS_DRA_REF_ALREADY_EXISTS = 8448 + ERROR_DS_DRA_REF_NOT_FOUND = 8449 + ERROR_DS_DRA_OBJ_IS_REP_SOURCE = 8450 + ERROR_DS_DRA_DB_ERROR = 8451 + ERROR_DS_DRA_NO_REPLICA = 8452 + ERROR_DS_DRA_ACCESS_DENIED = 8453 + ERROR_DS_DRA_NOT_SUPPORTED = 8454 + ERROR_DS_DRA_RPC_CANCELLED = 8455 + ERROR_DS_DRA_SOURCE_DISABLED = 8456 + ERROR_DS_DRA_SINK_DISABLED = 8457 + ERROR_DS_DRA_NAME_COLLISION = 8458 + ERROR_DS_DRA_SOURCE_REINSTALLED = 8459 + ERROR_DS_DRA_MISSING_PARENT = 8460 + ERROR_DS_DRA_PREEMPTED = 8461 + ERROR_DS_DRA_ABANDON_SYNC = 8462 + ERROR_DS_DRA_SHUTDOWN = 8463 + ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET = 8464 + ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA = 8465 + ERROR_DS_DRA_EXTN_CONNECTION_FAILED = 8466 + ERROR_DS_INSTALL_SCHEMA_MISMATCH = 8467 + ERROR_DS_DUP_LINK_ID = 8468 + ERROR_DS_NAME_ERROR_RESOLVING = 8469 + ERROR_DS_NAME_ERROR_NOT_FOUND = 8470 + ERROR_DS_NAME_ERROR_NOT_UNIQUE = 8471 + ERROR_DS_NAME_ERROR_NO_MAPPING = 8472 + ERROR_DS_NAME_ERROR_DOMAIN_ONLY = 8473 + ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = 8474 + ERROR_DS_CONSTRUCTED_ATT_MOD = 8475 + ERROR_DS_WRONG_OM_OBJ_CLASS = 8476 + ERROR_DS_DRA_REPL_PENDING = 8477 + ERROR_DS_DS_REQUIRED = 8478 + ERROR_DS_INVALID_LDAP_DISPLAY_NAME = 8479 + ERROR_DS_NON_BASE_SEARCH = 8480 + ERROR_DS_CANT_RETRIEVE_ATTS = 8481 + ERROR_DS_BACKLINK_WITHOUT_LINK = 8482 + ERROR_DS_EPOCH_MISMATCH = 8483 + ERROR_DS_SRC_NAME_MISMATCH = 8484 + ERROR_DS_SRC_AND_DST_NC_IDENTICAL = 8485 + ERROR_DS_DST_NC_MISMATCH = 8486 + ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = 8487 + ERROR_DS_SRC_GUID_MISMATCH = 8488 + ERROR_DS_CANT_MOVE_DELETED_OBJECT = 8489 + ERROR_DS_PDC_OPERATION_IN_PROGRESS = 8490 + ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD = 8491 + ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION = 8492 + ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS = 8493 + ERROR_DS_NC_MUST_HAVE_NC_PARENT = 8494 + ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE = 8495 + ERROR_DS_DST_DOMAIN_NOT_NATIVE = 8496 + ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER = 8497 + ERROR_DS_CANT_MOVE_ACCOUNT_GROUP = 8498 + ERROR_DS_CANT_MOVE_RESOURCE_GROUP = 8499 + ERROR_DS_INVALID_SEARCH_FLAG = 8500 + ERROR_DS_NO_TREE_DELETE_ABOVE_NC = 8501 + ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE = 8502 + ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE = 8503 + ERROR_DS_SAM_INIT_FAILURE = 8504 + ERROR_DS_SENSITIVE_GROUP_VIOLATION = 8505 + ERROR_DS_CANT_MOD_PRIMARYGROUPID = 8506 + ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD = 8507 + ERROR_DS_NONSAFE_SCHEMA_CHANGE = 8508 + ERROR_DS_SCHEMA_UPDATE_DISALLOWED = 8509 + ERROR_DS_CANT_CREATE_UNDER_SCHEMA = 8510 + ERROR_DS_INSTALL_NO_SRC_SCH_VERSION = 8511 + ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE = 8512 + ERROR_DS_INVALID_GROUP_TYPE = 8513 + ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 8514 + ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 8515 + ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 8516 + ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 8517 + ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 8518 + ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 8519 + ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 8520 + ERROR_DS_HAVE_PRIMARY_MEMBERS = 8521 + ERROR_DS_STRING_SD_CONVERSION_FAILED = 8522 + ERROR_DS_NAMING_MASTER_GC = 8523 + ERROR_DS_DNS_LOOKUP_FAILURE = 8524 + ERROR_DS_COULDNT_UPDATE_SPNS = 8525 + ERROR_DS_CANT_RETRIEVE_SD = 8526 + ERROR_DS_KEY_NOT_UNIQUE = 8527 + ERROR_DS_WRONG_LINKED_ATT_SYNTAX = 8528 + ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD = 8529 + ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY = 8530 + ERROR_DS_CANT_START = 8531 + ERROR_DS_INIT_FAILURE = 8532 + ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION = 8533 + ERROR_DS_SOURCE_DOMAIN_IN_FOREST = 8534 + ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST = 8535 + ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED = 8536 + ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN = 8537 + ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER = 8538 + ERROR_DS_SRC_SID_EXISTS_IN_FOREST = 8539 + ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH = 8540 + ERROR_SAM_INIT_FAILURE = 8541 + ERROR_DS_DRA_SCHEMA_INFO_SHIP = 8542 + ERROR_DS_DRA_SCHEMA_CONFLICT = 8543 + ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT = 8544 + ERROR_DS_DRA_OBJ_NC_MISMATCH = 8545 + ERROR_DS_NC_STILL_HAS_DSAS = 8546 + ERROR_DS_GC_REQUIRED = 8547 + ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 8548 + ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS = 8549 + ERROR_DS_CANT_ADD_TO_GC = 8550 + ERROR_DS_NO_CHECKPOINT_WITH_PDC = 8551 + ERROR_DS_SOURCE_AUDITING_NOT_ENABLED = 8552 + ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC = 8553 + ERROR_DS_INVALID_NAME_FOR_SPN = 8554 + ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = 8555 + ERROR_DS_UNICODEPWD_NOT_IN_QUOTES = 8556 + ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 8557 + ERROR_DS_MUST_BE_RUN_ON_DST_DC = 8558 + ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER = 8559 + ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ = 8560 + ERROR_DS_INIT_FAILURE_CONSOLE = 8561 + ERROR_DS_SAM_INIT_FAILURE_CONSOLE = 8562 + ERROR_DS_FOREST_VERSION_TOO_HIGH = 8563 + ERROR_DS_DOMAIN_VERSION_TOO_HIGH = 8564 + ERROR_DS_FOREST_VERSION_TOO_LOW = 8565 + ERROR_DS_DOMAIN_VERSION_TOO_LOW = 8566 + ERROR_DS_INCOMPATIBLE_VERSION = 8567 + ERROR_DS_LOW_DSA_VERSION = 8568 + ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN = 8569 + ERROR_DS_NOT_SUPPORTED_SORT_ORDER = 8570 + ERROR_DS_NAME_NOT_UNIQUE = 8571 + ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 = 8572 + ERROR_DS_OUT_OF_VERSION_STORE = 8573 + ERROR_DS_INCOMPATIBLE_CONTROLS_USED = 8574 + ERROR_DS_NO_REF_DOMAIN = 8575 + ERROR_DS_RESERVED_LINK_ID = 8576 + ERROR_DS_LINK_ID_NOT_AVAILABLE = 8577 + ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 8578 + ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE = 8579 + ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC = 8580 + ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG = 8581 + ERROR_DS_MODIFYDN_WRONG_GRANDPARENT = 8582 + ERROR_DS_NAME_ERROR_TRUST_REFERRAL = 8583 + ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER = 8584 + ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD = 8585 + ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 = 8586 + ERROR_DS_THREAD_LIMIT_EXCEEDED = 8587 + ERROR_DS_NOT_CLOSEST = 8588 + ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF = 8589 + ERROR_DS_SINGLE_USER_MODE_FAILED = 8590 + ERROR_DS_NTDSCRIPT_SYNTAX_ERROR = 8591 + ERROR_DS_NTDSCRIPT_PROCESS_ERROR = 8592 + ERROR_DS_DIFFERENT_REPL_EPOCHS = 8593 + ERROR_DS_DRS_EXTENSIONS_CHANGED = 8594 + ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR = 8595 + ERROR_DS_NO_MSDS_INTID = 8596 + ERROR_DS_DUP_MSDS_INTID = 8597 + ERROR_DS_EXISTS_IN_RDNATTID = 8598 + ERROR_DS_AUTHORIZATION_FAILED = 8599 + ERROR_DS_INVALID_SCRIPT = 8600 + ERROR_DS_REMOTE_CROSSREF_OP_FAILED = 8601 + ERROR_DS_CROSS_REF_BUSY = 8602 + ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN = 8603 + ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC = 8604 + ERROR_DS_DUPLICATE_ID_FOUND = 8605 + ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT = 8606 + ERROR_DS_GROUP_CONVERSION_ERROR = 8607 + ERROR_DS_CANT_MOVE_APP_BASIC_GROUP = 8608 + ERROR_DS_CANT_MOVE_APP_QUERY_GROUP = 8609 + ERROR_DS_ROLE_NOT_VERIFIED = 8610 + ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL = 8611 + ERROR_DS_DOMAIN_RENAME_IN_PROGRESS = 8612 + ERROR_DS_EXISTING_AD_CHILD_NC = 8613 + ERROR_DS_REPL_LIFETIME_EXCEEDED = 8614 + ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER = 8615 + ERROR_DS_LDAP_SEND_QUEUE_FULL = 8616 + ERROR_DS_DRA_OUT_SCHEDULE_WINDOW = 8617 |
|
From: Mark H. <mha...@us...> - 2004-10-03 07:25:41
|
Update of /cvsroot/pywin32/pywin32/pyisapi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9434 Modified Files: PyExtensionObjects.cpp PyFilterObjects.cpp Log Message: Allow GetServerVariable() to have a default specified, which will be used instead of raising an exception. Index: PyExtensionObjects.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/pyisapi/src/PyExtensionObjects.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyExtensionObjects.cpp 9 Sep 2004 06:09:11 -0000 1.4 --- PyExtensionObjects.cpp 3 Oct 2004 07:23:25 -0000 1.5 *************** *** 326,333 **** BOOL bRes = FALSE; TCHAR * variable = NULL; PyECB * pecb = (PyECB *) self; // @pyparm string|variable|| ! if (!PyArg_ParseTuple(args, "s:GetServerVariable", &variable)) return NULL; --- 326,336 ---- BOOL bRes = FALSE; TCHAR * variable = NULL; + PyObject *def = NULL; PyECB * pecb = (PyECB *) self; // @pyparm string|variable|| ! // @pyparm object|default||If specified, the function will return this ! // value instead of raising an error if the variable could not be fetched. ! if (!PyArg_ParseTuple(args, "s|O:GetServerVariable", &variable, &def)) return NULL; *************** *** 339,344 **** bRes = pecb->m_pcb->GetServerVariable(variable, buf, &bufsize); Py_END_ALLOW_THREADS ! if (!bRes) return SetPyECBError("GetServerVariable"); } return PyString_FromStringAndSize(buf, bufsize); --- 342,352 ---- bRes = pecb->m_pcb->GetServerVariable(variable, buf, &bufsize); Py_END_ALLOW_THREADS ! if (!bRes) { ! if (def) { ! Py_INCREF(def); ! return def; ! } return SetPyECBError("GetServerVariable"); + } } return PyString_FromStringAndSize(buf, bufsize); Index: PyFilterObjects.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/pyisapi/src/PyFilterObjects.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyFilterObjects.cpp 9 Sep 2004 00:22:28 -0000 1.3 --- PyFilterObjects.cpp 3 Oct 2004 07:23:25 -0000 1.4 *************** *** 199,207 **** BOOL bRes = FALSE; TCHAR * variable = NULL; PyHFC * phfc = (PyHFC *) self; // @pyparm string|variable|| ! if (!PyArg_ParseTuple(args, "s:GetServerVariable", &variable)) return NULL; --- 199,210 ---- BOOL bRes = FALSE; TCHAR * variable = NULL; + PyObject *def = NULL; PyHFC * phfc = (PyHFC *) self; // @pyparm string|variable|| ! // @pyparm object|default||If specified, the function will return this ! // value instead of raising an error if the variable could not be fetched. ! if (!PyArg_ParseTuple(args, "s|O:GetServerVariable", &variable, &def)) return NULL; *************** *** 212,217 **** bRes = phfc->m_pfc->GetServerVariable(variable, buf, &bufsize); Py_END_ALLOW_THREADS ! if (!bRes) return SetPyHFCError("GetServerVariable"); } return PyString_FromStringAndSize(buf, bufsize); --- 215,225 ---- bRes = phfc->m_pfc->GetServerVariable(variable, buf, &bufsize); Py_END_ALLOW_THREADS ! if (!bRes) { ! if (def) { ! Py_INCREF(def); ! return def; ! } return SetPyHFCError("GetServerVariable"); + } } return PyString_FromStringAndSize(buf, bufsize); |
|
From: Mark H. <mha...@us...> - 2004-10-01 00:16:38
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv800 Modified Files: win32security.i Log Message: * GetBinarySid() would crash for huge strings, and OpenProcessToken() returns a PyHANDLE so it will be automatically closed. Index: win32security.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security.i,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** win32security.i 1 Sep 2004 05:07:58 -0000 1.19 --- win32security.i 1 Oct 2004 00:16:20 -0000 1.20 *************** *** 697,700 **** --- 697,704 ---- ZeroMemory(&identAuthority, sizeof(identAuthority)); + /* avoid buffer overflows */ + if (lstrlen(TextualSid) >= sizeof(buffer)/sizeof(buffer[0])) + return NULL; + lstrcpy(buffer, TextualSid); *************** *** 987,995 **** %} ! // @pyswig int|OpenProcessToken| BOOLAPI OpenProcessToken( PyHANDLE ProcessHandle, // @pyparm int|processHandle||The handle of the process to open. DWORD DesiredAccess, // @pyparm int|desiredAccess||Desired access to process ! HANDLE *OUTPUT ); --- 991,999 ---- %} ! // @pyswig <o PyHANDLE>|OpenProcessToken|Opens the access token associated with a process. BOOLAPI OpenProcessToken( PyHANDLE ProcessHandle, // @pyparm int|processHandle||The handle of the process to open. DWORD DesiredAccess, // @pyparm int|desiredAccess||Desired access to process ! PyHANDLE *OUTPUT ); |
|
From: Mark H. <mha...@us...> - 2004-10-01 00:13:11
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv341 Modified Files: win32apimodule.cpp Log Message: Offer a clue that win32api.GetDomainName() is actually a wrapper of the win32 LookupAccountSid() function (and various others) Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** win32apimodule.cpp 24 Sep 2004 06:38:10 -0000 1.41 --- win32apimodule.cpp 1 Oct 2004 00:12:59 -0000 1.42 *************** *** 872,875 **** --- 872,876 ---- // @pymethod string|win32api|GetDomainName|Returns the current domain name + // @comm This is a convenience wrapper of the Win32 function LookupAccountSid() static PyObject * PyGetDomainName (PyObject *self, PyObject *args) |
|
From: Mark H. <mha...@us...> - 2004-10-01 00:12:17
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32517 Modified Files: win32helpmodule.cpp Log Message: Passing a long string to the underlying Win32 HtmlHelp() function causes a win32 exception (on win2k at least). Limit the string to MAX_PATH, raising a ValueError if too long. Index: win32helpmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32helpmodule.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32helpmodule.cpp 9 Feb 2001 07:35:57 -0000 1.2 --- win32helpmodule.cpp 1 Oct 2004 00:11:56 -0000 1.3 *************** *** 2403,2406 **** --- 2403,2412 ---- if (PyString_Check(fileOb)) { + /* The API function will crash with a huge filename, and that could + open an exploit hole */ + if (PyString_Size(fileOb) >= _MAX_PATH) + return PyErr_Format(PyExc_ValueError, + "string of length %d is too large for this function", + PyString_Size(fileOb) ); file = PyString_AsString(fileOb); } else if (fileOb == Py_None) { |
|
From: Mark H. <mha...@us...> - 2004-10-01 00:10:34
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32023 Modified Files: win32lzmodule.cpp Log Message: Anal MAX_PATH->MAX_PATH+1 for size of buffer passed to the API. Index: win32lzmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32lzmodule.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32lzmodule.cpp 9 Feb 2001 07:35:57 -0000 1.3 --- win32lzmodule.cpp 1 Oct 2004 00:10:15 -0000 1.4 *************** *** 74,78 **** PyGetExpandedName(PyObject *self, PyObject *args) { ! char outName[_MAX_PATH]; char *nameIn; if (!PyArg_ParseTuple(args, "s:GetExpandedName", &nameIn )) // @pyparm int|idControl||The Id of the control to be retrieved. --- 74,78 ---- PyGetExpandedName(PyObject *self, PyObject *args) { ! char outName[_MAX_PATH+1]; char *nameIn; if (!PyArg_ParseTuple(args, "s:GetExpandedName", &nameIn )) // @pyparm int|idControl||The Id of the control to be retrieved. |
|
From: Mark H. <mha...@us...> - 2004-10-01 00:08:11
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31689 Modified Files: win32rasmodule.cpp Log Message: Avoid overflowing the RASDIALPARAMS buffers, and plug a reference leak. Index: win32rasmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32rasmodule.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** win32rasmodule.cpp 7 Jul 2001 17:47:39 -0000 1.7 --- win32rasmodule.cpp 1 Oct 2004 00:07:52 -0000 1.8 *************** *** 295,316 **** char *dest; int size = PyObject_Length(ob); for (int num=0;num<size;num++) { switch (num) { ! case 0: dest = p->szEntryName; break; ! case 1: dest = p->szPhoneNumber; break; ! case 2: dest = p->szCallbackNumber; break; ! case 3: dest = p->szUserName; break; ! case 4: dest = p->szPassword; break; ! case 5: dest = p->szDomain; break; default: SetError("The RasDialParams sequence length must be less than 6", fnName); return FALSE; } ! char *src = PyString_AsString(PySequence_GetItem(ob, num)); ! if (src==NULL) { SetError("The RasDialParams sequence is invalid - must be a tuple of strings.", fnName); return FALSE; } ! strcpy(dest, src); } return TRUE; --- 295,328 ---- char *dest; int size = PyObject_Length(ob); + int dest_size; for (int num=0;num<size;num++) { switch (num) { ! #define GET_BUF_AND_SIZE(name) dest=p->name;dest_size=sizeof(p->name)/sizeof(p->name[0]) ! case 0: GET_BUF_AND_SIZE(szEntryName); break; ! case 1: GET_BUF_AND_SIZE(szPhoneNumber); break; ! case 2: GET_BUF_AND_SIZE(szCallbackNumber); break; ! case 3: GET_BUF_AND_SIZE(szUserName); break; ! case 4: GET_BUF_AND_SIZE(szPassword); break; ! case 5: GET_BUF_AND_SIZE(szDomain); break; default: SetError("The RasDialParams sequence length must be less than 6", fnName); return FALSE; } ! PyObject *sub = PySequence_GetItem(ob, num); ! if (!sub) return FALSE; ! if (!PyString_Check(sub)) { SetError("The RasDialParams sequence is invalid - must be a tuple of strings.", fnName); + Py_DECREF(sub); return FALSE; } ! // check it fits in the dest buffer. ! if (PyString_Size(sub) >= dest_size) { ! SetError("The string is too large for the RASDIALPARAMS structure", fnName); ! Py_DECREF(sub); ! return FALSE; ! } ! // we know it fits - blindly copy. ! strcpy(dest, PyString_AS_STRING(sub)); ! Py_DECREF(sub); } return TRUE; |
|
From: Mark H. <mha...@us...> - 2004-09-27 21:39:47
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15636 Modified Files: win32serviceutil.py Log Message: [ 1032764 ] Minor tweak to win32serviceutil.ServiceFramework Adds a couple of comments to the service base class. Index: win32serviceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32serviceutil.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** win32serviceutil.py 13 Sep 2004 02:19:18 -0000 1.14 --- win32serviceutil.py 27 Sep 2004 21:39:37 -0000 1.15 *************** *** 643,648 **** --- 643,655 ---- # class ServiceFramework: + # Required Attributes: # _svc_name = The service name # _svc_display_name = The service display name + + # Optional Attributes: + _svc_deps_ = None # sequence of service names on which this depends + _exe_name_ = None # Default to PythonService.exe + _exe_args_ = None # Default to no arguments + def __init__(self, args): import servicemanager |
|
From: Mark H. <mha...@us...> - 2004-09-24 07:34:17
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28071 Modified Files: win32uiExt.h Log Message: Ignore strange C++ exception when tearing down our docking toolbars under VC7 Index: win32uiExt.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiExt.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32uiExt.h 20 Jan 2004 22:28:58 -0000 1.4 --- win32uiExt.h 24 Sep 2004 07:34:08 -0000 1.5 *************** *** 147,151 **** } void _BaseOnClose() { ! T::OnClose(); } afx_msg void OnPaletteChanged(CWnd* pFocusWnd) { --- 147,158 ---- } void _BaseOnClose() { ! __try { ! T::OnClose(); ! } ! __except (EXCEPTION_EXECUTE_HANDLER) { ! // *sob* - no idea what is causing this in VC7 (other than vaguely ! // "docking toolbars" ! ; ! } } afx_msg void OnPaletteChanged(CWnd* pFocusWnd) { |
|
From: Mark H. <mha...@us...> - 2004-09-24 07:33:15
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27829 Modified Files: pywin32_postinstall.py Log Message: Write the .pth file in the site-packages directory rather than the main Python dir. Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pywin32_postinstall.py 2 Jul 2004 04:21:57 -0000 1.11 --- pywin32_postinstall.py 24 Sep 2004 07:33:03 -0000 1.12 *************** *** 126,131 **** import distutils.sysconfig import traceback lib_dir = distutils.sysconfig.get_python_lib(plat_specific=1) ! fname = os.path.join(sys.prefix, "pywin32.pth") if verbose: print "Creating .PTH file %s" % fname --- 126,135 ---- import distutils.sysconfig import traceback + # Create the .pth file in the site-packages dir, and use only relative paths lib_dir = distutils.sysconfig.get_python_lib(plat_specific=1) ! # Used to write this directly to sys.prefix - clobber it. ! if os.path.isfile(os.path.join(sys.prefix, "pywin32.pth")): ! os.unlink(os.path.join(sys.prefix, "pywin32.pth")) ! fname = os.path.join(lib_dir, "pywin32.pth") if verbose: print "Creating .PTH file %s" % fname *************** *** 136,142 **** # Create entries for the PTH file, and at the same time # add the directory to sys.path so we can load win32api below. ! path = os.path.join(lib_dir, name) ! pthfile.write(path + "\n") ! sys.path.append(path) # It is possible people with old versions installed with still have # pywintypes and pythoncom registered. We no longer need this, and stale --- 140,145 ---- # Create entries for the PTH file, and at the same time # add the directory to sys.path so we can load win32api below. ! pthfile.write(name + "\n") ! sys.path.append(os.path.join(lib_dir, name)) # It is possible people with old versions installed with still have # pywintypes and pythoncom registered. We no longer need this, and stale |
|
From: Mark H. <mha...@us...> - 2004-09-24 07:29:03
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26448/demos Log Message: Directory /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos added to the repository |
|
From: Mark H. <mha...@us...> - 2004-09-24 07:28:12
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26253 Added Files: adsicon.py Log Message: ADSI constants --- NEW FILE: adsicon.py --- ADS_ATTR_CLEAR = ( 1 ) ADS_ATTR_UPDATE = ( 2 ) ADS_ATTR_APPEND = ( 3 ) ADS_ATTR_DELETE = ( 4 ) ADS_EXT_MINEXTDISPID = ( 1 ) ADS_EXT_MAXEXTDISPID = ( 16777215 ) ADS_EXT_INITCREDENTIALS = ( 1 ) ADS_EXT_INITIALIZE_COMPLETE = ( 2 ) ADS_SEARCHPREF_ASYNCHRONOUS = 0 ADS_SEARCHPREF_DEREF_ALIASES = 1 ADS_SEARCHPREF_SIZE_LIMIT = 2 ADS_SEARCHPREF_TIME_LIMIT = 3 ADS_SEARCHPREF_ATTRIBTYPES_ONLY = 4 ADS_SEARCHPREF_SEARCH_SCOPE = 5 ADS_SEARCHPREF_TIMEOUT = 6 ADS_SEARCHPREF_PAGESIZE = 7 ADS_SEARCHPREF_PAGED_TIME_LIMIT = 8 ADS_SEARCHPREF_CHASE_REFERRALS = 9 ADS_SEARCHPREF_SORT_ON = 10 ADS_SEARCHPREF_CACHE_RESULTS = 11 ADS_SEARCHPREF_DIRSYNC = 12 ADS_SEARCHPREF_TOMBSTONE = 13 ADS_SCOPE_BASE = 0 ADS_SCOPE_ONELEVEL = 1 ADS_SCOPE_SUBTREE = 2 ADS_SECURE_AUTHENTICATION = 0x1 ADS_USE_ENCRYPTION = 0x2 ADS_USE_SSL = 0x2 ADS_READONLY_SERVER = 0x4 ADS_PROMPT_CREDENTIALS = 0x8 ADS_NO_AUTHENTICATION = 0x10 ADS_FAST_BIND = 0x20 ADS_USE_SIGNING = 0x40 ADS_USE_SEALING = 0x80 ADS_USE_DELEGATION = 0x100 ADS_SERVER_BIND = 0x200 ADSTYPE_INVALID = 0 ADSTYPE_DN_STRING = ADSTYPE_INVALID + 1 ADSTYPE_CASE_EXACT_STRING = ADSTYPE_DN_STRING + 1 ADSTYPE_CASE_IGNORE_STRING = ADSTYPE_CASE_EXACT_STRING + 1 ADSTYPE_PRINTABLE_STRING = ADSTYPE_CASE_IGNORE_STRING + 1 ADSTYPE_NUMERIC_STRING = ADSTYPE_PRINTABLE_STRING + 1 ADSTYPE_BOOLEAN = ADSTYPE_NUMERIC_STRING + 1 ADSTYPE_INTEGER = ADSTYPE_BOOLEAN + 1 ADSTYPE_OCTET_STRING = ADSTYPE_INTEGER + 1 ADSTYPE_UTC_TIME = ADSTYPE_OCTET_STRING + 1 ADSTYPE_LARGE_INTEGER = ADSTYPE_UTC_TIME + 1 ADSTYPE_PROV_SPECIFIC = ADSTYPE_LARGE_INTEGER + 1 ADSTYPE_OBJECT_CLASS = ADSTYPE_PROV_SPECIFIC + 1 ADSTYPE_CASEIGNORE_LIST = ADSTYPE_OBJECT_CLASS + 1 ADSTYPE_OCTET_LIST = ADSTYPE_CASEIGNORE_LIST + 1 ADSTYPE_PATH = ADSTYPE_OCTET_LIST + 1 ADSTYPE_POSTALADDRESS = ADSTYPE_PATH + 1 ADSTYPE_TIMESTAMP = ADSTYPE_POSTALADDRESS + 1 ADSTYPE_BACKLINK = ADSTYPE_TIMESTAMP + 1 ADSTYPE_TYPEDNAME = ADSTYPE_BACKLINK + 1 ADSTYPE_HOLD = ADSTYPE_TYPEDNAME + 1 ADSTYPE_NETADDRESS = ADSTYPE_HOLD + 1 ADSTYPE_REPLICAPOINTER = ADSTYPE_NETADDRESS + 1 ADSTYPE_FAXNUMBER = ADSTYPE_REPLICAPOINTER + 1 ADSTYPE_EMAIL = ADSTYPE_FAXNUMBER + 1 ADSTYPE_NT_SECURITY_DESCRIPTOR = ADSTYPE_EMAIL + 1 ADSTYPE_UNKNOWN = ADSTYPE_NT_SECURITY_DESCRIPTOR + 1 ADSTYPE_DN_WITH_BINARY = ADSTYPE_UNKNOWN + 1 ADSTYPE_DN_WITH_STRING = ADSTYPE_DN_WITH_BINARY + 1 ADS_PROPERTY_CLEAR = 1 ADS_PROPERTY_UPDATE = 2 ADS_PROPERTY_APPEND = 3 ADS_PROPERTY_DELETE = 4 ADS_SYSTEMFLAG_DISALLOW_DELETE = -2147483648 ADS_SYSTEMFLAG_CONFIG_ALLOW_RENAME = 0x40000000 ADS_SYSTEMFLAG_CONFIG_ALLOW_MOVE = 0x20000000 ADS_SYSTEMFLAG_CONFIG_ALLOW_LIMITED_MOVE = 0x10000000 ADS_SYSTEMFLAG_DOMAIN_DISALLOW_RENAME = -2147483648 ADS_SYSTEMFLAG_DOMAIN_DISALLOW_MOVE = 0x4000000 ADS_SYSTEMFLAG_CR_NTDS_NC = 0x1 ADS_SYSTEMFLAG_CR_NTDS_DOMAIN = 0x2 ADS_SYSTEMFLAG_ATTR_NOT_REPLICATED = 0x1 ADS_SYSTEMFLAG_ATTR_IS_CONSTRUCTED = 0x4 ADS_GROUP_TYPE_GLOBAL_GROUP = 0x2 ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP = 0x4 ADS_GROUP_TYPE_LOCAL_GROUP = 0x4 ADS_GROUP_TYPE_UNIVERSAL_GROUP = 0x8 ADS_GROUP_TYPE_SECURITY_ENABLED = -2147483648 ADS_UF_SCRIPT = 0x1 ADS_UF_ACCOUNTDISABLE = 0x2 ADS_UF_HOMEDIR_REQUIRED = 0x8 ADS_UF_LOCKOUT = 0x10 ADS_UF_PASSWD_NOTREQD = 0x20 ADS_UF_PASSWD_CANT_CHANGE = 0x40 ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = 0x80 ADS_UF_TEMP_DUPLICATE_ACCOUNT = 0x100 ADS_UF_NORMAL_ACCOUNT = 0x200 ADS_UF_INTERDOMAIN_TRUST_ACCOUNT = 0x800 ADS_UF_WORKSTATION_TRUST_ACCOUNT = 0x1000 ADS_UF_SERVER_TRUST_ACCOUNT = 0x2000 ADS_UF_DONT_EXPIRE_PASSWD = 0x10000 ADS_UF_MNS_LOGON_ACCOUNT = 0x20000 ADS_UF_SMARTCARD_REQUIRED = 0x40000 ADS_UF_TRUSTED_FOR_DELEGATION = 0x80000 ADS_UF_NOT_DELEGATED = 0x100000 ADS_UF_USE_DES_KEY_ONLY = 0x200000 ADS_UF_DONT_REQUIRE_PREAUTH = 0x400000 ADS_UF_PASSWORD_EXPIRED = 0x800000 ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = 0x1000000 ADS_RIGHT_DELETE = 0x10000 ADS_RIGHT_READ_CONTROL = 0x20000 ADS_RIGHT_WRITE_DAC = 0x40000 ADS_RIGHT_WRITE_OWNER = 0x80000 ADS_RIGHT_SYNCHRONIZE = 0x100000 ADS_RIGHT_ACCESS_SYSTEM_SECURITY = 0x1000000 ADS_RIGHT_GENERIC_READ = -2147483648 ADS_RIGHT_GENERIC_WRITE = 0x40000000 ADS_RIGHT_GENERIC_EXECUTE = 0x20000000 ADS_RIGHT_GENERIC_ALL = 0x10000000 ADS_RIGHT_DS_CREATE_CHILD = 0x1 ADS_RIGHT_DS_DELETE_CHILD = 0x2 ADS_RIGHT_ACTRL_DS_LIST = 0x4 ADS_RIGHT_DS_SELF = 0x8 ADS_RIGHT_DS_READ_PROP = 0x10 ADS_RIGHT_DS_WRITE_PROP = 0x20 ADS_RIGHT_DS_DELETE_TREE = 0x40 ADS_RIGHT_DS_LIST_OBJECT = 0x80 ADS_RIGHT_DS_CONTROL_ACCESS = 0x100 ADS_ACETYPE_ACCESS_ALLOWED = 0 ADS_ACETYPE_ACCESS_DENIED = 0x1 ADS_ACETYPE_SYSTEM_AUDIT = 0x2 ADS_ACETYPE_ACCESS_ALLOWED_OBJECT = 0x5 ADS_ACETYPE_ACCESS_DENIED_OBJECT = 0x6 ADS_ACETYPE_SYSTEM_AUDIT_OBJECT = 0x7 ADS_ACETYPE_SYSTEM_ALARM_OBJECT = 0x8 ADS_ACETYPE_ACCESS_ALLOWED_CALLBACK = 0x9 ADS_ACETYPE_ACCESS_DENIED_CALLBACK = 0xa ADS_ACETYPE_ACCESS_ALLOWED_CALLBACK_OBJECT = 0xb ADS_ACETYPE_ACCESS_DENIED_CALLBACK_OBJECT = 0xc ADS_ACETYPE_SYSTEM_AUDIT_CALLBACK = 0xd ADS_ACETYPE_SYSTEM_ALARM_CALLBACK = 0xe ADS_ACETYPE_SYSTEM_AUDIT_CALLBACK_OBJECT = 0xf ADS_ACETYPE_SYSTEM_ALARM_CALLBACK_OBJECT = 0x10 ADS_ACEFLAG_INHERIT_ACE = 0x2 ADS_ACEFLAG_NO_PROPAGATE_INHERIT_ACE = 0x4 ADS_ACEFLAG_INHERIT_ONLY_ACE = 0x8 ADS_ACEFLAG_INHERITED_ACE = 0x10 ADS_ACEFLAG_VALID_INHERIT_FLAGS = 0x1f ADS_ACEFLAG_SUCCESSFUL_ACCESS = 0x40 ADS_ACEFLAG_FAILED_ACCESS = 0x80 ADS_FLAG_OBJECT_TYPE_PRESENT = 0x1 ADS_FLAG_INHERITED_OBJECT_TYPE_PRESENT = 0x2 ADS_SD_CONTROL_SE_OWNER_DEFAULTED = 0x1 ADS_SD_CONTROL_SE_GROUP_DEFAULTED = 0x2 ADS_SD_CONTROL_SE_DACL_PRESENT = 0x4 ADS_SD_CONTROL_SE_DACL_DEFAULTED = 0x8 ADS_SD_CONTROL_SE_SACL_PRESENT = 0x10 ADS_SD_CONTROL_SE_SACL_DEFAULTED = 0x20 ADS_SD_CONTROL_SE_DACL_AUTO_INHERIT_REQ = 0x100 ADS_SD_CONTROL_SE_SACL_AUTO_INHERIT_REQ = 0x200 ADS_SD_CONTROL_SE_DACL_AUTO_INHERITED = 0x400 ADS_SD_CONTROL_SE_SACL_AUTO_INHERITED = 0x800 ADS_SD_CONTROL_SE_DACL_PROTECTED = 0x1000 ADS_SD_CONTROL_SE_SACL_PROTECTED = 0x2000 ADS_SD_CONTROL_SE_SELF_RELATIVE = 0x8000 ADS_SD_REVISION_DS = 4 ADS_NAME_TYPE_1779 = 1 ADS_NAME_TYPE_CANONICAL = 2 ADS_NAME_TYPE_NT4 = 3 ADS_NAME_TYPE_DISPLAY = 4 ADS_NAME_TYPE_DOMAIN_SIMPLE = 5 ADS_NAME_TYPE_ENTERPRISE_SIMPLE = 6 ADS_NAME_TYPE_GUID = 7 ADS_NAME_TYPE_UNKNOWN = 8 ADS_NAME_TYPE_USER_PRINCIPAL_NAME = 9 ADS_NAME_TYPE_CANONICAL_EX = 10 ADS_NAME_TYPE_SERVICE_PRINCIPAL_NAME = 11 ADS_NAME_TYPE_SID_OR_SID_HISTORY_NAME = 12 ADS_NAME_INITTYPE_DOMAIN = 1 ADS_NAME_INITTYPE_SERVER = 2 ADS_NAME_INITTYPE_GC = 3 ADS_OPTION_SERVERNAME = 0 ADS_OPTION_REFERRALS = ADS_OPTION_SERVERNAME + 1 ADS_OPTION_PAGE_SIZE = ADS_OPTION_REFERRALS + 1 ADS_OPTION_SECURITY_MASK = ADS_OPTION_PAGE_SIZE + 1 ADS_OPTION_MUTUAL_AUTH_STATUS = ADS_OPTION_SECURITY_MASK + 1 ADS_OPTION_QUOTA = ADS_OPTION_MUTUAL_AUTH_STATUS + 1 ADS_OPTION_PASSWORD_PORTNUMBER = ADS_OPTION_QUOTA + 1 ADS_OPTION_PASSWORD_METHOD = ADS_OPTION_PASSWORD_PORTNUMBER + 1 ADS_SECURITY_INFO_OWNER = 0x1 ADS_SECURITY_INFO_GROUP = 0x2 ADS_SECURITY_INFO_DACL = 0x4 ADS_SECURITY_INFO_SACL = 0x8 ADS_SETTYPE_FULL = 1 ADS_SETTYPE_PROVIDER = 2 ADS_SETTYPE_SERVER = 3 ADS_SETTYPE_DN = 4 ADS_FORMAT_WINDOWS = 1 ADS_FORMAT_WINDOWS_NO_SERVER = 2 ADS_FORMAT_WINDOWS_DN = 3 ADS_FORMAT_WINDOWS_PARENT = 4 ADS_FORMAT_X500 = 5 ADS_FORMAT_X500_NO_SERVER = 6 ADS_FORMAT_X500_DN = 7 ADS_FORMAT_X500_PARENT = 8 ADS_FORMAT_SERVER = 9 ADS_FORMAT_PROVIDER = 10 ADS_FORMAT_LEAF = 11 ADS_DISPLAY_FULL = 1 ADS_DISPLAY_VALUE_ONLY = 2 ADS_ESCAPEDMODE_DEFAULT = 1 ADS_ESCAPEDMODE_ON = 2 ADS_ESCAPEDMODE_OFF = 3 ADS_ESCAPEDMODE_OFF_EX = 4 ADS_PATH_FILE = 1 ADS_PATH_FILESHARE = 2 ADS_PATH_REGISTRY = 3 ADS_SD_FORMAT_IID = 1 ADS_SD_FORMAT_RAW = 2 ADS_SD_FORMAT_HEXSTRING = 3 # Generated by h2py from AdsErr.h def _HRESULT_TYPEDEF_(_sc): return _sc E_ADS_BAD_PATHNAME = _HRESULT_TYPEDEF_((-2147463168)) E_ADS_INVALID_DOMAIN_OBJECT = _HRESULT_TYPEDEF_((-2147463167)) E_ADS_INVALID_USER_OBJECT = _HRESULT_TYPEDEF_((-2147463166)) E_ADS_INVALID_COMPUTER_OBJECT = _HRESULT_TYPEDEF_((-2147463165)) E_ADS_UNKNOWN_OBJECT = _HRESULT_TYPEDEF_((-2147463164)) E_ADS_PROPERTY_NOT_SET = _HRESULT_TYPEDEF_((-2147463163)) E_ADS_PROPERTY_NOT_SUPPORTED = _HRESULT_TYPEDEF_((-2147463162)) E_ADS_PROPERTY_INVALID = _HRESULT_TYPEDEF_((-2147463161)) E_ADS_BAD_PARAMETER = _HRESULT_TYPEDEF_((-2147463160)) E_ADS_OBJECT_UNBOUND = _HRESULT_TYPEDEF_((-2147463159)) E_ADS_PROPERTY_NOT_MODIFIED = _HRESULT_TYPEDEF_((-2147463158)) E_ADS_PROPERTY_MODIFIED = _HRESULT_TYPEDEF_((-2147463157)) E_ADS_CANT_CONVERT_DATATYPE = _HRESULT_TYPEDEF_((-2147463156)) E_ADS_PROPERTY_NOT_FOUND = _HRESULT_TYPEDEF_((-2147463155)) E_ADS_OBJECT_EXISTS = _HRESULT_TYPEDEF_((-2147463154)) E_ADS_SCHEMA_VIOLATION = _HRESULT_TYPEDEF_((-2147463153)) E_ADS_COLUMN_NOT_SET = _HRESULT_TYPEDEF_((-2147463152)) S_ADS_ERRORSOCCURRED = _HRESULT_TYPEDEF_(0x00005011L) S_ADS_NOMORE_ROWS = _HRESULT_TYPEDEF_(0x00005012L) S_ADS_NOMORE_COLUMNS = _HRESULT_TYPEDEF_(0x00005013L) E_ADS_INVALID_FILTER = _HRESULT_TYPEDEF_((-2147463148)) |
|
From: Mark H. <mha...@us...> - 2004-09-24 07:27:23
|
Update of /cvsroot/pywin32/pywin32/com In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26112 Modified Files: adsi.dsp Log Message: New file exposing IDirectorySearch Index: adsi.dsp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/adsi.dsp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** adsi.dsp 3 Jul 2003 04:07:07 -0000 1.5 --- adsi.dsp 24 Sep 2004 07:27:14 -0000 1.6 *************** *** 109,112 **** --- 109,116 ---- SOURCE=.\win32comext\adsi\src\PyIDirectoryObject.cpp # End Source File + # Begin Source File + + SOURCE=.\win32comext\adsi\src\PyIDirectorySearch.cpp + # End Source File # End Group # Begin Source File *************** *** 278,281 **** --- 282,289 ---- # End Source File + # Begin Source File + + SOURCE=.\win32comext\adsi\src\PyIDirectorySearch.i + # End Source File # End Target # End Project |
|
From: Mark H. <mha...@us...> - 2004-09-24 07:26:46
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25935 Modified Files: setup_win32all.py Log Message: * New feature of copying .lib files didn't handle _d correctly. * axdebug struggles under release builds for vc6 * adsi gets a new swig file. Index: setup_win32all.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup_win32all.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** setup_win32all.py 20 Sep 2004 02:54:39 -0000 1.33 --- setup_win32all.py 24 Sep 2004 07:26:37 -0000 1.34 *************** *** 350,353 **** --- 350,357 ---- self.found_libraries[lib.lower()] = found patched_libs.append(os.path.splitext(os.path.basename(found))[0]) + # axdebug struggles under debug builds - worry about that when I care :) + if sys.hexversion < 0x2040000 and ext.name == 'axdebug' and self.debug: + return "axdebug doesn't build in VC6 debug builds (irony!)" + # We update the .libraries list with the resolved library name. # This is really only so "_d" works. *************** *** 421,432 **** # Copy cpp lib files needed to create Python COM extensions ! clib_files = (['win32', 'pywintypes.lib'], ! ['win32com', 'pythoncom.lib']) for clib_file in clib_files: target_dir = os.path.join(self.build_lib, clib_file[0], "libs") if not os.path.exists(target_dir): self.mkpath(target_dir) self.copy_file( ! os.path.join(self.build_temp, clib_file[1]), target_dir) def build_exefile(self, ext): --- 425,440 ---- # Copy cpp lib files needed to create Python COM extensions ! clib_files = (['win32', 'pywintypes%s.lib'], ! ['win32com', 'pythoncom%s.lib']) for clib_file in clib_files: target_dir = os.path.join(self.build_lib, clib_file[0], "libs") if not os.path.exists(target_dir): self.mkpath(target_dir) + suffix = "" + if self.debug: + suffix = "_d" + fname = clib_file[1] % suffix self.copy_file( ! os.path.join(self.build_temp, fname), target_dir) def build_exefile(self, ext): *************** *** 946,949 **** --- 954,958 ---- 'PyIADsUser': 'IDispatch', 'PyIDirectoryObject': '', + 'PyIDirectorySearch': '', } |
|
From: Mark H. <mha...@us...> - 2004-09-24 07:25:22
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25572 Modified Files: PyADSIUtil.cpp PyADSIUtil.h PyIDirectoryObject.i adsi.i adsilib.i Added Files: PyIDirectorySearch.i Log Message: Beef up ADSI support. --- NEW FILE: PyIDirectorySearch.i --- %module IDirectorySearch // A COM interface to ADSI's IDirectorySearch interface. %include "typemaps.i" %include "pywin32.i" %include "pythoncom.i" %include "adsilib.i" %{ #include "AdsErr.h" #include "PyIDirectorySearch.h" #define SWIG_THIS_IID IID_IDirectorySearch PyIDirectorySearch::PyIDirectorySearch(IUnknown *pDisp) : PyIUnknown(pDisp) { ob_type = &type; } PyIDirectorySearch::~PyIDirectorySearch() { } IDirectorySearch *PyIDirectorySearch::GetI(PyObject *self) { return (IDirectorySearch *)PyIUnknown::GetI(self); } %} %{ // @pyswig |SetSearchPreference| PyObject *PyIDirectorySearch::SetSearchPreference(PyObject *self, PyObject *args) { HRESULT _result; PyObject *obPrefs; IDirectorySearch *_swig_self; if ((_swig_self=GetI(self))==NULL) return NULL; if (!PyArg_ParseTuple(args, "O", &obPrefs)) return NULL; ADS_SEARCHPREF_INFO *p; DWORD numPrefs, i; if (!PyADSIObject_AsADS_SEARCHPREF_INFOs(obPrefs, &p, &numPrefs)) return NULL; PyObject *retStatus = PyList_New(numPrefs); if (!retStatus) { PyADSIObject_FreeADS_SEARCHPREF_INFOs(p, numPrefs); return NULL; } Py_BEGIN_ALLOW_THREADS _result = (HRESULT )_swig_self->SetSearchPreference(p, numPrefs); Py_END_ALLOW_THREADS PyObject *ret = NULL; for (i=0;i<numPrefs;i++) PyList_SET_ITEM(retStatus, i, PyInt_FromLong(p[i].dwStatus)); PyADSIObject_FreeADS_SEARCHPREF_INFOs(p, numPrefs); return Py_BuildValue("iN", _result, retStatus); } %} %native(SetSearchPreference) SetSearchPreference; %{ // @pyswig <o PyADS_OBJECT_INFO>|ExecuteSearch|Executes a search and passes the results to the caller. Some providers, such as LDAP, will defer the actual execution until the caller invokes the IDirectorySearch::GetFirstRow method or the IDirectorySearch::GetNextRow method. PyObject *PyIDirectorySearch::ExecuteSearch(PyObject *self, PyObject *args) { PyObject *obNames, *obFilter; IDirectorySearch *_swig_self; if ((_swig_self=GetI(self))==NULL) return NULL; if (!PyArg_ParseTuple(args, "OO", &obFilter, &obNames)) return NULL; WCHAR *szFilter = NULL; if (!PyWinObject_AsWCHAR(obFilter, &szFilter, FALSE)) return NULL; WCHAR **names = NULL; DWORD cnames = -1; if (obNames != Py_None) if (!PyADSI_MakeNames(obNames, &names, &cnames)) { PyWinObject_FreeWCHAR(szFilter); return NULL; } HRESULT _result; ADS_SEARCH_HANDLE handle; Py_BEGIN_ALLOW_THREADS _result = (HRESULT )_swig_self->ExecuteSearch(szFilter, names, cnames, &handle); Py_END_ALLOW_THREADS PyObject *ret = NULL; if (FAILED(_result)) PyCom_BuildPyException(_result, _swig_self, IID_IDirectoryObject); else { ret = PyInt_FromLong((long)handle); } PyADSI_FreeNames(names, cnames); PyWinObject_FreeWCHAR(szFilter); return ret; } %} %native(ExecuteSearch) ExecuteSearch; HRESULT_KEEP_INFO GetNextRow(ADS_SEARCH_HANDLE handle); HRESULT_KEEP_INFO GetFirstRow(ADS_SEARCH_HANDLE handle); HRESULT_KEEP_INFO GetPreviousRow(ADS_SEARCH_HANDLE handle); HRESULT CloseSearchHandle(ADS_SEARCH_HANDLE handle); HRESULT AbandonSearch(ADS_SEARCH_HANDLE handle); %{ // @pyswig |GetColumn| PyObject *PyIDirectorySearch::GetColumn(PyObject *self, PyObject *args) { PyObject *obName; long handle; IDirectorySearch *_swig_self; if ((_swig_self=GetI(self))==NULL) return NULL; if (!PyArg_ParseTuple(args, "lO:GetColumn", &handle, &obName)) return NULL; WCHAR *szName= NULL; if (!PyWinObject_AsWCHAR(obName, &szName, FALSE)) return NULL; ADS_SEARCH_COLUMN col; memset(&col, 0, sizeof(col)); HRESULT _result; PyObject *ret = NULL; Py_BEGIN_ALLOW_THREADS _result = (HRESULT )_swig_self->GetColumn((ADS_SEARCH_HANDLE)handle, szName, &col); Py_END_ALLOW_THREADS if (FAILED(_result)) PyCom_BuildPyException(_result, _swig_self, IID_IDirectoryObject); else { PyObject *values = PyList_New(col.dwNumValues); if (values) { DWORD i; for (i=0;i<col.dwNumValues;i++) { PyList_SET_ITEM(values, i, PyADSIObject_FromADSVALUE(col.pADsValues[i])); } ret = Py_BuildValue("NiN", PyWinObject_FromWCHAR(col.pszAttrName), col.dwADsType, values); } } _swig_self->FreeColumn(&col); PyWinObject_FreeWCHAR(szName); return ret; } %} %native(GetColumn) GetColumn; %{ // @pyswig |GetNextColumnName| // @rdesc Returns None when the underlying ADSI function return S_ADS_NOMORE_COLUMNS. PyObject *PyIDirectorySearch::GetNextColumnName(PyObject *self, PyObject *args) { long handle; IDirectorySearch *_swig_self; if ((_swig_self=GetI(self))==NULL) return NULL; if (!PyArg_ParseTuple(args, "l:GetNextColumnName", &handle)) return NULL; HRESULT _result; PyObject *ret = NULL; WCHAR *szName = NULL; Py_BEGIN_ALLOW_THREADS _result = (HRESULT )_swig_self->GetNextColumnName((ADS_SEARCH_HANDLE)handle, &szName); Py_END_ALLOW_THREADS if (FAILED(_result)) PyCom_BuildPyException(_result, _swig_self, IID_IDirectoryObject); else if (_result == S_ADS_NOMORE_COLUMNS) { ret = Py_None; Py_INCREF(ret); } else { ret = PyWinObject_FromWCHAR(szName); FreeADsMem(szName); } return ret; } %} %native(GetNextColumnName) GetNextColumnName; Index: adsilib.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/adsilib.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** adsilib.i 5 May 2000 00:42:00 -0000 1.1 --- adsilib.i 24 Sep 2004 07:25:12 -0000 1.2 *************** *** 46,49 **** --- 46,52 ---- } + %apply ADS_SEARCH_HANDLE {long}; + typedef long ADS_SEARCH_HANDLE + /*** // Some ** special cases. Index: PyADSIUtil.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyADSIUtil.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyADSIUtil.h 5 May 2000 00:42:00 -0000 1.1 --- PyADSIUtil.h 24 Sep 2004 07:25:12 -0000 1.2 *************** *** 14,15 **** --- 14,20 ---- BOOL PyADSI_MakeNames(PyObject *obNames, WCHAR ***names, DWORD *pcnames); void PyADSI_FreeNames(WCHAR **names, DWORD cnames); + + BOOL PyADSIObject_AsADS_SEARCHPREF_INFOs(PyObject *ob, ADS_SEARCHPREF_INFO **ppret, DWORD *pcinfos); + void PyADSIObject_FreeADS_SEARCHPREF_INFOs(ADS_SEARCHPREF_INFO *pattr, DWORD cattr); + + PyObject *PyADSIObject_FromADSVALUE(ADSVALUE &v); Index: PyADSIUtil.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyADSIUtil.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyADSIUtil.cpp 5 May 2000 00:42:00 -0000 1.1 --- PyADSIUtil.cpp 24 Sep 2004 07:25:12 -0000 1.2 *************** *** 142,145 **** --- 142,177 ---- } + BOOL PyADSIObject_AsTypedValue(PyObject *val, ADSVALUE &v) + { + BOOL ok = TRUE; + switch (v.dwType) { + // OK - get lazy - we know its a union! + case ADSTYPE_DN_STRING: + case ADSTYPE_CASE_EXACT_STRING: + case ADSTYPE_CASE_IGNORE_STRING: + case ADSTYPE_PRINTABLE_STRING: + case ADSTYPE_NUMERIC_STRING: + case ADSTYPE_OBJECT_CLASS: + ok = PyWinObject_AsWCHAR(val, &v.DNString, FALSE); + break; + case ADSTYPE_BOOLEAN: + v.Boolean = PyInt_AsLong(val); + break; + case ADSTYPE_INTEGER: + v.Integer = PyInt_AsLong(val); + break; + case ADSTYPE_UTC_TIME: + ok = PyWinObject_AsSYSTEMTIME(val, &v.UTCTime); + break; + case ADSTYPE_LARGE_INTEGER: + ok = PyWinObject_AsLARGE_INTEGER(val, &v.LargeInteger); + break; + default: + PyErr_SetString(PyExc_TypeError, "Cant convert to this type"); + return FALSE; + } + return ok; + } + BOOL PyADSIObject_AsADSVALUE(PyObject *ob, ADSVALUE &v) { *************** *** 172,204 **** return FALSE; } - BOOL ok = TRUE; - switch (dwType) { - // OK - get lazy - we know its a union! - case ADSTYPE_DN_STRING: - case ADSTYPE_CASE_EXACT_STRING: - case ADSTYPE_CASE_IGNORE_STRING: - case ADSTYPE_PRINTABLE_STRING: - case ADSTYPE_NUMERIC_STRING: - case ADSTYPE_OBJECT_CLASS: - ok = PyWinObject_AsWCHAR(val, &v.DNString, FALSE); - break; - case ADSTYPE_BOOLEAN: - v.Boolean = PyInt_AsLong(val); - break; - case ADSTYPE_INTEGER: - v.Integer = PyInt_AsLong(val); - break; - case ADSTYPE_UTC_TIME: - ok = PyWinObject_AsSYSTEMTIME(val, &v.UTCTime); - break; - case ADSTYPE_LARGE_INTEGER: - ok = PyWinObject_AsLARGE_INTEGER(val, &v.LargeInteger); - break; - default: - PyErr_SetString(PyExc_TypeError, "Cant convert to this type"); - return FALSE; - } v.dwType = (ADSTYPE)dwType; ! return ok; } --- 204,209 ---- return FALSE; } v.dwType = (ADSTYPE)dwType; ! return PyADSIObject_AsTypedValue(val, v); } *************** *** 216,219 **** --- 221,227 ---- ; } + // force 'null' reset if called again. + v.dwType = ADSTYPE_INTEGER; + v.Integer = 0; } *************** *** 532,535 **** --- 540,600 ---- } + BOOL _Make_ATTR_INFO(PyObject *ob, ADS_ATTR_INFO *pBase, DWORD index) + { + PyObject *obName, *obValues; + ADS_ATTR_INFO *pThis = pBase + index; + PyObject *sub = PySequence_GetItem(ob, index); + if (!sub) + return FALSE; + + if (!PyArg_ParseTuple(sub, "OllO:ADS_ATTR_INFO tuple", + &obName, &pThis->dwControlCode, + &pThis->dwADsType, &obValues)) + return FALSE; + if (!PyWinObject_AsWCHAR(obName, &pThis->pszAttrName, FALSE)) + return FALSE; + if (!PySequence_Check(obValues)) { + PyErr_Format(PyExc_TypeError, + "4th item in an ATTR_INFO structure must be a sequence (got %s)", + obValues->ob_type->tp_name); + return FALSE; + } + DWORD nValues = PySequence_Length(obValues); + pThis->pADsValues = (PADSVALUE)malloc(nValues * sizeof(ADSVALUE)); + if (!pThis->pADsValues) { + PyErr_NoMemory(); + return FALSE; + } + memset(pThis->pADsValues, 0, nValues * sizeof(ADSVALUE)); + pThis->dwNumValues = nValues; + DWORD i; + BOOL ok; + for (i=0;i<nValues;i++) { + PyObject *val = PySequence_GetItem(obValues, i); + if (!val) + return FALSE; + pThis->pADsValues[i].dwType = pThis->dwADsType; + ok = PyADSIObject_AsTypedValue(val, pThis->pADsValues[i]); + Py_DECREF(val); + } + return TRUE; + } + + void PyADSIObject_FreeADS_ATTR_INFOs(ADS_ATTR_INFO *pval, DWORD cinfos) + { + if (!pval) return; + DWORD i; + for (i=0;i<cinfos;i++) { + ADS_ATTR_INFO *pThis = pval + i; + PyWinObject_FreeWCHAR(pThis->pszAttrName); + if (pThis->pADsValues) { + DWORD valnum; + for (valnum=0;valnum<pThis->dwNumValues;valnum++) + PyADSIObject_FreeADSVALUE(pThis->pADsValues[valnum]); + free(pThis->pADsValues); + } + } + free(pval); + } BOOL PyADSIObject_AsADS_ATTR_INFOs(PyObject *ob, ADS_ATTR_INFO **ppret, DWORD *pcinfos) { *************** *** 538,549 **** return FALSE; } ! int nitems = PySequence_Length(ob); ! PyErr_SetString(PyExc_TypeError, "Havent got here yet!"); ! return FALSE; } ! void PyADSIObject_FreeADS_ATTR_INFOs(ADS_ATTR_INFO *pattr, DWORD cattr) { ! PyErr_SetString(PyExc_TypeError, "Havent got here yet!"); } --- 603,676 ---- return FALSE; } ! DWORD i; ! // Use C++ reference to make working with ppret more convenient. ! ADS_ATTR_INFO *&pret = *ppret; ! DWORD &nitems = *pcinfos; ! ! nitems = PySequence_Length(ob); ! pret = (PADS_ATTR_INFO)malloc(nitems * sizeof(ADS_ATTR_INFO)); ! if (!pret) { ! PyErr_NoMemory(); ! return FALSE; ! } ! memset(pret, 0, nitems * sizeof(ADS_ATTR_INFO)); ! BOOL ok = TRUE; ! for (i=0;ok && i<nitems;i++) { ! ok = _Make_ATTR_INFO(ob, pret, i); ! } ! if (!ok && pret) { ! PyADSIObject_FreeADS_ATTR_INFOs(pret, nitems); ! pret = 0; ! nitems = 0; ! } ! return ok; } ! void PyADSIObject_FreeADS_SEARCHPREF_INFOs(ADS_SEARCHPREF_INFO *pattr, DWORD cattr) { ! if (!pattr) return; ! DWORD i; ! for (i=0;i<cattr;i++) ! PyADSIObject_FreeADSVALUE(pattr[i].vValue); ! free(pattr); ! } ! ! BOOL PyADSIObject_AsADS_SEARCHPREF_INFOs(PyObject *ob, ADS_SEARCHPREF_INFO **ppret, DWORD *pcinfos) ! { ! BOOL ret = FALSE; ! if (!PySequence_Check(ob)) { ! PyErr_SetString(PyExc_TypeError, "ADS_SEARCHPREF_INFOs must be a sequence"); ! return FALSE; ! } ! // Use C++ reference to make working with ppret more convenient. ! ADS_SEARCHPREF_INFO *&pret = *ppret; ! DWORD &nitems = *pcinfos; ! nitems = PySequence_Length(ob); ! ! pret = (ADS_SEARCHPREF_INFO *)malloc(sizeof(ADS_SEARCHPREF_INFO) * nitems); ! if (!pret) { ! PyErr_NoMemory(); ! return NULL; ! } ! memset(pret, 0, sizeof(ADS_SEARCHPREF_INFO) * nitems); ! PyObject *sub = NULL; ! PyObject *obValue; // no reference ! DWORD i; ! for (i=0;i<nitems;i++) { ! PyObject *sub = PySequence_GetItem(ob, i); ! if (!sub) goto done; ! if (!PyArg_ParseTuple(sub, "iO:ADS_SEARCHPREF_INFO tuple", &pret[i].dwSearchPref, &obValue)) ! goto done; ! if (!PyADSIObject_AsADSVALUE(obValue, pret[i].vValue)) ! goto done; ! Py_DECREF(sub); ! sub = NULL; ! } ! ret = TRUE; ! done: ! Py_XDECREF(sub); ! if (!ret && pret) ! PyADSIObject_FreeADS_SEARCHPREF_INFOs(pret, nitems); ! return ret; } *************** *** 611,613 **** buf[0] = L'\0'; return FALSE; ! } \ No newline at end of file --- 738,740 ---- buf[0] = L'\0'; return FALSE; ! } Index: PyIDirectoryObject.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyIDirectoryObject.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIDirectoryObject.i 5 May 2000 00:42:00 -0000 1.1 --- PyIDirectoryObject.i 24 Sep 2004 07:25:12 -0000 1.2 *************** *** 106,107 **** --- 106,149 ---- %native(SetObjectAttributes) SetObjectAttributes; + %{ + // @pyswig <o PyIDispatch>|CreateDSObject| + PyObject *PyIDirectoryObject::CreateDSObject(PyObject *self, PyObject *args) + { + HRESULT _result; + IDirectoryObject *_swig_self; + if ((_swig_self=GetI(self))==NULL) return NULL; + PyObject *obAttr, *obName; + if (!PyArg_ParseTuple(args, "OO:CreateDSObject", &obName, &obAttr)) + return NULL; + + WCHAR *szName= NULL; + if (!PyWinObject_AsWCHAR(obName, &szName, FALSE)) + return NULL; + + PADS_ATTR_INFO attr; + DWORD cattr; + if (!PyADSIObject_AsADS_ATTR_INFOs(obAttr, &attr, &cattr)) { + PyWinObject_FreeWCHAR(szName); + return NULL; + } + IDispatch *pRet = NULL; + + Py_BEGIN_ALLOW_THREADS + _result = (HRESULT )_swig_self->CreateDSObject(szName, attr, cattr, &pRet); + Py_END_ALLOW_THREADS + PyObject *ret = NULL; + if (FAILED(_result)) { + PyCom_BuildPyException(_result, _swig_self, IID_IDirectoryObject); + } else + ret = PyCom_PyObjectFromIUnknown(pRet, IID_IDispatch, FALSE); + PyADSIObject_FreeADS_ATTR_INFOs(attr, cattr); + return ret; + }; + + %} + + %native(CreateDSObject) CreateDSObject; + + // @pyswig |DeleteDSObject|Deletes a leaf object in a directory tree + // @pyparm string|rdn||The relative distinguished name (relative path) of the object to be deleted. + HRESULT DeleteDSObject(WCHAR *rdn); Index: adsi.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/adsi.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** adsi.i 16 Oct 2000 06:00:49 -0000 1.3 --- adsi.i 24 Sep 2004 07:25:12 -0000 1.4 *************** *** 28,31 **** --- 28,32 ---- #include "PythonCOMRegister.h" #include "PyIDirectoryObject.h" + #include "PyIDirectorySearch.h" #include "PyIADsContainer.h" #include "PyIADsUser.h" *************** *** 67,73 **** if (!PyWinObject_AsWCHAR(obPath, &path, FALSE)) goto done; ! if (!PyWinObject_AsWCHAR(obUserName, &userName, FALSE)) goto done; ! if (!PyWinObject_AsWCHAR(obPassword, &password, FALSE)) goto done; Py_BEGIN_ALLOW_THREADS; --- 68,74 ---- if (!PyWinObject_AsWCHAR(obPath, &path, FALSE)) goto done; ! if (!PyWinObject_AsWCHAR(obUserName, &userName, TRUE)) goto done; ! if (!PyWinObject_AsWCHAR(obPassword, &password, TRUE)) goto done; Py_BEGIN_ALLOW_THREADS; *************** *** 221,224 **** --- 222,226 ---- %init %{ + PyDict_SetItemString(d, "error", PyWinExc_COMError); AddIID(d, "LIBID_ADs", LIBID_ADs); *************** *** 257,264 **** // ADD_IID(IID_IDSAttrMgmt); ! if ( PyCom_RegisterClientType(&PyIDirectoryObject::type, &IID_IDirectoryObject) != 0 ) return; ! ADD_IID(IID_IDirectoryObject); - ADD_IID(IID_IDirectorySearch); // ADD_IID(IID_IDirectoryAttrMgmt); --- 259,266 ---- // ADD_IID(IID_IDSAttrMgmt); ! ADD_IID(CLSID_AccessControlEntry); ! ADD_IID(CLSID_AccessControlList); ! ADD_IID(CLSID_SecurityDescriptor); // ADD_IID(IID_IDirectoryAttrMgmt); *************** *** 267,270 **** --- 269,278 ---- AddIID(d, "DBPROPSET_ADSISEARCH", DBPROPSET_ADSISEARCH); + if ( PyCom_RegisterClientType(&PyIDirectoryObject::type, &IID_IDirectoryObject) != 0 ) return; + ADD_IID(IID_IDirectoryObject); + + if ( PyCom_RegisterClientType(&PyIDirectorySearch::type, &IID_IDirectorySearch) != 0 ) return; + ADD_IID(IID_IDirectorySearch); + if ( PyCom_RegisterClientType(&PyIADsUser::type, &IID_IADsUser) != 0 ) return; ADD_IID(IID_IADsUser); *************** *** 272,275 **** if ( PyCom_RegisterClientType(&PyIADsContainer::type, &IID_IADsContainer) != 0 ) return; ADD_IID(IID_IADsContainer); - %} --- 280,282 ---- |
|
From: Mark H. <mha...@us...> - 2004-09-24 06:39:24
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16889 Modified Files: win32gui.i Log Message: Add AnimateWindow and expose 'error' directly from here too. Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** win32gui.i 12 Sep 2004 22:42:25 -0000 1.49 --- win32gui.i 24 Sep 2004 06:39:15 -0000 1.50 *************** *** 105,108 **** --- 105,109 ---- PyEval_InitThreads(); /* Start the interpreter's thread-awareness */ PyDict_SetItemString(d, "dllhandle", PyLong_FromVoidPtr(g_dllhandle)); + PyDict_SetItemString(d, "error", PyWinExc_ApiError); %} *************** *** 1133,1136 **** --- 1134,1144 ---- %native(FlashWindowEx) PyFlashWindowEx; + // @pyswig |AnimateWindow|Enables you to produce special effects when showing or hiding windows. There are three types of animation: roll, slide, and alpha-blended fade. + BOOLAPI AnimateWindow( + HWND hwnd, // @pyparm int|hwnd||handle to window + DWORD dwTime, // @pyparm int|dwTime||duration of animation + DWORD dwFlags // @pyparm int|dwFlags||animation type + ); + // @pyswig int|GetWindowLong| // @pyparm int|hwnd|| |
|
From: Mark H. <mha...@us...> - 2004-09-24 06:38:19
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16743 Modified Files: win32apimodule.cpp Log Message: Add GetComputerObjectName() Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** win32apimodule.cpp 22 Sep 2004 04:39:01 -0000 1.40 --- win32apimodule.cpp 24 Sep 2004 06:38:10 -0000 1.41 *************** *** 37,40 **** --- 37,41 ---- static BOOL (WINAPI *myGetUserNameEx)(EXTENDED_NAME_FORMAT, LPWSTR, PULONG)=NULL; static BOOL (WINAPI *myGetComputerNameEx)(COMPUTER_NAME_FORMAT, LPWSTR, LPDWORD)=NULL; + static BOOL (WINAPI *myGetComputerObjectName)(EXTENDED_NAME_FORMAT, LPWSTR, LPDWORD)=NULL; static BOOL (WINAPI *myGetLongPathNameA)(LPCSTR, LPSTR, DWORD)=NULL; static BOOL (WINAPI *myGetLongPathNameW)(LPCWSTR, LPWSTR, DWORD)=NULL; *************** *** 790,793 **** --- 791,827 ---- } + // @pymethod string|win32api|GetComputerObjectName|Retrieves the local computer's name in a specified format. + static PyObject * + PyGetComputerObjectName(PyObject *self, PyObject *args) + { + if (myGetComputerObjectName==NULL) + return ReturnError("GetComputerObjectName is not supported on current platform","GetComputerNameEx"); + + WCHAR *formattedname=NULL; + EXTENDED_NAME_FORMAT fmt; + PyObject *ret = NULL; + ULONG nSize=0; + if (!PyArg_ParseTuple (args, "i:GetComputerObjectName", &fmt)) + return NULL; + // @pyseeapi GetComputerObjectName + // We always get into trouble with WinXP vs 2k error codes. + // Simply assume that if we have a size, the function gave us the correct one. + myGetComputerObjectName(fmt,formattedname,&nSize); + if (!nSize) + return PyWin_SetAPIError("GetComputerObjectName"); + formattedname=(WCHAR *)malloc(nSize*sizeof(WCHAR)); + if (!formattedname) + return PyErr_NoMemory(); + if (!myGetComputerObjectName(fmt,formattedname,&nSize)){ + PyWin_SetAPIError("GetComputerObjectName"); + goto done; + } + ret=PyWinObject_FromWCHAR(formattedname); + done: + if (formattedname!=NULL) + free(formattedname); + return ret; + } + // @pymethod string|win32api|GetUserName|Returns the current user name static PyObject * *************** *** 4392,4395 **** --- 4426,4430 ---- {"GetComputerName", PyGetComputerName, 1}, // @pymeth GetComputerName|Returns the local computer name {"GetComputerNameEx", PyGetComputerNameEx, 1}, // @pymeth GetComputerNameEx|Retrieves a NetBIOS or DNS name associated with the local computer + {"GetComputerObjectName",PyGetComputerObjectName, 1}, // @pymeth GetComputerObjectName|Retrieves the local computer's name in a specified format {"GetUserName", PyGetUserName, 1}, // @pymeth GetUserName|Returns the current user name. {"GetUserNameEx", PyGetUserNameEx, 1}, // @pymeth GetUserNameEx|Returns the current user name in format specified by Name* constants *************** *** 4589,4592 **** --- 4624,4630 ---- if (fp!=NULL) myGetUserNameEx=(BOOL (WINAPI *)(EXTENDED_NAME_FORMAT, LPWSTR, PULONG))(fp); + fp = GetProcAddress(hmodule,"GetComputerObjectNameW"); + if (fp!=NULL) + myGetComputerObjectName=(BOOL (WINAPI *)(EXTENDED_NAME_FORMAT, LPWSTR, PULONG))(fp); } hmodule = LoadLibrary("kernel32.dll"); |
|
From: Mark H. <mha...@us...> - 2004-09-24 04:04:02
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28485 Modified Files: mapisend.py Log Message: New version from Stephen Emslie. Index: mapisend.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/demos/mapisend.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mapisend.py 20 Aug 2004 23:42:32 -0000 1.1 --- mapisend.py 24 Sep 2004 04:03:52 -0000 1.2 *************** *** 4,8 **** # this was based on Jason Hattingh's C++ code at http://www.codeproject.com/internet/mapadmin.asp ! # written by David Fraser <da...@sj...> and Stephen Emslie <ste...@sj...> # you can test this by changing the variables at the bottom and running from the command line --- 4,8 ---- # this was based on Jason Hattingh's C++ code at http://www.codeproject.com/internet/mapadmin.asp ! # written by David Fraser <davidf at sjsoft.com> and Stephen Emslie <stephene at sjsoft.com> # you can test this by changing the variables at the bottom and running from the command line *************** *** 26,36 **** messagestorestable.SetColumns((mapitags.PR_ENTRYID, mapitags.PR_DISPLAY_NAME_A, mapitags.PR_DEFAULT_STORE),0) ! while (True): rows = messagestorestable.QueryRows(1, 0) if len(rows) != 1: break row = rows[0] ! propertyid, propertyvalue = row[0] ! if (propertyid == mapitags.PR_DEFAULT_STORE and propertyvalue == True): break --- 26,37 ---- messagestorestable.SetColumns((mapitags.PR_ENTRYID, mapitags.PR_DISPLAY_NAME_A, mapitags.PR_DEFAULT_STORE),0) ! while True: rows = messagestorestable.QueryRows(1, 0) + #if this is the last row then stop if len(rows) != 1: break row = rows[0] ! #if this is the default store then stop ! if ((mapitags.PR_DEFAULT_STORE,True) in row): break *************** *** 42,45 **** --- 43,49 ---- hr, props = msgstore.GetProps((mapitags.PR_IPM_OUTBOX_ENTRYID), 0) (tag, eid) = props[0] + #check for errors + if mapitags.PROP_TYPE(tag) == mapitags.PT_ERROR: + raise TypeError,'got PT_ERROR instead of PT_BINARY: %s'%eid outboxfolder = msgstore.OpenEntry(eid,None,mapi.MAPI_BEST_ACCESS) *************** *** 76,82 **** MAPIProfile = "" # Change this to a valid email address to test ! SendTo = "an.invalid@address" SendMessage = "testing one two three" SendSubject = "Testing Extended MAPI!!" SendEMAPIMail(SendSubject, SendMessage, SendTo, MAPIProfile=MAPIProfile) - --- 80,85 ---- MAPIProfile = "" # Change this to a valid email address to test ! SendTo = "an.invalid at address" SendMessage = "testing one two three" SendSubject = "Testing Extended MAPI!!" SendEMAPIMail(SendSubject, SendMessage, SendTo, MAPIProfile=MAPIProfile) |
|
From: Mark H. <mha...@us...> - 2004-09-22 09:11:19
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6601 Modified Files: win32con.py Log Message: Add GetUserNameEx/GetComputerNameEx constants. Index: win32con.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32con.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32con.py 6 Sep 2004 23:52:42 -0000 1.6 --- win32con.py 22 Sep 2004 09:11:10 -0000 1.7 *************** *** 4498,4499 **** --- 4498,4520 ---- DOUBLE_CLICK = 2 MOUSE_WHEELED = 4 + + # GetUserNameEx/GetComputerNameEx + NameUnknown = 0 + NameFullyQualifiedDN = 1 + NameSamCompatible = 2 + NameDisplay = 3 + NameUniqueId = 6 + NameCanonical = 7 + NameUserPrincipal = 8 + NameCanonicalEx = 9 + NameServicePrincipal = 10 + NameDnsDomain = 12 + + ComputerNameNetBIOS = 0 + ComputerNameDnsHostname = 1 + ComputerNameDnsDomain = 2 + ComputerNameDnsFullyQualified = 3 + ComputerNamePhysicalNetBIOS = 4 + ComputerNamePhysicalDnsHostname = 5 + ComputerNamePhysicalDnsDomain = 6 + ComputerNamePhysicalDnsFullyQualified = 7 |
|
From: Mark H. <mha...@us...> - 2004-09-22 09:10:05
|
Update of /cvsroot/pywin32/pywin32/SWIG/swig_lib/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6331/python Modified Files: pythoncom.i Log Message: Add HRESULT_KEEP_INFO, which will raise an exception on failure, but still return the hresult on success. Index: pythoncom.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/SWIG/swig_lib/python/pythoncom.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pythoncom.i 28 Oct 2000 01:15:05 -0000 1.1 --- pythoncom.i 22 Sep 2004 09:09:54 -0000 1.2 *************** *** 31,34 **** --- 31,57 ---- } + // HRESULT_KEEP_INFO will raise an exception on failure, + // but still return the hresult to the caller + //typedef long HRESULT_KEEP_INFO; + %typedef long HRESULT_KEEP_INFO; + + %typemap(python,out) HRESULT_KEEP_INFO { + $target = PyInt_FromLong($source); + } + + %typemap(python,except) HRESULT_KEEP_INFO { + Py_BEGIN_ALLOW_THREADS + $function + Py_END_ALLOW_THREADS + if (FAILED($source)) { + $cleanup + #ifdef SWIG_THIS_IID + return PyCom_BuildPyException($source, _swig_self, SWIG_THIS_IID); + #else + return PyCom_BuildPyException($source); + #endif + } + } + %typemap(python,in) IID *INPUT(IID temp) { |
|
From: Mark H. <mha...@us...> - 2004-09-22 04:39:10
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18955 Modified Files: win32apimodule.cpp Log Message: Add GetComputerNameEx, and remove "(for buffer size)" from the GetUserNameEx() error message Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** win32apimodule.cpp 7 Sep 2004 04:27:04 -0000 1.39 --- win32apimodule.cpp 22 Sep 2004 04:39:01 -0000 1.40 *************** *** 29,33 **** --- 29,40 ---- #define PyW32_BLOCK_THREADS Py_BLOCK_THREADS + #if (_WIN32_WINNT < 0x0500) + // We don't get COMPUTER_NAME_FORMAT unless we bump this. + // As we use it dynamically, we don't *need* to bump it. + typedef int COMPUTER_NAME_FORMAT; + #endif + static BOOL (WINAPI *myGetUserNameEx)(EXTENDED_NAME_FORMAT, LPWSTR, PULONG)=NULL; + static BOOL (WINAPI *myGetComputerNameEx)(COMPUTER_NAME_FORMAT, LPWSTR, LPDWORD)=NULL; static BOOL (WINAPI *myGetLongPathNameA)(LPCSTR, LPSTR, DWORD)=NULL; static BOOL (WINAPI *myGetLongPathNameW)(LPCWSTR, LPWSTR, DWORD)=NULL; *************** *** 750,753 **** --- 757,793 ---- } + // @pymethod string|win32api|GetComputerNameEx|Retrieves a NetBIOS or DNS name associated with the local computer + static PyObject * + PyGetComputerNameEx(PyObject *self, PyObject *args) + { + if (myGetComputerNameEx==NULL) + return ReturnError("GetComputerNameEx is not supported on current platform","GetComputerNameEx"); + + WCHAR *formattedname=NULL; + COMPUTER_NAME_FORMAT fmt; + PyObject *ret = NULL; + ULONG nSize=0; + if (!PyArg_ParseTuple (args, "i:GetComputerNameEx", &fmt)) + return NULL; + // @pyseeapi GetComputerNameEx + // We always get into trouble with WinXP vs 2k error codes. + // Simply assume that if we have a size, the function gave us the correct one. + myGetComputerNameEx(fmt,formattedname,&nSize); + if (!nSize) + return PyWin_SetAPIError("GetComputerNameExW"); + formattedname=(WCHAR *)malloc(nSize*sizeof(WCHAR)); + if (!formattedname) + return PyErr_NoMemory(); + if (!myGetComputerNameEx(fmt,formattedname,&nSize)){ + PyWin_SetAPIError("GetComputerNameEx"); + goto done; + } + ret=PyWinObject_FromWCHAR(formattedname); + done: + if (formattedname!=NULL) + free(formattedname); + return ret; + } + // @pymethod string|win32api|GetUserName|Returns the current user name static PyObject * *************** *** 782,786 **** myGetUserNameEx(fmt,formattedname,&nSize); if (!nSize) ! return PyWin_SetAPIError("GetUserNameEx (for buffer size)"); formattedname=(WCHAR *)malloc(nSize*sizeof(WCHAR)); if (!formattedname) --- 822,826 ---- myGetUserNameEx(fmt,formattedname,&nSize); if (!nSize) ! return PyWin_SetAPIError("GetUserNameExW"); formattedname=(WCHAR *)malloc(nSize*sizeof(WCHAR)); if (!formattedname) *************** *** 4351,4354 **** --- 4391,4395 ---- {"GetCommandLine", PyGetCommandLine, 1}, // @pymeth GetCommandLine|Return the application's command line. {"GetComputerName", PyGetComputerName, 1}, // @pymeth GetComputerName|Returns the local computer name + {"GetComputerNameEx", PyGetComputerNameEx, 1}, // @pymeth GetComputerNameEx|Retrieves a NetBIOS or DNS name associated with the local computer {"GetUserName", PyGetUserName, 1}, // @pymeth GetUserName|Returns the current user name. {"GetUserNameEx", PyGetUserNameEx, 1}, // @pymeth GetUserNameEx|Returns the current user name in format specified by Name* constants *************** *** 4557,4560 **** --- 4598,4604 ---- if (fp!=NULL) myGetLongPathNameW=(BOOL (WINAPI *)(LPCWSTR, LPWSTR, DWORD))(fp); + fp = GetProcAddress(hmodule,"GetComputerNameExW"); + if (fp!=NULL) + myGetComputerNameEx=(BOOL (WINAPI *)(COMPUTER_NAME_FORMAT, LPWSTR, LPDWORD))(fp); } } |