home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Shareware / Comunicatii / jyte / jyte.exe / olectl.py < prev    next >
Text File  |  2004-01-26  |  3KB  |  69 lines

  1. """Constants used by COM Controls
  2.  
  3.   Hand created version of OLECTL.H constants.
  4. """
  5.  
  6. import winerror
  7.  
  8. FACILITY_CONTROL = 0xa
  9.  
  10. def MAKE_SCODE(sev, fac, code):
  11.     return int((long(-sev)<<31) | ((fac)<<16) | ((code)))
  12.  
  13. def STD_CTL_SCODE(n):
  14.     return MAKE_SCODE(winerror.SEVERITY_ERROR, FACILITY_CONTROL, n)
  15.  
  16. CTL_E_ILLEGALFUNCTIONCALL       = STD_CTL_SCODE(5)
  17. CTL_E_OVERFLOW                  = STD_CTL_SCODE(6)
  18. CTL_E_OUTOFMEMORY               = STD_CTL_SCODE(7)
  19. CTL_E_DIVISIONBYZERO            = STD_CTL_SCODE(11)
  20. CTL_E_OUTOFSTRINGSPACE          = STD_CTL_SCODE(14)
  21. CTL_E_OUTOFSTACKSPACE           = STD_CTL_SCODE(28)
  22. CTL_E_BADFILENAMEORNUMBER       = STD_CTL_SCODE(52)
  23. CTL_E_FILENOTFOUND              = STD_CTL_SCODE(53)
  24. CTL_E_BADFILEMODE               = STD_CTL_SCODE(54)
  25. CTL_E_FILEALREADYOPEN           = STD_CTL_SCODE(55)
  26. CTL_E_DEVICEIOERROR             = STD_CTL_SCODE(57)
  27. CTL_E_FILEALREADYEXISTS         = STD_CTL_SCODE(58)
  28. CTL_E_BADRECORDLENGTH           = STD_CTL_SCODE(59)
  29. CTL_E_DISKFULL                  = STD_CTL_SCODE(61)
  30. CTL_E_BADRECORDNUMBER           = STD_CTL_SCODE(63)
  31. CTL_E_BADFILENAME               = STD_CTL_SCODE(64)
  32. CTL_E_TOOMANYFILES              = STD_CTL_SCODE(67)
  33. CTL_E_DEVICEUNAVAILABLE         = STD_CTL_SCODE(68)
  34. CTL_E_PERMISSIONDENIED          = STD_CTL_SCODE(70)
  35. CTL_E_DISKNOTREADY              = STD_CTL_SCODE(71)
  36. CTL_E_PATHFILEACCESSERROR       = STD_CTL_SCODE(75)
  37. CTL_E_PATHNOTFOUND              = STD_CTL_SCODE(76)
  38. CTL_E_INVALIDPATTERNSTRING      = STD_CTL_SCODE(93)
  39. CTL_E_INVALIDUSEOFNULL          = STD_CTL_SCODE(94)
  40. CTL_E_INVALIDFILEFORMAT         = STD_CTL_SCODE(321)
  41. CTL_E_INVALIDPROPERTYVALUE      = STD_CTL_SCODE(380)
  42. CTL_E_INVALIDPROPERTYARRAYINDEX = STD_CTL_SCODE(381)
  43. CTL_E_SETNOTSUPPORTEDATRUNTIME  = STD_CTL_SCODE(382)
  44. CTL_E_SETNOTSUPPORTED           = STD_CTL_SCODE(383)
  45. CTL_E_NEEDPROPERTYARRAYINDEX    = STD_CTL_SCODE(385)
  46. CTL_E_SETNOTPERMITTED           = STD_CTL_SCODE(387)
  47. CTL_E_GETNOTSUPPORTEDATRUNTIME  = STD_CTL_SCODE(393)
  48. CTL_E_GETNOTSUPPORTED           = STD_CTL_SCODE(394)
  49. CTL_E_PROPERTYNOTFOUND          = STD_CTL_SCODE(422)
  50. CTL_E_INVALIDCLIPBOARDFORMAT    = STD_CTL_SCODE(460)
  51. CTL_E_INVALIDPICTURE            = STD_CTL_SCODE(481)
  52. CTL_E_PRINTERERROR              = STD_CTL_SCODE(482)
  53. CTL_E_CANTSAVEFILETOTEMP        = STD_CTL_SCODE(735)
  54. CTL_E_SEARCHTEXTNOTFOUND        = STD_CTL_SCODE(744)
  55. CTL_E_REPLACEMENTSTOOLONG       = STD_CTL_SCODE(746)
  56.  
  57. CONNECT_E_FIRST    = MAKE_SCODE(winerror.SEVERITY_ERROR,   winerror.FACILITY_ITF, 0x0200)
  58. CONNECT_E_LAST     = MAKE_SCODE(winerror.SEVERITY_ERROR,   winerror.FACILITY_ITF, 0x020F)
  59. CONNECT_S_FIRST    = MAKE_SCODE(winerror.SEVERITY_SUCCESS, winerror.FACILITY_ITF, 0x0200)
  60. CONNECT_S_LAST     = MAKE_SCODE(winerror.SEVERITY_SUCCESS, winerror.FACILITY_ITF, 0x020F)
  61.  
  62. CONNECT_E_NOCONNECTION = CONNECT_E_FIRST+0
  63. CONNECT_E_ADVISELIMIT  = CONNECT_E_FIRST+1
  64. CONNECT_E_CANNOTCONNECT = CONNECT_E_FIRST+2
  65. CONNECT_E_OVERRIDDEN = CONNECT_E_FIRST+3
  66.  
  67. CLASS_E_NOTLICENSED = winerror.CLASSFACTORY_E_FIRST+2
  68.  
  69.