Update of /cvsroot/ctypes/ctypes/comtypes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9952
Modified Files:
Tag: branch_1_0
_comobject.py __init__.py
Log Message:
Preliminary changes for Windows CE.
Index: __init__.py
===================================================================
RCS file: /cvsroot/ctypes/ctypes/comtypes/__init__.py,v
retrieving revision 1.25.2.37
retrieving revision 1.25.2.38
diff -C2 -d -r1.25.2.37 -r1.25.2.38
*** __init__.py 2 Jan 2006 19:11:25 -0000 1.25.2.37
--- __init__.py 4 Jan 2006 19:18:18 -0000 1.25.2.38
***************
*** 1,7 ****
# requires ctypes 0.9.8 or later
! import new
! ##import warnings
! import types
! import sys
from ctypes import *
--- 1,4 ----
# requires ctypes 0.9.8 or later
! import new, types, sys, os
from ctypes import *
***************
*** 82,86 ****
return
if flags is None:
! flags = getattr(sys, "coinit_flags", COINIT_APARTMENTTHREADED)
__inited = True
logger.debug("CoInitializeEx(None, %s)", flags)
--- 79,86 ----
return
if flags is None:
! if os.name == "ce":
! flags = getattr(sys, "coinit_flags", COINIT_MULTITHREADED)
! else:
! flags = getattr(sys, "coinit_flags", COINIT_APARTMENTTHREADED)
__inited = True
logger.debug("CoInitializeEx(None, %s)", flags)
Index: _comobject.py
===================================================================
RCS file: /cvsroot/ctypes/ctypes/comtypes/Attic/_comobject.py,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** _comobject.py 2 Jan 2006 19:11:25 -0000 1.1.2.3
--- _comobject.py 4 Jan 2006 19:18:18 -0000 1.1.2.4
***************
*** 2,5 ****
--- 2,6 ----
from comtypes.hresult import *
+ import os
import logging
logger = logging.getLogger(__name__)
***************
*** 78,85 ****
################################################################
!
!
! _InterlockedIncrement = windll.kernel32.InterlockedIncrement
! _InterlockedDecrement = windll.kernel32.InterlockedDecrement
class COMObject(object):
--- 79,88 ----
################################################################
! if os.name == "ce":
! _InterlockedIncrement = windll.coredll.InterlockedIncrement
! _InterlockedDecrement = windll.coredll.InterlockedDecrement
! else:
! _InterlockedIncrement = windll.kernel32.InterlockedIncrement
! _InterlockedDecrement = windll.kernel32.InterlockedDecrement
class COMObject(object):
|