diff --git a/AutoDuck/BuildHHP.py b/AutoDuck/BuildHHP.py index 52662d8f4..afe6f26bb 100644 --- a/AutoDuck/BuildHHP.py +++ b/AutoDuck/BuildHHP.py @@ -67,7 +67,7 @@ def handle_globs(lGlobs): # else we have a trailing slash - it means we _expect_ it to be a patch as-is. assert ( os.path.isdir(sCommonPrefix) and sCommonPrefix[-1] == "\\" - ), "commonprefix splitting aint gunna work!" + ), "commonprefix splitting ain't gunna work!" print("sCommonPrefix=", sCommonPrefix) # Ok, now remove this common prefix from every file: lRelativeFiles = [] diff --git a/AutoDuck/Dump2HHC.py b/AutoDuck/Dump2HHC.py index 42790a9d8..ef16a3816 100644 --- a/AutoDuck/Dump2HHC.py +++ b/AutoDuck/Dump2HHC.py @@ -412,7 +412,7 @@ def genTOC(cats, output, title, target): **locals() ) ) - # Dont show 'children' for objects - params etc don't need their own child nodes! + # Don't show 'children' for objects - params etc don't need their own child nodes! _genItemsFromDict(cat.objects, cat, output, target, do_children=0) output.write( """ diff --git a/AutoDuck/makedfromi.py b/AutoDuck/makedfromi.py index b83c51e20..a2d92c712 100644 --- a/AutoDuck/makedfromi.py +++ b/AutoDuck/makedfromi.py @@ -26,7 +26,7 @@ def GetComments(line, lineNo, lines): break doc = doc + "\n// " + data[1].strip() lineNo = lineNo + 1 - # This line doesnt match - step back + # This line doesn't match - step back lineNo = lineNo - 1 return doc, lineNo diff --git a/CHANGES.txt b/CHANGES.txt index 0e58b923e..d427d2baa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,6 +23,7 @@ Coming in build 307, as yet unreleased * Fixed a `TypeError` due to incorrect kwargs in `win32comext.axscript.client.pydumper.Register` (#2216, @Avasam) * Fixed error reporting of file copy failure for for installing debug dlls (#2216, @Avasam) * Fixed `py.exe -m win32verstamp` command and other quote typos caused by Implied String Concatenation (#2225, @Avasam) +* Fixed tons of quote-related typos in strings, docs and comments (#2271 , @Avasam) * Fixed VT_SAFEARRAY(VT_RECORD) which were missing the last element (#2247) * Fixed `MFC redist DLLs not found` by preferring corresponding version but accepting different version (#2248, @andreabravetti) * Fixed `pywintypes.error: (5, 'RegOpenKeyEx', 'Access is denied.')` when running service with debug parameter and no elevation (#2238, @jmartens) diff --git a/Pythonwin/Win32uiHostGlue.h b/Pythonwin/Win32uiHostGlue.h index 6e736be77..2bee28c94 100644 --- a/Pythonwin/Win32uiHostGlue.h +++ b/Pythonwin/Win32uiHostGlue.h @@ -253,7 +253,7 @@ inline BOOL Win32uiHostGlue::ApplicationInit(const TCHAR *cmd, const TCHAR *addi Py_Initialize(); } // Make sure the statically linked win32ui is the one Python sees - // (and doesnt go searching for a new one) + // (and doesn't go searching for a new one) PyInit_win32ui(); return Win32uiApplicationInit(this, cmd, additionalPaths); diff --git a/Pythonwin/contents.d b/Pythonwin/contents.d index b2d955e6c..86101de59 100644 --- a/Pythonwin/contents.d +++ b/Pythonwin/contents.d @@ -128,7 +128,7 @@ was used for the first block is used for the entire file. Another common scenario where things go wrong is when pasting code into a new file. You create a new file (which sets the tabs to your defaults), then paste in a huge chunk of code that is indented differently. The editor is still using -the defaults, which dont reflect the code that now exists in the buffer. +the defaults, which don't reflect the code that now exists in the buffer. The "tab-timmy" shows up these problems very quickly, and you can quickly toggle the current tab settings by pressing Ctrl+T, or change the indent width by pressing Ctrl+U. diff --git a/Pythonwin/dllmain.cpp b/Pythonwin/dllmain.cpp index 99e5124fb..806b16b8d 100644 --- a/Pythonwin/dllmain.cpp +++ b/Pythonwin/dllmain.cpp @@ -114,9 +114,9 @@ BOOL CInProcApp::InitInstance() // Check that we have a valid CWinApp object to use. bool CheckGoodWinApp() { - // Shouldnt need special symbols now that we delay the creation. + // shouldn't need special symbols now that we delay the creation. // If the host exports a special symbol, then - // dont create a host app. + // don't create a host app. // HMODULE hModule = GetModuleHandle(NULL); // BOOL hasSymbol = (GetProcAddress(hModule, "NoCreateWinApp") != NULL); if (AfxGetApp() == NULL) { // && !hasSymbol) { @@ -206,7 +206,7 @@ extern "C" __declspec(dllexport) int __stdcall DllMainwin32ui(HINSTANCE hInstanc if (pCreatedApp) { pCreatedApp->CleanupMainWindow(); - // We dont call ExitInstance, as the InitInstance we called could + // We don't call ExitInstance, as the InitInstance we called could // not have possibly called back to Python, as the Python app object // could not have been created. Let the Python code manage if it wants! Win32uiFinalize(); diff --git a/Pythonwin/pythonwin.cpp b/Pythonwin/pythonwin.cpp index 6b8af1086..2d904413f 100644 --- a/Pythonwin/pythonwin.cpp +++ b/Pythonwin/pythonwin.cpp @@ -59,7 +59,7 @@ BOOL CPythonWinApp::InitInstance() { if (!glue.InitInstance()) return FALSE; - // dialog based apps dont have a message pump. + // dialog based apps don't have a message pump. return m_pMainWnd && !m_pMainWnd->IsKindOf(RUNTIME_CLASS(CDialog)); } int CPythonWinApp::ExitInstance() diff --git a/Pythonwin/pywin/Demos/app/helloapp.py b/Pythonwin/pywin/Demos/app/helloapp.py index 6ac35b431..b0209288c 100644 --- a/Pythonwin/pywin/Demos/app/helloapp.py +++ b/Pythonwin/pywin/Demos/app/helloapp.py @@ -19,7 +19,7 @@ # The main frame. -# Does almost nothing at all - doesnt even create a child window! +# Does almost nothing at all - doesn't even create a child window! class HelloWindow(window.Wnd): def __init__(self): # The window.Wnd ctor creates a Window object, and places it in diff --git a/Pythonwin/pywin/Demos/dibdemo.py b/Pythonwin/pywin/Demos/dibdemo.py index 615227abf..141746bf6 100644 --- a/Pythonwin/pywin/Demos/dibdemo.py +++ b/Pythonwin/pywin/Demos/dibdemo.py @@ -1,6 +1,6 @@ # A demo which creates a view and a frame which displays a PPM format bitmap # -# This hasnnt been run in a while, as I dont have many of that format around! +# This hasnnt been run in a while, as I don't have many of that format around! import win32api import win32con @@ -46,7 +46,7 @@ def __init__(self, filename, *bPBM): rowcollist = f.readline().split() cols = int(rowcollist[0]) rows = int(rowcollist[1]) - f.readline() # whats this one? + f.readline() # what's this one? dib.LoadPBMData(f, (cols, rows)) else: dib.LoadWindowsFormatFile(f) diff --git a/Pythonwin/pywin/Demos/hiertest.py b/Pythonwin/pywin/Demos/hiertest.py index 376294611..a22dc3b94 100644 --- a/Pythonwin/pywin/Demos/hiertest.py +++ b/Pythonwin/pywin/Demos/hiertest.py @@ -7,7 +7,7 @@ # directory listbox -# This has obvious limitations - doesnt track subdirs, etc. Demonstrates +# This has obvious limitations - doesn't track subdirs, etc. Demonstrates # simple use of Python code for querying the tree as needed. # Only use strings, and lists of strings (from curdir()) class DirHierList(hierlist.HierList): diff --git a/Pythonwin/pywin/Demos/ocx/flash.py b/Pythonwin/pywin/Demos/ocx/flash.py index 239240ee3..9aa32bfc7 100644 --- a/Pythonwin/pywin/Demos/ocx/flash.py +++ b/Pythonwin/pywin/Demos/ocx/flash.py @@ -60,7 +60,7 @@ def __init__(self, url=None): self.url = regutil.GetRegisteredHelpFile("Main Python Documentation") else: self.url = url - pass # Dont call base class doc/view version... + pass # Don't call base class doc/view version... def Create(self, title, rect=None, parent=None): style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_OVERLAPPEDWINDOW diff --git a/Pythonwin/pywin/Demos/ocx/msoffice.py b/Pythonwin/pywin/Demos/ocx/msoffice.py index b158e609f..5162e5a05 100644 --- a/Pythonwin/pywin/Demos/ocx/msoffice.py +++ b/Pythonwin/pywin/Demos/ocx/msoffice.py @@ -88,7 +88,7 @@ def OnSetFocus(self, msg): wnd = item.GetInPlaceWindow() if wnd is not None: wnd.SetFocus() - return 0 # Dont get the base version called. + return 0 # Don't get the base version called. return 1 # Call the base version. def OnSize(self, params): @@ -115,7 +115,7 @@ class WordFrame(window.MDIChildWnd): def __init__(self, doc=None): self._obj_ = win32ui.CreateMDIChild() self._obj_.AttachObject(self) - # Dont call base class doc/view version... + # Don't call base class doc/view version... def Create(self, title, rect=None, parent=None): WordModule = gencache.EnsureModule( diff --git a/Pythonwin/pywin/Demos/ocx/ocxtest.py b/Pythonwin/pywin/Demos/ocx/ocxtest.py index 9d37ba8f1..695f708b8 100644 --- a/Pythonwin/pywin/Demos/ocx/ocxtest.py +++ b/Pythonwin/pywin/Demos/ocx/ocxtest.py @@ -173,7 +173,7 @@ def OnOK(self): # class OCXFrame(window.MDIChildWnd): def __init__(self): - pass # Dont call base class doc/view version... + pass # Don't call base class doc/view version... def Create(self, controlClass, title, rect=None, parent=None): style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_OVERLAPPEDWINDOW diff --git a/Pythonwin/pywin/Demos/ocx/webbrowser.py b/Pythonwin/pywin/Demos/ocx/webbrowser.py index 1dc318c19..89c713c26 100644 --- a/Pythonwin/pywin/Demos/ocx/webbrowser.py +++ b/Pythonwin/pywin/Demos/ocx/webbrowser.py @@ -35,7 +35,7 @@ def __init__(self, url=None): self.url = "http://www.python.org" else: self.url = url - pass # Dont call base class doc/view version... + pass # Don't call base class doc/view version... def Create(self, title, rect=None, parent=None): style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_OVERLAPPEDWINDOW diff --git a/Pythonwin/pywin/Demos/threadedgui.py b/Pythonwin/pywin/Demos/threadedgui.py index 5b0704ef3..c5c0ba667 100644 --- a/Pythonwin/pywin/Demos/threadedgui.py +++ b/Pythonwin/pywin/Demos/threadedgui.py @@ -95,7 +95,7 @@ def OnPrepareDC(self, dc, printinfo): class FontFrame(window.MDIChildWnd): def __init__(self): - pass # Dont call base class doc/view version... + pass # Don't call base class doc/view version... def Create(self, title, rect=None, parent=None): style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_OVERLAPPEDWINDOW @@ -134,7 +134,7 @@ def ExitInstance(self): class ThreadedFontFrame(window.MDIChildWnd): def __init__(self): - pass # Dont call base class doc/view version... + pass # Don't call base class doc/view version... self.thread = None def Create(self, title, rect=None, parent=None): diff --git a/Pythonwin/pywin/Demos/toolbar.py b/Pythonwin/pywin/Demos/toolbar.py index e56aefef1..0dfbb6a05 100644 --- a/Pythonwin/pywin/Demos/toolbar.py +++ b/Pythonwin/pywin/Demos/toolbar.py @@ -15,7 +15,7 @@ def OnCreateClient(self, cp, context): # handlers for toolbar buttons self.HookCommand(self.OnPrevious, 401) self.HookCommand(self.OnNext, 402) - # Its not necessary for us to hook both of these - the + # It's not necessary for us to hook both of these - the # common controls should fall-back all by themselves. # Indeed, given we hook TTN_NEEDTEXTW, commctrl.TTN_NEEDTEXTA # will not be called. @@ -85,7 +85,7 @@ def OnPrevious(self, id, cmd): \r The first item's tooltips is provided by Python code.\r \r -(Dont close the window with the toolbar in a floating state - it may not re-appear!)\r +(Don't close the window with the toolbar in a floating state - it may not re-appear!)\r """ diff --git a/Pythonwin/pywin/debugger/__init__.py b/Pythonwin/pywin/debugger/__init__.py index 6a6b65da7..4bcb7202a 100644 --- a/Pythonwin/pywin/debugger/__init__.py +++ b/Pythonwin/pywin/debugger/__init__.py @@ -85,7 +85,7 @@ def set_trace(): return # App closing if d.stopframe != d.botframe: - # If im not "running" + # If I'm not "running" return sys.settrace(None) # May be hooked diff --git a/Pythonwin/pywin/debugger/debugger.py b/Pythonwin/pywin/debugger/debugger.py index 17e64f7c5..e44aa37ce 100644 --- a/Pythonwin/pywin/debugger/debugger.py +++ b/Pythonwin/pywin/debugger/debugger.py @@ -132,7 +132,7 @@ def GetSubList(self): self.last_stack.append((frame, lineno)) if ( frame is debugger.userbotframe - ): # Dont bother showing frames below our bottom frame. + ): # Don't bother showing frames below our bottom frame. break for frame, lineno in self.last_stack: ret.append(HierFrameItem(frame, debugger)) @@ -455,7 +455,7 @@ def OnListEndLabelEdit(self, std, extra): def DeleteSelected(self): try: num = self.GetNextItem(-1, commctrl.LVNI_SELECTED) - if num < self.GetItemCount() - 1: # We cant delete the last + if num < self.GetItemCount() - 1: # We can't delete the last self.DeleteItem(num) except win32ui.error: win32api.MessageBeep() @@ -608,7 +608,7 @@ def close(self, frameShutdown=0): SetInteractiveContext(None, None) frame = win32ui.GetMainFrame() - # Hide the debuger toolbars (as they wont normally form part of the main toolbar state. + # Hide the debuger toolbars (as they won't normally form part of the main toolbar state. for id, klass, float in DebuggerDialogInfos: try: tb = frame.GetControlBar(id) @@ -623,7 +623,7 @@ def close(self, frameShutdown=0): return 1 def StopDebuggerPump(self): - assert self.pumping, "Can't stop the debugger pump if Im not pumping!" + assert self.pumping, "Can't stop the debugger pump if I'm not pumping!" # After stopping a pump, I may never return. if self.GUIAboutToFinishInteract(): self.pumping = 0 @@ -674,7 +674,7 @@ def cmdloop(self): self.GUIAboutToBreak() def print_stack_entry(self, frame): - # We dont want a stack printed - our GUI is better :-) + # We don't want a stack printed - our GUI is better :-) pass def user_return(self, frame, return_value): @@ -828,7 +828,7 @@ def set_trace(self): self.userbotframe = None while frame: # scriptutils.py creates a local variable with name - # '_debugger_stop_frame_', and we dont go past it + # '_debugger_stop_frame_', and we don't go past it # (everything above this is Pythonwin framework code) if "_debugger_stop_frame_" in frame.f_locals: self.userbotframe = frame @@ -883,7 +883,7 @@ def RespondDebuggerState(self, state): win32ui.LoadString(win32ui.IDR_MAINFRAME) + title ) if self.debuggerState == DBGSTATE_QUITTING and state != DBGSTATE_NOT_DEBUGGING: - print("Ignoring state change cos Im trying to stop!", state) + print("Ignoring state change cos I'm trying to stop!", state) return self.debuggerState = state try: diff --git a/Pythonwin/pywin/debugger/fail.py b/Pythonwin/pywin/debugger/fail.py index 97721576c..dbb5320ae 100644 --- a/Pythonwin/pywin/debugger/fail.py +++ b/Pythonwin/pywin/debugger/fail.py @@ -3,7 +3,7 @@ # The ONLY purpose for this script is testing/demoing the # Pythonwin debugger package. -# It does nothing useful, and it even doesnt do that! +# It does nothing useful, and it even doesn't do that! import sys import time diff --git a/Pythonwin/pywin/default.cfg b/Pythonwin/pywin/default.cfg index 1d08809d6..9366e2dfb 100644 --- a/Pythonwin/pywin/default.cfg +++ b/Pythonwin/pywin/default.cfg @@ -113,7 +113,7 @@ Alt+I = WindowBack # Toggle back to previous window. Home = InteractiveHome # A sample Event defined in this file. Shift+Home = InteractiveHomeExtend # A sample Event defined in this file. -# When docked, the Ctrl+Tab and Shift+Ctrl+Tab keys dont work as expected. +# When docked, the Ctrl+Tab and Shift+Ctrl+Tab keys don't work as expected. Ctrl+Tab = MDINext Ctrl+Shift+Tab = MDIPrev diff --git a/Pythonwin/pywin/docking/DockingBar.py b/Pythonwin/pywin/docking/DockingBar.py index 3e9b4131a..e73492ef8 100644 --- a/Pythonwin/pywin/docking/DockingBar.py +++ b/Pythonwin/pywin/docking/DockingBar.py @@ -295,7 +295,7 @@ def OnLButtonUp(self, msg): if not self.bTracking: return 1 # pass it on. self.StopTracking(1) - return 0 # Dont pass on + return 0 # Don't pass on def OnLButtonDown(self, msg): # UINT nFlags, CPoint point) @@ -374,7 +374,7 @@ def OnMouseMove(self, msg): self.rectTracker = OffsetRect(self.rectTracker, (pt[0] - cpt[0], 0)) self.OnInvertTracker(self.rectTracker) - return 0 # Dont pass it on. + return 0 # Don't pass it on. # def OnBarStyleChange(self, old, new): diff --git a/Pythonwin/pywin/framework/app.py b/Pythonwin/pywin/framework/app.py index 96cf45368..de63703a4 100644 --- a/Pythonwin/pywin/framework/app.py +++ b/Pythonwin/pywin/framework/app.py @@ -211,7 +211,7 @@ def OnHelp(self, id, code): def DoLoadModules(self, modules): # XXX - this should go, but the debugger uses it :-( - # dont do much checking! + # don't do much checking! for module in modules: __import__(module) @@ -270,7 +270,7 @@ def OnDropFiles(self, msg): # No longer used by Pythonwin, as the C++ code has this same basic functionality # but handles errors slightly better. # It all still works, tho, so if you need similar functionality, you can use it. - # Therefore I havent deleted this code completely! + # Therefore I haven't deleted this code completely! # def CallbackManager( self, ob, args = () ): # """Manage win32 callbacks. Trap exceptions, report on them, then return 'All OK' # to the frame-work. """ diff --git a/Pythonwin/pywin/framework/bitmap.py b/Pythonwin/pywin/framework/bitmap.py index 7619006f1..890b2f3fb 100644 --- a/Pythonwin/pywin/framework/bitmap.py +++ b/Pythonwin/pywin/framework/bitmap.py @@ -81,7 +81,7 @@ def OnCreateClient(self, createparams, context): borderX = win32api.GetSystemMetrics(win32con.SM_CXFRAME) borderY = win32api.GetSystemMetrics(win32con.SM_CYFRAME) titleY = win32api.GetSystemMetrics(win32con.SM_CYCAPTION) # includes border - # try and maintain default window pos, else adjust if cant fit + # try and maintain default window pos, else adjust if can't fit # get the main client window dimensions. mdiClient = win32ui.GetMainFrame().GetWindow(win32con.GW_CHILD) clientWindowRect = mdiClient.ScreenToClient(mdiClient.GetWindowRect()) @@ -138,7 +138,7 @@ def MatchDocType(self, fileName, fileType): ) win32ui.GetApp().AddDocTemplate(bitmapTemplate) -# This works, but just didnt make it through the code reorg. +# This works, but just didn't make it through the code reorg. # class PPMBitmap(Bitmap): # def LoadBitmapFile(self, file ): # magic=file.readline() @@ -147,7 +147,7 @@ def MatchDocType(self, fileName, fileType): # rowcollist=file.readline().split() # cols=int(rowcollist[0]) # rows=int(rowcollist[1]) -# file.readline() # whats this one? +# file.readline() # what's this one? # self.bitmap.LoadPPMFile(file,(cols,rows)) diff --git a/Pythonwin/pywin/framework/editor/__init__.py b/Pythonwin/pywin/framework/editor/__init__.py index 16e315818..59a52cd34 100644 --- a/Pythonwin/pywin/framework/editor/__init__.py +++ b/Pythonwin/pywin/framework/editor/__init__.py @@ -2,7 +2,7 @@ # # We used to support optional editors - eg, color or non-color. # -# This really isnt necessary with Scintilla, and scintilla +# This really isn't necessary with Scintilla, and scintilla # is getting so deeply embedded that it was too much work. import win32ui @@ -45,7 +45,7 @@ def LoadDefaultEditor(): ## del rc ## ## try: -## # Try and load the default one - dont catch errors here. +## # Try and load the default one - don't catch errors here. ## if mod is None: ## prefModule = "pywin.framework.editor.color.coloreditor" ## mod = __import__(prefModule) diff --git a/Pythonwin/pywin/framework/editor/color/coloreditor.py b/Pythonwin/pywin/framework/editor/color/coloreditor.py index 6b42de93b..b78103c5d 100644 --- a/Pythonwin/pywin/framework/editor/color/coloreditor.py +++ b/Pythonwin/pywin/framework/editor/color/coloreditor.py @@ -258,14 +258,14 @@ def DoConfigChange(self): # Tab size can never be guessed - set at user preference. ext.config(usetabs=usetabs, indentwidth=indentwidth, tabwidth=tabSize) else: - # Dont want smart-tabs - just set the options! + # Don't want smart-tabs - just set the options! ext.config(usetabs=bUseTabs, tabwidth=tabSize, indentwidth=indentSize) self.SCISetIndent(indentSize) self.SCISetTabWidth(tabSize) def OnDebuggerStateChange(self, state): if state == dbgcon.DBGSTATE_NOT_DEBUGGING: - # Indicate breakpoints arent really usable. + # Indicate breakpoints aren't really usable. # Not quite white - useful when no marker margin, so set as background color. self.SCIMarkerSetBack(MARKER_BREAKPOINT, win32api.RGB(0xEF, 0xEF, 0xEF)) else: @@ -287,7 +287,7 @@ def _EndUserStateChange(self, info): scrollOff = info[1] - self.GetFirstVisibleLine() if scrollOff: self.LineScroll(scrollOff) - # Make sure we dont reset the cursor beyond the buffer. + # Make sure we don't reset the cursor beyond the buffer. max = self.GetTextLength() newPos = min(info[0][0], max), min(info[0][1], max) self.SetSel(newPos) diff --git a/Pythonwin/pywin/framework/editor/document.py b/Pythonwin/pywin/framework/editor/document.py index ec27bccc6..234716bd8 100644 --- a/Pythonwin/pywin/framework/editor/document.py +++ b/Pythonwin/pywin/framework/editor/document.py @@ -239,7 +239,7 @@ def _UpdateUIForState(self): try: # This seems necessary so the internal state of the window becomes # "visible". without it, it is still shown, but certain functions - # (such as updating the title) dont immediately work? + # (such as updating the title) don't immediately work? self.GetFirstView().ShowWindow(win32con.SW_SHOW) title = win32ui.GetFileTitle(filename) except win32ui.error: diff --git a/Pythonwin/pywin/framework/editor/editor.py b/Pythonwin/pywin/framework/editor/editor.py index a1208cba6..58c2b76fb 100644 --- a/Pythonwin/pywin/framework/editor/editor.py +++ b/Pythonwin/pywin/framework/editor/editor.py @@ -410,17 +410,17 @@ def OnKeyEnter(self, key): if res > 0 and curLine.strip(): curIndent = patIndent.group(1) self._obj_.ReplaceSel(curIndent) - return 0 # dont pass on + return 0 # don't pass on def OnKeyCtrlY(self, key): if not self.GetDocument().CheckMakeDocumentWritable(): return 0 self.CutCurLine() - return 0 # dont let him have it! + return 0 # don't let him have it! def OnKeyCtrlG(self, key): self.GotoLine() - return 0 # dont let him have it! + return 0 # don't let him have it! def OnKeyTab(self, key): if not self.GetDocument().CheckMakeDocumentWritable(): diff --git a/Pythonwin/pywin/framework/editor/template.py b/Pythonwin/pywin/framework/editor/template.py index bbaed4e68..4b278188b 100644 --- a/Pythonwin/pywin/framework/editor/template.py +++ b/Pythonwin/pywin/framework/editor/template.py @@ -55,6 +55,6 @@ def OpenDocumentFile(self, filename, bMakeVisible=1): filename = os.path.join(path, filename) # print("filename") except (win32api.error, IndexError) as details: - # print("Couldnt get the full filename!", details) + # print("Couldn't get the full filename!", details) pass return self._obj_.OpenDocumentFile(filename, bMakeVisible) diff --git a/Pythonwin/pywin/framework/help.py b/Pythonwin/pywin/framework/help.py index 3d7676eb4..c986acabb 100644 --- a/Pythonwin/pywin/framework/help.py +++ b/Pythonwin/pywin/framework/help.py @@ -52,7 +52,7 @@ def OpenHelpFile(fileName, helpCmd=None, helpArg=None): global htmlhelp_handle helpCmd = html_help_command_translators.get(helpCmd, helpCmd) # frame = win32ui.GetMainFrame().GetSafeHwnd() - frame = 0 # Dont want it overlapping ours! + frame = 0 # Don't want it overlapping ours! if htmlhelp_handle is None: htmlhelp_hwnd, htmlhelp_handle = win32help.HtmlHelp( frame, None, win32help.HH_INITIALIZE @@ -154,7 +154,7 @@ def SetHelpMenuOtherHelp(mainMenu): helpMenu = mainMenu.GetSubMenu( mainMenu.GetMenuItemCount() - 1 ) # Help menu always last. - otherHelpMenuPos = 2 # cant search for ID, as sub-menu has no ID. + otherHelpMenuPos = 2 # can't search for ID, as sub-menu has no ID. otherMenu = helpMenu.GetSubMenu(otherHelpMenuPos) while otherMenu.GetMenuItemCount(): otherMenu.DeleteMenu(0, win32con.MF_BYPOSITION) diff --git a/Pythonwin/pywin/framework/interact.py b/Pythonwin/pywin/framework/interact.py index 1bd47c440..c4021ebf7 100644 --- a/Pythonwin/pywin/framework/interact.py +++ b/Pythonwin/pywin/framework/interact.py @@ -539,7 +539,7 @@ def ProcessEnterEvent(self, event): lines = self.ExtractCommand((start, end)) - # If we are in a code-block, but it isnt at the end of the buffer + # If we are in a code-block, but it isn't at the end of the buffer # then copy it to the end ready for editing and subsequent execution if end != self.GetLineCount() - 1: win32ui.SetStatusText("Press ENTER to execute command") @@ -567,7 +567,7 @@ def ProcessEnterEvent(self, event): ): # Need more input! bNeedIndent = 1 else: - # If the last line isnt empty, append a newline + # If the last line isn't empty, append a newline if self.history is not None: self.history.history_store(source) self.AppendToPrompt([]) diff --git a/Pythonwin/pywin/framework/intpyapp.py b/Pythonwin/pywin/framework/intpyapp.py index 71690a9ab..3f0133be6 100644 --- a/Pythonwin/pywin/framework/intpyapp.py +++ b/Pythonwin/pywin/framework/intpyapp.py @@ -123,7 +123,7 @@ def OnCommand(self, wparam, lparam): class InteractivePythonApp(app.CApp): - # This works if necessary - just we dont need to override the Run method. + # This works if necessary - just we don't need to override the Run method. # def Run(self): # return self._obj_.Run() @@ -484,7 +484,7 @@ def OnViewOptions(self, id, code): pages = [] for template in self.GetDocTemplateList(): try: - # Dont actually call the function with the exception handler. + # Don't actually call the function with the exception handler. getter = template.GetPythonPropertyPages except AttributeError: # Template does not provide property pages! @@ -521,7 +521,7 @@ def OnUpdateInteractiveWindow(self, cmdui): try: interact = sys.modules["pywin.framework.interact"] state = interact.IsInteractiveWindowVisible() - except KeyError: # Interactive module hasnt ever been imported. + except KeyError: # Interactive module hasn't ever been imported. state = 0 cmdui.Enable() cmdui.SetCheck(state) diff --git a/Pythonwin/pywin/framework/mdi_pychecker.py b/Pythonwin/pywin/framework/mdi_pychecker.py index c8514e2d5..2acb2f8ea 100644 --- a/Pythonwin/pywin/framework/mdi_pychecker.py +++ b/Pythonwin/pywin/framework/mdi_pychecker.py @@ -479,7 +479,7 @@ def OnLDblClick(self, params): fname = regexGrepResult.group(1) line = int(regexGrepResult.group(2)) scriptutils.JumpToDocument(fname, line) - return 0 # dont pass on + return 0 # don't pass on return 1 # pass it on by default. def OnRClick(self, params): diff --git a/Pythonwin/pywin/framework/scriptutils.py b/Pythonwin/pywin/framework/scriptutils.py index aedeaee6a..9813cc364 100644 --- a/Pythonwin/pywin/framework/scriptutils.py +++ b/Pythonwin/pywin/framework/scriptutils.py @@ -17,10 +17,12 @@ from .cmdline import ParseArgs -RS_DEBUGGER_NONE = 0 # Dont run under the debugger. +RS_DEBUGGER_NONE = 0 # Don't run under the debugger. RS_DEBUGGER_STEP = 1 # Start stepping under the debugger RS_DEBUGGER_GO = 2 # Just run under the debugger, stopping only at break-points. -RS_DEBUGGER_PM = 3 # Dont run under debugger, but do post-mortem analysis on exception. +RS_DEBUGGER_PM = ( + 3 # Don't run under debugger, but do post-mortem analysis on exception. +) debugging_options = """No debugging Step-through in the debugger @@ -159,7 +161,7 @@ def GetActiveEditControl(): def GetActiveEditorDocument(): """Returns the active editor document and view, or (None,None) if no - active document or its not an editor document. + active document or it's not an editor document. """ view = GetActiveView() if view is None or isinstance(view, TreeView): @@ -173,7 +175,7 @@ def GetActiveEditorDocument(): def GetActiveFileName(bAutoSave=1): """Gets the file name for the active frame, saving it if necessary. - Returns None if it cant be found, or raises KeyboardInterrupt. + Returns None if it can't be found, or raises KeyboardInterrupt. """ pathName = None active = GetActiveView() @@ -365,7 +367,7 @@ def RunScript(defName=None, defArgs=None, bShowDialog=1, debuggingType=None): exec(codeObject, __main__.__dict__) bWorked = 1 except bdb.BdbQuit: - # Dont print tracebacks when the debugger quit, but do print a message. + # Don't print tracebacks when the debugger quit, but do print a message. print("Debugging session cancelled.") exitCode = 1 bWorked = 1 @@ -373,7 +375,7 @@ def RunScript(defName=None, defArgs=None, bShowDialog=1, debuggingType=None): exitCode = code bWorked = 1 except KeyboardInterrupt: - # Consider this successful, as we dont want the debugger. + # Consider this successful, as we don't want the debugger. # (but we do want a traceback!) if interact.edit and interact.edit.currentView: interact.edit.currentView.EnsureNoPrompt() @@ -431,7 +433,7 @@ def ImportFile(): pathName = dlg.GetPathName() - # If already imported, dont look for package + # If already imported, don't look for package path, modName = os.path.split(pathName) modName, modExt = os.path.splitext(modName) newPath = None @@ -505,7 +507,7 @@ def CheckFile(): try: f = open(pathName) except OSError as details: - print(f"Cant open file '{pathName}' - {details}") + print(f"Can't open file '{pathName}' - {details}") return try: code = f.read() + "\n" @@ -556,7 +558,7 @@ def RunTabNanny(filename): pass win32ui.SetStatusText("The TabNanny found trouble at line %d" % lineno) except (IndexError, TypeError, ValueError): - print("The tab nanny complained, but I cant see where!") + print("The tab nanny complained, but I can't see where!") print(data) return 0 return 1 @@ -568,7 +570,7 @@ def _JumpToPosition(fileName, lineno, col=1): def JumpToDocument(fileName, lineno=0, col=1, nChars=0, bScrollToTop=0): # Jump to the position in a file. - # If lineno is <= 0, dont move the position - just open/restore. + # If lineno is <= 0, don't move the position - just open/restore. # if nChars > 0, select that many characters. # if bScrollToTop, the specified line will be moved to the top of the window # (eg, bScrollToTop should be false when jumping to an error line to retain the @@ -592,7 +594,7 @@ def JumpToDocument(fileName, lineno=0, col=1, nChars=0, bScrollToTop=0): try: view.EnsureCharsVisible(charNo) except AttributeError: - print("Doesnt appear to be one of our views?") + print("Doesn't appear to be one of our views?") view.SetSel(min(start, size), min(start + nChars, size)) if bScrollToTop: curTop = view.GetFirstVisibleLine() diff --git a/Pythonwin/pywin/framework/sgrepmdi.py b/Pythonwin/pywin/framework/sgrepmdi.py index 6383c939d..f75dbfa0a 100644 --- a/Pythonwin/pywin/framework/sgrepmdi.py +++ b/Pythonwin/pywin/framework/sgrepmdi.py @@ -387,7 +387,7 @@ def OnLDblClick(self, params): fname = regexGrepResult.group(1) line = int(regexGrepResult.group(2)) scriptutils.JumpToDocument(fname, line) - return 0 # dont pass on + return 0 # don't pass on return 1 # pass it on by default. def OnRClick(self, params): diff --git a/Pythonwin/pywin/framework/startup.py b/Pythonwin/pywin/framework/startup.py index d10eecf35..3cc6c0169 100644 --- a/Pythonwin/pywin/framework/startup.py +++ b/Pythonwin/pywin/framework/startup.py @@ -39,7 +39,7 @@ # To fix a problem with Pythonwin when started from the Pythonwin directory, # we update the pywin path to ensure it is absolute. # If it is indeed relative, it will be relative to our current directory. -# If its already absolute, then this will have no affect. +# If it's already absolute, then this will have no affect. import pywin import pywin.framework diff --git a/Pythonwin/pywin/framework/toolmenu.py b/Pythonwin/pywin/framework/toolmenu.py index 1f16f9fca..6b2076dcd 100644 --- a/Pythonwin/pywin/framework/toolmenu.py +++ b/Pythonwin/pywin/framework/toolmenu.py @@ -64,7 +64,7 @@ def WriteToolMenuItems(items): break win32api.RegDeleteKey(toolKey, subkey) # Keys are now removed - write the new ones. - # But first check if we have the defaults - and if so, dont write anything! + # But first check if we have the defaults - and if so, don't write anything! if items == defaultToolMenuItems: return itemNo = 1 diff --git a/Pythonwin/pywin/framework/winout.py b/Pythonwin/pywin/framework/winout.py index 1e831c2ea..91c7d4fde 100644 --- a/Pythonwin/pywin/framework/winout.py +++ b/Pythonwin/pywin/framework/winout.py @@ -180,9 +180,9 @@ def HandleSpecialLine(self): fileNameSpec = fileName fileName = scriptutils.LocatePythonFile(fileName) if fileName is None: - # Dont force update, so it replaces the idle prompt. + # Don't force update, so it replaces the idle prompt. win32ui.SetStatusText( - "Cant locate the file '%s'" % (fileNameSpec), 0 + "Can't locate the file '%s'" % (fileNameSpec), 0 ) return 1 @@ -228,7 +228,7 @@ def HookHandlers(self): def OnLDoubleClick(self, params): if self.HandleSpecialLine(): - return 0 # dont pass on + return 0 # don't pass on return 1 # pass it on by default. def RestoreKillBuffer(self): @@ -290,7 +290,7 @@ def OnScintillaDoubleClick(self, std, extra): self.HandleSpecialLine() ## def OnLDoubleClick(self,params): - ## return 0 # never dont pass on + ## return 0 # never don't pass on def RestoreKillBuffer(self): assert len(self.template.killBuffer) in (0, 1), "Unexpected killbuffer contents" diff --git a/Pythonwin/pywin/idle/FormatParagraph.py b/Pythonwin/pywin/idle/FormatParagraph.py index b3e74c532..1a0e14560 100644 --- a/Pythonwin/pywin/idle/FormatParagraph.py +++ b/Pythonwin/pywin/idle/FormatParagraph.py @@ -12,7 +12,7 @@ # applied. # * If a comment block has leading whitespace that mixes tabs and # spaces, they will not be considered part of the same block. -# * Fancy comments, like this bulleted list, arent handled :-) +# * Fancy comments, like this bulleted list, aren't handled :-) import re @@ -61,9 +61,9 @@ def format_paragraph_event(self, event): newdata = reformat_paragraph(data, format_width) # re-split and re-insert the comment header. newdata = newdata.split("\n") - # If the block ends in a \n, we dont want the comment - # prefix inserted after it. (Im not sure it makes sense to - # reformat a comment block that isnt made of complete + # If the block ends in a \n, we don't want the comment + # prefix inserted after it. (I'm not sure it makes sense to + # reformat a comment block that isn't made of complete # lines, but whatever!) Can't think of a clean soltution, # so we hack away block_suffix = "" diff --git a/Pythonwin/pywin/mfc/dialog.py b/Pythonwin/pywin/mfc/dialog.py index 41107e54d..93a5ba650 100644 --- a/Pythonwin/pywin/mfc/dialog.py +++ b/Pythonwin/pywin/mfc/dialog.py @@ -201,7 +201,7 @@ def __init__(self, id, dllid=None, caption=0): dlg = win32ui.CreatePropertyPage(id, caption) if self.dll: win32ui.SetResource(oldRes) - # dont call dialog init! + # don't call dialog init! window.Wnd.__init__(self, dlg) self.HookCommands() diff --git a/Pythonwin/pywin/mfc/object.py b/Pythonwin/pywin/mfc/object.py index 62062a535..218b67e66 100644 --- a/Pythonwin/pywin/mfc/object.py +++ b/Pythonwin/pywin/mfc/object.py @@ -24,11 +24,11 @@ def __getattr__( return getattr(o, attr) # Only raise this error for non "internal" names - # Python may be calling __len__, __bool__, etc, so - # we dont want this exception + # we don't want this exception if attr[0] != "_" and attr[-1] != "_": raise win32ui.error("The MFC object has died.") except KeyError: - # No _obj_ at all - dont report MFC object died when there isnt one! + # No _obj_ at all - don't report MFC object died when there isn't one! pass raise AttributeError(attr) diff --git a/Pythonwin/pywin/scintilla/IDLEenvironment.py b/Pythonwin/pywin/scintilla/IDLEenvironment.py index 9114c2c6b..8e0fa20ea 100644 --- a/Pythonwin/pywin/scintilla/IDLEenvironment.py +++ b/Pythonwin/pywin/scintilla/IDLEenvironment.py @@ -236,7 +236,7 @@ def TkIndexToOffset(bm, edit, marks): if col == "first" or col == "last": # Tag name if line != "sel": - raise ValueError("Tags arent here!") + raise ValueError("Tags aren't here!") sel = edit.GetSel() if sel[0] == sel[1]: raise EmptyRange @@ -322,8 +322,8 @@ def __init__(self, edit): ## size = self.edit.GetTabWidth() ## if size==8: return "" # Tk default ## return size # correct semantics? - ## elif item=="font": # Used for measurements we dont need to do! - ## return "Dont know the font" + ## elif item=="font": # Used for measurements we don't need to do! + ## return "Don't know the font" ## raise IndexError, "Invalid index '%s'" % item def make_calltip_window(self): if self.calltips is None: @@ -480,7 +480,7 @@ def tag_add(self, name, start, end): def tag_remove(self, name, start, end): if name != "sel" or start != "1.0" or end != "end": - raise ValueError("Cant remove this tag") + raise ValueError("Can't remove this tag") # Turn the sel into a cursor self.edit.SetSel(self.edit.GetSel()[0]) diff --git a/Pythonwin/pywin/scintilla/control.py b/Pythonwin/pywin/scintilla/control.py index 5430e65d3..18984b9c2 100644 --- a/Pythonwin/pywin/scintilla/control.py +++ b/Pythonwin/pywin/scintilla/control.py @@ -26,7 +26,7 @@ ) except ( win32api.error - ): # Not there - we dont _need_ a debug ver, so ignore this error. + ): # Not there - we don't _need_ a debug ver, so ignore this error. pass if dllid is None: try: @@ -36,7 +36,7 @@ except win32api.error: pass if dllid is None: - # Still not there - lets see if Windows can find it by searching? + # Still not there - let's see if Windows can find it by searching? dllid = win32api.LoadLibrary("Scintilla.DLL") null_byte = b"\0" @@ -514,7 +514,7 @@ def GetFirstVisibleLine(self): def SetWordWrap(self, mode): if mode != win32ui.CRichEditView_WrapNone: - raise ValueError("We dont support word-wrap (I dont think :-)") + raise ValueError("We don't support word-wrap (I don't think :-)") class CScintillaColorEditInterface(CScintillaEditInterface): diff --git a/Pythonwin/pywin/scintilla/document.py b/Pythonwin/pywin/scintilla/document.py index bf0a2f03b..6cc367804 100644 --- a/Pythonwin/pywin/scintilla/document.py +++ b/Pythonwin/pywin/scintilla/document.py @@ -151,7 +151,7 @@ def _LoadTextFromFile(self, f): if view.IsWindow(): # Turn off undo collection while loading view.SendScintilla(scintillacon.SCI_SETUNDOCOLLECTION, 0, 0) - # Make sure the control isnt read-only + # Make sure the control isn't read-only view.SetReadOnly(0) view.SendScintilla(scintillacon.SCI_CLEARALL) view.SendMessage(scintillacon.SCI_ADDTEXT, text) diff --git a/Pythonwin/pywin/scintilla/find.py b/Pythonwin/pywin/scintilla/find.py index b7b5a81c6..612661ad3 100644 --- a/Pythonwin/pywin/scintilla/find.py +++ b/Pythonwin/pywin/scintilla/find.py @@ -27,7 +27,7 @@ def __init__(self, other=None): else: self.__dict__.update(other.__dict__) - # Helper so we cant misspell attributes :-) + # Helper so we can't misspell attributes :-) def __setattr__(self, attr, val): if not hasattr(self, attr): raise AttributeError(attr) @@ -119,7 +119,7 @@ def _FindIt(control, searchParams): try: doc = control.GetParent().GetDocument() except AttributeError: - print("Cant find a document for the control!") + print("Can't find a document for the control!") doc = None if doc is not None: template = doc.GetDocTemplate() diff --git a/Pythonwin/pywin/scintilla/formatter.py b/Pythonwin/pywin/scintilla/formatter.py index b8aad0b13..b91b93b87 100644 --- a/Pythonwin/pywin/scintilla/formatter.py +++ b/Pythonwin/pywin/scintilla/formatter.py @@ -99,7 +99,7 @@ def GetStringStyle(self, pos): try: style = self.styles_by_id[self.scintilla.SCIGetStyleAt(pos)] except KeyError: - # A style we dont know about - probably not even a .py file - can't be a string + # A style we don't know about - probably not even a .py file - can't be a string return None if style.name in self.string_style_names: return style @@ -238,7 +238,7 @@ def SavePreference(self, name, value): class Formatter(FormatterBase): def __init__(self, scintilla): self.bCompleteWhileIdle = 0 - self.bHaveIdleHandler = 0 # Dont currently have an idle handle + self.bHaveIdleHandler = 0 # Don't currently have an idle handle self.nextstylenum = 0 FormatterBase.__init__(self, scintilla) diff --git a/Pythonwin/pywin/scintilla/view.py b/Pythonwin/pywin/scintilla/view.py index 28db05d8e..b6d971e94 100644 --- a/Pythonwin/pywin/scintilla/view.py +++ b/Pythonwin/pywin/scintilla/view.py @@ -272,7 +272,7 @@ def OnWinIniChange(self, section=None): self.bindings.complete_configure() def DoConfigChange(self): - # Bit of a hack I dont kow what to do about - these should be "editor options" + # Bit of a hack I don't kow what to do about - these should be "editor options" from pywin.framework.editor import GetEditorOption self.bAutoCompleteAttributes = GetEditorOption("Autocomplete Attributes", 1) @@ -491,7 +491,7 @@ def list2dict(l): pass # object has no __dict__ if hasattr(ob, "__class__"): items_dict.update(list2dict(_get_class_attributes(ob.__class__))) - # The object may be a COM object with typelib support - lets see if we can get its props. + # The object may be a COM object with typelib support - let's see if we can get its props. # (contributed by Stefan Migowsky) try: # Get the automation attributes @@ -502,7 +502,7 @@ def list2dict(l): # append to the already evaluated list except AttributeError: pass - # The object might be a pure COM dynamic dispatch with typelib support - lets see if we can get its props. + # The object might be a pure COM dynamic dispatch with typelib support - let's see if we can get its props. if hasattr(ob, "_oleobj_"): try: for iTI in range(0, ob._oleobj_.GetTypeInfoCount()): @@ -718,7 +718,7 @@ def OnPrepareDC(self, dc, pInfo): def OnPreparePrinting(self, pInfo): flags = ( win32ui.PD_USEDEVMODECOPIES | win32ui.PD_ALLPAGES | win32ui.PD_NOSELECTION - ) # Dont support printing just a selection. + ) # Don't support printing just a selection. # NOTE: Custom print dialogs are stopping the user's values from coming back :-( # self.prtDlg = PrintDialog(pInfo, PRINTDLGORD, flags) # pInfo.SetPrintDialog(self.prtDlg) @@ -749,7 +749,7 @@ def CalculatePageRanges(self, dc, pInfo): self.starts[maxPage] = pageStart # And a sentinal for one page past the end self.starts[maxPage + 1] = textLen - # When actually printing, maxPage doesnt have any effect at this late state. + # When actually printing, maxPage doesn't have any effect at this late state. # but is needed to make the Print Preview work correctly. pInfo.SetMaxPage(maxPage) @@ -817,7 +817,7 @@ def OnPrint(self, dc, pInfo): def LoadConfiguration(): global configManager - # Bit of a hack I dont kow what to do about? + # Bit of a hack I don't kow what to do about? from .config import ConfigManager configName = rc = win32ui.GetProfileVal("Editor", "Keyboard Config", "default") diff --git a/Pythonwin/pywin/tools/TraceCollector.py b/Pythonwin/pywin/tools/TraceCollector.py index 093ecf133..97ac75f55 100644 --- a/Pythonwin/pywin/tools/TraceCollector.py +++ b/Pythonwin/pywin/tools/TraceCollector.py @@ -62,7 +62,7 @@ def MakeOutputWindow(): global outputWindow if outputWindow is None: title = "Python Trace Collector" - # queueingFlag doesnt matter, as all output will come from new thread + # queueingFlag doesn't matter, as all output will come from new thread outputWindow = WindowOutput(title, title) # Let people know what this does! msg = """\ diff --git a/Pythonwin/pywin/tools/browseProjects.py b/Pythonwin/pywin/tools/browseProjects.py index d7f5cd467..14abcee94 100644 --- a/Pythonwin/pywin/tools/browseProjects.py +++ b/Pythonwin/pywin/tools/browseProjects.py @@ -209,7 +209,7 @@ def IsExpandable(self): def GetSubList(self): paths = regutil.GetRegisteredNamedPath(self.projectName) pathList = paths.split(";") - if len(pathList) == 1: # Single dir - dont bother putting the dir in + if len(pathList) == 1: # Single dir - don't bother putting the dir in ret = MakePathSubList(pathList[0]) else: ret = list(map(HLIDirectoryItem, pathList)) diff --git a/Pythonwin/pywin/tools/browser.py b/Pythonwin/pywin/tools/browser.py index 5422b5fb6..9dcb5a3a0 100644 --- a/Pythonwin/pywin/tools/browser.py +++ b/Pythonwin/pywin/tools/browser.py @@ -87,7 +87,7 @@ def GetSubList(self): pass try: for name in self.myobject.__methods__: - ret.append(HLIMethod(name)) # no MakeHLI, as cant auto detect + ret.append(HLIMethod(name)) # no MakeHLI, as can't auto detect except (AttributeError, TypeError): pass try: @@ -298,7 +298,7 @@ def GetSubList(self): return ret -# strings and Unicode have builtin methods, but we dont really want to see these +# strings and Unicode have builtin methods, but we don't really want to see these class HLIString(HLIPythonObject): def IsExpandable(self): return 0 @@ -327,7 +327,7 @@ def MakeHLI(ob, name=None): cls = TypeMap[type(ob)] except KeyError: # hrmph - this check gets more and more bogus as Python - # improves. Its possible we should just *always* use + # improves. It's possible we should just *always* use # HLIInstance? if hasattr(ob, "__class__"): # 'new style' class cls = HLIInstance diff --git a/Pythonwin/pywin/tools/hierlist.py b/Pythonwin/pywin/tools/hierlist.py index 495eea78f..9c0a78dd5 100644 --- a/Pythonwin/pywin/tools/hierlist.py +++ b/Pythonwin/pywin/tools/hierlist.py @@ -121,7 +121,7 @@ def DeleteAllItems(self): self.filledItemHandlesMap = {} def HierTerm(self): - # Dont want notifies as we kill the list. + # Don't want notifies as we kill the list. parent = self.notify_parent # GetParentFrame() parent.HookNotify(None, commctrl.TVN_ITEMEXPANDINGW) parent.HookNotify(None, commctrl.TVN_SELCHANGEDW) diff --git a/Pythonwin/stdafx.h b/Pythonwin/stdafx.h index 320ac2efd..b8d9811e0 100644 --- a/Pythonwin/stdafx.h +++ b/Pythonwin/stdafx.h @@ -29,7 +29,7 @@ // allow memory leaks to give me the line number. // #define new DEBUG_NEW -/* dont really need to undef these anymore, but helpful to +/* don't really need to undef these anymore, but helpful to programmers who forget to use the new names. */ #undef INCREF #undef DECREF @@ -42,7 +42,7 @@ programmers who forget to use the new names. */ #include "import.h" // Python: for dynamicattach routines. #include "pywintypes.h" -// dont need all of these for all, but it cant hurt (and keep the speed up!) +// don't need all of these for all, but it can't hurt (and keep the speed up!) #include "win32ui.h" diff --git a/Pythonwin/stdafxole.h b/Pythonwin/stdafxole.h index c58da2f47..1731eb138 100644 --- a/Pythonwin/stdafxole.h +++ b/Pythonwin/stdafxole.h @@ -28,7 +28,7 @@ #include "traceback.h" #include "pythonrun.h" -// dont need all of these for all, but it cant hurt (and keep the speed up!) +// don't need all of these for all, but it can't hurt (and keep the speed up!) #include "pywintypes.h" #include "win32ui.h" diff --git a/Pythonwin/stddde.cpp b/Pythonwin/stddde.cpp index d26588156..19d82d30c 100644 --- a/Pythonwin/stddde.cpp +++ b/Pythonwin/stddde.cpp @@ -1431,7 +1431,7 @@ BOOL CDDEServer::DoCallback(WORD wType, WORD wFmt, HCONV hConv, HSZ hszTopic, HS if (!b) { // // Nobody took the data. - // Maybe its not a supported item or format + // Maybe it's not a supported item or format // Status(_T("Poke %s|%s failed"), (const TCHAR *)strTopic, (const TCHAR *)strItem); @@ -1473,7 +1473,7 @@ BOOL CDDEServer::DoCallback(WORD wType, WORD wFmt, HCONV hConv, HSZ hszTopic, HS if (!b) { // // Nobody took the data. - // Maybe its not of interrest + // Maybe it's not of interrest // Status(_T("AdviseData %s|%s failed"), (const TCHAR *)strTopic, (const TCHAR *)strItem); diff --git a/Pythonwin/win32RichEdit.cpp b/Pythonwin/win32RichEdit.cpp index bac553d20..ac1f17ef6 100644 --- a/Pythonwin/win32RichEdit.cpp +++ b/Pythonwin/win32RichEdit.cpp @@ -199,7 +199,7 @@ static PyObject *PyCRichEditView_save_text_file(PyObject *self, PyObject *args) size += size; // try doubling! } if (bytesCopied == size) // hit max. - --bytesCopied; // so NULL doesnt overshoot. + --bytesCopied; // so NULL doesn't overshoot. buf[bytesCopied] = 0; if (i < lineCount - 1) fwrite(buf, sizeof(TCHAR), bytesCopied, f); diff --git a/Pythonwin/win32assoc.cpp b/Pythonwin/win32assoc.cpp index 18504d155..a228821a5 100644 --- a/Pythonwin/win32assoc.cpp +++ b/Pythonwin/win32assoc.cpp @@ -40,7 +40,7 @@ CAssocManager::~CAssocManager() #ifdef _DEBUG TCHAR buf[256]; if (cacheLookups) { - // cant use TRACE, as CWinApp may no longer be valid. + // can't use TRACE, as CWinApp may no longer be valid. wsprintf(buf, _T("AssocManager cache hit ratio is %d percent\n"), cacheHits * 100 / cacheLookups); OutputDebugString(buf); } @@ -74,7 +74,7 @@ void CAssocManager::RemoveAssoc(void *handle) map.RemoveKey(handle); if (ob != Py_None) // The object isn't necessarily dead (ie, its refcount may - // not be about to hit zero), but its 'dead' from our POV, so + // not be about to hit zero), but it's 'dead' from our POV, so // let it free any MFC etc resources the object owns. // XXX - this kinda sucks - just relying on the object // destructor *should* be OK... @@ -201,11 +201,11 @@ bool ui_assoc_CObject::CheckCppObject(ui_type *ui_type_check) const return false; CObject *pObj = (CObject *)assoc; // Assert triggers occasionally for brand new window objects - - // Removing this ASSERT cant hurt too much (as I have never seen it + // Removing this ASSERT can't hurt too much (as I have never seen it // fire legitimately // ASSERT_VALID(pObj); // NULL has already been handled before now. if (ui_type_check == NULL) - return true; // Cant check anything! + return true; // Can't check anything! ui_type_CObject *pTyp = (ui_type_CObject *)ui_type_check; if (pTyp->pCObjectClass == NULL) { diff --git a/Pythonwin/win32assoc.h b/Pythonwin/win32assoc.h index fcca61d94..7b94a49de 100644 --- a/Pythonwin/win32assoc.h +++ b/Pythonwin/win32assoc.h @@ -3,7 +3,7 @@ // #pragma once // afxmt.h is often not included by default in stdafx.h -// Try and include it here - it wont hurt if stfafx.h has already done it! +// Try and include it here - it won't hurt if stfafx.h has already done it! #include // CCriticalSection, etc // Handle Manager maps between pointers of some sort, and an associated @@ -43,7 +43,7 @@ class CAssocManager // ui_assoc_object // class PYW_EXPORT ui_assoc_object : public ui_base_class { - public: // some probably shouldnt be, but... + public: // some probably shouldn't be, but... PyObject *GetGoodRet(); static ui_assoc_object *make(ui_type &makeType, void *search, bool skipLookup = false); diff --git a/Pythonwin/win32bitmap.cpp b/Pythonwin/win32bitmap.cpp index 31e9890ff..157457063 100644 --- a/Pythonwin/win32bitmap.cpp +++ b/Pythonwin/win32bitmap.cpp @@ -195,7 +195,7 @@ PyObject *ui_bitmap_load_bitmap_file(PyObject *self, PyObject *args) } BITMAPFILEHEADER bmFileHeader; memcpy(&bmFileHeader, PyBytes_AsString(result), len); - Py_DECREF(result); // dont need this anymore + Py_DECREF(result); // don't need this anymore if (bmFileHeader.bfType != DIB_HEADER_MARKER) { Py_DECREF(reader); PyErr_SetString(PyExc_TypeError, "File is not a DIB format file"); @@ -242,7 +242,7 @@ PyObject *ui_bitmap_load_bitmap_file(PyObject *self, PyObject *args) char *pBits = new char[len]; // XXX - need memory exception handler. memcpy(pBits, PyBytes_AsString(result), len); - Py_DECREF(result); // dont need this. + Py_DECREF(result); // don't need this. Py_DECREF(reader); // or this. // kill old palette @@ -335,7 +335,7 @@ PyObject *ui_bitmap_load_ppm_file(PyObject *self, PyObject *args) pMem[col + 2] = pImg[col]; } - Py_DECREF(result); // dont need this. + Py_DECREF(result); // don't need this. Py_DECREF(reader); // or this. // delete old palette - none for this format diff --git a/Pythonwin/win32cmd.h b/Pythonwin/win32cmd.h index 698c5f787..33e0dd7c4 100644 --- a/Pythonwin/win32cmd.h +++ b/Pythonwin/win32cmd.h @@ -8,7 +8,7 @@ class PYW_EXPORT PyCCmdTarget : public ui_assoc_CObject { friend CVirtualHelper::CVirtualHelper(const char *iname, void *iassoc, EnumVirtualErrorHandling veh); - public: // some probably shouldnt be, but... + public: // some probably shouldn't be, but... CMapWordToPtr *pNotifyHookList; CMapWordToPtr *pCommandHookList; CMapWordToPtr *pOleEventHookList; diff --git a/Pythonwin/win32control.cpp b/Pythonwin/win32control.cpp index 78631f43f..45aff2258 100644 --- a/Pythonwin/win32control.cpp +++ b/Pythonwin/win32control.cpp @@ -1051,7 +1051,7 @@ static PyObject *PyCComboBox_get_lb_text(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "i", &pos)) return NULL; CString cs; - // Prevent MFC ASSERTing when empty - dont use the CString version. + // Prevent MFC ASSERTing when empty - don't use the CString version. GUI_BGN_SAVE; int size = pLB->GetLBTextLen(pos); if (size != LB_ERR) { diff --git a/Pythonwin/win32ctledit.cpp b/Pythonwin/win32ctledit.cpp index e55715f5a..44c2f40fd 100644 --- a/Pythonwin/win32ctledit.cpp +++ b/Pythonwin/win32ctledit.cpp @@ -368,7 +368,7 @@ static PyObject *PyCEdit_get_line(PyObject *self, PyObject *args) TRACE0("Doubling buffer for GetLine value\n"); } if (bytesCopied == size) // hit max. - --bytesCopied; // so NULL doesnt overshoot. + --bytesCopied; // so NULL doesn't overshoot. if (buf[bytesCopied - 1] == '\r' || buf[bytesCopied - 1] == '\n') // kill newlines. --bytesCopied; buf[bytesCopied] = '\0'; diff --git a/Pythonwin/win32ctrlRichEdit.cpp b/Pythonwin/win32ctrlRichEdit.cpp index 611d4497d..8d921e1e9 100644 --- a/Pythonwin/win32ctrlRichEdit.cpp +++ b/Pythonwin/win32ctrlRichEdit.cpp @@ -436,7 +436,7 @@ static PyObject *PyCRichEditCtrl_get_line(PyObject *self, PyObject *args) TRACE0("Doubling buffer for GetLine value\n"); } if (bytesCopied == size) // hit max. - --bytesCopied; // so NULL doesnt overshoot. + --bytesCopied; // so NULL doesn't overshoot. // if (buf[bytesCopied-1]=='\r' || buf[bytesCopied-1]=='\n') // kill newlines. // --bytesCopied; buf[bytesCopied] = '\0'; diff --git a/Pythonwin/win32dc.cpp b/Pythonwin/win32dc.cpp index 794aa8280..1e3015dc6 100644 --- a/Pythonwin/win32dc.cpp +++ b/Pythonwin/win32dc.cpp @@ -106,7 +106,7 @@ CDC *ui_dc_object::GetDC(PyObject *self) { return (CDC *)GetGoodCppObject(self, void ui_dc_object::SetAssocInvalid() { - return; // do nothing. Dont call base as dont want my handle wiped. + return; // do nothing. Don't call base as don't want my handle wiped. } ui_dc_object::~ui_dc_object() diff --git a/Pythonwin/win32dlg.cpp b/Pythonwin/win32dlg.cpp index 3fcd9583c..598aae410 100644 --- a/Pythonwin/win32dlg.cpp +++ b/Pythonwin/win32dlg.cpp @@ -403,7 +403,7 @@ void Python_do_exchange(CDialog *pDlg, CDataExchange *pDX) PyCDialog *dob = (PyCDialog *)ui_assoc_object::GetAssocObject(pDlg); if (!dob) { TRACE("do_exchange called on dialog with no Python object!\n"); - return; // dont print an exception + return; // don't print an exception } for (int i = 0; i < PyList_Size(dob->ddlist); i++) { PyObject *ob = PyList_GetItem(dob->ddlist, i); @@ -569,7 +569,7 @@ static PyObject *ui_dialog_do_modal(PyObject *self, PyObject *args) RETURN_ERR("InitModalIndirect failed"); } - Py_INCREF(self); // make sure Python doesnt kill the object while in a modal call. + Py_INCREF(self); // make sure Python doesn't kill the object while in a modal call. // really only for the common dialog, and other non CPythonDlg's INT_PTR ret; GUI_BGN_SAVE; @@ -737,7 +737,7 @@ ui_type_CObject PyCDialog::type("PyCDialog", static struct PyMethodDef ui_common_dialog_methods[] = {{NULL, NULL}}; ui_type_CObject PyCCommonDialog::type("PyCCommonDialog", &PyCDialog::type, - NULL, // CCommonDialog doesnt have RTTI??? + NULL, // CCommonDialog doesn't have RTTI??? sizeof(PyCCommonDialog), PYOBJ_OFFSET(PyCCommonDialog), ui_common_dialog_methods, NULL); diff --git a/Pythonwin/win32dlg.h b/Pythonwin/win32dlg.h index da94fbb03..2d79ab8ee 100644 --- a/Pythonwin/win32dlg.h +++ b/Pythonwin/win32dlg.h @@ -1,6 +1,6 @@ // dialog objects -// hack the associations a bit. When the dialog window closes, I dont +// hack the associations a bit. When the dialog window closes, I don't // destroy the association. ///////////////////////////////////////////////////////// diff --git a/Pythonwin/win32doc.cpp b/Pythonwin/win32doc.cpp index 21f91da6a..431ccad8f 100644 --- a/Pythonwin/win32doc.cpp +++ b/Pythonwin/win32doc.cpp @@ -104,7 +104,7 @@ PyObject *ui_doc_get_first_view(PyObject *self, PyObject *args) GUI_END_SAVE; // @comm For more info, see - ASSERT(pWnd); // shouldnt be possible. + ASSERT(pWnd); // shouldn't be possible. return ui_assoc_object::make(UITypeFromCObject(pWnd), pWnd)->GetGoodRet(); } @@ -123,7 +123,7 @@ PyObject *ui_doc_get_all_views(PyObject *self, PyObject *args) GUI_BGN_SAVE; CView *pWnd = pDoc->GetNextView(pos); // @pyseemfc CDocument|GetNextView GUI_END_SAVE; - ASSERT(pWnd); // shouldnt be possible. + ASSERT(pWnd); // shouldn't be possible. if (pWnd == NULL) { Py_DECREF(retList); RETURN_ERR("No view was available!"); diff --git a/Pythonwin/win32gdi.h b/Pythonwin/win32gdi.h index b1742770e..58e8d26ce 100644 --- a/Pythonwin/win32gdi.h +++ b/Pythonwin/win32gdi.h @@ -24,7 +24,7 @@ class PyCGdiObject : public ui_assoc_CObject { // XXX - PyCGDIObject used to have an 'm_deleteObject' attribute - but all // it did was cause a normal 'delete' of the object - ie, identical to the - // base-class bManualDelete. Its likely the original intent was for the new + // base-class bManualDelete. It's likely the original intent was for the new // attribute to determine if ::DeleteObject() should have been called, but // that apparently has never happened... }; diff --git a/Pythonwin/win32menu.cpp b/Pythonwin/win32menu.cpp index 4604a1ad5..96b4a2a9d 100644 --- a/Pythonwin/win32menu.cpp +++ b/Pythonwin/win32menu.cpp @@ -86,7 +86,7 @@ PyObject *PyCMenu::load_menu(PyObject *self, PyObject *args) ////////////////////////////////////////////////////////////////////// void PyCMenu::SetAssocInvalid() { - return; // do nothing. Dont call base as dont want my handle wiped. + return; // do nothing. Don't call base as don't want my handle wiped. } // Menu Methods // @pymethod |PyCMenu|AppendMenu|Appends a new item to the end of a menu. Python can specify the state of the menu item diff --git a/Pythonwin/win32notify.cpp b/Pythonwin/win32notify.cpp index d9662cd68..21dd6ef29 100644 --- a/Pythonwin/win32notify.cpp +++ b/Pythonwin/win32notify.cpp @@ -372,7 +372,7 @@ BOOL Python_OnNotify(CWnd *pFrom, WPARAM, LPARAM lParam, LRESULT *pResult) PyObject *result = Python_do_callback(method, args); if (result == NULL) PyErr_Warn(PyExc_Warning, "Exception in OnNotify() handler"); - else if (result == Py_None) // allow for None "dont pass on", else result to windows + else if (result == Py_None) // allow for None "don't pass on", else result to windows bPassOn = TRUE; else if (PyTuple_Check(result)) { // Result should be a tuple of the LRESULT and a tuple to fill the appropriate diff --git a/Pythonwin/win32prinfo.cpp b/Pythonwin/win32prinfo.cpp index 9ff8c7088..3b1af9c5d 100644 --- a/Pythonwin/win32prinfo.cpp +++ b/Pythonwin/win32prinfo.cpp @@ -67,7 +67,7 @@ CPrintInfo *ui_prinfo_object::GetPrintInfo(PyObject *self) void ui_prinfo_object::SetAssocInvalid() { - return; // do nothing. Dont call base as dont want my handle wiped. + return; // do nothing. Don't call base as don't want my handle wiped. } ui_prinfo_object::~ui_prinfo_object() diff --git a/Pythonwin/win32prop.cpp b/Pythonwin/win32prop.cpp index 3bd366977..651aa7593 100644 --- a/Pythonwin/win32prop.cpp +++ b/Pythonwin/win32prop.cpp @@ -314,7 +314,7 @@ PyObject *ui_propsheet_do_modal(PyObject *self, PyObject *args) return NULL; if (!PropSheetCheckForDisplay(pPS)) return NULL; - Py_INCREF(self); // make sure Python doesnt kill the object while in a modal call. + Py_INCREF(self); // make sure Python doesn't kill the object while in a modal call. // really only for the common dialog(!?), and other non CPythonPropSheet's INT_PTR ret; GUI_BGN_SAVE; @@ -590,7 +590,7 @@ ui_type_CObject PyCPropertySheet::type("PyCPropertySheet", &PyCWnd::type, RUNTIM ////////////////////////////////////////////////////////////////////// PyCPropertyPage::PyCPropertyPage() { - bManualDelete = FALSE; // dont "delete" the CWnd. + bManualDelete = FALSE; // don't "delete" the CWnd. } PyCPropertyPage::~PyCPropertyPage() { diff --git a/Pythonwin/win32prop.h b/Pythonwin/win32prop.h index c61261188..2674aa25e 100644 --- a/Pythonwin/win32prop.h +++ b/Pythonwin/win32prop.h @@ -1,7 +1,7 @@ // property page/sheet objects // property sheets are a "clone" -// hack the associations a bit. When the dialog window closes, I dont +// hack the associations a bit. When the dialog window closes, I don't // destroy the association. ///////////////////////////////////////////////////////// diff --git a/Pythonwin/win32splitter.h b/Pythonwin/win32splitter.h index 6a8f52ef8..a9c4ece29 100644 --- a/Pythonwin/win32splitter.h +++ b/Pythonwin/win32splitter.h @@ -22,7 +22,7 @@ class CPythonSplitter : public CPythonWndFramework { DECLARE_MESSAGE_MAP() void AssertValid() const - { // MFCs version wont allow us to call it before created, and our framework want's to! + { // MFCs version won't allow us to call it before created, and our framework want's to! CWnd::AssertValid(); } }; diff --git a/Pythonwin/win32thread.cpp b/Pythonwin/win32thread.cpp index d1f9baa86..c26e8c7a1 100644 --- a/Pythonwin/win32thread.cpp +++ b/Pythonwin/win32thread.cpp @@ -245,7 +245,7 @@ static PyObject *ui_thread_set_main_frame(PyObject *self, PyObject *args) if (wndObject == Py_None) { // @comm You can pass None to this function to reset the main frame. - pThread->m_pMainWnd = NULL; // Should I free this? I dont think so! + pThread->m_pMainWnd = NULL; // Should I free this? I don't think so! } else { CWnd *pMainWnd = GetWndPtr(wndObject); diff --git a/Pythonwin/win32ui.rc b/Pythonwin/win32ui.rc index be8896b2c..4cf2cac5b 100644 --- a/Pythonwin/win32ui.rc +++ b/Pythonwin/win32ui.rc @@ -909,7 +909,7 @@ BEGIN CONTROL "View end of line markers",IDC_VIEW_EOL,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,141,50,97,12 GROUPBOX "Tab-Timmy",IDC_STATIC,7,67,242,48 - CONTROL "Dont show inconsistent indentation",IDC_TABTIMMY_NONE, + CONTROL "Don't show inconsistent indentation",IDC_TABTIMMY_NONE, "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14, 76,122,12 CONTROL "Show as indicator",IDC_TABTIMMY_IND,"Button", diff --git a/Pythonwin/win32uiExt.h b/Pythonwin/win32uiExt.h index 90eff1b87..6d70302e1 100644 --- a/Pythonwin/win32uiExt.h +++ b/Pythonwin/win32uiExt.h @@ -29,7 +29,7 @@ template class CPythonWndFramework : public T { public: // EEEK - It seem necessary to have the _union_ of all possible base class ctors. - // The ctors seem to only be referenced when used, so they dont worry classes that dont use them?? + // The ctors seem to only be referenced when used, so they don't worry classes that don't use them?? // What a pain - anyone know how to avoid???? // CWnd diff --git a/Pythonwin/win32uimodule.cpp b/Pythonwin/win32uimodule.cpp index 5edea4ab3..25cb0d8af 100644 --- a/Pythonwin/win32uimodule.cpp +++ b/Pythonwin/win32uimodule.cpp @@ -174,7 +174,7 @@ ui_type::ui_type(const char *name, ui_type *pBase, Py_ssize_t typeSize, // #define funky_offsetof_weakreflist ((size_t) &((PyObject *)(ui_base_class *)0)->weakreflist) tp_weaklistoffset -= pyobjOffset; - // cast away const, as Python doesnt use it. + // cast away const, as Python doesn't use it. tp_name = (char *)name; tp_basicsize = typeSize; tp_base = pBase; @@ -244,7 +244,7 @@ ui_base_class *ui_base_class::make(ui_type &makeTypeRef) _Py_NewReference(pNew); #ifdef _DEBUG // this is really only for internal errors, and they should be ironed out! if (!pNew->is_uiobject(makeType)) - RETURN_ERR("Internal error - created type isnt what was requested!"); + RETURN_ERR("Internal error - created type isn't what was requested!"); #endif #ifdef TRACE_LIFETIMES TRACE("Constructing a '%s' at %p\n", pNew->ob_type->tp_name, pNew); @@ -506,7 +506,7 @@ BOOL DisplayPythonTraceback(PyObject *exc_type, PyObject *exc_val, PyObject *exc free(msg_free); #ifdef _DEBUG { - // doesnt seem to like long strings. + // doesn't seem to like long strings. CString cs(useMsg); int i = 0; while (i < cs.GetLength()) { @@ -566,8 +566,8 @@ int Python_run_command_with_log(const char *command) void Python_set_error(const char *msg) {} // In DEBUG builds, access voilations will normally trip my debugger, and -// hence I dont want them trapped. Stack Overflows normally mean runaway Python -// code, and I dont really want these trapped. +// hence I don't want them trapped. Stack Overflows normally mean runaway Python +// code, and I don't really want these trapped. #ifdef _DEBUG static int bTrapAccessViolations = FALSE; #endif @@ -857,7 +857,7 @@ static PyObject *ui_output_debug(PyObject *self, PyObject *args) while (*msg) { // not sure what's going on here. NT seems to add a \n each call.. - // Im sure msvc16 doesnt...(well, I _think_ Im sure..:) + // I'm sure msvc16 doesn't...(well, I _think_ I'm sure..:) while (*msg && *msg != '\n') *uiod++ = *msg++; *uiod = '\0'; // replace with NULL; if (*msg) { // must be \n @@ -2416,7 +2416,7 @@ PYWIN_MODULE_INIT_FUNC(win32ui) Py_XDECREF(dllhandle); // Ensure we have a __file__ attribute (Python itself normally // adds one, but if this is called not as part of the standard - // import process, we dont have one! + // import process, we don't have one! TCHAR pathName[MAX_PATH]; GetModuleFileName(hWin32uiDll, pathName, sizeof(pathName) / sizeof(pathName[0])); PyObject *obPathName = PyWinObject_FromTCHAR(pathName); diff --git a/Pythonwin/win32util.cpp b/Pythonwin/win32util.cpp index 880836d0a..dcaefb5a7 100644 --- a/Pythonwin/win32util.cpp +++ b/Pythonwin/win32util.cpp @@ -178,7 +178,7 @@ PyCRectType PyCRect::type("PyCRect", &ui_base_class::type, sizeof(PyCRect), PYOB NULL); // The CREATESTRUCT just has pointers (no buffers) for the name -// and classname. Therefore, I dont treat them as strings, just +// and classname. Therefore, I don't treat them as strings, just // pointers (via long casts) // @object CREATESTRUCT|A representation of a Windows CREATESTRUCT structure. PyObject *PyObjectFromCreateStruct(LPCREATESTRUCT lpcs) @@ -260,7 +260,7 @@ BOOL DictToLogFont(PyObject *font_props, LOGFONT *pLF) szFontClipPrecision, szFontQuality, szFontPitch, szFontName, NULL}; // font default values - pLF->lfCharSet = DEFAULT_CHARSET; // dont use ANSI_CHARSET to support Japanese charset. + pLF->lfCharSet = DEFAULT_CHARSET; // don't use ANSI_CHARSET to support Japanese charset. pLF->lfQuality = PROOF_QUALITY; // don't scale raster fonts and force anti aliasing if (!PyDict_Check(font_props)) { PyErr_Format(PyExc_TypeError, "LOGFONT must be a dict, not %s", font_props->ob_type->tp_name); diff --git a/Pythonwin/win32virt.cpp b/Pythonwin/win32virt.cpp index 6801ffe78..5d049fbf3 100644 --- a/Pythonwin/win32virt.cpp +++ b/Pythonwin/win32virt.cpp @@ -523,7 +523,7 @@ BOOL CVirtualHelper::retnone() { ASSERT(retVal); if (!retVal) - return FALSE; // failed - assume didnt work in non debug + return FALSE; // failed - assume didn't work in non debug return (retVal == Py_None); } @@ -531,7 +531,7 @@ BOOL CVirtualHelper::retval(MSG *msg) { ASSERT(retVal); if (!retVal) - return FALSE; // failed - assume didnt work in non debug + return FALSE; // failed - assume didn't work in non debug if (!PyWinObject_AsMSG(retVal, msg)) { gui_print_error(); return FALSE; @@ -542,7 +542,7 @@ BOOL CVirtualHelper::retval(int &ret) { ASSERT(retVal); if (!retVal) - return FALSE; // failed - assume didnt work in non debug + return FALSE; // failed - assume didn't work in non debug if (retVal == Py_None) { ret = 0; return TRUE; @@ -559,7 +559,7 @@ BOOL CVirtualHelper::retval(long &ret) { ASSERT(retVal); if (!retVal) - return FALSE; // failed - assume didnt work in non debug + return FALSE; // failed - assume didn't work in non debug if (retVal == Py_None) { ret = 0; return TRUE; @@ -576,7 +576,7 @@ BOOL CVirtualHelper::retval(HANDLE &ret) { ASSERT(retVal); if (!retVal) - return FALSE; // failed - assume didnt work in non debug + return FALSE; // failed - assume didn't work in non debug if (retVal == Py_None) { ret = 0; return TRUE; @@ -592,7 +592,7 @@ BOOL CVirtualHelper::retval(CString &ret) { ASSERT(retVal); if (!retVal) - return FALSE; // failed - assume didnt work in non debug + return FALSE; // failed - assume didn't work in non debug if (retVal == Py_None) { ret.Empty(); return TRUE; @@ -611,7 +611,7 @@ BOOL CVirtualHelper::retval(_object *&ret) { ASSERT(retVal); if (!retVal) - return FALSE; // failed - assume didnt work in non debug + return FALSE; // failed - assume didn't work in non debug ret = retVal; /** what was I thinking? if (!PyArg_Parse(retVal, "O",&ret)) { @@ -627,7 +627,7 @@ BOOL CVirtualHelper::retval(CREATESTRUCT &cs) USES_CONVERSION; ASSERT(retVal); if (!retVal || retVal == Py_None) - return FALSE; // failed - assume didnt work in non debug + return FALSE; // failed - assume didn't work in non debug if (!CreateStructFromPyObject(&cs, retVal)) { gui_print_error(); CString msgBuf; diff --git a/Pythonwin/win32win.cpp b/Pythonwin/win32win.cpp index dce0c3ab0..f7db04170 100644 --- a/Pythonwin/win32win.cpp +++ b/Pythonwin/win32win.cpp @@ -622,7 +622,7 @@ BOOL PyCWnd::check_key_stroke(WPARAM ch) CWnd *PyCWnd::GetPythonGenericWnd(PyObject *self, ui_type_CObject *pType) { - // Damn it - only pass PyCWnd::type so the RTTI check wont fail + // Damn it - only pass PyCWnd::type so the RTTI check won't fail // for builtin controls. return (CWnd *)GetGoodCppObject(self, &type); } @@ -647,7 +647,7 @@ CWnd *PyCWnd::GetPythonGenericWnd(PyObject *self, ui_type_CObject *pType) #include "D:\Program Files\DevStudio\VC\mfc\src\WINHAND_.H" extern AFX_MODULE_THREAD_STATE * PyWin_MainModuleThreadState; - // Lets see if it is in the main thread state + // Let's see if it is in the main thread state if (PyWin_MainModuleThreadState->m_pmapHWND && (AfxGetModuleThreadState() != PyWin_MainModuleThreadState)) { // Gross hack - look it up in the internal map structure. @@ -667,7 +667,7 @@ CWnd *PyCWnd::GetPythonGenericWnd(PyObject *self, ui_type_CObject *pType) if (makeType.pCObjectClass && makeType.pCObjectClass->m_pfnCreateObject) { pWnd = (CWnd *)makeType.pCObjectClass->CreateObject(); if (pWnd == NULL) { - PyErr_SetString(PyExc_MemoryError, "Cant create the window object"); + PyErr_SetString(PyExc_MemoryError, "Can't create the window object"); return NULL; } ASSERT(pWnd->IsKindOf(RUNTIME_CLASS(CWnd))); // Must be a window object we just created! @@ -3515,7 +3515,7 @@ static PyObject *PyCFrameWnd_DockControlBar(PyObject *self, PyObject *args) Py_INCREF(Py_None); } __except (EXCEPTION_EXECUTE_HANDLER) { - rc = NULL; // Cant set Python error till we have the lock back. + rc = NULL; // Can't set Python error till we have the lock back. } GUI_END_SAVE; if (rc == NULL) diff --git a/Pythonwin/win32win.h b/Pythonwin/win32win.h index c23033ad6..888635562 100644 --- a/Pythonwin/win32win.h +++ b/Pythonwin/win32win.h @@ -4,7 +4,7 @@ // Window Objects // class PYW_EXPORT PyCWnd : public PyCCmdTarget { - public: // probably shouldnt be, but... + public: // probably shouldn't be, but... MAKE_PY_CTOR(PyCWnd) CMapWordToPtr *pMessageHookList; CMapWordToPtr *pKeyHookList; diff --git a/adodbapi/adodbapi.py b/adodbapi/adodbapi.py index 3f6b0c48e..0f84a890a 100644 --- a/adodbapi/adodbapi.py +++ b/adodbapi/adodbapi.py @@ -168,7 +168,7 @@ def _configure_parameter(p, value, adotype, settings_known): L = min(L, p.Size) # v2.1 Cole limit data to defined size p.Value = value[:L] # v2.1 Jevon & v2.1 Cole else: - p.Value = value # dont limit if db column is numeric + p.Value = value # don't limit if db column is numeric if L > 0: # v2.1 Cole something does not like p.Size as Zero p.Size = L # v2.1 Jevon diff --git a/adodbapi/readme.txt b/adodbapi/readme.txt index b5798677b..00f76f7c2 100644 --- a/adodbapi/readme.txt +++ b/adodbapi/readme.txt @@ -40,7 +40,7 @@ notes for 2.6.2: The definitive source has been moved to https://github.com/mhammond/pywin32/tree/master/adodbapi. Remote has proven too hard to configure and test with Pyro4. I am moving it to unsupported status until I can change to a different connection method. -whats new in version 2.6 +what's new in version 2.6 A cursor.prepare() method and support for prepared SQL statements. Lots of refactoring, especially of the Remote and Server modules (still to be treated as Beta code). The quick start document 'quick_reference.odt' will export as a nice-looking pdf. @@ -48,7 +48,7 @@ whats new in version 2.6 parameters to your .execute() method. If your 'paramstyle' is 'format' 'pyformat' or 'dynamic', you _may_ pass a dictionary of parameters -- provided your SQL operation string is formatted correctly. -whats new in version 2.5 +what's new in version 2.5 Remote module: (works on Linux!) allows a Windows computer to serve ADO databases via PyRO Server module: PyRO server for ADO. Run using a command like= C:>python -m adodbapi.server (server has simple connection string macros: is64bit, getuser, sql_provider, auto_security) diff --git a/com/TestSources/PyCOMTest/PyCOMTest.idl b/com/TestSources/PyCOMTest/PyCOMTest.idl index a006934fb..f4ab94590 100644 --- a/com/TestSources/PyCOMTest/PyCOMTest.idl +++ b/com/TestSources/PyCOMTest/PyCOMTest.idl @@ -26,7 +26,7 @@ typedef enum // Missing EnumTestAttributes2 uuid(6bcdcb60-5605-11d0-ae5f-cadd4c000000), version(1.1), // an extended character in the help string should stress things... - helpstring("Python COM Test Harness 1.0 Type Library, © pywin32 contributors") + helpstring("Python COM Test Harness 1.0 Type Library, � pywin32 contributors") ] library PyCOMTestLib { @@ -70,7 +70,7 @@ library PyCOMTestLib const long LongTest2 = 0x7FFFFFFFL; const unsigned char UCharTest = 255; const char CharTest = -1; - const LPWSTR StringTest = L"Hello Wo®ld"; + const LPWSTR StringTest = L"Hello Wo�ld"; }; enum TestAttributes3{ // Note missing the enum name. @@ -371,7 +371,7 @@ library PyCOMTestLib [ uuid(638630ac-a734-45a2-8080-fda5c1e47f66), - helpstring("PyCOMTest Class that doesnt derive from IDispatch") + helpstring("PyCOMTest Class that doesn't derive from IDispatch") ] coclass CoPyCOMTestNoDispatch { diff --git a/com/TestSources/PyCOMTest/SimpleCounter.cpp b/com/TestSources/PyCOMTest/SimpleCounter.cpp index 8946cad58..a691e2d62 100644 --- a/com/TestSources/PyCOMTest/SimpleCounter.cpp +++ b/com/TestSources/PyCOMTest/SimpleCounter.cpp @@ -10,7 +10,7 @@ CSimpleCounter::CSimpleCounter() { - m_minIndex = 1; // have 1 based index, just cos Python doesnt! + m_minIndex = 1; // have 1 based index, just cos Python doesn't! m_maxIndex = 10; } STDMETHODIMP CSimpleCounter::get_Count(long *retval) diff --git a/com/TestSources/PyCOMVBTest/Tester.cls b/com/TestSources/PyCOMVBTest/Tester.cls index b21226197..12b4e5601 100644 --- a/com/TestSources/PyCOMVBTest/Tester.cls +++ b/com/TestSources/PyCOMVBTest/Tester.cls @@ -23,7 +23,7 @@ Private mvarCollectionProperty As Collection 'local copy 'local variable(s) to hold property value(s) Private mvarVariantPutref As Variant 'local copy 'local variable(s) to hold property value(s) -' I cant seem to declare properties as returning native arrays. +' I can't seem to declare properties as returning native arrays. ' I can only declare them as variant which hopefully holds an array. Private mvarArrayProperty As Variant 'local copy @@ -250,7 +250,7 @@ Public Sub DoSomeCallbacks(ob As Object) Dim rg(1) As Integer Dim rgv(1) As Variant Dim rg_new As Variant - Rem On Error GoTo failed ' Dont really need this - error is correctly propogated back to Python! + Rem On Error GoTo failed ' Don't really need this - error is correctly propogated back to Python! Rem Can check byrefs for gateways here, as VB passes all params byref! i = 99 @@ -270,7 +270,7 @@ Public Sub DoSomeCallbacks(ob As Object) If variantResult <> Null Then MsgBox "After CallbackResultOneByRefButReturnNone, the param was in error - was " & variantResult & " but expected Null" ' See what happens to a ByRef with a void function! ' XXX - was expecting this to fail - VB passes as VT_VARIANT|VT_BYREF - ' and Python sets the Variant to NULL - but VB doesnt complain! + ' and Python sets the Variant to NULL - but VB doesn't complain! ob.CallbackVoidOneByRefButReturnNone i If i <> 100 Then MsgBox "After CallbackVoidOneByRefButReturnNone, the param was in error - was " & i & " but expected 100" rgv(0) = 0 @@ -292,7 +292,7 @@ Public Sub DoSomeCallbacks(ob As Object) ' rg_new should now be rg before the call. If rg_new(0) <> 1 Or rg_new(1) <> 2 Then MsgBox "CallbackArrayResultOneArrayByRef - result wrong - - (" & rg_new(0) & "," & rg_new(1) & ")!!" ' The byref array gets incremented. - ' EEEK - this doesnt work. + ' EEEK - this doesn't work. ' Cos we are using function call syntax, the array is _not_ passed byref!!! 'If rg(0) <> 1 Or rg(1) <> 2 Then MsgBox "CallbackArrayResultOneArrayByRef - byref param wrong - - (" & rg(0) & "," & rg(1) & ")!!" Exit Sub diff --git a/com/changes.txt b/com/changes.txt index 5e16e89a9..f94adde87 100644 --- a/com/changes.txt +++ b/com/changes.txt @@ -45,7 +45,7 @@ fixed (eg, all MSOffice test run both as dynamic and makepy - the only differenc speed. Note that Office97 can be _very_ slow at startup without makep support loaded. * Full support for Office 97. Note that Word97 has changed its object model, and -their "compatibility" layer doesnt work with Python - you will need to change any code +their "compatibility" layer doesn't work with Python - you will need to change any code that uses Word. See the win32com\test\testMSOffice.py for a demo of talking to word. * Support for interfaces with variable arguments supported. diff --git a/com/win32com/HTML/GeneratedSupport.html b/com/win32com/HTML/GeneratedSupport.html index b6fa50f74..9cbb548bc 100644 --- a/com/win32com/HTML/GeneratedSupport.html +++ b/com/win32com/HTML/GeneratedSupport.html @@ -26,7 +26,7 @@

Usage

The following functions are defined. The best examples of their usage is probably in the Pythonwin OCX Demos, and the COM Test Suite (particularly testMSOffice.py)

Note that the gencache.py file supports being run from the command line, and provides some utilities for managing the cache. Run the file to see usage options.

Using makepy to help with the runtime generation

-

makepy supports a "-i" option, to print information about a type library. When you select a type library, makepy will print out 2 lines of code that you cant paste into your application. This will then allow your module to generate the makepy .py file at runtime, but will only take you a few seconds!

+

makepy supports a "-i" option, to print information about a type library. When you select a type library, makepy will print out 2 lines of code that you can't paste into your application. This will then allow your module to generate the makepy .py file at runtime, but will only take you a few seconds!

win32com.client.gencache functions

def MakeModuleForTypelib(typelibCLSID, lcid, major, minor, progressInstance = None):

Generate support for a type library.

diff --git a/com/win32com/changes.txt b/com/win32com/changes.txt index 266d231f9..3b3a0588e 100644 --- a/com/win32com/changes.txt +++ b/com/win32com/changes.txt @@ -48,7 +48,7 @@ fixed (eg, all MSOffice test run both as dynamic and makepy - the only differenc speed. Note that Office97 can be _very_ slow at startup without makep support loaded. * Full support for Office 97. Note that Word97 has changed its object model, and -their "compatibility" layer doesnt work with Python - you will need to change any code +their "compatibility" layer doesn't work with Python - you will need to change any code that uses Word. See the win32com\test\testMSOffice.py for a demo of talking to word. * Support for interfaces with variable arguments supported. diff --git a/com/win32com/client/__init__.py b/com/win32com/client/__init__.py index 4cc903d50..e8a4b6e99 100644 --- a/com/win32com/client/__init__.py +++ b/com/win32com/client/__init__.py @@ -507,7 +507,7 @@ def __init__(self, oobj=None): if details.hresult != winerror.E_NOINTERFACE: raise oobj = oobj._oleobj_ - self.__dict__["_oleobj_"] = oobj # so we dont call __setattr__ + self.__dict__["_oleobj_"] = oobj # so we don't call __setattr__ def __dir__(self): lst = ( diff --git a/com/win32com/client/build.py b/com/win32com/client/build.py index 72f8e4c3b..342f60a39 100644 --- a/com/win32com/client/build.py +++ b/com/win32com/client/build.py @@ -33,7 +33,7 @@ class NotSupportedException(Exception): - pass # Raised when we cant support a param type. + pass # Raised when we can't support a param type. DropIndirection = "DropIndirection" @@ -233,7 +233,7 @@ def _AddFunc_(self, typeinfo, fdesc, bForUser): hidden = (funcflags & pythoncom.FUNCFLAG_FHIDDEN) != 0 if invkind == pythoncom.INVOKE_PROPERTYGET: map = self.propMapGet - # This is not the best solution, but I dont think there is + # This is not the best solution, but I don't think there is # one without specific "set" syntax. # If there is a single PUT or PUTREF, it will function as a property. # If there are both, then the PUT remains a property, and the PUTREF @@ -251,7 +251,7 @@ def _AddFunc_(self, typeinfo, fdesc, bForUser): self.mapFuncs["Set" + name] = existing map = self.propMapPut # existing gets overwritten below. else: - map = self.propMapPut # first time weve seen it. + map = self.propMapPut # first time we've seen it. elif invkind == pythoncom.INVOKE_FUNC: map = self.mapFuncs @@ -262,7 +262,7 @@ def _AddFunc_(self, typeinfo, fdesc, bForUser): # sys.stderr.write("Warning - overwriting existing method/attribute %s\n" % name) map[name] = MapEntry(fdesc, names, doc, resultCLSID, resultDoc, hidden) # any methods that can't be reached via DISPATCH we return None - # for, so dynamic dispatch doesnt see it. + # for, so dynamic dispatch doesn't see it. if fdesc.funckind != pythoncom.FUNC_DISPATCH: return None return (name, map) @@ -505,7 +505,7 @@ def MakeVarArgsFuncMethod(self, entry, name, bMakeClass=1): class VTableItem(DispatchItem): def Build(self, typeinfo, attr, bForUser=1): DispatchItem.Build(self, typeinfo, attr, bForUser) - assert typeinfo is not None, "Cant build vtables without type info!" + assert typeinfo is not None, "Can't build vtables without type info!" meth_list = ( list(self.mapFuncs.values()) @@ -551,7 +551,7 @@ def _ResolveType(typerepr, itypeinfo): # We need to drop an indirection level on pointer to user defined interfaces. # eg, (VT_PTR, (VT_USERDEFINED, somehandle)) needs to become VT_DISPATCH # only when "somehandle" is an object. - # but (VT_PTR, (VT_USERDEFINED, otherhandle)) doesnt get the indirection dropped. + # but (VT_PTR, (VT_USERDEFINED, otherhandle)) doesn't get the indirection dropped. was_user = ( isinstance(subrepr, tuple) and subrepr[0] == pythoncom.VT_USERDEFINED ) @@ -649,7 +649,7 @@ def demunge_leading_underscores(className): def MakePublicAttributeName(className, is_global=False): # Given a class attribute that needs to be public, convert it to a # reasonable name. - # Also need to be careful that the munging doesnt + # Also need to be careful that the munging doesn't # create duplicates - eg, just removing a leading "_" is likely to cause # a clash. # if is_global is True, then the name is a global variable that may diff --git a/com/win32com/client/dynamic.py b/com/win32com/client/dynamic.py index 523fb0dc1..ffe7e9e26 100644 --- a/com/win32com/client/dynamic.py +++ b/com/win32com/client/dynamic.py @@ -216,7 +216,7 @@ def __call__(self, *args): def __bool__(self): return True # ie "if object:" should always be "true" - without this, __len__ is tried. - # _Possibly_ want to defer to __len__ if available, but Im not sure this is + # _Possibly_ want to defer to __len__ if available, but I'm not sure this is # desirable??? def __repr__(self): @@ -426,7 +426,7 @@ def _make_method_(self, name): return None def _Release_(self): - """Cleanup object - like a close - to force cleanup when you dont + """Cleanup object - like a close - to force cleanup when you don't want to rely on Python's reference counting.""" for childCont in self._mapCachedItems_.values(): childCont._Release_() diff --git a/com/win32com/client/gencache.py b/com/win32com/client/gencache.py index fed4cc52c..e71869503 100644 --- a/com/win32com/client/gencache.py +++ b/com/win32com/client/gencache.py @@ -413,7 +413,7 @@ def ForgetAboutTypelibInterface(typelib_ob): try: del demandGeneratedTypeLibraries[info] except KeyError: - # Not worth raising an exception - maybe they dont know we only remember for demand generated, etc. + # Not worth raising an exception - maybe they don't know we only remember for demand generated, etc. print( "ForgetAboutTypelibInterface:: Warning - type library with info {} is not being remembered!".format( info @@ -738,7 +738,7 @@ def Rebuild(verbose=1): """Rebuild the cache indexes from the file system.""" clsidToTypelib.clear() infos = GetGeneratedInfos() - if verbose and len(infos): # Dont bother reporting this when directory is empty! + if verbose and len(infos): # Don't bother reporting this when directory is empty! print("Rebuilding cache of generated files for COM support...") for info in infos: iid, lcid, major, minor = info @@ -752,7 +752,7 @@ def Rebuild(verbose=1): info, sys.exc_info()[0], sys.exc_info()[1] ) ) - if verbose and len(infos): # Dont bother reporting this when directory is empty! + if verbose and len(infos): # Don't bother reporting this when directory is empty! print("Done.") _SaveDicts() diff --git a/com/win32com/client/genpy.py b/com/win32com/client/genpy.py index a45791ae3..a7c4857f9 100644 --- a/com/win32com/client/genpy.py +++ b/com/win32com/client/genpy.py @@ -479,7 +479,7 @@ def WriteClassBody(self, generator): lkey = "value" elif dispid == pythoncom.DISPID_NEWENUM: specialItems["_newenum"] = (entry, entry.desc.invkind, None) - continue # Dont build this one now! + continue # Don't build this one now! else: lkey = name.lower() if ( @@ -677,7 +677,7 @@ def WriteClassBody(self, generator): else: invkind = pythoncom.DISPATCH_METHOD | pythoncom.DISPATCH_PROPERTYGET resultCLSID = "None" - # If we dont have a good CLSID for the enum result, assume it is the same as the Item() method. + # If we don't have a good CLSID for the enum result, assume it is the same as the Item() method. if resultCLSID == "None" and "Item" in self.mapFuncs: resultCLSID = self.mapFuncs["Item"].GetResultCLSIDStr() print("\tdef __iter__(self):", file=stream) @@ -986,7 +986,7 @@ def _Build_Interface(self, type_info_tuple): def BuildOleItemsFromType(self): assert ( self.bBuildHidden - ), "This code doesnt look at the hidden flag - I thought everyone set it true!?!?!" + ), "This code doesn't look at the hidden flag - I thought everyone set it true!?!?!" oleItems = {} enumItems = {} recordItems = {} @@ -1012,7 +1012,7 @@ def BuildOleItemsFromType(self): newItem = RecordItem(info, attr, doc) recordItems[newItem.clsid] = newItem elif infotype == pythoncom.TKIND_ALIAS: - # We dont care about alias' - handled intrinsicly. + # We don't care about alias' - handled intrinsicly. continue elif infotype == pythoncom.TKIND_COCLASS: newItem, child_infos = self._Build_CoClass(type_info_tuple) @@ -1326,7 +1326,7 @@ def generate_child(self, child, dir): assert ( found - ), f"Cant find the '{child}' interface in the CoClasses, or the interfaces" + ), f"Can't find the '{child}' interface in the CoClasses, or the interfaces" # Make a map of iid: dispitem, vtableitem) items = {} for key, value in oleItems.items(): diff --git a/com/win32com/client/makepy.py b/com/win32com/client/makepy.py index 53ff7e1c7..05091bfe8 100644 --- a/com/win32com/client/makepy.py +++ b/com/win32com/client/makepy.py @@ -212,7 +212,7 @@ def GetTypeLibsForSpec(arg): print("Could not locate a type library matching '%s'" % (arg)) for spec in tlbs: # Version numbers not always reliable if enumerated from registry. - # (as some libs use hex, other's dont. Both examples from MS, of course.) + # (as some libs use hex, other's don't. Both examples from MS, of course.) if spec.dll is None: tlb = pythoncom.LoadRegTypeLib( spec.clsid, spec.major, spec.minor, spec.lcid diff --git a/com/win32com/client/selecttlb.py b/com/win32com/client/selecttlb.py index 56197128f..ee2c7bd23 100644 --- a/com/win32com/client/selecttlb.py +++ b/com/win32com/client/selecttlb.py @@ -25,7 +25,7 @@ def __init__(self, clsid, lcid, major, minor, flags=0): def __getitem__(self, item): if item == 0: return self.ver_desc - raise IndexError("Cant index me!") + raise IndexError("Can't index me!") def __lt__(self, other): me = ( diff --git a/com/win32com/server/exception.py b/com/win32com/server/exception.py index 043933fa0..a6b3111fe 100644 --- a/com/win32com/server/exception.py +++ b/com/win32com/server/exception.py @@ -18,7 +18,7 @@ # Note that we derive from com_error, which derives from builtin Exception -# Also note that we dont support "self.args", as we dont support tuple-unpacking +# Also note that we don't support "self.args", as we don't support tuple-unpacking class COMException(pythoncom.com_error): """An Exception object that is understood by the framework. @@ -58,7 +58,7 @@ def __init__( # convert a WIN32 error into an HRESULT scode = scode or hresult - if scode and scode != 1: # We dont want S_FALSE mapped! + if scode and scode != 1: # We don't want S_FALSE mapped! if scode >= -32768 and scode < 32768: # this is HRESULT_FROM_WIN32() scode = -2147024896 | (scode & 0x0000FFFF) diff --git a/com/win32com/server/policy.py b/com/win32com/server/policy.py index f62a7c28e..e99b48216 100644 --- a/com/win32com/server/policy.py +++ b/com/win32com/server/policy.py @@ -631,7 +631,7 @@ def _invokeex_(self, dispid, lcid, wFlags, args, kwArgs, serviceProvider): try: func = getattr(self._obj_, funcname) except AttributeError: - # May have a dispid, but that doesnt mean we have the function! + # May have a dispid, but that doesn't mean we have the function! raise COMException(scode=winerror.DISP_E_MEMBERNOTFOUND) # Should check callable here try: @@ -780,7 +780,7 @@ def resolve_func(spec): idx = spec.rindex(".") mname = spec[:idx] fname = spec[idx + 1 :] - # Dont attempt to optimize by looking in sys.modules, + # Don't attempt to optimize by looking in sys.modules, # as another thread may also be performing the import - this # way we take advantage of the built-in import lock. module = _import_module(mname) @@ -818,5 +818,5 @@ def _import_module(mname): # still reference them here. These will end up being removed. try: from .dispatcher import DispatcherTrace, DispatcherWin32trace -except ImportError: # Quite likely a frozen executable that doesnt need dispatchers +except ImportError: # Quite likely a frozen executable that doesn't need dispatchers pass diff --git a/com/win32com/src/ErrorUtils.cpp b/com/win32com/src/ErrorUtils.cpp index 8f02cb1d3..ff16d9985 100644 --- a/com/win32com/src/ErrorUtils.cpp +++ b/com/win32com/src/ErrorUtils.cpp @@ -358,7 +358,7 @@ void PyCom_StreamMessage(const WCHAR *pszMessageText) { OutputDebugString(pszMessageText); // PySys_WriteStderr has an internal 1024 limit due to varargs. - // weve already resolved them, so we gotta do it the hard way + // we've already resolved them, so we gotta do it the hard way // We can't afford to screw with the Python exception state PyObject *typ, *val, *tb; PyErr_Fetch(&typ, &val, &tb); diff --git a/com/win32com/src/MiscTypes.cpp b/com/win32com/src/MiscTypes.cpp index dd54f4024..64808d6f0 100644 --- a/com/win32com/src/MiscTypes.cpp +++ b/com/win32com/src/MiscTypes.cpp @@ -75,7 +75,7 @@ PyComTypeObject::PyComTypeObject(const char *name, PyComTypeObject *pBase, Py_ss *((PyTypeObject *)this) = type_template; ctor = thector; - // cast away const, as Python doesnt use it. + // cast away const, as Python doesn't use it. tp_name = (char *)name; tp_basicsize = typeSize; ((PyObject *)this)->ob_type = &PyType_Type; diff --git a/com/win32com/src/PyFactory.cpp b/com/win32com/src/PyFactory.cpp index 59fe29ba1..101b5336a 100644 --- a/com/win32com/src/PyFactory.cpp +++ b/com/win32com/src/PyFactory.cpp @@ -77,7 +77,7 @@ STDMETHODIMP CPyFactory::CreateInstance(IUnknown *punkOuter, REFIID riid, void * hr = E_FAIL; } } - Py_XDECREF(pNewInstance); // Dont need it any more. + Py_XDECREF(pNewInstance); // Don't need it any more. } PyCom_DLLReleaseRef(); return hr; diff --git a/com/win32com/src/PyGatewayBase.cpp b/com/win32com/src/PyGatewayBase.cpp index edd571f1a..b6da6ac04 100644 --- a/com/win32com/src/PyGatewayBase.cpp +++ b/com/win32com/src/PyGatewayBase.cpp @@ -87,7 +87,7 @@ PyGatewayBase::PyGatewayBase(PyObject *instance) m_pBaseObject = NULL; m_cRef = 1; m_pPyObject = instance; - Py_XINCREF(instance); // instance should never be NULL - but whats an X between friends! + Py_XINCREF(instance); // instance should never be NULL - but what's an X between friends! PyCom_DLLAddRef(); @@ -377,7 +377,7 @@ static HRESULT invoke_setup(DISPPARAMS FAR *params, LCID lcid, PyObject **pPyArg params->cNamedArgs != 1 || params->rgdispidNamedArgs[0] != DISPID_PROPERTYPUT ? params->cNamedArgs : 0; for (i = 0; i < numNamedArgs; i++) { - // make sure its not a special DISPID we don't understand. + // make sure it's not a special DISPID we don't understand. if (params->rgdispidNamedArgs[i] < 0) return DISP_E_PARAMNOTFOUND; numArgs = max(numArgs, (UINT)params->rgdispidNamedArgs[i] + 1); @@ -492,8 +492,8 @@ static void fill_byref_offsets(DISPPARAMS *pDispParams, unsigned *pOffsets, unsi // named params could have their dispid in any order - so we sort // them - but only if necessary if (numNamedArgs && ioffset < noffsets) { - // NOTE: optimizations possible - if only 1 named param its - // obvious which one it is! If 2 params its very easy to work + // NOTE: optimizations possible - if only 1 named param it's + // obvious which one it is! If 2 params it's very easy to work // it out - so we should only qsort for 3 or more. NPI *npi = (NPI *)_malloca(sizeof(NPI) * pDispParams->cNamedArgs); // death if we fail :) for (unsigned i = 0; i < pDispParams->cNamedArgs; i++) { @@ -580,7 +580,7 @@ static HRESULT invoke_finish(PyObject *dispatcher, /* The dispatcher for the // here - otherwise returning an array of objects would be difficult. // NOTE: Although this is not ideal, it would be evil if the parameters determined // how the Python result was unpacked. VB, for example, will often pass everything - // BYREF, but Python wont. This would mean Python and VB would see different results + // BYREF, but Python won't. This would mean Python and VB would see different results // from the same function. if (PyTuple_Check(userResult)) { unsigned cUserResult = PyWin_SAFE_DOWNCAST(PyTuple_Size(userResult), Py_ssize_t, UINT); @@ -616,7 +616,7 @@ static HRESULT invoke_finish(PyObject *dispatcher, /* The dispatcher for the ob = PyTuple_GetItem(userResult, i + firstByRef); if (!ob) goto done; - Py_INCREF(ob); // tuple fetch doesnt do this! + Py_INCREF(ob); // tuple fetch doesn't do this! // Need to use the ArgHelper to get correct BYREF semantics. PythonOleArgHelper arghelper; arghelper.m_reqdType = V_VT(pv); diff --git a/com/win32com/src/PyIDispatch.cpp b/com/win32com/src/PyIDispatch.cpp index 71b4541b2..d308e1b76 100644 --- a/com/win32com/src/PyIDispatch.cpp +++ b/com/win32com/src/PyIDispatch.cpp @@ -666,7 +666,7 @@ PyObject *PyIDispatchEx::InvokeEx(PyObject *self, PyObject *args) } // TODO - We do not yet support the Type Description here - // (Im not even sure if we need it!) + // (I'm not even sure if we need it!) if (types != Py_None || obReturnDesc != Py_None) { PyErr_SetString(PyExc_TypeError, "Type descriptions are not yet supported."); return NULL; diff --git a/com/win32com/src/PyRecord.cpp b/com/win32com/src/PyRecord.cpp index 181926127..df389bf79 100644 --- a/com/win32com/src/PyRecord.cpp +++ b/com/win32com/src/PyRecord.cpp @@ -493,7 +493,7 @@ PyObject *PyRecord::getattro(PyObject *self, PyObject *obname) return PyCom_BuildPyException(hr, pyrec->pri, IID_IRecordInfo); } - // Short-circuit sub-structs and arrays here, so we dont allocate a new chunk + // Short-circuit sub-structs and arrays here, so we don't allocate a new chunk // of memory and copy it - we need sub-structs to persist. if (V_VT(&vret) == (VT_BYREF | VT_RECORD)) return new PyRecord(V_RECORDINFO(&vret), V_RECORD(&vret), pyrec->owner); diff --git a/com/win32com/src/PythonCOM.cpp b/com/win32com/src/PythonCOM.cpp index 248e53734..6b76b7c98 100644 --- a/com/win32com/src/PythonCOM.cpp +++ b/com/win32com/src/PythonCOM.cpp @@ -752,7 +752,7 @@ static PyObject *pythoncom_WrapObject(PyObject *self, PyObject *args) IUnknown *pLook = (IUnknown *)(*ppv); IInternalUnwrapPythonObject *pTemp; if (pLook->QueryInterface(IID_IInternalUnwrapPythonObject, (void **)&pTemp)==S_OK) { - // One of our objects, so set the base object if it doesnt already have one + // One of our objects, so set the base object if it doesn't already have one PyGatewayBase *pG = (PyGatewayBase *)pTemp; // Eeek - just these few next lines need to be thread-safe :-( PyWin_AcquireGlobalLock(); @@ -2185,7 +2185,7 @@ PYWIN_MODULE_INIT_FUNC(pythoncom) HRESULT hr = PyCom_CoInitializeEx(NULL, coinit_flags); if (hr == E_NOTIMPL) // Special return val from PyCom_Co.. indicates not DCOM. hr = PyCom_CoInitialize(NULL); - // If HR fails, we really dont care - the import should work. User can + // If HR fails, we really don't care - the import should work. User can // manually CoInit() to see! PYWIN_MODULE_INIT_PREPARE(pythoncom, pythoncom_methods, "A module, encapsulating the OLE automation API"); @@ -2625,12 +2625,12 @@ PYWIN_MODULE_INIT_FUNC(pythoncom) ADD_CONSTANT(DESCKIND_FUNCDESC); ADD_CONSTANT(DESCKIND_VARDESC); - // Expose the frozen flag, as Python itself doesnt!! + // Expose the frozen flag, as Python itself doesn't!! // @prop int|frozen|1 if the host is a frozen program, else 0 AddConstant(dict, "frozen", Py_FrozenFlag); // And finally some gross hacks relating to DCOM - // Im really not sure what a better option is! + // I'm really not sure what a better option is! // // If these #error pragma's fire it means this needs revisiting for // an upgrade to the MSVC header files! diff --git a/com/win32com/src/dllmain.cpp b/com/win32com/src/dllmain.cpp index 230f85a37..bac646ece 100644 --- a/com/win32com/src/dllmain.cpp +++ b/com/win32com/src/dllmain.cpp @@ -39,7 +39,7 @@ static BOOL hasInitialized = FALSE; void PyCom_DLLAddRef(void) { - // Must be thread-safe, although cant have the Python lock! + // Must be thread-safe, although can't have the Python lock! CEnterLeaveFramework _celf; LONG cnt = InterlockedIncrement(&g_cLockCount); if (cnt == 1) { // First call @@ -83,7 +83,7 @@ void PyCom_DLLReleaseRef(void) /*** NOTE: We no longer finalize Python EVER in the COM world see pycom-dev mailing list archives from April 2000 for why ***/ - // Must be thread-safe, although cant have the Python lock! + // Must be thread-safe, although can't have the Python lock! // only needed when we finalize. // CEnterLeaveFramework _celf; LONG cnt = InterlockedDecrement(&g_cLockCount); @@ -161,7 +161,7 @@ typedef HRESULT(WINAPI *PFNCoInitializeEx)(LPVOID pvReserved, DWORD dwCoInit); // XXX - Needs more thought about threading implications. HRESULT PyCom_CoInitializeEx(LPVOID reserved, DWORD dwInit) { - // Must be thread-safe, although doesnt need the Python lock. + // Must be thread-safe, although doesn't need the Python lock. CEnterLeaveFramework _celf; if (g_bCoInitThreadHasInit && g_dwCoInitThread == GetCurrentThreadId()) return S_OK; @@ -197,7 +197,7 @@ HRESULT PyCom_CoInitializeEx(LPVOID reserved, DWORD dwInit) HRESULT PyCom_CoInitialize(LPVOID reserved) { - // Must be thread-safe, although doesnt need the Python lock. + // Must be thread-safe, although doesn't need the Python lock. CEnterLeaveFramework _celf; // If our "main" thread has ever called this before, just // ignore it. If it is another thread, then that thread @@ -220,7 +220,7 @@ HRESULT PyCom_CoInitialize(LPVOID reserved) void PyCom_CoUninitialize() { - // Must be thread-safe, although doesnt need the Python lock. + // Must be thread-safe, although doesn't need the Python lock. CEnterLeaveFramework _celf; if (g_dwCoInitThread == GetCurrentThreadId()) { // being asked to terminate on our "main" thread @@ -241,7 +241,7 @@ void PyCom_CoUninitialize() STDAPI DllCanUnloadNow(void) { - // If we dont finalize Python, we should never unload! + // If we don't finalize Python, we should never unload! return S_FALSE; // return g_cLockCount ? S_FALSE : S_OK; } diff --git a/com/win32com/src/extensions/PyTYPEATTR.cpp b/com/win32com/src/extensions/PyTYPEATTR.cpp index a7fa4d6c3..2fd2cf2e1 100644 --- a/com/win32com/src/extensions/PyTYPEATTR.cpp +++ b/com/win32com/src/extensions/PyTYPEATTR.cpp @@ -144,7 +144,7 @@ PyTYPEATTR::PyTYPEATTR(const TYPEATTR *attr) wMinorVerNum = attr->wMinorVerNum; // Some (only a few 16 bit MSOffice only one so far, and even then only occasionally!) - // servers seem to send invalid tdescAlias when its not actually an alias. + // servers seem to send invalid tdescAlias when it's not actually an alias. if (attr->typekind == TKIND_ALIAS) obDescAlias = PyObject_FromTYPEDESC(&attr->tdescAlias); else { diff --git a/com/win32com/src/include/PythonCOM.h b/com/win32com/src/include/PythonCOM.h index 4c0e2cced..446500acd 100644 --- a/com/win32com/src/include/PythonCOM.h +++ b/com/win32com/src/include/PythonCOM.h @@ -347,7 +347,7 @@ PYCOM_EXPORT HRESULT PyCom_HandleIEnumNoSequence(REFIID riid); PYCOM_EXPORT HRESULT PyCom_SetCOMErrorFromPyException(REFIID riid = IID_NULL); // A couple of EXCEPINFO helpers - could be private to IDispatch -// if it wasnt for the AXScript support (and ITypeInfo if we get around to that :-) +// if it wasn't for the AXScript support (and ITypeInfo if we get around to that :-) // These functions do not set any error states to either Python or // COM - they simply convert to/from PyObjects and EXCEPINFOs @@ -367,7 +367,7 @@ PYCOM_EXPORT PyObject *PyCom_PyObjectFromExcepInfo(const EXCEPINFO *pexcepInfo); /////////////////////////////////////////////////////////////////// // // External C++ helpers - these helpers are for other DLLs which -// may need similar functionality, but dont want to duplicate all +// may need similar functionality, but don't want to duplicate all // This helper is for an application that has an IDispatch, and COM arguments // and wants to call a Python function. It is assumed the caller can map the IDispatch @@ -648,9 +648,9 @@ class PYCOM_EXPORT PyIConnectionPointContainer : public PyIUnknown { // which need to convert from a Python object when the specific OLE // type is known - eg, when a TypeInfo is available. // -// The type of conversion determines who owns what buffers etc. I wish BYREF didnt exist :-) +// The type of conversion determines who owns what buffers etc. I wish BYREF didn't exist :-) typedef enum { - // We dont know what sort of conversion it is yet. + // We don't know what sort of conversion it is yet. POAH_CONVERT_UNKNOWN, // A PyObject is given, we convert to a VARIANT, make the COM call, then BYREFs back to a PyObject // ie, this is typically a "normal" COM call, where Python initiates the call diff --git a/com/win32com/src/include/PythonCOMServer.h b/com/win32com/src/include/PythonCOMServer.h index 3f9c039f4..752d223a4 100644 --- a/com/win32com/src/include/PythonCOMServer.h +++ b/com/win32com/src/include/PythonCOMServer.h @@ -125,7 +125,7 @@ class PYCOM_EXPORT PyGatewayBase : public IDispatchEx, // IDispatch comes along STDMETHOD(Unwrap)(PyObject **ppPyObject); // Basically just PYGATEWAY_MAKE_SUPPORT(PyGatewayBase, IDispatch, IID_IDispatch); - // but with special handling as its the base class. + // but with special handling as it's the base class. static HRESULT PyGatewayConstruct(PyObject *pPyInstance, PyGatewayBase *gatewayBase, void **ppResult, REFIID iid) { if (ppResult == NULL) @@ -139,7 +139,7 @@ class PYCOM_EXPORT PyGatewayBase : public IDispatchEx, // IDispatch comes along } // Currently this is used only for ISupportErrorInfo, // so hopefully this will never be called in this base class. - // (however, this is not a rule, so we wont assert or anything!) + // (however, this is not a rule, so we won't assert or anything!) virtual IID GetIID(void) { return IID_IUnknown; } virtual void *ThisAsIID(IID iid); // End of PYGATEWAY_MAKE_SUPPORT diff --git a/com/win32com/src/include/stdafx.h b/com/win32com/src/include/stdafx.h index 4dd5505ba..8b8b51337 100644 --- a/com/win32com/src/include/stdafx.h +++ b/com/win32com/src/include/stdafx.h @@ -4,7 +4,7 @@ // // _WIN32_DCOM screws win95 and NT :-( However, we need to define this -// so we dont lose all the constants etc that come with DCOM +// so we don't lose all the constants etc that come with DCOM // #define _WIN32_DCOM #define _WIN32_WINNT 0x0501 // we use some of these features. diff --git a/com/win32com/src/oleargs.cpp b/com/win32com/src/oleargs.cpp index dbb7d46ca..0187949f6 100644 --- a/com/win32com/src/oleargs.cpp +++ b/com/win32com/src/oleargs.cpp @@ -327,13 +327,13 @@ PyObject *PyCom_PyObjectFromVariant(const VARIANT *var) return Py_None; } /* skip past any variant references to a "real" variant - (Why do we do this? Why is it only a VARIANT? whats the story, morning glory? + (Why do we do this? Why is it only a VARIANT? what's the story, morning glory? */ while (V_VT(var) == (VT_BYREF | VT_VARIANT)) var = V_VARIANTREF(var); /* ### note: we shouldn't see this, it is illegal in a VARIANT */ if (V_ISVECTOR(var)) { - return OleSetTypeError(_T("Cant convert vectors!")); + return OleSetTypeError(_T("Can't convert vectors!")); } if (V_ISARRAY(var)) { @@ -692,7 +692,7 @@ static BOOL PyCom_SAFEARRAYFromPyObjectEx(PyObject *obj, SAFEARRAY **ppSA, bool // Seek down searching for total dimension count. // Item zero of each element will do for now // (as all must be same) - // First we _will_ allow None here (just dont use it if it crashes :-) + // First we _will_ allow None here (just don't use it if it crashes :-) if (obj == Py_None) { if (bAllocNewArray) *ppSA = NULL; @@ -1075,7 +1075,7 @@ PythonOleArgHelper::~PythonOleArgHelper() // First check we actually have ownership of any buffers. if (m_convertDirection == POAH_CONVERT_UNKNOWN || m_convertDirection == POAH_CONVERT_FROM_VARIANT) return; - // OK - its is possible we own the buffers - check for sure based on the type... + // OK - it is possible we own the buffers - check for sure based on the type... if (m_reqdType & VT_ARRAY) { // Array datatype - cleanup (but how?) if (m_reqdType & VT_BYREF) { @@ -1154,7 +1154,7 @@ BOOL PythonOleArgHelper::ParseTypeInformation(PyObject *reqdObjectTuple) BOOL PythonOleArgHelper::MakeObjToVariant(PyObject *obj, VARIANT *var, PyObject *reqdObjectTuple) { - // Check my logic still holds up - basically we cant call this twice on the same object. + // Check my logic still holds up - basically we can't call this twice on the same object. assert(m_convertDirection == POAH_CONVERT_UNKNOWN || m_convertDirection == POAH_CONVERT_FROM_VARIANT); // If this is the "driving" conversion, then we allocate buffers. // Otherwise, we are simply filling in the buffers as provided by the caller. @@ -1225,7 +1225,7 @@ BOOL PythonOleArgHelper::MakeObjToVariant(PyObject *obj, VARIANT *var, PyObject return TRUE; // All done with array! } if (m_reqdType & VT_VECTOR) { // we have been asked for an array. - OleSetTypeError(_T("Sorry - cant support VT_VECTOR arguments")); + OleSetTypeError(_T("Sorry - can't support VT_VECTOR arguments")); return FALSE; } BOOL rc = TRUE; @@ -1610,7 +1610,7 @@ PyObject *PythonOleArgHelper::MakeVariantToObj(VARIANT *var) // performed first, then Python called, then the ObjToVariant conversion will // happen later. In this case, remember the buffer for the Variant - // Check my logic still holds up - basically we cant call this twice on the same object. + // Check my logic still holds up - basically we can't call this twice on the same object. assert(m_convertDirection == POAH_CONVERT_UNKNOWN || m_convertDirection == POAH_CONVERT_FROM_PYOBJECT); // If this is the "driving" conversion, then the callers owns the buffers - we just use-em if (m_convertDirection == POAH_CONVERT_UNKNOWN) { diff --git a/com/win32com/src/univgw.cpp b/com/win32com/src/univgw.cpp index c16d2693c..aec11ad12 100644 --- a/com/win32com/src/univgw.cpp +++ b/com/win32com/src/univgw.cpp @@ -125,9 +125,9 @@ static HRESULT univgw_dispatch(DWORD index, gw_object *_this, va_list argPtr) Py_DECREF(result); // ### Greg> what to do for non-HRESULT return values? - // ### Bill> If its not a float/double then + // ### Bill> If it's not a float/double then // ### then they'll see a 32bit sign-extended value. - // ### If its a float/double they're currently out of luck. + // ### If it's a float/double they're currently out of luck. // ### The smart ones only declare int, HRESULT, or void // ### functions in any event... // ### on X86s __stdcall return values go into: @@ -263,7 +263,7 @@ static pfnGWMethod make_method(DWORD index, UINT argsize, UINT argc) } #else // other arches /* The MAINWIN toolkit allows us to build this on Linux!!! */ -#pragma message("XXXXXXXXX - win32com.universal wont work on this platform - need make_method") +#pragma message("XXXXXXXXX - win32com.universal won't work on this platform - need make_method") PyErr_SetString(PyExc_NotImplementedError, "not implemented on this platform"); code = NULL; #endif diff --git a/com/win32com/test/daodump.py b/com/win32com/test/daodump.py index 0b6cc9517..41f6f7094 100644 --- a/com/win32com/test/daodump.py +++ b/com/win32com/test/daodump.py @@ -42,7 +42,7 @@ def DumpRelations(db, bDeep=1): print(f"Relation {relation.Name} - {relation.Table}->{relation.ForeignTable}") -#### This dont work. TLB says it is a Fields collection, but apparently not! +#### This don't work. TLB says it is a Fields collection, but apparently not! #### if bDeep: DumpFields(relation.Fields) diff --git a/com/win32com/test/testDictionary.py b/com/win32com/test/testDictionary.py index dfcbb98d4..3e6691332 100644 --- a/com/win32com/test/testDictionary.py +++ b/com/win32com/test/testDictionary.py @@ -62,7 +62,7 @@ def TestDict(quiet=None): print("Failure tests") try: dict() - raise Exception("default method with no args worked when it shouldnt have!") + raise Exception("default method with no args worked when it shouldn't have!") except pythoncom.com_error as xxx_todo_changeme: (hr, desc, exc, argErr) = xxx_todo_changeme.args assert ( @@ -71,7 +71,7 @@ def TestDict(quiet=None): try: dict("hi", "there") - raise Exception("multiple args worked when it shouldnt have!") + raise Exception("multiple args worked when it shouldn't have!") except pythoncom.com_error as xxx_todo_changeme1: (hr, desc, exc, argErr) = xxx_todo_changeme1.args assert ( @@ -80,7 +80,7 @@ def TestDict(quiet=None): try: dict(0) - raise Exception("int key worked when it shouldnt have!") + raise Exception("int key worked when it shouldn't have!") except pythoncom.com_error as xxx_todo_changeme2: (hr, desc, exc, argErr) = xxx_todo_changeme2.args assert ( diff --git a/com/win32com/test/testGIT.py b/com/win32com/test/testGIT.py index f5228a6b2..b290792eb 100644 --- a/com/win32com/test/testGIT.py +++ b/com/win32com/test/testGIT.py @@ -2,7 +2,7 @@ Uses standard COM marshalling to pass objects between threads. Even though Python generally seems to work when you just pass COM objects -between threads, it shouldnt. +between threads, it shouldn't. This shows the "correct" way to do it. diff --git a/com/win32com/test/testGatewayAddresses.py b/com/win32com/test/testGatewayAddresses.py index ee3682bad..ed78d37e7 100644 --- a/com/win32com/test/testGatewayAddresses.py +++ b/com/win32com/test/testGatewayAddresses.py @@ -93,7 +93,7 @@ def _query_interface_(self, iid): def TestGatewayInheritance(): # By default, wrap() creates and discards a temporary object. # This is not necessary, but just the current implementation of wrap. - # As the object is correctly discarded, it doesnt affect this test. + # As the object is correctly discarded, it doesn't affect this test. o = wrap(Dummy(), pythoncom.IID_IPersistStorage) o2 = o.QueryInterface(pythoncom.IID_IUnknown) FailObjectIdentity(o, o2, "IID_IPersistStorage->IID_IUnknown") diff --git a/com/win32com/test/testIterators.py b/com/win32com/test/testIterators.py index 8eba364a7..fe336e54e 100644 --- a/com/win32com/test/testIterators.py +++ b/com/win32com/test/testIterators.py @@ -124,7 +124,7 @@ def tearDown(self): def suite(): - # We dont want our base class run + # We don't want our base class run suite = unittest.TestSuite() for item in list(globals().values()): if ( diff --git a/com/win32com/test/testMSOffice.py b/com/win32com/test/testMSOffice.py index b65a964b0..37a37fe93 100644 --- a/com/win32com/test/testMSOffice.py +++ b/com/win32com/test/testMSOffice.py @@ -86,7 +86,7 @@ def TestWord8(word): # XXX - note that # for para in paras: # para().Font... - # doesnt seem to work - no error, just doesnt work + # doesn't seem to work - no error, just doesn't work # Should check if it works for VB! doc.Close(SaveChanges=0) word.Quit() diff --git a/com/win32com/test/testMSOfficeEvents.py b/com/win32com/test/testMSOfficeEvents.py index e677afc67..f44e1d9b8 100644 --- a/com/win32com/test/testMSOfficeEvents.py +++ b/com/win32com/test/testMSOfficeEvents.py @@ -16,7 +16,7 @@ class ExcelEvents: def OnNewWorkbook(self, wb): if not isinstance(wb, types.InstanceType): raise RuntimeError( - "The transformer doesnt appear to have translated this for us!" + "The transformer doesn't appear to have translated this for us!" ) self.seen_events["OnNewWorkbook"] = None @@ -25,7 +25,7 @@ def OnWindowActivate(self, wb, wn): wn, types.InstanceType ): raise RuntimeError( - "The transformer doesnt appear to have translated this for us!" + "The transformer doesn't appear to have translated this for us!" ) self.seen_events["OnWindowActivate"] = None diff --git a/com/win32com/test/testMarshal.py b/com/win32com/test/testMarshal.py index 6c9a6ce90..d5b931c8c 100644 --- a/com/win32com/test/testMarshal.py +++ b/com/win32com/test/testMarshal.py @@ -2,7 +2,7 @@ Uses standard COM marshalling to pass objects between threads. Even though Python generally seems to work when you just pass COM objects -between threads, it shouldnt. +between threads, it shouldn't. This shows the "correct" way to do it. @@ -74,14 +74,14 @@ def BeginThreadsSimpleMarshal(self, numThreads): t = threading.Thread( target=self._testInterpInThread, args=(hEvent, interpStream) ) - t.setDaemon(1) # so errors dont cause shutdown hang + t.setDaemon(1) # so errors don't cause shutdown hang t.start() threads.append(t) interp = None return threads, events # - # NOTE - this doesnt quite work - Im not even sure it should, but Greg reckons + # NOTE - this doesn't quite work - I'm not even sure it should, but Greg reckons # you should be able to avoid the marshal per thread! # I think that refers to CoMarshalInterface though... def BeginThreadsFastMarshal(self, numThreads): @@ -101,7 +101,7 @@ def BeginThreadsFastMarshal(self, numThreads): for i in range(numThreads): hEvent = win32event.CreateEvent(None, 0, 0, None) t = threading.Thread(target=self._testInterpInThread, args=(hEvent, interp)) - t.setDaemon(1) # so errors dont cause shutdown hang + t.setDaemon(1) # so errors don't cause shutdown hang t.start() events.append(hEvent) threads.append(t) diff --git a/com/win32com/test/testNetscape.py b/com/win32com/test/testNetscape.py index ed3638031..8347aae99 100644 --- a/com/win32com/test/testNetscape.py +++ b/com/win32com/test/testNetscape.py @@ -1,4 +1,4 @@ -## AHH - I cant make this work!!! +## AHH - I can't make this work!!! # But this is the general idea. diff --git a/com/win32com/test/testPersist.py b/com/win32com/test/testPersist.py index 5ca6053f7..b2379cc85 100644 --- a/com/win32com/test/testPersist.py +++ b/com/win32com/test/testPersist.py @@ -206,7 +206,7 @@ def test(): # XXX - note that # for para in paras: # para().Font... - # doesnt seem to work - no error, just doesnt work + # doesn't seem to work - no error, just doesn't work # Should check if it works for VB! dpcom.Save(stcom, 0) diff --git a/com/win32com/test/testPyComTest.py b/com/win32com/test/testPyComTest.py index a906de5c9..d355098a8 100644 --- a/com/win32com/test/testPyComTest.py +++ b/com/win32com/test/testPyComTest.py @@ -1,5 +1,5 @@ # NOTE - Still seems to be a leak here somewhere -# gateway count doesnt hit zero. Hence the print statements! +# gateway count doesn't hit zero. Hence the print statements! import sys @@ -190,7 +190,7 @@ def TestCommon(o, is_generated): assert o.GetSetUnsignedLong(-1) == 0xFFFFFFFF, "unsigned -1 failed" # We want to explicitly test > 32 bits. - # 'maxsize+1' is no good on 64bit platforms as its 65 bits! + # 'maxsize+1' is no good on 64bit platforms as it's 65 bits! big = 2147483647 for l in big, big + 1, 1 << 65: check_get_set(o.GetSetVariant, l) @@ -628,7 +628,7 @@ def TestCounter(counter, bIsGenerated): num = num + 1 assert num == len( counter - ), "*** Length of counter and loop iterations dont match ***" + ), "*** Length of counter and loop iterations don't match ***" assert num == 10, "*** Unexpected number of loop iterations ***" try: diff --git a/com/win32com/test/testStorage.py b/com/win32com/test/testStorage.py index 27ae640e0..e8f3d5d17 100644 --- a/com/win32com/test/testStorage.py +++ b/com/win32com/test/testStorage.py @@ -24,7 +24,7 @@ def testit(self): storagecon.STGM_READWRITE | storagecon.STGM_CREATE | storagecon.STGM_SHARE_EXCLUSIVE, - ) ## its very picky about flag combinations! + ) ## it's very picky about flag combinations! psuser.WriteMultiple((3, 4), ("hey", "bubba")) psuser.WritePropertyNames((3, 4), ("property3", "property4")) expected_summaries = [] diff --git a/com/win32com/test/testvb.py b/com/win32com/test/testvb.py index a99b3a0a2..ca5ab7689 100644 --- a/com/win32com/test/testvb.py +++ b/com/win32com/test/testvb.py @@ -107,7 +107,7 @@ def TestVB(vbtest, bUseGenerated): assert vbtest.TakeByValObject(vbtest) == vbtest - # Python doesnt support PUTREF properties without a typeref + # Python doesn't support PUTREF properties without a typeref # (although we could) if bUseGenerated: ob = vbtest.TakeByRefObject(vbtest) @@ -118,7 +118,7 @@ def TestVB(vbtest, bUseGenerated): assert ( vbtest.VariantPutref._oleobj_ == vbtest._oleobj_ ), "Could not set the VariantPutref property correctly." - # Cant test further types for this VariantPutref, as only + # Can't test further types for this VariantPutref, as only # COM objects can be stored ByRef. # A "set" type property - only works for generated. @@ -133,7 +133,7 @@ def TestVB(vbtest, bUseGenerated): # Result should be just the byref. assert vbtest.IncrementIntegerParam(1) == 2, "Could not pass an integer byref" - # Sigh - we cant have *both* "ommited byref" and optional args + # Sigh - we can't have *both* "ommited byref" and optional args # We really have to opt that args nominated as optional work as optional # rather than simply all byrefs working as optional. # assert vbtest.IncrementIntegerParam() == 1, "Could not pass an omitted integer byref" @@ -154,7 +154,7 @@ def TestVB(vbtest, bUseGenerated): assert ret == 2, f"Could not increment the integer - {ret}" TestVBInterface(vbtest) - # Python doesnt support byrefs without some sort of generated support. + # Python doesn't support byrefs without some sort of generated support. if bUseGenerated: # This is a VB function that takes a single byref # Hence 2 return values - function and byref. @@ -260,7 +260,7 @@ def _DoTestArray(vbtest, data, expected_exception=None): def TestArrays(vbtest, bUseGenerated): # Try and use a safe array (note that the VB code has this declared as a VARIANT - # and I cant work out how to force it to use native arrays! + # and I can't work out how to force it to use native arrays! # (NOTE Python will convert incoming arrays to tuples, so we pass a tuple, even tho # a list works fine - just makes it easier for us to compare the result! # Empty array @@ -315,7 +315,7 @@ def TestArrays(vbtest, bUseGenerated): except pythoncom.com_error as exc: assert ( exc.excepinfo[1] == "Python COM Server Internal Error" - ), f"Didnt get the correct exception - '{exc}'" + ), f"Didn't get the correct exception - '{exc}'" if bUseGenerated: # This one is a bit strange! The array param is "ByRef", as VB insists. diff --git a/com/win32com/test/util.py b/com/win32com/test/util.py index 6ded9a525..d649b7fcb 100644 --- a/com/win32com/test/util.py +++ b/com/win32com/test/util.py @@ -64,7 +64,7 @@ def RegisterPythonServer(filename, progids=None, verbose=0): else: # print(f"Skipping registration of '{filename}' - already registered") return - # needs registration - see if its likely! + # needs registration - see if it's likely! try: from win32com.shell.shell import IsUserAnAdmin except ImportError: diff --git a/com/win32com/universal.py b/com/win32com/universal.py index 055312acd..345160963 100644 --- a/com/win32com/universal.py +++ b/com/win32com/universal.py @@ -93,7 +93,7 @@ def _doCreateVTable(iid, interface_name, is_dispatch, method_defs): def _CalcTypeSize(typeTuple): t = typeTuple[0] if t & (pythoncom.VT_BYREF | pythoncom.VT_ARRAY): - # Its a pointer. + # It's a pointer. cb = _univgw.SizeOfVT(pythoncom.VT_PTR)[1] elif t == pythoncom.VT_RECORD: # Just because a type library uses records doesn't mean the user @@ -131,7 +131,7 @@ def __init__(self, method_info, isEventSink=0): self.dispid = dispid self.invkind = invkind - # We dont use this ATM. + # We don't use this ATM. # self.ret = Arg(ret_def) if isEventSink and name[:2] != "On": name = "On%s" % name diff --git a/com/win32comext/adsi/__init__.py b/com/win32comext/adsi/__init__.py index 1b464d10a..16afd3b78 100644 --- a/com/win32comext/adsi/__init__.py +++ b/com/win32comext/adsi/__init__.py @@ -88,7 +88,7 @@ def _NewEnum(self): try: return ADSIEnumerator(self) except pythoncom.com_error: - # doesnt support it - let our base try! + # doesn't support it - let our base try! return win32com.client.CDispatch._NewEnum(self) def __getattr__(self, attr): diff --git a/com/win32comext/adsi/src/PyADSIUtil.cpp b/com/win32comext/adsi/src/PyADSIUtil.cpp index 8293e960d..07f3093d1 100644 --- a/com/win32comext/adsi/src/PyADSIUtil.cpp +++ b/com/win32comext/adsi/src/PyADSIUtil.cpp @@ -37,7 +37,7 @@ PyObject *OleSetADSIError(HRESULT hr, IUnknown *pUnk, REFIID iid) info.bstrSource = SysAllocString(szNameBuf); info.bstrDescription = SysAllocString(szErrorBuf); // Technically, we probably should return DISP_E_EXCEPTION so we - // appear to follow COM's rules - however, we really dont + // appear to follow COM's rules - however, we really don't // _need_ to (as only Python sees this result), and having the native // HRESULT is preferable. return PyCom_BuildPyExceptionFromEXCEPINFO(dwErrCode, &info); @@ -61,7 +61,7 @@ PyObject *OleSetADSIError(HRESULT hr, IUnknown *pUnk, REFIID iid) info.bstrSource = SysAllocString(szNameBuf); info.bstrDescription = SysAllocString(szErrorBuf); // Technically, we probably should return DISP_E_EXCEPTION so we - // appear to follow COM's rules - however, we really dont + // appear to follow COM's rules - however, we really don't // _need_ to (as only Python sees this result), and having the native // HRESULT is preferable. return PyCom_BuildPyExceptionFromEXCEPINFO(dwErrCode, &info); @@ -162,7 +162,7 @@ BOOL PyADSIObject_AsTypedValue(PyObject *val, ADSVALUE &v) { BOOL ok = TRUE; switch (v.dwType) { - // OK - get lazy - we know its a union! + // OK - get lazy - we know it's a union! case ADSTYPE_DN_STRING: case ADSTYPE_CASE_EXACT_STRING: case ADSTYPE_CASE_IGNORE_STRING: @@ -184,7 +184,7 @@ BOOL PyADSIObject_AsTypedValue(PyObject *val, ADSVALUE &v) ok = PyWinObject_AsLARGE_INTEGER(val, &v.LargeInteger); break; default: - PyErr_SetString(PyExc_TypeError, "Cant convert to this type"); + PyErr_SetString(PyExc_TypeError, "Can't convert to this type"); return FALSE; } return ok; @@ -675,7 +675,7 @@ BOOL PyADSIObject_AsADS_SEARCHPREF_INFOs(PyObject *ob, ADS_SEARCHPREF_INFO **ppr // ADSERR.h is built from a message file. // Therefore, there _must_ be a DLL around we can call // FormatMessage with. -// However, its not obvious, and this code was cut directly from MSDN. +// However, it's not obvious, and this code was cut directly from MSDN. #include "adserr.h" typedef struct tagADSERRMSG { HRESULT hr; diff --git a/com/win32comext/adsi/src/adsi.i b/com/win32comext/adsi/src/adsi.i index fa569b93a..838ccee43 100644 --- a/com/win32comext/adsi/src/adsi.i +++ b/com/win32comext/adsi/src/adsi.i @@ -135,7 +135,7 @@ class PyIADsEnumVARIANT : public PyIEnumVARIANT { virtual ~PyIADsEnumVARIANT() { if (m_obj) { ADsFreeEnumerator((IEnumVARIANT *)m_obj); - m_obj = NULL; // so base dtor doesnt "Release" + m_obj = NULL; // so base dtor doesn't "Release" } } }; diff --git a/com/win32comext/axdebug/adb.py b/com/win32comext/axdebug/adb.py index 2345ce5d6..b947627c9 100644 --- a/com/win32comext/axdebug/adb.py +++ b/com/win32comext/axdebug/adb.py @@ -148,7 +148,7 @@ def break_anywhere(self, frame): def dispatch_return(self, frame, arg): traceenter("dispatch_return", _dumpf(frame), arg) if self.logicalbotframe is frame: - # We dont want to debug parent frames. + # We don't want to debug parent frames. tracev("dispatch_return resetting sys.trace") sys.settrace(None) return diff --git a/com/win32comext/axdebug/codecontainer.py b/com/win32comext/axdebug/codecontainer.py index d6d48048f..8d03747d9 100644 --- a/com/win32comext/axdebug/codecontainer.py +++ b/com/win32comext/axdebug/codecontainer.py @@ -77,7 +77,7 @@ def GetLineOfPosition(self, charPos): lastOffset = lineOffset lineNo = lineNo + 1 else: # for not broken. - # print("Cant find", charPos, "in", self.lineOffsets) + # print("Can't find", charPos, "in", self.lineOffsets) raise COMException(scode=winerror.S_FALSE) # print("GLOP ret=", lineNo, (charPos - lastOffset)) return lineNo, (charPos - lastOffset) @@ -266,7 +266,7 @@ def GetName(self, dnt): attrlen = attrlen + 1 text = sc.GetText() if attrlen != len(text): - print(f"Lengths dont match!!! ({attrlen}/{len(text)})") + print(f"Lengths don't match!!! ({attrlen}/{len(text)})") # print("Attributes:") # print(attrs) diff --git a/com/win32comext/axdebug/contexts.py b/com/win32comext/axdebug/contexts.py index 08443b251..df6e97760 100644 --- a/com/win32comext/axdebug/contexts.py +++ b/com/win32comext/axdebug/contexts.py @@ -11,7 +11,7 @@ class DebugCodeContext(gateways.DebugCodeContext, gateways.DebugDocumentContext): # NOTE: We also implement the IDebugDocumentContext interface for Simple Hosts. # Thus, debugDocument may be NULL when we have smart hosts - but in that case, we - # wont be called upon to provide it. + # won't be called upon to provide it. _public_methods_ = ( gateways.DebugCodeContext._public_methods_ + gateways.DebugDocumentContext._public_methods_ @@ -40,7 +40,7 @@ def GetDocumentContext(self): self.codeContainer.sourceContext, self.offset, self.length ) else: - # Simple host - Fine - Ill do it myself! + # Simple host - Fine - I'll do it myself! return _wrap(self, axdebug.IID_IDebugDocumentContext) def SetBreakPoint(self, bps): diff --git a/com/win32comext/axdebug/debugger.py b/com/win32comext/axdebug/debugger.py index 65a682680..c0b1089f1 100644 --- a/com/win32comext/axdebug/debugger.py +++ b/com/win32comext/axdebug/debugger.py @@ -81,7 +81,7 @@ def __init__(self, axdebugger): self.axdebugger.RefreshAllModules(self.nodes, self) def FromFileName(self, fname): - # It appears we cant add modules during a debug session! + # It appears we can't add modules during a debug session! # if self.currentNumModules != len(sys.modules): # self.axdebugger.RefreshAllModules(self.nodes, self) # self.currentNumModules = len(sys.modules) diff --git a/com/win32comext/axdebug/stackframe.py b/com/win32comext/axdebug/stackframe.py index a5c888872..08fa09ed7 100644 --- a/com/win32comext/axdebug/stackframe.py +++ b/com/win32comext/axdebug/stackframe.py @@ -30,7 +30,7 @@ def __init__(self, debugger): try: address = frame.f_locals["__axstack_address__"] except KeyError: - # print("Couldnt find stack address for",frame.f_code.co_filename, frame.f_lineno-1) + # print("Couldn't find stack address for",frame.f_code.co_filename, frame.f_lineno-1) # Use this one, even tho it is wrong :-( address = axdebug.GetStackAddress() frameInfo = ( diff --git a/com/win32comext/axscript/client/debug.py b/com/win32comext/axscript/client/debug.py index bdae7aac6..554f96095 100644 --- a/com/win32comext/axscript/client/debug.py +++ b/com/win32comext/axscript/client/debug.py @@ -61,7 +61,7 @@ def __init__(self, scriptEngine): if self.debugApplication is None: # Try to get/create the default one - # NOTE - Dont catch exceptions here - let the parent do it, + # NOTE - Don't catch exceptions here - let the parent do it, # so it knows debug support is available. pdm = pythoncom.CoCreateInstance( axdebug.CLSID_ProcessDebugManager, @@ -144,7 +144,7 @@ def OnLeaveScript(self): self.adb.ResetAXDebugging() def AddScriptBlock(self, codeBlock): - # If we dont have debugging support, dont bother. + # If we don't have debugging support, don't bother. cc = DebugCodeBlockContainer(codeBlock, self.scriptSiteDebug) if self.IsSimpleHost(): document = documents.DebugDocumentText(cc) diff --git a/com/win32comext/axscript/client/framework.py b/com/win32comext/axscript/client/framework.py index 8c5152c3d..37ca3787c 100644 --- a/com/win32comext/axscript/client/framework.py +++ b/com/win32comext/axscript/client/framework.py @@ -140,7 +140,7 @@ def __init__( self.beenExecuted = 0 def GetFileName(self): - # Gets the "file name" for Python - uses <...> so Python doesnt think + # Gets the "file name" for Python - uses <...> so Python doesn't think # it is a real file. return "<%s>" % self.name @@ -926,7 +926,7 @@ def Clone(self): # IObjectSafety # Note that IE seems to insist we say we support all the flags, even tho - # we dont accept them all. If unknown flags come in, they are ignored, and never + # we don't accept them all. If unknown flags come in, they are ignored, and never # reflected in GetInterfaceSafetyOptions and the QIs obviously fail, but still IE # allows our engine to initialize. def SetInterfaceSafetyOptions(self, iid, optionsMask, enabledOptions): @@ -1202,19 +1202,19 @@ def HandleException(self, codeBlock: AXScriptCodeBlock | None) -> NoReturn: # likely to have originated from the script code itself, and therefore # needs to be reported like any other exception. if IsCOMServerException(exc_type): - # Ensure the traceback doesnt cause a cycle. + # Ensure the traceback doesn't cause a cycle. raise # It could be an error by another script. if ( isinstance(exc_value, pythoncom.com_error) and exc_value.hresult == axscript.SCRIPT_E_REPORTED ): - # Ensure the traceback doesnt cause a cycle. + # Ensure the traceback doesn't cause a cycle. raise COMException(scode=exc_value.hresult) exception = error.AXScriptException(self, codeBlock, exc_value=exc_value) - # Ensure the traceback doesnt cause a cycle. + # Ensure the traceback doesn't cause a cycle. result_exception = error.ProcessAXScriptException( self.scriptSite, self.debugManager, exception ) diff --git a/com/win32comext/axscript/demos/client/ie/FOO.HTM b/com/win32comext/axscript/demos/client/ie/FOO.HTM index 34a880fa8..556502542 100644 --- a/com/win32comext/axscript/demos/client/ie/FOO.HTM +++ b/com/win32comext/axscript/demos/client/ie/FOO.HTM @@ -1,6 +1,6 @@ -Lets try this out: +Let's try this out:
diff --git a/com/win32comext/axscript/demos/client/ie/demo_intro.htm b/com/win32comext/axscript/demos/client/ie/demo_intro.htm index 94494ec16..9987d8972 100644 --- a/com/win32comext/axscript/demos/client/ie/demo_intro.htm +++ b/com/win32comext/axscript/demos/client/ie/demo_intro.htm @@ -26,7 +26,7 @@

Object model

Known bugs and problems

    -
  • This release seems to have broken Aaron's mouse-trace sample. No idea why, and Im supposed to be looking into it. +

  • This release seems to have broken Aaron's mouse-trace sample. No idea why, and I'm supposed to be looking into it.

  • Builtin objects such as MARQUEE are giving me grief. Objects accessed via forms are generally no problem.

  • If you are trying to use Python with the Windows Scripting Host, note that diff --git a/com/win32comext/axscript/demos/client/ie/foo2.htm b/com/win32comext/axscript/demos/client/ie/foo2.htm index d967822b9..7849dfb8d 100644 --- a/com/win32comext/axscript/demos/client/ie/foo2.htm +++ b/com/win32comext/axscript/demos/client/ie/foo2.htm @@ -61,7 +61,7 @@ @@ -84,7 +84,7 @@ print("Y is ", y) def PythonGlobalFunction(): - window.alert("Hello from Python - Im about to call JScript!") + window.alert("Hello from Python - I'm about to call JScript!") window.JScriptFunction() def Window_OnLoad(): diff --git a/com/win32comext/axscript/src/PyGActiveScript.cpp b/com/win32comext/axscript/src/PyGActiveScript.cpp index 88bc70fe9..dad76db29 100644 --- a/com/win32comext/axscript/src/PyGActiveScript.cpp +++ b/com/win32comext/axscript/src/PyGActiveScript.cpp @@ -143,7 +143,7 @@ STDMETHODIMP PyGActiveScript::GetScriptThreadID( hr = PyCom_SetCOMErrorFromPyException(GetIID()); } else - hr = PyCom_SetCOMErrorFromSimple(E_FAIL, GetIID(), L"Python didnt return an integer"); + hr = PyCom_SetCOMErrorFromSimple(E_FAIL, GetIID(), L"Python didn't return an integer"); return hr; } diff --git a/com/win32comext/axscript/test/leakTest.py b/com/win32comext/axscript/test/leakTest.py index 98a589d3e..7b52e36a9 100644 --- a/com/win32comext/axscript/test/leakTest.py +++ b/com/win32comext/axscript/test/leakTest.py @@ -51,7 +51,7 @@ def echo(self, *args): # self._connect_server_.Broadcast(last) -#### Connections currently wont work, as there is no way for the engine to +#### Connections currently won't work, as there is no way for the engine to #### know what events we support. We need typeinfo support. IID_ITestEvents = pythoncom.MakeIID("{8EB72F90-0D44-11d1-9C4B-00AA00125A98}") @@ -145,7 +145,7 @@ def doTestEngine(engine, echoer): print("***** Calling 'hello' failed", exc) return if echoer.last != "Goober": - print("***** Function call didnt set value correctly", repr(echoer.last)) + print("***** Function call didn't set value correctly", repr(echoer.last)) if str(ob.prop) != "Property Value": print("***** Property Value not correct - ", repr(ob.prop)) diff --git a/com/win32comext/axscript/test/testHost.py b/com/win32comext/axscript/test/testHost.py index 1dba19ed1..3b1181bb6 100644 --- a/com/win32comext/axscript/test/testHost.py +++ b/com/win32comext/axscript/test/testHost.py @@ -69,7 +69,7 @@ def fail(self, *args): # self._connect_server_.Broadcast(last) -#### Connections currently wont work, as there is no way for the engine to +#### Connections currently won't work, as there is no way for the engine to #### know what events we support. We need typeinfo support. IID_ITestEvents = pythoncom.MakeIID("{8EB72F90-0D44-11d1-9C4B-00AA00125A98}") diff --git a/com/win32comext/ifilter/demo/filterDemo.py b/com/win32comext/ifilter/demo/filterDemo.py index 513f70081..5c598fa98 100644 --- a/com/win32comext/ifilter/demo/filterDemo.py +++ b/com/win32comext/ifilter/demo/filterDemo.py @@ -126,11 +126,11 @@ def Parse(self, fileName, maxErrors=10): errCnt = 0 if flags == CHUNK_TEXT: - # its a text segment - get all available text for this chunk. + # it's a text segment - get all available text for this chunk. body_chunks = properties.setdefault(propName, []) self._get_text(body_chunks) elif flags == CHUNK_VALUE: - # its a data segment - get the value + # it's a data segment - get the value properties[propName] = self.f.GetValue() else: self._trace("Unknown flag returned by GetChunk:", flags) diff --git a/com/win32comext/ifilter/src/stdafx.h b/com/win32comext/ifilter/src/stdafx.h index 6672c006d..8a9b1c26c 100644 --- a/com/win32comext/ifilter/src/stdafx.h +++ b/com/win32comext/ifilter/src/stdafx.h @@ -4,7 +4,7 @@ // // _WIN32_DCOM screws win95 and NT :-( However, we need to define this -// so we dont lose all the constants etc that come with DCOM +// so we don't lose all the constants etc that come with DCOM // #define _WIN32_DCOM diff --git a/com/win32comext/internet/src/internet.cpp b/com/win32comext/internet/src/internet.cpp index c16f9e2f7..741af0007 100644 --- a/com/win32comext/internet/src/internet.cpp +++ b/com/win32comext/internet/src/internet.cpp @@ -106,7 +106,7 @@ BOOL PyObject_AsBINDINFO(PyObject *ob, BINDINFO *pPD) if (!PyWinObject_AsTaskAllocatedWCHAR(obExtra, &pPD->szExtraInfo, /*bNoneOK=*/TRUE)) goto done; if (obSTGM != Py_None) { - PyErr_SetString(PyExc_TypeError, "Sorry - dont support STGMEDIUM yet - must be None"); + PyErr_SetString(PyExc_TypeError, "Sorry - don't support STGMEDIUM yet - must be None"); goto done; } if (!PyWinObject_AsTaskAllocatedWCHAR(obCustomVerb, &pPD->szCustomVerb, /*bNoneOK=*/TRUE)) diff --git a/com/win32comext/mapi/src/mapi_headers/EdkMdb.h b/com/win32comext/mapi/src/mapi_headers/EdkMdb.h index 887d64c35..6de385916 100644 --- a/com/win32comext/mapi/src/mapi_headers/EdkMdb.h +++ b/com/win32comext/mapi/src/mapi_headers/EdkMdb.h @@ -17,22 +17,21 @@ * literals declared here instead of the numerical values. */ -#define pidStoreNonTransMin 0x0E40 -#define pidExchangeXmitReservedMin 0x3FE0 -#define pidExchangeNonXmitReservedMin 0x65E0 -#define pidProfileMin 0x6600 -#define pidStoreMin 0x6618 -#define pidFolderMin 0x6638 -#define pidMessageReadOnlyMin 0x6640 -#define pidMessageWriteableMin 0x6658 -#define pidAttachReadOnlyMin 0x666C -#define pidSpecialMin 0x6670 -#define pidAdminMin 0x6690 -#define pidSecureProfileMin PROP_ID_SECURE_MIN -#define pidRenMsgFldMin 0x1080 -#define pidLocalStoreInternalMin 0x6500 // Using a portion of the user-defined non-tranmittable prop for local store -#define pidLocalStoreInternalMax 0x65C0 - +#define pidStoreNonTransMin 0x0E40 +#define pidExchangeXmitReservedMin 0x3FE0 +#define pidExchangeNonXmitReservedMin 0x65E0 +#define pidProfileMin 0x6600 +#define pidStoreMin 0x6618 +#define pidFolderMin 0x6638 +#define pidMessageReadOnlyMin 0x6640 +#define pidMessageWriteableMin 0x6658 +#define pidAttachReadOnlyMin 0x666C +#define pidSpecialMin 0x6670 +#define pidAdminMin 0x6690 +#define pidSecureProfileMin PROP_ID_SECURE_MIN +#define pidRenMsgFldMin 0x1080 +#define pidLocalStoreInternalMin 0x6500 // Using a portion of the user-defined non-tranmittable prop for local store +#define pidLocalStoreInternalMax 0x65C0 /*------------------------------------------------------------------------ * @@ -49,136 +48,132 @@ /* GUID of the global section */ -#define pbGlobalProfileSectionGuid "\x13\xDB\xB0\xC8\xAA\x05\x10\x1A\x9B\xB0\x00\xAA\x00\x2F\xC4\x5A" - +#define pbGlobalProfileSectionGuid "\x13\xDB\xB0\xC8\xAA\x05\x10\x1A\x9B\xB0\x00\xAA\x00\x2F\xC4\x5A" /* Properties in the global section */ -#define PR_PROFILE_VERSION PROP_TAG( PT_LONG, pidProfileMin+0x00) -#define PR_PROFILE_CONFIG_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x01) -#define PR_PROFILE_HOME_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x02) -#define PR_PROFILE_HOME_SERVER_DN PROP_TAG( PT_STRING8, pidProfileMin+0x12) -#define PR_PROFILE_HOME_SERVER_ADDRS PROP_TAG( PT_MV_STRING8, pidProfileMin+0x13) -#define PR_PROFILE_USER PROP_TAG( PT_STRING8, pidProfileMin+0x03) -#define PR_PROFILE_CONNECT_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x04) -#define PR_PROFILE_TRANSPORT_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x05) -#define PR_PROFILE_UI_STATE PROP_TAG( PT_LONG, pidProfileMin+0x06) -#define PR_PROFILE_UNRESOLVED_NAME PROP_TAG( PT_STRING8, pidProfileMin+0x07) -#define PR_PROFILE_UNRESOLVED_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x08) -#define PR_PROFILE_BINDING_ORDER PROP_TAG( PT_STRING8, pidProfileMin+0x09) -#define PR_PROFILE_MAX_RESTRICT PROP_TAG( PT_LONG, pidProfileMin+0x0D) -#define PR_PROFILE_AB_FILES_PATH PROP_TAG( PT_STRING8, pidProfileMin+0xE) -#define PR_PROFILE_OFFLINE_STORE_PATH PROP_TAG( PT_STRING8, pidProfileMin+0x10) -#define PR_PROFILE_OFFLINE_INFO PROP_TAG( PT_BINARY, pidProfileMin+0x11) -#define PR_PROFILE_ADDR_INFO PROP_TAG( PT_BINARY, pidSpecialMin+0x17) -#define PR_PROFILE_OPTIONS_DATA PROP_TAG( PT_BINARY, pidSpecialMin+0x19) -#define PR_PROFILE_SECURE_MAILBOX PROP_TAG( PT_BINARY, pidSecureProfileMin + 0) -#define PR_DISABLE_WINSOCK PROP_TAG( PT_LONG, pidProfileMin+0x18) -#define PR_PROFILE_AUTH_PACKAGE PROP_TAG( PT_LONG, pidProfileMin+0x19) // dup tag of PR_USER_ENTRYID -#define PR_PROFILE_RECONNECT_INTERVAL PROP_TAG( PT_LONG, pidProfileMin+0x1a) // dup tag of PR_USER_NAME -#define PR_PROFILE_SERVER_VERSION PROP_TAG( PT_LONG, pidProfileMin+0x1b) +#define PR_PROFILE_VERSION PROP_TAG(PT_LONG, pidProfileMin + 0x00) +#define PR_PROFILE_CONFIG_FLAGS PROP_TAG(PT_LONG, pidProfileMin + 0x01) +#define PR_PROFILE_HOME_SERVER PROP_TAG(PT_STRING8, pidProfileMin + 0x02) +#define PR_PROFILE_HOME_SERVER_DN PROP_TAG(PT_STRING8, pidProfileMin + 0x12) +#define PR_PROFILE_HOME_SERVER_ADDRS PROP_TAG(PT_MV_STRING8, pidProfileMin + 0x13) +#define PR_PROFILE_USER PROP_TAG(PT_STRING8, pidProfileMin + 0x03) +#define PR_PROFILE_CONNECT_FLAGS PROP_TAG(PT_LONG, pidProfileMin + 0x04) +#define PR_PROFILE_TRANSPORT_FLAGS PROP_TAG(PT_LONG, pidProfileMin + 0x05) +#define PR_PROFILE_UI_STATE PROP_TAG(PT_LONG, pidProfileMin + 0x06) +#define PR_PROFILE_UNRESOLVED_NAME PROP_TAG(PT_STRING8, pidProfileMin + 0x07) +#define PR_PROFILE_UNRESOLVED_SERVER PROP_TAG(PT_STRING8, pidProfileMin + 0x08) +#define PR_PROFILE_BINDING_ORDER PROP_TAG(PT_STRING8, pidProfileMin + 0x09) +#define PR_PROFILE_MAX_RESTRICT PROP_TAG(PT_LONG, pidProfileMin + 0x0D) +#define PR_PROFILE_AB_FILES_PATH PROP_TAG(PT_STRING8, pidProfileMin + 0xE) +#define PR_PROFILE_OFFLINE_STORE_PATH PROP_TAG(PT_STRING8, pidProfileMin + 0x10) +#define PR_PROFILE_OFFLINE_INFO PROP_TAG(PT_BINARY, pidProfileMin + 0x11) +#define PR_PROFILE_ADDR_INFO PROP_TAG(PT_BINARY, pidSpecialMin + 0x17) +#define PR_PROFILE_OPTIONS_DATA PROP_TAG(PT_BINARY, pidSpecialMin + 0x19) +#define PR_PROFILE_SECURE_MAILBOX PROP_TAG(PT_BINARY, pidSecureProfileMin + 0) +#define PR_DISABLE_WINSOCK PROP_TAG(PT_LONG, pidProfileMin + 0x18) +#define PR_PROFILE_AUTH_PACKAGE PROP_TAG(PT_LONG, pidProfileMin + 0x19) // dup tag of PR_USER_ENTRYID +#define PR_PROFILE_RECONNECT_INTERVAL PROP_TAG(PT_LONG, pidProfileMin + 0x1a) // dup tag of PR_USER_NAME +#define PR_PROFILE_SERVER_VERSION PROP_TAG(PT_LONG, pidProfileMin + 0x1b) /* SE 233155 - MarkH: EMSABP DCR /* /* Properties in the abp section - I got these values from AlecDun (Outlook team) */ -#define PR_PROFILE_ABP_ALLOW_RECONNECT PROP_TAG( PT_LONG, pidProfileMin+0x39) -#define PR_PROFILE_ABP_MTHREAD_TIMEOUT_SECS PROP_TAG( PT_LONG, pidProfileMin+0x3A) +#define PR_PROFILE_ABP_ALLOW_RECONNECT PROP_TAG(PT_LONG, pidProfileMin + 0x39) +#define PR_PROFILE_ABP_MTHREAD_TIMEOUT_SECS PROP_TAG(PT_LONG, pidProfileMin + 0x3A) /* Properties passed through the Service Entry to the OST */ -#define PR_OST_ENCRYPTION PROP_TAG(PT_LONG, 0x6702) +#define PR_OST_ENCRYPTION PROP_TAG(PT_LONG, 0x6702) /* Values for PR_OST_ENCRYPTION */ -#define OSTF_NO_ENCRYPTION ((DWORD)0x80000000) -#define OSTF_COMPRESSABLE_ENCRYPTION ((DWORD)0x40000000) -#define OSTF_BEST_ENCRYPTION ((DWORD)0x20000000) +#define OSTF_NO_ENCRYPTION ((DWORD)0x80000000) +#define OSTF_COMPRESSABLE_ENCRYPTION ((DWORD)0x40000000) +#define OSTF_BEST_ENCRYPTION ((DWORD)0x20000000) /* Properties in each profile section */ -#define PR_PROFILE_OPEN_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x09) -#define PR_PROFILE_TYPE PROP_TAG( PT_LONG, pidProfileMin+0x0A) -#define PR_PROFILE_MAILBOX PROP_TAG( PT_STRING8, pidProfileMin+0x0B) -#define PR_PROFILE_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x0C) -#define PR_PROFILE_SERVER_DN PROP_TAG( PT_STRING8, pidProfileMin+0x14) +#define PR_PROFILE_OPEN_FLAGS PROP_TAG(PT_LONG, pidProfileMin + 0x09) +#define PR_PROFILE_TYPE PROP_TAG(PT_LONG, pidProfileMin + 0x0A) +#define PR_PROFILE_MAILBOX PROP_TAG(PT_STRING8, pidProfileMin + 0x0B) +#define PR_PROFILE_SERVER PROP_TAG(PT_STRING8, pidProfileMin + 0x0C) +#define PR_PROFILE_SERVER_DN PROP_TAG(PT_STRING8, pidProfileMin + 0x14) /* Properties in the Public Folders section */ -#define PR_PROFILE_FAVFLD_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x0F) -#define PR_PROFILE_FAVFLD_COMMENT PROP_TAG(PT_STRING8, pidProfileMin+0x15) -#define PR_PROFILE_ALLPUB_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x16) -#define PR_PROFILE_ALLPUB_COMMENT PROP_TAG(PT_STRING8, pidProfileMin+0x17) +#define PR_PROFILE_FAVFLD_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin + 0x0F) +#define PR_PROFILE_FAVFLD_COMMENT PROP_TAG(PT_STRING8, pidProfileMin + 0x15) +#define PR_PROFILE_ALLPUB_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin + 0x16) +#define PR_PROFILE_ALLPUB_COMMENT PROP_TAG(PT_STRING8, pidProfileMin + 0x17) /* Properties for Multiple Offline Address Book support (MOAB) */ -#define PR_PROFILE_MOAB PROP_TAG( PT_STRING8, pidSpecialMin + 0x0B ) -#define PR_PROFILE_MOAB_GUID PROP_TAG( PT_STRING8, pidSpecialMin + 0x0C ) -#define PR_PROFILE_MOAB_SEQ PROP_TAG( PT_LONG, pidSpecialMin + 0x0D ) +#define PR_PROFILE_MOAB PROP_TAG(PT_STRING8, pidSpecialMin + 0x0B) +#define PR_PROFILE_MOAB_GUID PROP_TAG(PT_STRING8, pidSpecialMin + 0x0C) +#define PR_PROFILE_MOAB_SEQ PROP_TAG(PT_LONG, pidSpecialMin + 0x0D) // Property for setting a list of prop_ids to be excluded // from the GetProps(NULL) call. -#define PR_GET_PROPS_EXCLUDE_PROP_ID_LIST PROP_TAG( PT_BINARY, pidSpecialMin + 0x0E ) +#define PR_GET_PROPS_EXCLUDE_PROP_ID_LIST PROP_TAG(PT_BINARY, pidSpecialMin + 0x0E) // Current value for PR_PROFILE_VERSION -#define PROFILE_VERSION ((ULONG)0x501) +#define PROFILE_VERSION ((ULONG)0x501) // Bit values for PR_PROFILE_CONFIG_FLAGS -#define CONFIG_SERVICE ((ULONG)0x00000001) -#define CONFIG_SHOW_STARTUP_UI ((ULONG)0x00000002) -#define CONFIG_SHOW_CONNECT_UI ((ULONG)0x00000004) -#define CONFIG_PROMPT_FOR_CREDENTIALS ((ULONG)0x00000008) -#define CONFIG_NO_AUTO_DETECT ((ULONG)0x00000010) -#define CONFIG_OST_CACHE_ONLY ((ULONG)0x00000020) +#define CONFIG_SERVICE ((ULONG)0x00000001) +#define CONFIG_SHOW_STARTUP_UI ((ULONG)0x00000002) +#define CONFIG_SHOW_CONNECT_UI ((ULONG)0x00000004) +#define CONFIG_PROMPT_FOR_CREDENTIALS ((ULONG)0x00000008) +#define CONFIG_NO_AUTO_DETECT ((ULONG)0x00000010) +#define CONFIG_OST_CACHE_ONLY ((ULONG)0x00000020) // Bit values for PR_PROFILE_CONNECT_FLAGS -#define CONNECT_USE_ADMIN_PRIVILEGE ((ULONG)1) -#define CONNECT_NO_RPC_ENCRYPTION ((ULONG)2) -#define CONNECT_USE_SEPARATE_CONNECTION ((ULONG)4) -#define CONNECT_NO_UNDER_COVER_CONNECTION ((ULONG)8) -#define CONNECT_ANONYMOUS_ACCESS ((ULONG)16) -#define CONNECT_NO_NOTIFICATIONS ((ULONG)32) -#define CONNECT_NO_TABLE_NOTIFICATIONS ((ULONG)32) /* BUGBUG: TEMPORARY */ -#define CONNECT_NO_ADDRESS_RESOLUTION ((ULONG)64) -#define CONNECT_RESTORE_DATABASE ((ULONG)128) - +#define CONNECT_USE_ADMIN_PRIVILEGE ((ULONG)1) +#define CONNECT_NO_RPC_ENCRYPTION ((ULONG)2) +#define CONNECT_USE_SEPARATE_CONNECTION ((ULONG)4) +#define CONNECT_NO_UNDER_COVER_CONNECTION ((ULONG)8) +#define CONNECT_ANONYMOUS_ACCESS ((ULONG)16) +#define CONNECT_NO_NOTIFICATIONS ((ULONG)32) +#define CONNECT_NO_TABLE_NOTIFICATIONS ((ULONG)32) /* BUGBUG: TEMPORARY */ +#define CONNECT_NO_ADDRESS_RESOLUTION ((ULONG)64) +#define CONNECT_RESTORE_DATABASE ((ULONG)128) // Bit values for PR_PROFILE_TRANSPORT_FLAGS -#define TRANSPORT_DOWNLOAD ((ULONG)1) -#define TRANSPORT_UPLOAD ((ULONG)2) +#define TRANSPORT_DOWNLOAD ((ULONG)1) +#define TRANSPORT_UPLOAD ((ULONG)2) // Bit values for PR_PROFILE_OPEN_FLAGS -#define OPENSTORE_USE_ADMIN_PRIVILEGE ((ULONG)0x00000001) -#define OPENSTORE_PUBLIC ((ULONG)0x00000002) -#define OPENSTORE_HOME_LOGON ((ULONG)0x00000004) -#define OPENSTORE_TAKE_OWNERSHIP ((ULONG)0x00000008) -#define OPENSTORE_OVERRIDE_HOME_MDB ((ULONG)0x00000010) -#define OPENSTORE_TRANSPORT ((ULONG)0x00000020) -#define OPENSTORE_REMOTE_TRANSPORT ((ULONG)0x00000040) -#define OPENSTORE_INTERNET_ANONYMOUS ((ULONG)0x00000080) -#define OPENSTORE_ALTERNATE_SERVER ((ULONG)0x00000100) /* reserved for internal use */ -#define OPENSTORE_IGNORE_HOME_MDB ((ULONG)0x00000200) /* reserved for internal use */ -#define OPENSTORE_NO_MAIL ((ULONG)0x00000400) /* reserved for internal use */ -#define OPENSTORE_OVERRIDE_LAST_MODIFIER ((ULONG)0x00000800) -#define OPENSTORE_CALLBACK_LOGON ((ULONG)0x00001000) /* reserved for internal use */ -#define OPENSTORE_LOCAL ((ULONG)0x00002000) -#define OPENSTORE_FAIL_IF_NO_MAILBOX ((ULONG)0x00004000) /* reserved for internal use */ -#define OPENSTORE_CACHE_EXCHANGE ((ULONG)0x00008000) -#define OPENSTORE_CLI_WITH_NAMEDPROP_FIX ((ULONG)0x00010000) /* reserved for internal use */ -#define OPENSTORE_ENABLE_LAZY_LOGGING ((ULONG)0x00020000) /* reserved for internal use */ -#define OPENSTORE_CLI_WITH_REPLID_GUID_MAPPING_FIX ((ULONG)0x00040000) /* reserved for internal use */ -#define OPENSTORE_NO_LOCALIZATION ((ULONG)0x00080000) /* reserved for internal use */ -#define OPENSTORE_RESTORE_DATABASE ((ULONG)0x00100000) -#define OPENSTORE_XFOREST_MOVE ((ULONG)0x00200000) /* reserved for internal use */ - +#define OPENSTORE_USE_ADMIN_PRIVILEGE ((ULONG)0x00000001) +#define OPENSTORE_PUBLIC ((ULONG)0x00000002) +#define OPENSTORE_HOME_LOGON ((ULONG)0x00000004) +#define OPENSTORE_TAKE_OWNERSHIP ((ULONG)0x00000008) +#define OPENSTORE_OVERRIDE_HOME_MDB ((ULONG)0x00000010) +#define OPENSTORE_TRANSPORT ((ULONG)0x00000020) +#define OPENSTORE_REMOTE_TRANSPORT ((ULONG)0x00000040) +#define OPENSTORE_INTERNET_ANONYMOUS ((ULONG)0x00000080) +#define OPENSTORE_ALTERNATE_SERVER ((ULONG)0x00000100) /* reserved for internal use */ +#define OPENSTORE_IGNORE_HOME_MDB ((ULONG)0x00000200) /* reserved for internal use */ +#define OPENSTORE_NO_MAIL ((ULONG)0x00000400) /* reserved for internal use */ +#define OPENSTORE_OVERRIDE_LAST_MODIFIER ((ULONG)0x00000800) +#define OPENSTORE_CALLBACK_LOGON ((ULONG)0x00001000) /* reserved for internal use */ +#define OPENSTORE_LOCAL ((ULONG)0x00002000) +#define OPENSTORE_FAIL_IF_NO_MAILBOX ((ULONG)0x00004000) /* reserved for internal use */ +#define OPENSTORE_CACHE_EXCHANGE ((ULONG)0x00008000) +#define OPENSTORE_CLI_WITH_NAMEDPROP_FIX ((ULONG)0x00010000) /* reserved for internal use */ +#define OPENSTORE_ENABLE_LAZY_LOGGING ((ULONG)0x00020000) /* reserved for internal use */ +#define OPENSTORE_CLI_WITH_REPLID_GUID_MAPPING_FIX ((ULONG)0x00040000) /* reserved for internal use */ +#define OPENSTORE_NO_LOCALIZATION ((ULONG)0x00080000) /* reserved for internal use */ +#define OPENSTORE_RESTORE_DATABASE ((ULONG)0x00100000) +#define OPENSTORE_XFOREST_MOVE ((ULONG)0x00200000) /* reserved for internal use */ // Values for PR_PROFILE_TYPE -#define PROFILE_PRIMARY_USER ((ULONG)1) -#define PROFILE_DELEGATE ((ULONG)2) -#define PROFILE_PUBLIC_STORE ((ULONG)3) -#define PROFILE_SUBSCRIPTION ((ULONG)4) - +#define PROFILE_PRIMARY_USER ((ULONG)1) +#define PROFILE_DELEGATE ((ULONG)2) +#define PROFILE_PUBLIC_STORE ((ULONG)3) +#define PROFILE_SUBSCRIPTION ((ULONG)4) /*------------------------------------------------------------------------ * @@ -188,111 +183,111 @@ /* PR_MDB_PROVIDER GUID in stores table */ -#define pbExchangeProviderPrimaryUserGuid "\x54\x94\xA1\xC0\x29\x7F\x10\x1B\xA5\x87\x08\x00\x2B\x2A\x25\x17" -#define pbExchangeProviderDelegateGuid "\x9e\xb4\x77\x00\x74\xe4\x11\xce\x8c\x5e\x00\xaa\x00\x42\x54\xe2" -#define pbExchangeProviderPublicGuid "\x78\xb2\xfa\x70\xaf\xf7\x11\xcd\x9b\xc8\x00\xaa\x00\x2f\xc4\x5a" -#define pbExchangeProviderXportGuid "\xa9\x06\x40\xe0\xd6\x93\x11\xcd\xaf\x95\x00\xaa\x00\x4a\x35\xc3" -#define pbExchangeProviderLocalStoreGuid "\x2D\xE5\x6B\xA1\x64\x6E\x11\xd2\x8D\x4E\x00\xC0\x4F\xAE\x23\x71" -#define pbExchangeProviderPersistStoreGuid "\x98\xA2\x3D\x67\x62\xCF\x4d\x34\x82\x79\xDB\xFA\x6A\x50\x8B\x31" +#define pbExchangeProviderPrimaryUserGuid "\x54\x94\xA1\xC0\x29\x7F\x10\x1B\xA5\x87\x08\x00\x2B\x2A\x25\x17" +#define pbExchangeProviderDelegateGuid "\x9e\xb4\x77\x00\x74\xe4\x11\xce\x8c\x5e\x00\xaa\x00\x42\x54\xe2" +#define pbExchangeProviderPublicGuid "\x78\xb2\xfa\x70\xaf\xf7\x11\xcd\x9b\xc8\x00\xaa\x00\x2f\xc4\x5a" +#define pbExchangeProviderXportGuid "\xa9\x06\x40\xe0\xd6\x93\x11\xcd\xaf\x95\x00\xaa\x00\x4a\x35\xc3" +#define pbExchangeProviderLocalStoreGuid "\x2D\xE5\x6B\xA1\x64\x6E\x11\xd2\x8D\x4E\x00\xC0\x4F\xAE\x23\x71" +#define pbExchangeProviderPersistStoreGuid "\x98\xA2\x3D\x67\x62\xCF\x4d\x34\x82\x79\xDB\xFA\x6A\x50\x8B\x31" // All properties in this section are readonly // Identity of store - // All stores -#define PR_USER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x01) -#define PR_USER_NAME PROP_TAG( PT_STRING8, pidStoreMin+0x02) +// All stores +#define PR_USER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x01) +#define PR_USER_NAME PROP_TAG(PT_STRING8, pidStoreMin + 0x02) - // All mailbox stores -#define PR_MAILBOX_OWNER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x03) -#define PR_MAILBOX_OWNER_NAME PROP_TAG( PT_STRING8, pidStoreMin+0x04) -#define PR_OOF_STATE PROP_TAG( PT_BOOLEAN, pidStoreMin+0x05) +// All mailbox stores +#define PR_MAILBOX_OWNER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x03) +#define PR_MAILBOX_OWNER_NAME PROP_TAG(PT_STRING8, pidStoreMin + 0x04) +#define PR_OOF_STATE PROP_TAG(PT_BOOLEAN, pidStoreMin + 0x05) // Bug#255023 Provide quota information to MAPI clients to avoid large emails from ever reaching the server -#define PR_MAX_SUBMIT_MESSAGE_SIZE PROP_TAG( PT_LONG, 0x666D) -#define PR_PROHIBIT_SEND_QUOTA PROP_TAG( PT_LONG, 0x666E) +#define PR_MAX_SUBMIT_MESSAGE_SIZE PROP_TAG(PT_LONG, 0x666D) +#define PR_PROHIBIT_SEND_QUOTA PROP_TAG(PT_LONG, 0x666E) - // Public stores -- name of hierarchy server -#define PR_HIERARCHY_SERVER PROP_TAG( PT_TSTRING, pidStoreMin+0x1B) +// Public stores -- name of hierarchy server +#define PR_HIERARCHY_SERVER PROP_TAG(PT_TSTRING, pidStoreMin + 0x1B) // Entryids of special folders - // All mailbox stores -#define PR_SCHEDULE_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x06) - - // All mailbox and gateway stores -#define PR_IPM_DAF_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x07) - - // Public store -#define PR_NON_IPM_SUBTREE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x08) -#define PR_EFORMS_REGISTRY_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x09) -#define PR_SPLUS_FREE_BUSY_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0A) -#define PR_OFFLINE_ADDRBOOK_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0B) -#define PR_NNTP_CONTROL_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidSpecialMin+0x1B) -#define PR_EFORMS_FOR_LOCALE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0C) -#define PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0D) -#define PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0E) -#define PR_NEWSGROUP_ROOT_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidSpecialMin+0x1C) -#define PR_OFFLINE_MESSAGE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0F) -#define PR_IPM_FAVORITES_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x18) -#define PR_IPM_PUBLIC_FOLDERS_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x19) -#define PR_FAVORITES_DEFAULT_NAME PROP_TAG( PT_STRING8, pidStoreMin+0x1D) -#define PR_SYS_CONFIG_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x1E) -#define PR_NNTP_ARTICLE_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidSpecialMin+0x1A) -#define PR_EVENTS_ROOT_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidSpecialMin+0xA) - - // Gateway stores -#define PR_GW_MTSIN_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x10) -#define PR_GW_MTSOUT_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x11) -#define PR_TRANSFER_ENABLED PROP_TAG( PT_BOOLEAN, pidStoreMin+0x12) +// All mailbox stores +#define PR_SCHEDULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x06) + +// All mailbox and gateway stores +#define PR_IPM_DAF_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x07) + +// Public store +#define PR_NON_IPM_SUBTREE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x08) +#define PR_EFORMS_REGISTRY_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x09) +#define PR_SPLUS_FREE_BUSY_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0A) +#define PR_OFFLINE_ADDRBOOK_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0B) +#define PR_NNTP_CONTROL_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin + 0x1B) +#define PR_EFORMS_FOR_LOCALE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0C) +#define PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0D) +#define PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0E) +#define PR_NEWSGROUP_ROOT_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin + 0x1C) +#define PR_OFFLINE_MESSAGE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x0F) +#define PR_IPM_FAVORITES_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x18) +#define PR_IPM_PUBLIC_FOLDERS_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x19) +#define PR_FAVORITES_DEFAULT_NAME PROP_TAG(PT_STRING8, pidStoreMin + 0x1D) +#define PR_SYS_CONFIG_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x1E) +#define PR_NNTP_ARTICLE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin + 0x1A) +#define PR_EVENTS_ROOT_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin + 0xA) + +// Gateway stores +#define PR_GW_MTSIN_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x10) +#define PR_GW_MTSOUT_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin + 0x11) +#define PR_TRANSFER_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreMin + 0x12) // This property is preinitialized to 256 bytes of zeros // GetProp on this property is guaranteed to RPC. May be used // to determine line speed of connection to server. -#define PR_TEST_LINE_SPEED PROP_TAG( PT_BINARY, pidStoreMin+0x13) +#define PR_TEST_LINE_SPEED PROP_TAG(PT_BINARY, pidStoreMin + 0x13) // Used with OpenProperty to get interface, also on folders -#define PR_HIERARCHY_SYNCHRONIZER PROP_TAG( PT_OBJECT, pidStoreMin+0x14) -#define PR_CONTENTS_SYNCHRONIZER PROP_TAG( PT_OBJECT, pidStoreMin+0x15) -#define PR_COLLECTOR PROP_TAG( PT_OBJECT, pidStoreMin+0x16) +#define PR_HIERARCHY_SYNCHRONIZER PROP_TAG(PT_OBJECT, pidStoreMin + 0x14) +#define PR_CONTENTS_SYNCHRONIZER PROP_TAG(PT_OBJECT, pidStoreMin + 0x15) +#define PR_COLLECTOR PROP_TAG(PT_OBJECT, pidStoreMin + 0x16) // Used with OpenProperty to get interface for folders, messages, attachmentson -#define PR_FAST_TRANSFER PROP_TAG( PT_OBJECT, pidStoreMin+0x17) +#define PR_FAST_TRANSFER PROP_TAG(PT_OBJECT, pidStoreMin + 0x17) // Used with OpenProperty to get interface for store object -#define PR_CHANGE_ADVISOR PROP_TAG( PT_OBJECT, pidStoreMin+0x1C) +#define PR_CHANGE_ADVISOR PROP_TAG(PT_OBJECT, pidStoreMin + 0x1C) // used to set the ics notification suppression guid -#define PR_CHANGE_NOTIFICATION_GUID PROP_TAG( PT_CLSID, pidStoreMin+0x1F) +#define PR_CHANGE_NOTIFICATION_GUID PROP_TAG(PT_CLSID, pidStoreMin + 0x1F) // This property is available on mailbox and public stores. If it exists // and its value is TRUE, the store is connected to the offline store provider. -#define PR_STORE_OFFLINE PROP_TAG( PT_BOOLEAN, pidStoreMin+0x1A) +#define PR_STORE_OFFLINE PROP_TAG(PT_BOOLEAN, pidStoreMin + 0x1A) // In transit state for store object. This state is // set when mail is being moved and it pauses mail delivery // to the mail box -#define PR_IN_TRANSIT PROP_TAG( PT_BOOLEAN, pidStoreMin) +#define PR_IN_TRANSIT PROP_TAG(PT_BOOLEAN, pidStoreMin) // Writable only with Admin rights, available on public stores and folders -#define PR_REPLICATION_STYLE PROP_TAG( PT_LONG, pidAdminMin) -#define PR_REPLICATION_SCHEDULE PROP_TAG( PT_BINARY, pidAdminMin+0x01) -#define PR_REPLICATION_MESSAGE_PRIORITY PROP_TAG( PT_LONG, pidAdminMin+0x02) +#define PR_REPLICATION_STYLE PROP_TAG(PT_LONG, pidAdminMin) +#define PR_REPLICATION_SCHEDULE PROP_TAG(PT_BINARY, pidAdminMin + 0x01) +#define PR_REPLICATION_MESSAGE_PRIORITY PROP_TAG(PT_LONG, pidAdminMin + 0x02) // Writable only with Admin rights, available on public stores -#define PR_OVERALL_MSG_AGE_LIMIT PROP_TAG( PT_LONG, pidAdminMin+0x03 ) -#define PR_REPLICATION_ALWAYS_INTERVAL PROP_TAG( PT_LONG, pidAdminMin+0x04 ) -#define PR_REPLICATION_MSG_SIZE PROP_TAG( PT_LONG, pidAdminMin+0x05 ) +#define PR_OVERALL_MSG_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x03) +#define PR_REPLICATION_ALWAYS_INTERVAL PROP_TAG(PT_LONG, pidAdminMin + 0x04) +#define PR_REPLICATION_MSG_SIZE PROP_TAG(PT_LONG, pidAdminMin + 0x05) // default replication style=always interval (minutes) -#define STYLE_ALWAYS_INTERVAL_DEFAULT (ULONG) 15 +#define STYLE_ALWAYS_INTERVAL_DEFAULT (ULONG)15 // default replication message size limit (KB) -#define REPLICATION_MESSAGE_SIZE_LIMIT_DEFAULT (ULONG) 300 +#define REPLICATION_MESSAGE_SIZE_LIMIT_DEFAULT (ULONG)300 // Values for PR_REPLICATION_STYLE -#define STYLE_NEVER (ULONG) 0 // never replicate -#define STYLE_NORMAL (ULONG) 1 // use 84 byte schedule TIB -#define STYLE_ALWAYS (ULONG) 2 // replicate at fastest rate -#define STYLE_DEFAULT (ULONG) -1 // default value +#define STYLE_NEVER (ULONG)0 // never replicate +#define STYLE_NORMAL (ULONG)1 // use 84 byte schedule TIB +#define STYLE_ALWAYS (ULONG)2 // replicate at fastest rate +#define STYLE_DEFAULT (ULONG) - 1 // default value /*------------------------------------------------------------------------ * @@ -301,16 +296,16 @@ * *-----------------------------------------------------------------------*/ -#define PR_SOURCE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x0) -#define PR_PARENT_SOURCE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x1) -#define PR_CHANGE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x2) -#define PR_PREDECESSOR_CHANGE_LIST PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x3) +#define PR_SOURCE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin + 0x0) +#define PR_PARENT_SOURCE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin + 0x1) +#define PR_CHANGE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin + 0x2) +#define PR_PREDECESSOR_CHANGE_LIST PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin + 0x3) // msg-folder only property // actual FID for a msg-folder row // ptagFID for message rows // ptagInstanceID for subfolder rows -#define PR_SOURCE_FID PROP_TAG(PT_I8, pidStoreNonTransMin+0x1F) +#define PR_SOURCE_FID PROP_TAG(PT_I8, pidStoreNonTransMin + 0x1F) /*------------------------------------------------------------------------ * @@ -320,92 +315,91 @@ // folders table property used by PKM to define the catalog guid for content // indexing and searching; doubles as index enable/disable -#define PR_CATALOG PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x1B) +#define PR_CATALOG PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x1B) // Is CI searching enabled on this folder? -#define PR_CI_SEARCH_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x1C) +#define PR_CI_SEARCH_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin + 0x1C) // Is notification-based indexing enabled on this folder? -#define PR_CI_NOTIFICATION_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x1D) +#define PR_CI_NOTIFICATION_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin + 0x1D) // Max number of cached view allowed -#define PR_MAX_CACHED_VIEWS PROP_TAG(PT_LONG, pidStoreNonTransMin+0x28) +#define PR_MAX_CACHED_VIEWS PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x28) // Max number of indices allowed // Review : this ptag is used for PR_MIME_HANDLER_CLASSIDS, but because the context // is different I am reusing it here. -#define PR_MAX_INDICES PROP_TAG(PT_LONG, pidStoreNonTransMin+0x1E) +#define PR_MAX_INDICES PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x1E) // folders table property containing list of guid/restriction pairs -#define PR_IMPLIED_RESTRICTIONS PROP_TAG( PT_MV_BINARY, pidSpecialMin+0x0F) +#define PR_IMPLIED_RESTRICTIONS PROP_TAG(PT_MV_BINARY, pidSpecialMin + 0x0F) // Read only, available on all folders -#define PR_FOLDER_CHILD_COUNT PROP_TAG( PT_LONG, pidFolderMin) -#define PR_RIGHTS PROP_TAG( PT_LONG, pidFolderMin+0x01) -#define PR_ACL_TABLE PROP_TAG( PT_OBJECT, pidExchangeXmitReservedMin) -#define PR_RULES_TABLE PROP_TAG( PT_OBJECT, pidExchangeXmitReservedMin+0x1) -#define PR_HAS_RULES PROP_TAG( PT_BOOLEAN, pidFolderMin+0x02) -#define PR_HAS_MODERATOR_RULES PROP_TAG( PT_BOOLEAN, pidFolderMin+0x07 ) - -//Read only, available only for public folders -#define PR_ADDRESS_BOOK_ENTRYID PROP_TAG( PT_BINARY, pidFolderMin+0x03) - -//Writable, available on folders in all stores -#define PR_ACL_DATA PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin) -#define PR_RULES_DATA PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x1) -#define PR_EXTENDED_ACL_DATA PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x1E) -#define PR_FOLDER_DESIGN_FLAGS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x2) -#define PR_DESIGN_IN_PROGRESS PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x4) -#define PR_SECURE_ORIGINATION PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x5) - -//Writable, available only for public folders -#define PR_PUBLISH_IN_ADDRESS_BOOK PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x6) -#define PR_RESOLVE_METHOD PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x7) -#define PR_ADDRESS_BOOK_DISPLAY_NAME PROP_TAG( PT_TSTRING, pidExchangeXmitReservedMin+0x8) - -//Writable, used to indicate locale id for eforms registry subfolders -#define PR_EFORMS_LOCALE_ID PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x9) +#define PR_FOLDER_CHILD_COUNT PROP_TAG(PT_LONG, pidFolderMin) +#define PR_RIGHTS PROP_TAG(PT_LONG, pidFolderMin + 0x01) +#define PR_ACL_TABLE PROP_TAG(PT_OBJECT, pidExchangeXmitReservedMin) +#define PR_RULES_TABLE PROP_TAG(PT_OBJECT, pidExchangeXmitReservedMin + 0x1) +#define PR_HAS_RULES PROP_TAG(PT_BOOLEAN, pidFolderMin + 0x02) +#define PR_HAS_MODERATOR_RULES PROP_TAG(PT_BOOLEAN, pidFolderMin + 0x07) + +// Read only, available only for public folders +#define PR_ADDRESS_BOOK_ENTRYID PROP_TAG(PT_BINARY, pidFolderMin + 0x03) + +// Writable, available on folders in all stores +#define PR_ACL_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin) +#define PR_RULES_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x1) +#define PR_EXTENDED_ACL_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x1E) +#define PR_FOLDER_DESIGN_FLAGS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x2) +#define PR_DESIGN_IN_PROGRESS PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x4) +#define PR_SECURE_ORIGINATION PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x5) + +// Writable, available only for public folders +#define PR_PUBLISH_IN_ADDRESS_BOOK PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x6) +#define PR_RESOLVE_METHOD PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x7) +#define PR_ADDRESS_BOOK_DISPLAY_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x8) + +// Writable, used to indicate locale id for eforms registry subfolders +#define PR_EFORMS_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x9) // Writable only with Admin rights, available only for public folders -#define PR_REPLICA_LIST PROP_TAG( PT_BINARY, pidAdminMin+0x8) -#define PR_OVERALL_AGE_LIMIT PROP_TAG( PT_LONG, pidAdminMin+0x9) +#define PR_REPLICA_LIST PROP_TAG(PT_BINARY, pidAdminMin + 0x8) +#define PR_OVERALL_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x9) // Newsgroup related properties. Writable only with Admin rights. -#define PR_IS_NEWSGROUP_ANCHOR PROP_TAG( PT_BOOLEAN, pidAdminMin+0x06) -#define PR_IS_NEWSGROUP PROP_TAG( PT_BOOLEAN, pidAdminMin+0x07) -#define PR_NEWSGROUP_COMPONENT PROP_TAG( PT_STRING8, pidAdminMin+0x15) -#define PR_INTERNET_NEWSGROUP_NAME PROP_TAG( PT_STRING8, pidAdminMin+0x17) -#define PR_NEWSFEED_INFO PROP_TAG( PT_BINARY, pidAdminMin+0x16) +#define PR_IS_NEWSGROUP_ANCHOR PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x06) +#define PR_IS_NEWSGROUP PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x07) +#define PR_NEWSGROUP_COMPONENT PROP_TAG(PT_STRING8, pidAdminMin + 0x15) +#define PR_INTERNET_NEWSGROUP_NAME PROP_TAG(PT_STRING8, pidAdminMin + 0x17) +#define PR_NEWSFEED_INFO PROP_TAG(PT_BINARY, pidAdminMin + 0x16) // Newsgroup related property. -#define PR_PREVENT_MSG_CREATE PROP_TAG( PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x14) +#define PR_PREVENT_MSG_CREATE PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin + 0x14) // IMAP internal date -#define PR_IMAP_INTERNAL_DATE PROP_TAG( PT_SYSTIME, pidExchangeNonXmitReservedMin+0x15) +#define PR_IMAP_INTERNAL_DATE PROP_TAG(PT_SYSTIME, pidExchangeNonXmitReservedMin + 0x15) // Virtual properties to refer to Newsfeed DNs. Cannot get/set these on // any object. Supported currently only in specifying restrictions. -#define PR_INBOUND_NEWSFEED_DN PROP_TAG( PT_STRING8, pidSpecialMin+0x1D) -#define PR_OUTBOUND_NEWSFEED_DN PROP_TAG( PT_STRING8, pidSpecialMin+0x1E) +#define PR_INBOUND_NEWSFEED_DN PROP_TAG(PT_STRING8, pidSpecialMin + 0x1D) +#define PR_OUTBOUND_NEWSFEED_DN PROP_TAG(PT_STRING8, pidSpecialMin + 0x1E) // Used for controlling content conversion in NNTP -#define PR_INTERNET_CHARSET PROP_TAG( PT_TSTRING, pidAdminMin+0xA) +#define PR_INTERNET_CHARSET PROP_TAG(PT_TSTRING, pidAdminMin + 0xA) -//PR_RESOLVE_METHOD values -#define RESOLVE_METHOD_DEFAULT ((LONG)0) // default handling attach conflicts -#define RESOLVE_METHOD_LAST_WRITER_WINS ((LONG)1) // the last writer will win conflict -#define RESOLVE_METHOD_NO_CONFLICT_NOTIFICATION ((LONG)2) // no conflict notif +// PR_RESOLVE_METHOD values +#define RESOLVE_METHOD_DEFAULT ((LONG)0) // default handling attach conflicts +#define RESOLVE_METHOD_LAST_WRITER_WINS ((LONG)1) // the last writer will win conflict +#define RESOLVE_METHOD_NO_CONFLICT_NOTIFICATION ((LONG)2) // no conflict notif -//Read only, available only for public folder favorites -#define PR_PUBLIC_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidFolderMin+0x04) +// Read only, available only for public folder favorites +#define PR_PUBLIC_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidFolderMin + 0x04) -//Read only. changes everytime a subfolder is created or deleted -#define PR_HIERARCHY_CHANGE_NUM PROP_TAG( PT_LONG, pidFolderMin+0x06) +// Read only. changes everytime a subfolder is created or deleted +#define PR_HIERARCHY_CHANGE_NUM PROP_TAG(PT_LONG, pidFolderMin + 0x06) // For IFS/OLEDB to set and get user sid in LOGON -#define PR_USER_SID PROP_TAG(PT_BINARY, PROP_ID(ptagSearchState)) // pidInternalNoAccessNonTransMin+0x23) -#define PR_CREATOR_TOKEN PR_USER_SID - +#define PR_USER_SID PROP_TAG(PT_BINARY, PROP_ID(ptagSearchState)) // pidInternalNoAccessNonTransMin+0x23) +#define PR_CREATOR_TOKEN PR_USER_SID /*------------------------------------------------------------------------ * @@ -414,141 +408,140 @@ *-----------------------------------------------------------------------*/ // Read only, automatically set on all messages in all stores -#define PR_HAS_NAMED_PROPERTIES PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin+0x0A) +#define PR_HAS_NAMED_PROPERTIES PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin + 0x0A) // Read only but outside the provider specific range for replication thru GDK-GWs -#define PR_CREATOR_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x18) -#define PR_CREATOR_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x19) -#define PR_LAST_MODIFIER_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x1A) -#define PR_LAST_MODIFIER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x1B) -#define PR_REPLY_RECIPIENT_SMTP_PROXIES PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x1C) +#define PR_CREATOR_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x18) +#define PR_CREATOR_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x19) +#define PR_LAST_MODIFIER_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x1A) +#define PR_LAST_MODIFIER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x1B) +#define PR_REPLY_RECIPIENT_SMTP_PROXIES PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x1C) // Read only, appears on messages which have DAM's pointing to them -#define PR_HAS_DAMS PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x0A) -#define PR_RULE_TRIGGER_HISTORY PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x12) -#define PR_MOVE_TO_STORE_ENTRYID PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x13) -#define PR_MOVE_TO_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x14) +#define PR_HAS_DAMS PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x0A) +#define PR_RULE_TRIGGER_HISTORY PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x12) +#define PR_MOVE_TO_STORE_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x13) +#define PR_MOVE_TO_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x14) // Read only, available only on messages in the public store -#define PR_REPLICA_SERVER PROP_TAG(PT_TSTRING, pidMessageReadOnlyMin+0x04) -#define PR_REPLICA_VERSION PROP_TAG(PT_I8, pidMessageReadOnlyMin+0x0B) +#define PR_REPLICA_SERVER PROP_TAG(PT_TSTRING, pidMessageReadOnlyMin + 0x04) +#define PR_REPLICA_VERSION PROP_TAG(PT_I8, pidMessageReadOnlyMin + 0x0B) // SID versions of standard messaging properties -#define PR_CREATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x18) -#define PR_LAST_MODIFIER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x19) -#define PR_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0d) -#define PR_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0e) -#define PR_ORIGINAL_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0f) -#define PR_ORIGINAL_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x10) -#define PR_READ_RECEIPT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x11) -#define PR_REPORT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x12) -#define PR_ORIGINATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x13) -#define PR_REPORT_DESTINATION_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x14) -#define PR_ORIGINAL_AUTHOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x15) -#define PR_RECEIVED_BY_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x16) -#define PR_RCVD_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x17) - -#define PR_TRUST_SENDER_NO 0x00000000L -#define PR_TRUST_SENDER_YES 0x00000001L -#define PR_TRUST_SENDER PROP_TAG(PT_LONG, pidStoreNonTransMin+0x39) +#define PR_CREATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x18) +#define PR_LAST_MODIFIER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x19) +#define PR_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x0d) +#define PR_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x0e) +#define PR_ORIGINAL_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x0f) +#define PR_ORIGINAL_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x10) +#define PR_READ_RECEIPT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x11) +#define PR_REPORT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x12) +#define PR_ORIGINATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x13) +#define PR_REPORT_DESTINATION_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x14) +#define PR_ORIGINAL_AUTHOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x15) +#define PR_RECEIVED_BY_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x16) +#define PR_RCVD_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x17) + +#define PR_TRUST_SENDER_NO 0x00000000L +#define PR_TRUST_SENDER_YES 0x00000001L +#define PR_TRUST_SENDER PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x39) // XML versions of SID properties -#define PR_CREATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2C) -#define PR_LAST_MODIFIER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2D) -#define PR_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2E) -#define PR_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2F) -#define PR_ORIGINAL_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x30) -#define PR_ORIGINAL_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x31) -#define PR_READ_RECEIPT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x32) -#define PR_REPORT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x33) -#define PR_ORIGINATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x34) -#define PR_REPORT_DESTINATION_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x35) -#define PR_ORIGINAL_AUTHOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x36) -#define PR_RECEIVED_BY_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x37) -#define PR_RCVD_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x38) - +#define PR_CREATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2C) +#define PR_LAST_MODIFIER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2D) +#define PR_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2E) +#define PR_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2F) +#define PR_ORIGINAL_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x30) +#define PR_ORIGINAL_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x31) +#define PR_READ_RECEIPT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x32) +#define PR_REPORT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x33) +#define PR_ORIGINATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x34) +#define PR_REPORT_DESTINATION_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x35) +#define PR_ORIGINAL_AUTHOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x36) +#define PR_RECEIVED_BY_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x37) +#define PR_RCVD_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x38) // those two are pseudo-properties on folder. calling OFOLD::EcGetProps(PR_RESERVE_RANGE_OF_IDS) is // equivalent to calling EcGetLocalRepIdsOp(), calling OFOLD::EcSetProps(PR_MERGE_MIDSET_DELETED) // is equivalen to calling OFOLD::EcSetLocalRepMidsetDeleted() -#define PR_MERGE_MIDSET_DELETED PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x3a) // 0x0E7A0102 -#define PR_RESERVE_RANGE_OF_IDS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x3b) // 0x0E7B0102 +#define PR_MERGE_MIDSET_DELETED PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x3a) // 0x0E7A0102 +#define PR_RESERVE_RANGE_OF_IDS PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x3b) // 0x0E7B0102 // computed message property (read only) // 44 byte binary property - used by PKM as globally unique message key // 22 bytes of global ID for FID // 22 bytes of global ID for VID -#define PR_FID_VID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x0C) -#define PR_FID_MID PR_FID_VID //NSK : temporary to allow transition +#define PR_FID_VID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x0C) +#define PR_FID_MID PR_FID_VID // NSK : temporary to allow transition // message property - read only, xref ID in global ID format - used by PKM -#define PR_ORIGIN_ID PROP_TAG( PT_BINARY, pidMessageReadOnlyMin+0x0D) +#define PR_ORIGIN_ID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x0D) // computed message property used in search folders to determine quality of // search hit match // NOTE: ptag.h consumers, see also ptagMsgFolderTemplateRes3 -#define PR_RANK PROP_TAG( PT_LONG, pidAdminMin+0x82 ) +#define PR_RANK PROP_TAG(PT_LONG, pidAdminMin + 0x82) // msg-folder property, read only // value is PR_MSG_DELIVERY_TIME if it exists, else PR_CREATION_TIME // used as the default sort time when subfolder rows are returned in views -#define PR_MSG_FOLD_TIME PROP_TAG( PT_SYSTIME, pidMessageReadOnlyMin+0x14) -#define PR_ICS_CHANGE_KEY PROP_TAG( PT_BINARY, pidMessageReadOnlyMin+0x15) +#define PR_MSG_FOLD_TIME PROP_TAG(PT_SYSTIME, pidMessageReadOnlyMin + 0x14) +#define PR_ICS_CHANGE_KEY PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x15) -#define PR_DEFERRED_SEND_NUMBER PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xB) -#define PR_DEFERRED_SEND_UNITS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xC) -#define PR_EXPIRY_NUMBER PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xD) -#define PR_EXPIRY_UNITS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xE) +#define PR_DEFERRED_SEND_NUMBER PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0xB) +#define PR_DEFERRED_SEND_UNITS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0xC) +#define PR_EXPIRY_NUMBER PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0xD) +#define PR_EXPIRY_UNITS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0xE) // Writeable, deferred send time -#define PR_DEFERRED_SEND_TIME PROP_TAG( PT_SYSTIME, pidExchangeXmitReservedMin+0xF) +#define PR_DEFERRED_SEND_TIME PROP_TAG(PT_SYSTIME, pidExchangeXmitReservedMin + 0xF) -//Writeable, intended for both folders and messages in gateway mailbox -#define PR_GW_ADMIN_OPERATIONS PROP_TAG( PT_LONG, pidMessageWriteableMin) +// Writeable, intended for both folders and messages in gateway mailbox +#define PR_GW_ADMIN_OPERATIONS PROP_TAG(PT_LONG, pidMessageWriteableMin) -//Writeable, used for DMS messages -#define PR_P1_CONTENT PROP_TAG( PT_BINARY, 0x1100) -#define PR_P1_CONTENT_TYPE PROP_TAG( PT_BINARY, 0x1101) +// Writeable, used for DMS messages +#define PR_P1_CONTENT PROP_TAG(PT_BINARY, 0x1100) +#define PR_P1_CONTENT_TYPE PROP_TAG(PT_BINARY, 0x1101) // Properties on deferred action messages -#define PR_CLIENT_ACTIONS PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x5) -#define PR_DAM_ORIGINAL_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x6) -#define PR_DAM_BACK_PATCHED PROP_TAG( PT_BOOLEAN, pidMessageReadOnlyMin+0x7) +#define PR_CLIENT_ACTIONS PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x5) +#define PR_DAM_ORIGINAL_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x6) +#define PR_DAM_BACK_PATCHED PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin + 0x7) // Properties on deferred action error messages -#define PR_RULE_ERROR PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x8) -#define PR_RULE_ACTION_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x9) -#define PR_RULE_ACTION_NUMBER PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x10) -#define PR_RULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x11) +#define PR_RULE_ERROR PROP_TAG(PT_LONG, pidMessageReadOnlyMin + 0x8) +#define PR_RULE_ACTION_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin + 0x9) +#define PR_RULE_ACTION_NUMBER PROP_TAG(PT_LONG, pidMessageReadOnlyMin + 0x10) +#define PR_RULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x11) // Mime representation of a message. // Defined as 3 different types for convenience. Will be stored as file handle // internally. -#define PR_INTERNET_CONTENT PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x1) -#define PR_INTERNET_CONTENT_HANDLE PROP_TAG(PT_FILE_HANDLE, pidMessageWriteableMin+0x1) -#define PR_INTERNET_CONTENT_EA PROP_TAG(PT_FILE_EA, pidMessageWriteableMin+0x1) +#define PR_INTERNET_CONTENT PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x1) +#define PR_INTERNET_CONTENT_HANDLE PROP_TAG(PT_FILE_HANDLE, pidMessageWriteableMin + 0x1) +#define PR_INTERNET_CONTENT_EA PROP_TAG(PT_FILE_EA, pidMessageWriteableMin + 0x1) // Dot-stuff state property on message -#define PR_DOTSTUFF_STATE PROP_TAG(PT_LONG, pidUserNonTransmitMin+0x1) +#define PR_DOTSTUFF_STATE PROP_TAG(PT_LONG, pidUserNonTransmitMin + 0x1) // Raw byte count of mime stream, if mime exists. -#define PR_MIME_SIZE PROP_TAG(PT_LONG, 0x6746) -#define PR_MIME_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6746) +#define PR_MIME_SIZE PROP_TAG(PT_LONG, 0x6746) +#define PR_MIME_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6746) // Raw byte count of ptagInternetContent, whether it is a mime message // or freedoc using OURL -#define PR_FILE_SIZE PROP_TAG(PT_LONG, 0x6747) -#define PR_FILE_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6747) +#define PR_FILE_SIZE PROP_TAG(PT_LONG, 0x6747) +#define PR_FILE_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6747) // Sender's editor format -#define PR_MSG_EDITOR_FORMAT PROP_TAG( PT_LONG, 0x5909 ) +#define PR_MSG_EDITOR_FORMAT PROP_TAG(PT_LONG, 0x5909) -#define EDITOR_FORMAT_DONTKNOW ((ULONG)0) -#define EDITOR_FORMAT_PLAINTEXT ((ULONG)1) -#define EDITOR_FORMAT_HTML ((ULONG)2) -#define EDITOR_FORMAT_RTF ((ULONG)3) +#define EDITOR_FORMAT_DONTKNOW ((ULONG)0) +#define EDITOR_FORMAT_PLAINTEXT ((ULONG)1) +#define EDITOR_FORMAT_HTML ((ULONG)2) +#define EDITOR_FORMAT_RTF ((ULONG)3) -#ifdef pidInternalWriteableNonTransMin +#ifdef pidInternalWriteableNonTransMin #if pidInternalWritableNonTranMin - 0x6740 #pragma error("pidInternalWritableNonTransMin definition has changed, must change definition of PR_MIME_SIZE") #endif @@ -556,72 +549,70 @@ // State of this inid as far as conversion is concerned. // Reusing mailbox table property -#define PR_CONVERSION_STATE PROP_TAG(PT_LONG, PROP_ID(ptagAdminNickName)) +#define PR_CONVERSION_STATE PROP_TAG(PT_LONG, PROP_ID(ptagAdminNickName)) // Property to represent native html content - assumed to be in the internet // codepage as determined by PR_INTERNET_CPID // -#define PR_HTML PROP_TAG( PT_BINARY, PROP_ID( PR_BODY_HTML ) ) +#define PR_HTML PROP_TAG(PT_BINARY, PROP_ID(PR_BODY_HTML)) // computed property used for moderated folder rule -// its an EntryId whose value is: +// it's an EntryId whose value is: // ptagSenderEntryId on delivery // LOGON::PbUserEntryId() for all other cases (move/copy/post) -#define PR_ACTIVE_USER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x12) +#define PR_ACTIVE_USER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin + 0x12) // Property on conflict notification indicating entryid of conflicting object -#define PR_CONFLICT_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x10) +#define PR_CONFLICT_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin + 0x10) // Property on messages to indicate the language client used to create this message -#define PR_MESSAGE_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x11) -#define PR_MESSAGE_CODEPAGE PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x1D) +#define PR_MESSAGE_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x11) +#define PR_MESSAGE_CODEPAGE PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x1D) // Properties on Quota warning messages to indicate Storage quota and Excess used -#define PR_STORAGE_QUOTA_LIMIT PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x15) -#define PR_EXCESS_STORAGE_USED PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x16) -#define PR_SVR_GENERATING_QUOTA_MSG PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x17) +#define PR_STORAGE_QUOTA_LIMIT PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x15) +#define PR_EXCESS_STORAGE_USED PROP_TAG(PT_LONG, pidExchangeXmitReservedMin + 0x16) +#define PR_SVR_GENERATING_QUOTA_MSG PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin + 0x17) // Property affixed by delegation rule and deleted on forwards -#define PR_DELEGATED_BY_RULE PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x3) +#define PR_DELEGATED_BY_RULE PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin + 0x3) // Message status bit used to indicate message is in conflict -#define MSGSTATUS_IN_CONFLICT ((ULONG) 0x800) +#define MSGSTATUS_IN_CONFLICT ((ULONG)0x800) // Message status bit used to indicate the IMAP4 $MDNSent flag -#define MSGSTATUS_MDNSENT ((ULONG) 0x4000) +#define MSGSTATUS_MDNSENT ((ULONG)0x4000) // used to indicate how much X400 private extension data is present: none, just the // message level, or both the message and recipient levels // !!The high order byte of this ULONG is reserved.!! -#define ENV_BLANK ((ULONG)0x00000000) -#define ENV_RECIP_NUM ((ULONG)0x00000001) -#define ENV_MSG_EXT ((ULONG)0x00000002) -#define ENV_RECIP_EXT ((ULONG)0x00000004) +#define ENV_BLANK ((ULONG)0x00000000) +#define ENV_RECIP_NUM ((ULONG)0x00000001) +#define ENV_MSG_EXT ((ULONG)0x00000002) +#define ENV_RECIP_EXT ((ULONG)0x00000004) - - -#define PR_X400_ENVELOPE_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x13) -#define X400_ENV_PLAIN (ENV_BLANK) // no extension -#define X400_ENV_VALID_RECIP (ENV_RECIP_NUM | ENV_MSG_EXT) // just the message level extension -#define X400_ENV_FULL_EXT (ENV_RECIP_NUM | ENV_MSG_EXT | ENV_RECIP_EXT) // both message and recipient levels +#define PR_X400_ENVELOPE_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin + 0x13) +#define X400_ENV_PLAIN (ENV_BLANK) // no extension +#define X400_ENV_VALID_RECIP (ENV_RECIP_NUM | ENV_MSG_EXT) // just the message level extension +#define X400_ENV_FULL_EXT (ENV_RECIP_NUM | ENV_MSG_EXT | ENV_RECIP_EXT) // both message and recipient levels // // bitmask that indicates whether RN, NRN, DR, NDR, OOF, Auto-Reply should be suppressed // -#define AUTO_RESPONSE_SUPPRESS_DR ((ULONG)0x00000001) -#define AUTO_RESPONSE_SUPPRESS_NDR ((ULONG)0x00000002) -#define AUTO_RESPONSE_SUPPRESS_RN ((ULONG)0x00000004) -#define AUTO_RESPONSE_SUPPRESS_NRN ((ULONG)0x00000008) -#define AUTO_RESPONSE_SUPPRESS_OOF ((ULONG)0x00000010) -#define AUTO_RESPONSE_SUPPRESS_AUTO_REPLY ((ULONG)0x00000020) +#define AUTO_RESPONSE_SUPPRESS_DR ((ULONG)0x00000001) +#define AUTO_RESPONSE_SUPPRESS_NDR ((ULONG)0x00000002) +#define AUTO_RESPONSE_SUPPRESS_RN ((ULONG)0x00000004) +#define AUTO_RESPONSE_SUPPRESS_NRN ((ULONG)0x00000008) +#define AUTO_RESPONSE_SUPPRESS_OOF ((ULONG)0x00000010) +#define AUTO_RESPONSE_SUPPRESS_AUTO_REPLY ((ULONG)0x00000020) // raid 91101 - Flag indicates No RFC821 From field #define AUTO_RESPONSE_SUPPRESS_NORFC821FROM ((ULONG)0x00000040) -#define PR_AUTO_RESPONSE_SUPPRESS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x01) -#define PR_INTERNET_CPID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x02) +#define PR_AUTO_RESPONSE_SUPPRESS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x01) +#define PR_INTERNET_CPID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x02) -#define PR_SYNCEVENT_FIRED PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin + 0x0F) +#define PR_SYNCEVENT_FIRED PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin + 0x0F) /*------------------------------------------------------------------------ * @@ -631,8 +622,7 @@ // Appears on attachments to a message marked to be in conflict. Identifies // those attachments which are conflicting versions of the top level message -#define PR_IN_CONFLICT PROP_TAG(PT_BOOLEAN, pidAttachReadOnlyMin) - +#define PR_IN_CONFLICT PROP_TAG(PT_BOOLEAN, pidAttachReadOnlyMin) /*------------------------------------------------------------------------ * @@ -642,67 +632,66 @@ // Indicates when a message, folder, or mailbox has been deleted. // (Read only, non transmittable property). -#define PR_DELETED_ON PROP_TAG(PT_SYSTIME, pidSpecialMin+0x1F) +#define PR_DELETED_ON PROP_TAG(PT_SYSTIME, pidSpecialMin + 0x1F) // Read-only folder properties which indicate the number of messages, and child folders // that have been "soft" deleted in this folder (and the time the first message was deleted). -#define PR_DELETED_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin+0x08) -#define PR_DELETED_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin+0x0B) -#define PR_DELETED_FOLDER_COUNT PROP_TAG(PT_LONG, pidFolderMin + 0x09) -#define PR_OLDEST_DELETED_ON PROP_TAG(PT_SYSTIME, pidFolderMin + 0x0A) +#define PR_DELETED_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin + 0x08) +#define PR_DELETED_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin + 0x0B) +#define PR_DELETED_FOLDER_COUNT PROP_TAG(PT_LONG, pidFolderMin + 0x09) +#define PR_OLDEST_DELETED_ON PROP_TAG(PT_SYSTIME, pidFolderMin + 0x0A) // Total size of all soft deleted messages -#define PR_DELETED_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0xB) +#define PR_DELETED_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0xB) // Total size of all normal soft deleted messages -#define PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0xC) +#define PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0xC) // Total size of all associated soft deleted messages -#define PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0xD) +#define PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0xD) // This property controls the retention age limit (minutes) for the Private/Public MDB, // Mailbox (private only), or Folder (public). // Note - the Folder/Mailbox retention, if set, overrides the MDB retention. -#define PR_RETENTION_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x34) +#define PR_RETENTION_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x34) // This property controls if we maintain per user read/unread for a public // folder. By default (if this property is missing or set to FALSE) we will // maintain per user read/unread. -#define PR_DISABLE_PERUSER_READ PROP_TAG(PT_BOOLEAN, pidAdminMin+0x35) +#define PR_DISABLE_PERUSER_READ PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x35) // This property is set by JET after a full backup has occurred. // It is used to determine whether or not messages and folders can be "hard" deleted // before a full backup has captured the last modification to the object. -#define PR_LAST_FULL_BACKUP PROP_TAG(PT_SYSTIME, pidSpecialMin+0x15) +#define PR_LAST_FULL_BACKUP PROP_TAG(PT_SYSTIME, pidSpecialMin + 0x15) /*------------------------------------------------------------------------ * URL related properties *-----------------------------------------------------------------------*/ // This is read only property. -#define PR_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x77) //0x6707 -#define PR_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x77) -#define PR_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x77) +#define PR_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x77) // 0x6707 +#define PR_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin + 0x77) +#define PR_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin + 0x77) // This is a read-write property. -#define PR_URL_COMP_NAME PROP_TAG(PT_TSTRING, pidRenMsgFldMin+0x73) -#define PR_URL_COMP_NAME_A PROP_TAG(PT_STRING8, pidRenMsgFldMin+0x73) -#define PR_URL_COMP_NAME_W PROP_TAG(PT_UNICODE, pidRenMsgFldMin+0x73) +#define PR_URL_COMP_NAME PROP_TAG(PT_TSTRING, pidRenMsgFldMin + 0x73) +#define PR_URL_COMP_NAME_A PROP_TAG(PT_STRING8, pidRenMsgFldMin + 0x73) +#define PR_URL_COMP_NAME_W PROP_TAG(PT_UNICODE, pidRenMsgFldMin + 0x73) // this is a read-only property -#define PR_PARENT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7D) // 0x670d -#define PR_PARENT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7D) -#define PR_PARENT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7D) +#define PR_PARENT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x7D) // 0x670d +#define PR_PARENT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin + 0x7D) +#define PR_PARENT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin + 0x7D) // read-only property -#define PR_FLAT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7E) // 0x670e -#define PR_FLAT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7E) -#define PR_FLAT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7E) +#define PR_FLAT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x7E) // 0x670e +#define PR_FLAT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin + 0x7E) +#define PR_FLAT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin + 0x7E) // read-only property -#define PR_SRC_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7F) // 0x670f -#define PR_SRC_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7F) -#define PR_SRC_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7F) - +#define PR_SRC_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x7F) // 0x670f +#define PR_SRC_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin + 0x7F) +#define PR_SRC_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin + 0x7F) // Constant wstring to specify URL with fid encoded directly in the URL // For example, URL L"/~FlatUrlSpace/1-401" will refer to folder with FID 1-401 @@ -710,23 +699,23 @@ // in that folder. // But remember that the FID/MID have to be long term, i.e GUID-Globcnt, // the replid used above is simply to explain the idea simpler. -#define WSZ_URL_FLAT_FOLDER_SPACE L"/-FlatUrlSpace-/" -#define cwchUrlFlatFolderSpace 16 +#define WSZ_URL_FLAT_FOLDER_SPACE L"/-FlatUrlSpace-/" +#define cwchUrlFlatFolderSpace 16 // Property that defines whether a folder is secure or not -#define PR_SECURE_IN_SITE PROP_TAG(PT_BOOLEAN, pidAdminMin+0xE) +#define PR_SECURE_IN_SITE PROP_TAG(PT_BOOLEAN, pidAdminMin + 0xE) // PR_LOCAL_COMMIT_TIME is maintained on folders and messages. It is the // FileTime when the object was modified last on the given MDB. It is updated // any time the object is modified (including replicated in change).This is // strictly computed, non-transmittable and non-copyable. -#define PR_LOCAL_COMMIT_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x79) +#define PR_LOCAL_COMMIT_TIME PROP_TAG(PT_SYSTIME, pidAdminMin + 0x79) // PR_LOCAL_COMMIT_TIME_MAX is maintained on folders only. // It is >= PR_LOCAL_COMMIT_TIME of all messages in the folder. It is updated // any time any message in the folder is modified. This is strictly computed, // non-transmittable and non-copyable. -#define PR_LOCAL_COMMIT_TIME_MAX PROP_TAG(PT_SYSTIME, pidAdminMin+0x7a) +#define PR_LOCAL_COMMIT_TIME_MAX PROP_TAG(PT_SYSTIME, pidAdminMin + 0x7a) // PR_DELETED_COUNT_TOTAL is maintained on folders only. // It is the total number of messages deleted in this folder from the beginning @@ -735,14 +724,14 @@ // 4 bytes, it will start again at 0. This is updated whenever a message in the // folder is deleted. This is strictly computed, non-transmitabble and // non-copyable. -#define PR_DELETED_COUNT_TOTAL PROP_TAG(PT_LONG, pidAdminMin+0x7b) +#define PR_DELETED_COUNT_TOTAL PROP_TAG(PT_LONG, pidAdminMin + 0x7b) -// PR_AUTO_RESET is maintained on messages only. Its PT_MV_CLSID and is deleted +// PR_AUTO_RESET is maintained on messages only. It's PT_MV_CLSID and is deleted // (by the store) anytime a message is saved, if it has not been // explicitly set on the message between the time it was opened and saved // (by the user/app that opened and later saved the message). // It is intended to be used by async callback agents. -#define PR_AUTO_RESET PROP_TAG(PT_MV_CLSID, pidAdminMin+0x7c) +#define PR_AUTO_RESET PROP_TAG(PT_MV_CLSID, pidAdminMin + 0x7c) /*------------------------------------------------------------------------ * @@ -752,14 +741,13 @@ * *-----------------------------------------------------------------------*/ -//This property can be used in a contents table to get PR_ENTRYID returned -//as a long term entryid instead of a short term entryid. -#define PR_LONGTERM_ENTRYID_FROM_TABLE PROP_TAG(PT_BINARY, pidSpecialMin) +// This property can be used in a contents table to get PR_ENTRYID returned +// as a long term entryid instead of a short term entryid. +#define PR_LONGTERM_ENTRYID_FROM_TABLE PROP_TAG(PT_BINARY, pidSpecialMin) // This is read only property that is used for contents tables that include // subfolder entries. -#define PR_SUBFOLDER PROP_TAG(PT_BOOLEAN, pidAdminMin+0x78) - +#define PR_SUBFOLDER PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x78) /*------------------------------------------------------------------------ * @@ -769,25 +757,25 @@ * *-----------------------------------------------------------------------*/ -#define PR_ORIGINATOR_NAME PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x3) -#define PR_ORIGINATOR_ADDR PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x4) -#define PR_ORIGINATOR_ADDRTYPE PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x5) -#define PR_ORIGINATOR_ENTRYID PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x6) -#define PR_ARRIVAL_TIME PROP_TAG( PT_SYSTIME, pidMessageWriteableMin+0x7) -#define PR_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x8) -#define PR_INTERNAL_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x12) -#define PR_SUBJECT_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x9) -#define PR_RECIPIENT_NUMBER PROP_TAG( PT_LONG, pidMessageWriteableMin+0xA) -#define PR_MTS_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xB) -#define PR_REPORT_DESTINATION_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin+0xC) -#define PR_REPORT_DESTINATION_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xD) -#define PR_CONTENT_SEARCH_KEY PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xE) -#define PR_FOREIGN_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xF) -#define PR_FOREIGN_REPORT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x10) -#define PR_FOREIGN_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x11) -#define PR_PROMOTE_PROP_ID_LIST PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x13) -#define PR_MTS_ID PR_MESSAGE_SUBMISSION_ID -#define PR_MTS_REPORT_ID PR_MESSAGE_SUBMISSION_ID +#define PR_ORIGINATOR_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin + 0x3) +#define PR_ORIGINATOR_ADDR PROP_TAG(PT_TSTRING, pidMessageWriteableMin + 0x4) +#define PR_ORIGINATOR_ADDRTYPE PROP_TAG(PT_TSTRING, pidMessageWriteableMin + 0x5) +#define PR_ORIGINATOR_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x6) +#define PR_ARRIVAL_TIME PROP_TAG(PT_SYSTIME, pidMessageWriteableMin + 0x7) +#define PR_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x8) +#define PR_INTERNAL_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x12) +#define PR_SUBJECT_TRACE_INFO PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x9) +#define PR_RECIPIENT_NUMBER PROP_TAG(PT_LONG, pidMessageWriteableMin + 0xA) +#define PR_MTS_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0xB) +#define PR_REPORT_DESTINATION_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin + 0xC) +#define PR_REPORT_DESTINATION_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0xD) +#define PR_CONTENT_SEARCH_KEY PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0xE) +#define PR_FOREIGN_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0xF) +#define PR_FOREIGN_REPORT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x10) +#define PR_FOREIGN_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x11) +#define PR_PROMOTE_PROP_ID_LIST PROP_TAG(PT_BINARY, pidMessageWriteableMin + 0x13) +#define PR_MTS_ID PR_MESSAGE_SUBMISSION_ID +#define PR_MTS_REPORT_ID PR_MESSAGE_SUBMISSION_ID /*------------------------------------------------------------------------ * @@ -797,62 +785,58 @@ * *-----------------------------------------------------------------------*/ -#define MAX_ADMD_NAME_SIZ 17 -#define MAX_PRMD_NAME_SIZ 17 -#define MAX_COUNTRY_NAME_SIZ 4 -#define MAX_MTA_NAME_SIZ 33 +#define MAX_ADMD_NAME_SIZ 17 +#define MAX_PRMD_NAME_SIZ 17 +#define MAX_COUNTRY_NAME_SIZ 4 +#define MAX_MTA_NAME_SIZ 33 -#define ADMN_PAD 3 -#define PRMD_PAD 3 -#define COUNTRY_PAD 0 -#define MTA_PAD 3 -#define PRMD_PAD_FOR_ACTIONS 2 -#define MTA_PAD_FOR_ACTIONS 2 +#define ADMN_PAD 3 +#define PRMD_PAD 3 +#define COUNTRY_PAD 0 +#define MTA_PAD 3 +#define PRMD_PAD_FOR_ACTIONS 2 +#define MTA_PAD_FOR_ACTIONS 2 typedef struct { - LONG lAction; // The routing action the tracing site - // took.(1984 actions only) - FILETIME ftArrivalTime; // The time at which the communique - // entered the tracing site. - FILETIME ftDeferredTime; // The time are which the tracing site - // released the message. - char rgchADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // ADMD - char rgchCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Country - char rgchPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // PRMD - char rgchAttADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // Attempted ADMD - char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Attempted Country - char rgchAttPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD_FOR_ACTIONS]; // Attempted PRMD - BYTE bAdditionalActions; // 1998 additional actions -} TRACEENTRY, FAR * LPTRACEENTRY; + LONG lAction; // The routing action the tracing site + // took.(1984 actions only) + FILETIME ftArrivalTime; // The time at which the communique + // entered the tracing site. + FILETIME ftDeferredTime; // The time are which the tracing site + // released the message. + char rgchADMDName[MAX_ADMD_NAME_SIZ + ADMN_PAD]; // ADMD + char rgchCountryName[MAX_COUNTRY_NAME_SIZ + COUNTRY_PAD]; // Country + char rgchPRMDId[MAX_PRMD_NAME_SIZ + PRMD_PAD]; // PRMD + char rgchAttADMDName[MAX_ADMD_NAME_SIZ + ADMN_PAD]; // Attempted ADMD + char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ + COUNTRY_PAD]; // Attempted Country + char rgchAttPRMDId[MAX_PRMD_NAME_SIZ + PRMD_PAD_FOR_ACTIONS]; // Attempted PRMD + BYTE bAdditionalActions; // 1998 additional actions +} TRACEENTRY, FAR *LPTRACEENTRY; typedef struct { - ULONG cEntries; // Number of trace entries - TRACEENTRY rgtraceentry[MAPI_DIM]; // array of trace entries -} TRACEINFO, FAR * LPTRACEINFO; - -typedef struct -{ - LONG lAction; // The 1984 routing action the tracing domain took. - FILETIME ftArrivalTime; // The time at which the communique entered the tracing domain. - FILETIME ftDeferredTime; // The time are which the tracing domain released the message. - char rgchADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // ADMD - char rgchCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Country - char rgchPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // PRMD - char rgchAttADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // Attempted ADMD - char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Attempted Country - char rgchAttPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // Attempted PRMD - char rgchMTAName[MAX_MTA_NAME_SIZ+MTA_PAD]; // MTA Name - char rgchAttMTAName[MAX_MTA_NAME_SIZ+MTA_PAD_FOR_ACTIONS]; // Attempted MTA Name - BYTE bAdditionalActions; // 1988 additional actions -}INTTRACEENTRY, *PINTTRACEENTRY; - - -typedef struct -{ - ULONG cEntries; // Number of trace entries - INTTRACEENTRY rgIntTraceEntry[MAPI_DIM]; // array of internal trace entries -}INTTRACEINFO, *PINTTRACEINFO; + ULONG cEntries; // Number of trace entries + TRACEENTRY rgtraceentry[MAPI_DIM]; // array of trace entries +} TRACEINFO, FAR *LPTRACEINFO; +typedef struct { + LONG lAction; // The 1984 routing action the tracing domain took. + FILETIME ftArrivalTime; // The time at which the communique entered the tracing domain. + FILETIME ftDeferredTime; // The time are which the tracing domain released the message. + char rgchADMDName[MAX_ADMD_NAME_SIZ + ADMN_PAD]; // ADMD + char rgchCountryName[MAX_COUNTRY_NAME_SIZ + COUNTRY_PAD]; // Country + char rgchPRMDId[MAX_PRMD_NAME_SIZ + PRMD_PAD]; // PRMD + char rgchAttADMDName[MAX_ADMD_NAME_SIZ + ADMN_PAD]; // Attempted ADMD + char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ + COUNTRY_PAD]; // Attempted Country + char rgchAttPRMDId[MAX_PRMD_NAME_SIZ + PRMD_PAD]; // Attempted PRMD + char rgchMTAName[MAX_MTA_NAME_SIZ + MTA_PAD]; // MTA Name + char rgchAttMTAName[MAX_MTA_NAME_SIZ + MTA_PAD_FOR_ACTIONS]; // Attempted MTA Name + BYTE bAdditionalActions; // 1988 additional actions +} INTTRACEENTRY, *PINTTRACEENTRY; + +typedef struct { + ULONG cEntries; // Number of trace entries + INTTRACEENTRY rgIntTraceEntry[MAPI_DIM]; // array of internal trace entries +} INTTRACEINFO, *PINTTRACEINFO; /*------------------------------------------------------------------------ * @@ -862,85 +846,74 @@ typedef struct * *-----------------------------------------------------------------------*/ - /* ulRowFlags */ -#define ROWLIST_REPLACE ((ULONG)1) - -#define ROW_ADD ((ULONG)1) -#define ROW_MODIFY ((ULONG)2) -#define ROW_REMOVE ((ULONG)4) -#define ROW_EMPTY (ROW_ADD|ROW_REMOVE) - -typedef struct _ROWENTRY -{ - ULONG ulRowFlags; - ULONG cValues; - LPSPropValue rgPropVals; -} ROWENTRY, FAR * LPROWENTRY; - -typedef struct _ROWLIST -{ - ULONG cEntries; - ROWENTRY aEntries[MAPI_DIM]; -} ROWLIST, FAR * LPROWLIST; - -#define EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(GetTable) \ - (THIS_ ULONG ulFlags, \ - LPMAPITABLE FAR * lppTable) IPURE; \ - MAPIMETHOD(ModifyTable) \ - (THIS_ ULONG ulFlags, \ - LPROWLIST lpMods) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeModifyTable -DECLARE_MAPI_INTERFACE_(IExchangeModifyTable, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(PURE) -}; -#undef IMPL +#define ROWLIST_REPLACE ((ULONG)1) + +#define ROW_ADD ((ULONG)1) +#define ROW_MODIFY ((ULONG)2) +#define ROW_REMOVE ((ULONG)4) +#define ROW_EMPTY (ROW_ADD | ROW_REMOVE) + +typedef struct _ROWENTRY { + ULONG ulRowFlags; + ULONG cValues; + LPSPropValue rgPropVals; +} ROWENTRY, FAR *LPROWENTRY; + +typedef struct _ROWLIST { + ULONG cEntries; + ROWENTRY aEntries[MAPI_DIM]; +} ROWLIST, FAR *LPROWLIST; + +#define EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(GetTable) \ + (THIS_ ULONG ulFlags, LPMAPITABLE FAR * lppTable) IPURE; \ + MAPIMETHOD(ModifyTable) \ + (THIS_ ULONG ulFlags, LPROWLIST lpMods) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeModifyTable +DECLARE_MAPI_INTERFACE_(IExchangeModifyTable, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(PURE)}; +#undef IMPL #define IMPL -DECLARE_MAPI_INTERFACE_PTR(IExchangeModifyTable, LPEXCHANGEMODIFYTABLE); +DECLARE_MAPI_INTERFACE_PTR(IExchangeModifyTable, LPEXCHANGEMODIFYTABLE); /* Special flag bit for GetContentsTable, GetHierarchyTable and - OpenEntry. - Supported by > 5.x servers - If set in GetContentsTable and GetHierarchyTable - we will show only items that are soft deleted, i.e deleted - by user but not yet purged from the system. If set in OpenEntry - we will open this item even if it is soft deleted */ + OpenEntry. + Supported by > 5.x servers + If set in GetContentsTable and GetHierarchyTable + we will show only items that are soft deleted, i.e deleted + by user but not yet purged from the system. If set in OpenEntry + we will open this item even if it is soft deleted */ /* Flag bits must not collide by existing definitions in Mapi */ /****** MAPI_UNICODE ((ULONG) 0x80000000) above */ /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */ /****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */ /****** CONVENIENT_DEPTH ((ULONG) 0x00000001) */ -#define SHOW_SOFT_DELETES ((ULONG) 0x00000002) -#define SHOW_SUBFOLDERS ((ULONG) 0x00000004) +#define SHOW_SOFT_DELETES ((ULONG)0x00000002) +#define SHOW_SUBFOLDERS ((ULONG)0x00000004) // reserved flag bit(s) - do not set -#define MAPI_RESERVED1 ((ULONG) 0x00010000) +#define MAPI_RESERVED1 ((ULONG)0x00010000) // Do not block this OpenMessage (MAPI's OpenEntry) -#define MDB_OPEN_MSG_NO_BLOCK ((ULONG) 0x00000020) +#define MDB_OPEN_MSG_NO_BLOCK ((ULONG)0x00000020) // Unlock a MID at SaveChanges /****** KEEP_OPEN_READONLY ((ULONG) 0x00000001) */ /****** KEEP_OPEN_READWRITE ((ULONG) 0x00000002) */ /****** FORCE_SAVE ((ULONG) 0x00000004) */ /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) */ -#define MDB_SAVE_MSG_UNLOCK ((ULONG) 0x00000040) - +#define MDB_SAVE_MSG_UNLOCK ((ULONG)0x00000040) /* Special flag bit for DeleteFolder - Supported by > 5.x servers - If set the server will hard delete the folder (i.e it will not be - retained for later recovery) */ + Supported by > 5.x servers + If set the server will hard delete the folder (i.e it will not be + retained for later recovery) */ /* Flag bits must not collide by existing definitions in Mapi */ /* DeleteFolder */ /***** #define DEL_MESSAGES ((ULONG) 0x00000001) */ @@ -949,33 +922,32 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeModifyTable, LPEXCHANGEMODIFYTABLE); /* EmptyFolder */ /***** #define DEL_ASSOCIATED ((ULONG) 0x00000008) */ -#define DELETE_HARD_DELETE ((ULONG) 0x00000010) +#define DELETE_HARD_DELETE ((ULONG)0x00000010) /* Access Control Specifics */ -//Properties -#define PR_MEMBER_ID PROP_TAG(PT_I8, pidSpecialMin+0x01) -#define PR_MEMBER_NAME PROP_TAG(PT_TSTRING, pidSpecialMin+0x02) -#define PR_MEMBER_ENTRYID PR_ENTRYID -#define PR_MEMBER_RIGHTS PROP_TAG(PT_LONG, pidSpecialMin+0x03) +// Properties +#define PR_MEMBER_ID PROP_TAG(PT_I8, pidSpecialMin + 0x01) +#define PR_MEMBER_NAME PROP_TAG(PT_TSTRING, pidSpecialMin + 0x02) +#define PR_MEMBER_ENTRYID PR_ENTRYID +#define PR_MEMBER_RIGHTS PROP_TAG(PT_LONG, pidSpecialMin + 0x03) -//Security bits +// Security bits typedef DWORD RIGHTS; -#define frightsReadAny 0x0000001L -#define frightsCreate 0x0000002L -#define frightsEditOwned 0x0000008L -#define frightsDeleteOwned 0x0000010L -#define frightsEditAny 0x0000020L -#define frightsDeleteAny 0x0000040L -#define frightsCreateSubfolder 0x0000080L -#define frightsOwner 0x0000100L -#define frightsContact 0x0000200L // NOTE: not part of rightsAll -#define frightsVisible 0x0000400L -#define rightsNone 0x00000000 -#define rightsReadOnly frightsReadAny -#define rightsReadWrite (frightsReadAny|frightsEditAny) -#define rightsAll 0x00005FBL - +#define frightsReadAny 0x0000001L +#define frightsCreate 0x0000002L +#define frightsEditOwned 0x0000008L +#define frightsDeleteOwned 0x0000010L +#define frightsEditAny 0x0000020L +#define frightsDeleteAny 0x0000040L +#define frightsCreateSubfolder 0x0000080L +#define frightsOwner 0x0000100L +#define frightsContact 0x0000200L // NOTE: not part of rightsAll +#define frightsVisible 0x0000400L +#define rightsNone 0x00000000 +#define rightsReadOnly frightsReadAny +#define rightsReadWrite (frightsReadAny | frightsEditAny) +#define rightsAll 0x00005FBL // // Mailbox specific access rights. @@ -988,91 +960,94 @@ typedef DWORD RIGHTS; // #define fsdpermUserDeleteMailbox DELETE #define fsdpermUserMailboxOwner 0x00000001 -#define fsdpermUserSendAs 0x00000002 -#define fsdpermUserPrimaryUser 0x00000004 - +#define fsdpermUserSendAs 0x00000002 +#define fsdpermUserPrimaryUser 0x00000004 -#define sdpermUserGenericRead (STANDARD_RIGHTS_READ) +#define sdpermUserGenericRead (STANDARD_RIGHTS_READ) // generic execute -#define sdpermUserGenericExecute (STANDARD_RIGHTS_EXECUTE) +#define sdpermUserGenericExecute (STANDARD_RIGHTS_EXECUTE) // generic write -#define sdpermUserGenericWrite (STANDARD_RIGHTS_WRITE | fsdpermUserDeleteMailbox) +#define sdpermUserGenericWrite (STANDARD_RIGHTS_WRITE | fsdpermUserDeleteMailbox) // generic all -#define sdpermUserGenericAll (STANDARD_RIGHTS_ALL | fsdpermUserMailboxOwner | fsdpermUserSendAs | fsdpermUserPrimaryUser) +#define sdpermUserGenericAll \ + (STANDARD_RIGHTS_ALL | fsdpermUserMailboxOwner | fsdpermUserSendAs | fsdpermUserPrimaryUser) // // Message specific rights. // typedef DWORD SDRIGHTS; -#define fsdrightReadBody 0x00000001 //** ONLY ON MESSAGES, SAME AS FILE_READ_DATA -#define fsdrightListContents 0x00000001 //** ONLY ON FOLDERS, SAME AS FILE_LIST_DATA - IGNORED -#define fsdrightWriteBody 0x00000002 //** ONLY ON MESSAGES, SAME AS FILE_WRITE_DATA -#define fsdrightCreateItem 0x00000002 //** ONLY ON FOLDERs, SAME AS FILE_ADD_FILE +#define fsdrightReadBody 0x00000001 //** ONLY ON MESSAGES, SAME AS FILE_READ_DATA +#define fsdrightListContents 0x00000001 //** ONLY ON FOLDERS, SAME AS FILE_LIST_DATA - IGNORED +#define fsdrightWriteBody 0x00000002 //** ONLY ON MESSAGES, SAME AS FILE_WRITE_DATA +#define fsdrightCreateItem 0x00000002 //** ONLY ON FOLDERs, SAME AS FILE_ADD_FILE -#define fsdrightAppendMsg 0x00000004 //** ONLY ON MESSAGES, SAME AS FILE_WRITE_DATA. ENFORCED BY IFS. -#define fsdrightCreateContainer 0x00000004 //** ONLY ON FOLDERS, SAME AS FILE_ADD_FILE +#define fsdrightAppendMsg 0x00000004 //** ONLY ON MESSAGES, SAME AS FILE_WRITE_DATA. ENFORCED BY IFS. +#define fsdrightCreateContainer 0x00000004 //** ONLY ON FOLDERS, SAME AS FILE_ADD_FILE -#define fsdrightReadProperty 0x00000008 //** SAME AS FILE_READ_EA -#define fsdrightWriteProperty 0x00000010 //** SAME AS FILE_WRITE_EA +#define fsdrightReadProperty 0x00000008 //** SAME AS FILE_READ_EA +#define fsdrightWriteProperty 0x00000010 //** SAME AS FILE_WRITE_EA -#define fsdrightExecute 0x00000020 // Same as FILE_EXECUTE/FILE_TRAVERSE. ENFORCED BY IFS -#define fsdrightReserved1 0x00000040 // Same as FILE_DELETE_CHILD.. Currently unused -#define fsdrightReadAttributes 0x00000080 // Same as FILE_READ_ATTRIBUTES. Currently unused -#define fsdrightWriteAttributes 0x00000100 // Same as FILE_WRITE_ATTRIBUTES. Currently unused +#define fsdrightExecute 0x00000020 // Same as FILE_EXECUTE/FILE_TRAVERSE. ENFORCED BY IFS +#define fsdrightReserved1 0x00000040 // Same as FILE_DELETE_CHILD.. Currently unused +#define fsdrightReadAttributes 0x00000080 // Same as FILE_READ_ATTRIBUTES. Currently unused +#define fsdrightWriteAttributes 0x00000100 // Same as FILE_WRITE_ATTRIBUTES. Currently unused -#define fsdrightWriteOwnProperty 0x00000200 //** ONLY ON MESSAGES -#define fsdrightDeleteOwnItem 0x00000400 //** ONLY ON MESSAGES -#define fsdrightViewItem 0x00000800 -#define fsdrightOwner 0x00004000 //** ONLY ON FOLDERS -#define fsdrightContact 0x00008000 //** ONLY ON FOLDERS +#define fsdrightWriteOwnProperty 0x00000200 //** ONLY ON MESSAGES +#define fsdrightDeleteOwnItem 0x00000400 //** ONLY ON MESSAGES +#define fsdrightViewItem 0x00000800 +#define fsdrightOwner 0x00004000 //** ONLY ON FOLDERS +#define fsdrightContact 0x00008000 //** ONLY ON FOLDERS // // Standard NT rights. // -#define fsdrightWriteSD WRITE_DAC -#define fsdrightDelete DELETE -#define fsdrightWriteOwner WRITE_OWNER -#define fsdrightReadControl READ_CONTROL -#define fsdrightSynchronize SYNCHRONIZE - -#define sdrightsNone 0x00000000 -#define sdrightsBestAccess MAXIMUM_ALLOWED -#define sdrightsReadOnly GENERIC_READ -#define sdrightsReadWrite GENERIC_READ | GENERIC_WRITE - -#define sdrightsGenericRead (fsdrightReadControl | fsdrightReadBody | fsdrightReadAttributes | fsdrightReadProperty | fsdrightViewItem |\ - fsdrightSynchronize) -#define sdrightsGenericWrite (fsdrightReadControl | fsdrightWriteBody | fsdrightWriteAttributes | fsdrightWriteProperty | \ - fsdrightAppendMsg | fsdrightCreateItem | fsdrightDelete | fsdrightCreateContainer | \ - fsdrightOwner | fsdrightSynchronize | fsdrightWriteSD | fsdrightWriteOwner) - -#define sdrightsGenericExecute (fsdrightReadControl | fsdrightReadAttributes | fsdrightExecute | fsdrightViewItem | fsdrightSynchronize) - -#define sdrightsGenericAll (fsdrightDelete | fsdrightReadProperty | fsdrightWriteProperty |\ - fsdrightCreateItem | fsdrightCreateContainer | fsdrightReadControl | fsdrightWriteSD |\ - fsdrightWriteOwner | fsdrightReadControl | \ - fsdrightViewItem | fsdrightOwner | \ - fsdrightWriteOwnProperty | fsdrightDeleteOwnItem | fsdrightSynchronize | \ - fsdrightExecute | fsdrightReserved1 | fsdrightReadAttributes | fsdrightWriteAttributes | \ - fsdrightReadBody | fsdrightWriteBody | fsdrightSynchronize | fsdrightContact) +#define fsdrightWriteSD WRITE_DAC +#define fsdrightDelete DELETE +#define fsdrightWriteOwner WRITE_OWNER +#define fsdrightReadControl READ_CONTROL +#define fsdrightSynchronize SYNCHRONIZE + +#define sdrightsNone 0x00000000 +#define sdrightsBestAccess MAXIMUM_ALLOWED +#define sdrightsReadOnly GENERIC_READ +#define sdrightsReadWrite GENERIC_READ | GENERIC_WRITE + +#define sdrightsGenericRead \ + (fsdrightReadControl | fsdrightReadBody | fsdrightReadAttributes | fsdrightReadProperty | fsdrightViewItem | \ + fsdrightSynchronize) +#define sdrightsGenericWrite \ + (fsdrightReadControl | fsdrightWriteBody | fsdrightWriteAttributes | fsdrightWriteProperty | fsdrightAppendMsg | \ + fsdrightCreateItem | fsdrightDelete | fsdrightCreateContainer | fsdrightOwner | fsdrightSynchronize | \ + fsdrightWriteSD | fsdrightWriteOwner) + +#define sdrightsGenericExecute \ + (fsdrightReadControl | fsdrightReadAttributes | fsdrightExecute | fsdrightViewItem | fsdrightSynchronize) + +#define sdrightsGenericAll \ + (fsdrightDelete | fsdrightReadProperty | fsdrightWriteProperty | fsdrightCreateItem | fsdrightCreateContainer | \ + fsdrightReadControl | fsdrightWriteSD | fsdrightWriteOwner | fsdrightReadControl | fsdrightViewItem | \ + fsdrightOwner | fsdrightWriteOwnProperty | fsdrightDeleteOwnItem | fsdrightSynchronize | fsdrightExecute | \ + fsdrightReserved1 | fsdrightReadAttributes | fsdrightWriteAttributes | fsdrightReadBody | fsdrightWriteBody | \ + fsdrightSynchronize | fsdrightContact) // // SDRights that together make up rightsOwner. // -#define sdrightsFolderOwner (fsdrightWriteProperty | fsdrightOwner | fsdrightWriteSD | fsdrightDelete | \ - fsdrightWriteOwner | fsdrightWriteAttributes) +#define sdrightsFolderOwner \ + (fsdrightWriteProperty | fsdrightOwner | fsdrightWriteSD | fsdrightDelete | fsdrightWriteOwner | \ + fsdrightWriteAttributes) // // Rights that are valid on folders. // -#define sdrightsFolders (fsdrightDelete | fsdrightReadProperty | fsdrightReadAttributes | \ - fsdrightWriteProperty | fsdrightWriteAttributes | fsdrightWriteOwner | \ - fsdrightReadControl | fsdrightWriteSD | fsdrightExecute | \ - fsdrightCreateContainer | fsdrightViewItem | fsdrightOwner | \ - fsdrightContact | fsdrightCreateItem | fsdrightSynchronize | fsdrightListContents | fsdrightReserved1) +#define sdrightsFolders \ + (fsdrightDelete | fsdrightReadProperty | fsdrightReadAttributes | fsdrightWriteProperty | \ + fsdrightWriteAttributes | fsdrightWriteOwner | fsdrightReadControl | fsdrightWriteSD | fsdrightExecute | \ + fsdrightCreateContainer | fsdrightViewItem | fsdrightOwner | fsdrightContact | fsdrightCreateItem | \ + fsdrightSynchronize | fsdrightListContents | fsdrightReserved1) // // Rights that are valid on messages. @@ -1080,30 +1055,31 @@ typedef DWORD SDRIGHTS; // // NB: fsdrightWriteOwnProperty/fsdrightDeleteOwnItem are NOT in this list. // -#define sdrightsItems (fsdrightDelete | fsdrightReadBody | fsdrightReadAttributes | fsdrightReadProperty | \ - fsdrightWriteProperty | fsdrightWriteBody | fsdrightWriteAttributes | fsdrightReadControl | \ - fsdrightWriteOwner | fsdrightWriteSD | fsdrightViewItem | fsdrightWriteOwnProperty | \ - fsdrightDeleteOwnItem | fsdrightSynchronize | fsdrightExecute | fsdrightAppendMsg) +#define sdrightsItems \ + (fsdrightDelete | fsdrightReadBody | fsdrightReadAttributes | fsdrightReadProperty | fsdrightWriteProperty | \ + fsdrightWriteBody | fsdrightWriteAttributes | fsdrightReadControl | fsdrightWriteOwner | fsdrightWriteSD | \ + fsdrightViewItem | fsdrightWriteOwnProperty | fsdrightDeleteOwnItem | fsdrightSynchronize | fsdrightExecute | \ + fsdrightAppendMsg) // // These access rights are ignored in the determination of a canonical ACL. Since the exchange store ignores // these rights, their presence or absense doesn't make an ACL canonical. // -#define sdrightsIgnored (fsdrightExecute | fsdrightAppendMsg | fsdrightContact | fsdrightReserved1) +#define sdrightsIgnored (fsdrightExecute | fsdrightAppendMsg | fsdrightContact | fsdrightReserved1) // // Backwards Compatible rights definitions. // -#define msgrightsGenericRead (sdrightsGenericRead & sdrightsItems) -#define msgrightsGenericWrite (sdrightsGenericWrite & sdrightsItems) -#define msgrightsGenericExecute (sdrightsGenericExecute & sdrightsItems) -#define msgrightsGenericAll (sdrightsGenericAll & sdrightsItems) +#define msgrightsGenericRead (sdrightsGenericRead & sdrightsItems) +#define msgrightsGenericWrite (sdrightsGenericWrite & sdrightsItems) +#define msgrightsGenericExecute (sdrightsGenericExecute & sdrightsItems) +#define msgrightsGenericAll (sdrightsGenericAll & sdrightsItems) -#define fldrightsGenericRead (sdrightsGenericRead & sdrightsFolders) -#define fldrightsGenericWrite (sdrightsGenericWrite & sdrightsFolders) -#define fldrightsGenericExecute (sdrightsGenericExecute & sdrightsFolders) -#define fldrightsGenericAll (sdrightsGenericAll & sdrightsFolders) +#define fldrightsGenericRead (sdrightsGenericRead & sdrightsFolders) +#define fldrightsGenericWrite (sdrightsGenericWrite & sdrightsFolders) +#define fldrightsGenericExecute (sdrightsGenericExecute & sdrightsFolders) +#define fldrightsGenericAll (sdrightsGenericAll & sdrightsFolders) // // If set in the RM control field of an NTSD, allows @@ -1120,14 +1096,15 @@ typedef DWORD SDRIGHTS; #define SET_GUID_PROP_ID(pguid, ptag) (pguid)->Data1 = PROP_ID(ptag) #define SET_GUID_SUB_PROP_ID(pguid, ptag, subptag) (pguid)->Data1 = (PROP_ID(ptag) | PROP_ID(subptag) << 16) -#define PROPERTY_GUID(ptag) { PROP_ID(ptag), \ - 0x6585, 0x11d3, \ - {0xb6, 0x19, 0x00, 0xaa, 0x00, 0x4b, 0x9c, 0x30}} \ - -#define SUB_PROPERTY_GUID(ptag, subptag) { PROP_ID(subptag) << 16 | PROP_ID(ptag), \ - 0x6585, 0x11d3, \ - {0xb6, 0x19, 0x00, 0xaa, 0x00, 0x4b, 0x9c, 0x30}} \ +#define PROPERTY_GUID(ptag) \ + { \ + PROP_ID(ptag), 0x6585, 0x11d3, { 0xb6, 0x19, 0x00, 0xaa, 0x00, 0x4b, 0x9c, 0x30 } \ + } +#define SUB_PROPERTY_GUID(ptag, subptag) \ + { \ + PROP_ID(subptag) << 16 | PROP_ID(ptag), 0x6585, 0x11d3, { 0xb6, 0x19, 0x00, 0xaa, 0x00, 0x4b, 0x9c, 0x30 } \ + } // // Transfer version for PR_NT_SECURITY_DESCRIPTOR. @@ -1156,12 +1133,12 @@ typedef DWORD SDRIGHTS; // // Please note that OLEDB/DAV reserves the even numbers of the transfer version, so it must ALWAYS be an odd number. // -#define SECURITY_DESCRIPTOR_TRANSFER_VERSION 0x0003 +#define SECURITY_DESCRIPTOR_TRANSFER_VERSION 0x0003 -#define SECURITY_DESCRIPTOR_OF(pb) (((BYTE *)(pb)) + *((WORD *)(pb))) +#define SECURITY_DESCRIPTOR_OF(pb) (((BYTE *)(pb)) + *((WORD *)(pb))) #define SECURITY_DESCRIPTOR_VERSION(pb) (*((WORD *)((pb) + sizeof(WORD)))) #define SECURITY_INFORMATION_OF(pb) (*((DWORD *)((pb) + sizeof(WORD) + sizeof(WORD)))) -#define CbSecurityDescriptorHeader(pb) (*((WORD *)(pb))) +#define CbSecurityDescriptorHeader(pb) (*((WORD *)(pb))) // // To check to see if the security descriptor version matches the currently compiled @@ -1173,57 +1150,56 @@ typedef DWORD SDRIGHTS; // Role scopes // typedef BYTE ROLESCOPE; -#define ROLESCOPE_OBJECT 0x00 // Roles will be read from the object (folder or item) itself -#define ROLESCOPE_FOLDER 0x01 // Roles will be read from the folder itself, or the containing folder if it is an item -#define ROLESCOPE_MAX ROLESCOPE_FOLDER +#define ROLESCOPE_OBJECT 0x00 // Roles will be read from the object (folder or item) itself +#define ROLESCOPE_FOLDER 0x01 // Roles will be read from the folder itself, or the containing folder if it is an item +#define ROLESCOPE_MAX ROLESCOPE_FOLDER // // Security authority used for role sids // -#define SECURITY_EXCHANGE_AUTHORITY {0,0,0,0,0,8} +#define SECURITY_EXCHANGE_AUTHORITY {0, 0, 0, 0, 0, 8} // // Application role properties // -#define PR_XMT_SECURITY_ROLE_1 PROP_TAG(PT_BINARY,0x3d25) -#define PR_XMT_SECURITY_ROLE_1_AS_XML PROP_TAG(PT_TSTRING,0x3d25) -#define PR_XMT_SECURITY_ROLE_2 PROP_TAG(PT_BINARY,0x3d26) -#define PR_XMT_SECURITY_ROLE_2_AS_XML PROP_TAG(PT_TSTRING,0x3d26) -#define PR_XMT_SECURITY_ROLE_3 PROP_TAG(PT_BINARY,0x3d27) -#define PR_XMT_SECURITY_ROLE_3_AS_XML PROP_TAG(PT_TSTRING,0x3d27) -#define PR_XMT_SECURITY_ROLE_4 PROP_TAG(PT_BINARY,0x3d28) -#define PR_XMT_SECURITY_ROLE_4_AS_XML PROP_TAG(PT_TSTRING,0x3d28) -#define PR_XMT_SECURITY_ROLE_5 PROP_TAG(PT_BINARY,0x3d29) -#define PR_XMT_SECURITY_ROLE_5_AS_XML PROP_TAG(PT_TSTRING,0x3d29) -#define PR_XMT_SECURITY_ROLE_6 PROP_TAG(PT_BINARY,0x3d2A) -#define PR_XMT_SECURITY_ROLE_6_AS_XML PROP_TAG(PT_TSTRING,0x3d2A) -#define PR_XMT_SECURITY_ROLE_7 PROP_TAG(PT_BINARY,0x3d2B) -#define PR_XMT_SECURITY_ROLE_7_AS_XML PROP_TAG(PT_TSTRING,0x3d2B) -#define PR_XMT_SECURITY_ROLE_8 PROP_TAG(PT_BINARY,0x3d2C) -#define PR_XMT_SECURITY_ROLE_8_AS_XML PROP_TAG(PT_TSTRING,0x3d2C) -#define PR_NON_XMT_SECURITY_ROLE_1 PROP_TAG(PT_BINARY,0x0E7C) -#define PR_NON_XMT_SECURITY_ROLE_1_AS_XML PROP_TAG(PT_TSTRING,0x0E7C) -#define PR_NON_XMT_SECURITY_ROLE_2 PROP_TAG(PT_BINARY,0x0E7D) -#define PR_NON_XMT_SECURITY_ROLE_2_AS_XML PROP_TAG(PT_TSTRING,0x0E7D) -#define PR_NON_XMT_SECURITY_ROLE_3 PROP_TAG(PT_BINARY,0x0E7E) -#define PR_NON_XMT_SECURITY_ROLE_3_AS_XML PROP_TAG(PT_TSTRING,0x0E7E) -#define PR_NON_XMT_SECURITY_ROLE_4 PROP_TAG(PT_BINARY,0x0E7F) -#define PR_NON_XMT_SECURITY_ROLE_4_AS_XML PROP_TAG(PT_TSTRING,0x0E7F) -#define PR_NON_XMT_SECURITY_ROLE_5 PROP_TAG(PT_BINARY,0x0E80) -#define PR_NON_XMT_SECURITY_ROLE_5_AS_XML PROP_TAG(PT_TSTRING,0x0E80) -#define PR_NON_XMT_SECURITY_ROLE_6 PROP_TAG(PT_BINARY,0x0E81) -#define PR_NON_XMT_SECURITY_ROLE_6_AS_XML PROP_TAG(PT_TSTRING,0x0E81) -#define PR_NON_XMT_SECURITY_ROLE_7 PROP_TAG(PT_BINARY,0x0E82) -#define PR_NON_XMT_SECURITY_ROLE_7_AS_XML PROP_TAG(PT_TSTRING,0x0E82) -#define PR_NON_XMT_SECURITY_ROLE_8 PROP_TAG(PT_BINARY,0x0E83) -#define PR_NON_XMT_SECURITY_ROLE_8_AS_XML PROP_TAG(PT_TSTRING,0x0E83) - +#define PR_XMT_SECURITY_ROLE_1 PROP_TAG(PT_BINARY, 0x3d25) +#define PR_XMT_SECURITY_ROLE_1_AS_XML PROP_TAG(PT_TSTRING, 0x3d25) +#define PR_XMT_SECURITY_ROLE_2 PROP_TAG(PT_BINARY, 0x3d26) +#define PR_XMT_SECURITY_ROLE_2_AS_XML PROP_TAG(PT_TSTRING, 0x3d26) +#define PR_XMT_SECURITY_ROLE_3 PROP_TAG(PT_BINARY, 0x3d27) +#define PR_XMT_SECURITY_ROLE_3_AS_XML PROP_TAG(PT_TSTRING, 0x3d27) +#define PR_XMT_SECURITY_ROLE_4 PROP_TAG(PT_BINARY, 0x3d28) +#define PR_XMT_SECURITY_ROLE_4_AS_XML PROP_TAG(PT_TSTRING, 0x3d28) +#define PR_XMT_SECURITY_ROLE_5 PROP_TAG(PT_BINARY, 0x3d29) +#define PR_XMT_SECURITY_ROLE_5_AS_XML PROP_TAG(PT_TSTRING, 0x3d29) +#define PR_XMT_SECURITY_ROLE_6 PROP_TAG(PT_BINARY, 0x3d2A) +#define PR_XMT_SECURITY_ROLE_6_AS_XML PROP_TAG(PT_TSTRING, 0x3d2A) +#define PR_XMT_SECURITY_ROLE_7 PROP_TAG(PT_BINARY, 0x3d2B) +#define PR_XMT_SECURITY_ROLE_7_AS_XML PROP_TAG(PT_TSTRING, 0x3d2B) +#define PR_XMT_SECURITY_ROLE_8 PROP_TAG(PT_BINARY, 0x3d2C) +#define PR_XMT_SECURITY_ROLE_8_AS_XML PROP_TAG(PT_TSTRING, 0x3d2C) +#define PR_NON_XMT_SECURITY_ROLE_1 PROP_TAG(PT_BINARY, 0x0E7C) +#define PR_NON_XMT_SECURITY_ROLE_1_AS_XML PROP_TAG(PT_TSTRING, 0x0E7C) +#define PR_NON_XMT_SECURITY_ROLE_2 PROP_TAG(PT_BINARY, 0x0E7D) +#define PR_NON_XMT_SECURITY_ROLE_2_AS_XML PROP_TAG(PT_TSTRING, 0x0E7D) +#define PR_NON_XMT_SECURITY_ROLE_3 PROP_TAG(PT_BINARY, 0x0E7E) +#define PR_NON_XMT_SECURITY_ROLE_3_AS_XML PROP_TAG(PT_TSTRING, 0x0E7E) +#define PR_NON_XMT_SECURITY_ROLE_4 PROP_TAG(PT_BINARY, 0x0E7F) +#define PR_NON_XMT_SECURITY_ROLE_4_AS_XML PROP_TAG(PT_TSTRING, 0x0E7F) +#define PR_NON_XMT_SECURITY_ROLE_5 PROP_TAG(PT_BINARY, 0x0E80) +#define PR_NON_XMT_SECURITY_ROLE_5_AS_XML PROP_TAG(PT_TSTRING, 0x0E80) +#define PR_NON_XMT_SECURITY_ROLE_6 PROP_TAG(PT_BINARY, 0x0E81) +#define PR_NON_XMT_SECURITY_ROLE_6_AS_XML PROP_TAG(PT_TSTRING, 0x0E81) +#define PR_NON_XMT_SECURITY_ROLE_7 PROP_TAG(PT_BINARY, 0x0E82) +#define PR_NON_XMT_SECURITY_ROLE_7_AS_XML PROP_TAG(PT_TSTRING, 0x0E82) +#define PR_NON_XMT_SECURITY_ROLE_8 PROP_TAG(PT_BINARY, 0x0E83) +#define PR_NON_XMT_SECURITY_ROLE_8_AS_XML PROP_TAG(PT_TSTRING, 0x0E83) /* Rules specifics */ // Property types -#define PT_SRESTRICTION ((ULONG) 0x00FD) -#define PT_ACTIONS ((ULONG) 0x00FE) +#define PT_SRESTRICTION ((ULONG)0x00FD) +#define PT_ACTIONS ((ULONG)0x00FE) /*----------------------------------------------------------------------- * PT_FILE_HANDLE: real data is in file specified by handle. @@ -1236,205 +1212,194 @@ typedef BYTE ROLESCOPE; * is not supported for outside calls. *-----------------------------------------------------------------------*/ -#define PT_FILE_HANDLE ((ULONG) 0x0103) -#define PT_FILE_EA ((ULONG) 0x0104) -#define PT_VIRTUAL ((ULONG) 0x0105) - -#define FVirtualProp(ptag) (PROP_TYPE(ptag) == PT_VIRTUAL) -#define FFileHandleProp(ptag) (PROP_TYPE(ptag) == PT_FILE_HANDLE || PROP_TYPE(ptag) == PT_FILE_EA) - -//Properties in rule table -#define PR_RULE_ID PROP_TAG(PT_I8, pidSpecialMin+0x04) -#define PR_RULE_IDS PROP_TAG(PT_BINARY, pidSpecialMin+0x05) -#define PR_RULE_SEQUENCE PROP_TAG(PT_LONG, pidSpecialMin+0x06) -#define PR_RULE_STATE PROP_TAG(PT_LONG, pidSpecialMin+0x07) -#define PR_RULE_USER_FLAGS PROP_TAG(PT_LONG, pidSpecialMin+0x08) -#define PR_RULE_CONDITION PROP_TAG(PT_SRESTRICTION, pidSpecialMin+0x09) -#define PR_RULE_ACTIONS PROP_TAG(PT_ACTIONS, pidSpecialMin+0x10) -#define PR_RULE_PROVIDER PROP_TAG(PT_STRING8, pidSpecialMin+0x11) -#define PR_RULE_NAME PROP_TAG(PT_TSTRING, pidSpecialMin+0x12) -#define PR_RULE_LEVEL PROP_TAG(PT_LONG, pidSpecialMin+0x13) -#define PR_RULE_PROVIDER_DATA PROP_TAG(PT_BINARY, pidSpecialMin+0x14) - -#define PR_EXTENDED_RULE_ACTIONS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x59) -#define PR_EXTENDED_RULE_CONDITION PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x5a) -#define PR_EXTENDED_RULE_SIZE_LIMIT PROP_TAG(PT_LONG, pidStoreNonTransMin+0x5b) +#define PT_FILE_HANDLE ((ULONG)0x0103) +#define PT_FILE_EA ((ULONG)0x0104) +#define PT_VIRTUAL ((ULONG)0x0105) + +#define FVirtualProp(ptag) (PROP_TYPE(ptag) == PT_VIRTUAL) +#define FFileHandleProp(ptag) (PROP_TYPE(ptag) == PT_FILE_HANDLE || PROP_TYPE(ptag) == PT_FILE_EA) + +// Properties in rule table +#define PR_RULE_ID PROP_TAG(PT_I8, pidSpecialMin + 0x04) +#define PR_RULE_IDS PROP_TAG(PT_BINARY, pidSpecialMin + 0x05) +#define PR_RULE_SEQUENCE PROP_TAG(PT_LONG, pidSpecialMin + 0x06) +#define PR_RULE_STATE PROP_TAG(PT_LONG, pidSpecialMin + 0x07) +#define PR_RULE_USER_FLAGS PROP_TAG(PT_LONG, pidSpecialMin + 0x08) +#define PR_RULE_CONDITION PROP_TAG(PT_SRESTRICTION, pidSpecialMin + 0x09) +#define PR_RULE_ACTIONS PROP_TAG(PT_ACTIONS, pidSpecialMin + 0x10) +#define PR_RULE_PROVIDER PROP_TAG(PT_STRING8, pidSpecialMin + 0x11) +#define PR_RULE_NAME PROP_TAG(PT_TSTRING, pidSpecialMin + 0x12) +#define PR_RULE_LEVEL PROP_TAG(PT_LONG, pidSpecialMin + 0x13) +#define PR_RULE_PROVIDER_DATA PROP_TAG(PT_BINARY, pidSpecialMin + 0x14) + +#define PR_EXTENDED_RULE_ACTIONS PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x59) +#define PR_EXTENDED_RULE_CONDITION PROP_TAG(PT_BINARY, pidStoreNonTransMin + 0x5a) +#define PR_EXTENDED_RULE_SIZE_LIMIT PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x5b) // moved to ptag.h (scottno) - still needed for 2.27 upgrader // #define PR_RULE_VERSION PROP_TAG( PT_I2, pidSpecialMin+0x1D) -//PR_STATE property values -#define ST_DISABLED 0x0000 -#define ST_ENABLED 0x0001 -#define ST_ERROR 0x0002 -#define ST_ONLY_WHEN_OOF 0x0004 -#define ST_KEEP_OOF_HIST 0x0008 -#define ST_EXIT_LEVEL 0x0010 -#define ST_SKIP_IF_SCL_IS_SAFE 0x0020 -#define ST_RULE_PARSE_ERROR 0x0040 -#define ST_CLEAR_OOF_HIST 0x80000000 +// PR_STATE property values +#define ST_DISABLED 0x0000 +#define ST_ENABLED 0x0001 +#define ST_ERROR 0x0002 +#define ST_ONLY_WHEN_OOF 0x0004 +#define ST_KEEP_OOF_HIST 0x0008 +#define ST_EXIT_LEVEL 0x0010 +#define ST_SKIP_IF_SCL_IS_SAFE 0x0020 +#define ST_RULE_PARSE_ERROR 0x0040 +#define ST_CLEAR_OOF_HIST 0x80000000 -//Empty restriction -#define NULL_RESTRICTION 0xff +// Empty restriction +#define NULL_RESTRICTION 0xff // special RELOP for Member of DL -#define RELOP_MEMBER_OF_DL 100 - -//Action types -typedef enum -{ - OP_MOVE = 1, - OP_COPY, - OP_REPLY, - OP_OOF_REPLY, - OP_DEFER_ACTION, - OP_BOUNCE, - OP_FORWARD, - OP_DELEGATE, - OP_TAG, - OP_DELETE, - OP_MARK_AS_READ, +#define RELOP_MEMBER_OF_DL 100 + +// Action types +typedef enum { + OP_MOVE = 1, + OP_COPY, + OP_REPLY, + OP_OOF_REPLY, + OP_DEFER_ACTION, + OP_BOUNCE, + OP_FORWARD, + OP_DELEGATE, + OP_TAG, + OP_DELETE, + OP_MARK_AS_READ, } ACTTYPE; // provider name for moderator rules -#define szProviderModeratorRule "MSFT:MR" -#define wszProviderModeratorRule L"MSFT:MR" +#define szProviderModeratorRule "MSFT:MR" +#define wszProviderModeratorRule L"MSFT:MR" // action flavors // for OP_REPLY -#define DO_NOT_SEND_TO_ORIGINATOR 1 -#define STOCK_REPLY_TEMPLATE 2 +#define DO_NOT_SEND_TO_ORIGINATOR 1 +#define STOCK_REPLY_TEMPLATE 2 // for OP_FORWARD -#define FWD_PRESERVE_SENDER 1 -#define FWD_DO_NOT_MUNGE_MSG 2 -#define FWD_AS_ATTACHMENT 4 - -//scBounceCode values -#define BOUNCE_MESSAGE_SIZE_TOO_LARGE (SCODE) MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD -#define BOUNCE_FORMS_MISMATCH (SCODE) MAPI_DIAG_RENDITION_UNSUPPORTED -#define BOUNCE_ACCESS_DENIED (SCODE) MAPI_DIAG_MAIL_REFUSED - -//Message class prefix for Reply and OOF Reply templates -#define szReplyTemplateMsgClassPrefix "IPM.Note.Rules.ReplyTemplate." -#define szOofTemplateMsgClassPrefix "IPM.Note.Rules.OofTemplate." - -//Action structure -typedef struct _action -{ - ACTTYPE acttype; - - // to indicate which flavor of the action. - ULONG ulActionFlavor; - - // Action restriction - // currently unused and must be set to NULL - LPSRestriction lpRes; - - // currently unused and must be set to NULL. - LPSPropTagArray lpPropTagArray; - - // User defined flags - ULONG ulFlags; - - // padding to align the union on 8 byte boundary - ULONG dwAlignPad; - - union - { - // used for OP_MOVE and OP_COPY actions - struct - { - ULONG cbStoreEntryId; - LPENTRYID lpStoreEntryId; - ULONG cbFldEntryId; - LPENTRYID lpFldEntryId; - } actMoveCopy; - - // used for OP_REPLY and OP_OOF_REPLY actions - struct - { - ULONG cbEntryId; - LPENTRYID lpEntryId; - GUID guidReplyTemplate; - } actReply; - - // used for OP_DEFER_ACTION action - struct - { - ULONG cbData; - BYTE *pbData; - } actDeferAction; - - // Error code to set for OP_BOUNCE action - SCODE scBounceCode; - - // list of address for OP_FORWARD and OP_DELEGATE action - LPADRLIST lpadrlist; - - // prop value for OP_TAG action - SPropValue propTag; - }; -} ACTION, FAR * LPACTION; +#define FWD_PRESERVE_SENDER 1 +#define FWD_DO_NOT_MUNGE_MSG 2 +#define FWD_AS_ATTACHMENT 4 + +// scBounceCode values +#define BOUNCE_MESSAGE_SIZE_TOO_LARGE (SCODE) MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD +#define BOUNCE_FORMS_MISMATCH (SCODE) MAPI_DIAG_RENDITION_UNSUPPORTED +#define BOUNCE_ACCESS_DENIED (SCODE) MAPI_DIAG_MAIL_REFUSED + +// Message class prefix for Reply and OOF Reply templates +#define szReplyTemplateMsgClassPrefix "IPM.Note.Rules.ReplyTemplate." +#define szOofTemplateMsgClassPrefix "IPM.Note.Rules.OofTemplate." + +// Action structure +typedef struct _action { + ACTTYPE acttype; + + // to indicate which flavor of the action. + ULONG ulActionFlavor; + + // Action restriction + // currently unused and must be set to NULL + LPSRestriction lpRes; + + // currently unused and must be set to NULL. + LPSPropTagArray lpPropTagArray; + + // User defined flags + ULONG ulFlags; + + // padding to align the union on 8 byte boundary + ULONG dwAlignPad; + + union { + // used for OP_MOVE and OP_COPY actions + struct { + ULONG cbStoreEntryId; + LPENTRYID lpStoreEntryId; + ULONG cbFldEntryId; + LPENTRYID lpFldEntryId; + } actMoveCopy; + + // used for OP_REPLY and OP_OOF_REPLY actions + struct { + ULONG cbEntryId; + LPENTRYID lpEntryId; + GUID guidReplyTemplate; + } actReply; + + // used for OP_DEFER_ACTION action + struct { + ULONG cbData; + BYTE *pbData; + } actDeferAction; + + // Error code to set for OP_BOUNCE action + SCODE scBounceCode; + + // list of address for OP_FORWARD and OP_DELEGATE action + LPADRLIST lpadrlist; + + // prop value for OP_TAG action + SPropValue propTag; + }; +} ACTION, FAR *LPACTION; // Rules version -#define EDK_RULES_VERSION 1 - -//Array of actions -typedef struct _actions -{ - ULONG ulVersion; // use the #define above - UINT cActions; - LPACTION lpAction; +#define EDK_RULES_VERSION 1 + +// Array of actions +typedef struct _actions { + ULONG ulVersion; // use the #define above + UINT cActions; + LPACTION lpAction; } ACTIONS; #ifdef __cplusplus extern "C" { #endif -HRESULT WINAPI -HrSerializeSRestriction(IMAPIProp * pprop, LPSRestriction prest, BYTE ** ppbRest, ULONG * pcbRest); +HRESULT WINAPI HrSerializeSRestriction(IMAPIProp *pprop, LPSRestriction prest, BYTE **ppbRest, ULONG *pcbRest); -HRESULT WINAPI -HrDeserializeSRestriction(IMAPIProp * pprop, BYTE * pbRest, ULONG cbRest, LPSRestriction * pprest); +HRESULT WINAPI HrDeserializeSRestriction(IMAPIProp *pprop, BYTE *pbRest, ULONG cbRest, LPSRestriction *pprest); -HRESULT WINAPI -HrSerializeActions(IMAPIProp * pprop, ACTIONS * pActions, BYTE ** ppbActions, ULONG * pcbActions); +HRESULT WINAPI HrSerializeActions(IMAPIProp *pprop, ACTIONS *pActions, BYTE **ppbActions, ULONG *pcbActions); -HRESULT WINAPI -HrDeserializeActions(IMAPIProp * pprop, BYTE * pbActions, ULONG cbActions, ACTIONS ** ppActions); +HRESULT WINAPI HrDeserializeActions(IMAPIProp *pprop, BYTE *pbActions, ULONG cbActions, ACTIONS **ppActions); #ifdef __cplusplus -} // extern "C" +} // extern "C" #endif // message class definitions for Deferred Action and Deffered Error messages -#define szDamMsgClass "IPC.Microsoft Exchange 4.0.Deferred Action" -#define szDemMsgClass "IPC.Microsoft Exchange 4.0.Deferred Error" +#define szDamMsgClass "IPC.Microsoft Exchange 4.0.Deferred Action" +#define szDemMsgClass "IPC.Microsoft Exchange 4.0.Deferred Error" -#define szExRuleMsgClass "IPM.ExtendedRule.Message" -#define wszExRuleMsgClass L"IPM.ExtendedRule.Message" +#define szExRuleMsgClass "IPM.ExtendedRule.Message" +#define wszExRuleMsgClass L"IPM.ExtendedRule.Message" /* * Rule error codes * Values for PR_RULE_ERROR */ -#define RULE_ERR_UNKNOWN 1 //general catchall error -#define RULE_ERR_LOAD 2 //unable to load folder rules -#define RULE_ERR_DELIVERY 3 //unable to deliver message temporarily -#define RULE_ERR_PARSING 4 //error while parsing -#define RULE_ERR_CREATE_DAE 5 //error creating DAE message -#define RULE_ERR_NO_FOLDER 6 //folder to move/copy doesn't exist -#define RULE_ERR_NO_RIGHTS 7 //no rights to move/copy into folder -#define RULE_ERR_CREATE_DAM 8 //error creating DAM -#define RULE_ERR_NO_SENDAS 9 //can not send as another user -#define RULE_ERR_NO_TEMPLATE 10 //reply template is missing -#define RULE_ERR_EXECUTION 11 //error in rule execution -#define RULE_ERR_QUOTA_EXCEEDED 12 //mailbox quota size exceeded -#define RULE_ERR_TOO_MANY_RECIPS 13 //number of recips exceded upper limit - -#define RULE_ERR_FIRST RULE_ERR_UNKNOWN -#define RULE_ERR_LAST RULE_ERR_TOO_MANY_RECIPS +#define RULE_ERR_UNKNOWN 1 // general catchall error +#define RULE_ERR_LOAD 2 // unable to load folder rules +#define RULE_ERR_DELIVERY 3 // unable to deliver message temporarily +#define RULE_ERR_PARSING 4 // error while parsing +#define RULE_ERR_CREATE_DAE 5 // error creating DAE message +#define RULE_ERR_NO_FOLDER 6 // folder to move/copy doesn't exist +#define RULE_ERR_NO_RIGHTS 7 // no rights to move/copy into folder +#define RULE_ERR_CREATE_DAM 8 // error creating DAM +#define RULE_ERR_NO_SENDAS 9 // can not send as another user +#define RULE_ERR_NO_TEMPLATE 10 // reply template is missing +#define RULE_ERR_EXECUTION 11 // error in rule execution +#define RULE_ERR_QUOTA_EXCEEDED 12 // mailbox quota size exceeded +#define RULE_ERR_TOO_MANY_RECIPS 13 // number of recips exceded upper limit + +#define RULE_ERR_FIRST RULE_ERR_UNKNOWN +#define RULE_ERR_LAST RULE_ERR_TOO_MANY_RECIPS /*------------------------------------------------------------------------ * @@ -1444,22 +1409,17 @@ HrDeserializeActions(IMAPIProp * pprop, BYTE * pbActions, ULONG cbActions, ACTIO * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGERULEACTION_METHODS(IPURE) \ - MAPIMETHOD(ActionCount) \ - (THIS_ ULONG FAR * lpcActions) IPURE; \ - MAPIMETHOD(GetAction) \ - (THIS_ ULONG ulActionNumber, \ - LARGE_INTEGER * lpruleid, \ - LPACTION FAR * lppAction) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeRuleAction -DECLARE_MAPI_INTERFACE_(IExchangeRuleAction, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGERULEACTION_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGERULEACTION_METHODS(IPURE) \ + MAPIMETHOD(ActionCount) \ + (THIS_ ULONG FAR * lpcActions) IPURE; \ + MAPIMETHOD(GetAction) \ + (THIS_ ULONG ulActionNumber, LARGE_INTEGER * lpruleid, LPACTION FAR * lppAction) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeRuleAction +DECLARE_MAPI_INTERFACE_(IExchangeRuleAction, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGERULEACTION_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeRuleAction, LPEXCHANGERULEACTION); @@ -1472,43 +1432,26 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeRuleAction, LPEXCHANGERULEACTION); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(IPURE) \ - MAPIMETHOD(CreateStoreEntryID) \ - (THIS_ LPSTR lpszMsgStoreDN, \ - LPSTR lpszMailboxDN, \ - ULONG ulFlags, \ - ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(EntryIDFromSourceKey) \ - (THIS_ ULONG cFolderKeySize, \ - BYTE FAR * lpFolderSourceKey, \ - ULONG cMessageKeySize, \ - BYTE FAR * lpMessageSourceKey, \ - ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; \ - MAPIMETHOD(GetRights) \ - (THIS_ ULONG cbUserEntryID, \ - LPENTRYID lpUserEntryID, \ - ULONG cbEntryID, \ - LPENTRYID lpEntryID, \ - ULONG FAR * lpulRights) IPURE; \ - MAPIMETHOD(GetMailboxTable) \ - (THIS_ LPSTR lpszServerName, \ - LPMAPITABLE FAR * lppTable, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(GetPublicFolderTable) \ - (THIS_ LPSTR lpszServerName, \ - LPMAPITABLE FAR * lppTable, \ - ULONG ulFlags) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeManageStore -DECLARE_MAPI_INTERFACE_(IExchangeManageStore, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(IPURE) \ + MAPIMETHOD(CreateStoreEntryID) \ + (THIS_ LPSTR lpszMsgStoreDN, LPSTR lpszMailboxDN, ULONG ulFlags, ULONG FAR * lpcbEntryID, \ + LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(EntryIDFromSourceKey) \ + (THIS_ ULONG cFolderKeySize, BYTE FAR * lpFolderSourceKey, ULONG cMessageKeySize, BYTE FAR * lpMessageSourceKey, \ + ULONG FAR * lpcbEntryID, LPENTRYID FAR * lppEntryID) IPURE; \ + MAPIMETHOD(GetRights) \ + (THIS_ ULONG cbUserEntryID, LPENTRYID lpUserEntryID, ULONG cbEntryID, LPENTRYID lpEntryID, ULONG FAR * lpulRights) \ + IPURE; \ + MAPIMETHOD(GetMailboxTable) \ + (THIS_ LPSTR lpszServerName, LPMAPITABLE FAR * lppTable, ULONG ulFlags) IPURE; \ + MAPIMETHOD(GetPublicFolderTable) \ + (THIS_ LPSTR lpszServerName, LPMAPITABLE FAR * lppTable, ULONG ulFlags) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeManageStore +DECLARE_MAPI_INTERFACE_(IExchangeManageStore, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore, LPEXCHANGEMANAGESTORE); @@ -1521,26 +1464,20 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore, LPEXCHANGEMANAGESTORE); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(IPURE) \ - MAPIMETHOD(CreateNewsgroupNameEntryID) \ - (THIS_ LPSTR lpszNewsgroupName, \ - ULONG FAR * lpcbEntryID, \ - LPENTRYID FAR * lppEntryID) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeManageStore2 -DECLARE_MAPI_INTERFACE_(IExchangeManageStore2, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(IPURE) \ + MAPIMETHOD(CreateNewsgroupNameEntryID) \ + (THIS_ LPSTR lpszNewsgroupName, ULONG FAR * lpcbEntryID, LPENTRYID FAR * lppEntryID) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeManageStore2 +DECLARE_MAPI_INTERFACE_(IExchangeManageStore2, IUnknown){MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore2, LPEXCHANGEMANAGESTORE2); - /*------------------------------------------------------------------------ * * "IExchangeManageStore3" Interface Declaration @@ -1549,28 +1486,20 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore2, LPEXCHANGEMANAGESTORE2); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(IPURE) \ - MAPIMETHOD(GetMailboxTableOffset) \ - (THIS_ LPSTR lpszServerName, \ - LPMAPITABLE FAR * lppTable, \ - ULONG ulFlags, \ - UINT uOffset) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeManageStore3 -DECLARE_MAPI_INTERFACE_(IExchangeManageStore3, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(IPURE) \ + MAPIMETHOD(GetMailboxTableOffset) \ + (THIS_ LPSTR lpszServerName, LPMAPITABLE FAR * lppTable, ULONG ulFlags, UINT uOffset) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeManageStore3 +DECLARE_MAPI_INTERFACE_(IExchangeManageStore3, IUnknown){ + MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore3, LPEXCHANGEMANAGESTORE3); - /*------------------------------------------------------------------------ * * "IExchangeManageStore4" Interface Declaration @@ -1579,29 +1508,20 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore3, LPEXCHANGEMANAGESTORE3); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEMANAGESTORE4_METHODS(IPURE) \ - MAPIMETHOD(GetPublicFolderTableOffset) \ - (THIS_ LPSTR lpszServerName, \ - LPMAPITABLE FAR * lppTable, \ - ULONG ulFlags, \ - UINT uOffset) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeManageStore4 -DECLARE_MAPI_INTERFACE_(IExchangeManageStore4, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(PURE) - EXCHANGE_IEXCHANGEMANAGESTORE4_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEMANAGESTORE4_METHODS(IPURE) \ + MAPIMETHOD(GetPublicFolderTableOffset) \ + (THIS_ LPSTR lpszServerName, LPMAPITABLE FAR * lppTable, ULONG ulFlags, UINT uOffset) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeManageStore4 +DECLARE_MAPI_INTERFACE_(IExchangeManageStore4, IUnknown){ + MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE2_METHODS(PURE) + EXCHANGE_IEXCHANGEMANAGESTORE3_METHODS(PURE) EXCHANGE_IEXCHANGEMANAGESTORE4_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore4, LPEXCHANGEMANAGESTORE4); - /*------------------------------------------------------------------------ * * "IExchangeNntpNewsfeed" Interface Declaration @@ -1610,110 +1530,101 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore4, LPEXCHANGEMANAGESTORE4); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGENNTPNEWSFEED_METHODS(IPURE) \ - MAPIMETHOD(Configure) \ - (THIS_ LPSTR lpszNewsfeedDN, \ - ULONG cValues, \ - LPSPropValue lpIMailPropArray) IPURE; \ - MAPIMETHOD(CheckMsgIds) \ - (THIS_ LPSTR lpszMsgIds, \ - ULONG FAR * lpcfWanted, \ - BYTE FAR ** lppfWanted) IPURE; \ - MAPIMETHOD(OpenArticleStream) \ - (THIS_ LPSTREAM FAR * lppStream) IPURE; \ - - -#undef INTERFACE -#define INTERFACE IExchangeNntpNewsfeed -DECLARE_MAPI_INTERFACE_(IExchangeNntpNewsfeed, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGENNTPNEWSFEED_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGENNTPNEWSFEED_METHODS(IPURE) \ + MAPIMETHOD(Configure) \ + (THIS_ LPSTR lpszNewsfeedDN, ULONG cValues, LPSPropValue lpIMailPropArray) IPURE; \ + MAPIMETHOD(CheckMsgIds) \ + (THIS_ LPSTR lpszMsgIds, ULONG FAR * lpcfWanted, BYTE FAR * *lppfWanted) IPURE; \ + MAPIMETHOD(OpenArticleStream) \ + (THIS_ LPSTREAM FAR * lppStream) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeNntpNewsfeed +DECLARE_MAPI_INTERFACE_(IExchangeNntpNewsfeed, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGENNTPNEWSFEED_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeNntpNewsfeed, LPEXCHANGENNTPNEWSFEED); // Properties for GetMailboxTable -#define PR_NT_USER_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x10) +#define PR_NT_USER_NAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x10) // // PR_LOCALE_ID definition has been moved down and combined with other // locale-specific properties. It is still being returned through the // mailbox table. // -//#define PR_LOCALE_ID PROP_TAG( PT_LONG, pidAdminMin+0x11 ) -#define PR_LAST_LOGON_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x12 ) -#define PR_LAST_LOGOFF_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x13 ) -#define PR_STORAGE_LIMIT_INFORMATION PROP_TAG(PT_LONG, pidAdminMin+0x14 ) +// #define PR_LOCALE_ID PROP_TAG( PT_LONG, pidAdminMin+0x11 ) +#define PR_LAST_LOGON_TIME PROP_TAG(PT_SYSTIME, pidAdminMin + 0x12) +#define PR_LAST_LOGOFF_TIME PROP_TAG(PT_SYSTIME, pidAdminMin + 0x13) +#define PR_STORAGE_LIMIT_INFORMATION PROP_TAG(PT_LONG, pidAdminMin + 0x14) // property on disabling message read (unread) receipt // reusing Folders table property (pidAdminMin+0x15) -#define PR_INTERNET_MDNS PROP_TAG(PT_BOOLEAN, PROP_ID(PR_NEWSGROUP_COMPONENT)) +#define PR_INTERNET_MDNS PROP_TAG(PT_BOOLEAN, PROP_ID(PR_NEWSGROUP_COMPONENT)) // properties for mailbox quota info - reusing properties from folder table - // folder pathname, owner, and contacts re-used. -#define PR_QUOTA_WARNING_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x91) -#define PR_QUOTA_SEND_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x92) -#define PR_QUOTA_RECEIVE_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x93) - +#define PR_QUOTA_WARNING_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin + 0x91) +#define PR_QUOTA_SEND_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin + 0x92) +#define PR_QUOTA_RECEIVE_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin + 0x93) // Properties for GetPublicFolderTable -#define PR_FOLDER_FLAGS PROP_TAG(PT_LONG, pidAdminMin+0x18) -#define PR_LAST_ACCESS_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x19) -#define PR_RESTRICTION_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1A) -#define PR_CATEG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1B) -#define PR_CACHED_COLUMN_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1C) -#define PR_NORMAL_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1D) -#define PR_ASSOC_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1E) -#define PR_RECIPIENT_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1F) -#define PR_RECIPIENT_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x20) -#define PR_ATTACH_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x21) -#define PR_ATTACH_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x22) -#define PR_NORMAL_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin+0x23) -#define PR_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x23) -#define PR_ASSOC_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin+0x24) -#define PR_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x24) -#define PR_FOLDER_PATHNAME PROP_TAG(PT_TSTRING, pidAdminMin+0x25) -#define PR_OWNER_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x26) -#define PR_CONTACT_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x27) +#define PR_FOLDER_FLAGS PROP_TAG(PT_LONG, pidAdminMin + 0x18) +#define PR_LAST_ACCESS_TIME PROP_TAG(PT_SYSTIME, pidAdminMin + 0x19) +#define PR_RESTRICTION_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1A) +#define PR_CATEG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1B) +#define PR_CACHED_COLUMN_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1C) +#define PR_NORMAL_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1D) +#define PR_ASSOC_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1E) +#define PR_RECIPIENT_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x1F) +#define PR_RECIPIENT_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x20) +#define PR_ATTACH_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x21) +#define PR_ATTACH_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x22) +#define PR_NORMAL_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin + 0x23) +#define PR_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0x23) +#define PR_ASSOC_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin + 0x24) +#define PR_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin + 0x24) +#define PR_FOLDER_PATHNAME PROP_TAG(PT_TSTRING, pidAdminMin + 0x25) +#define PR_OWNER_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x26) +#define PR_CONTACT_COUNT PROP_TAG(PT_LONG, pidAdminMin + 0x27) /* the absolute size limitation of a public folder */ -#define PR_PF_OVER_HARD_QUOTA_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x91) +#define PR_PF_OVER_HARD_QUOTA_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x91) /* the size limit of a message in a public folder */ -#define PR_PF_MSG_SIZE_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x92) +#define PR_PF_MSG_SIZE_LIMIT PROP_TAG(PT_LONG, pidAdminMin + 0x92) // Do not inherit expiry settings from the MDB wide settings and instead use folder specific ones // (if folder specific is not set, it will still not get from MDB and remain with no expiry at all) -#define PR_PF_DISALLOW_MDB_WIDE_EXPIRY PROP_TAG(PT_BOOLEAN, pidAdminMin+0x93) +#define PR_PF_DISALLOW_MDB_WIDE_EXPIRY PROP_TAG(PT_BOOLEAN, pidAdminMin + 0x93) // Locale-specific properties -#define PR_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin+0x11) -#define PR_CODE_PAGE_ID PROP_TAG(PT_LONG, pidAdminMin+0x33) -#define PR_SORT_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin+0x75) +#define PR_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin + 0x11) +#define PR_CODE_PAGE_ID PROP_TAG(PT_LONG, pidAdminMin + 0x33) +#define PR_SORT_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin + 0x75) // PT_I8 version of PR_MESSAGE_SIZE defined in mapitags.h -#define PR_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, PROP_ID(PR_MESSAGE_SIZE)) +#define PR_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, PROP_ID(PR_MESSAGE_SIZE)) /* Bits in PR_FOLDER_FLAGS */ -#define MDB_FOLDER_IPM 0x1 -#define MDB_FOLDER_SEARCH 0x2 -#define MDB_FOLDER_NORMAL 0x4 -#define MDB_FOLDER_RULES 0x8 +#define MDB_FOLDER_IPM 0x1 +#define MDB_FOLDER_SEARCH 0x2 +#define MDB_FOLDER_NORMAL 0x4 +#define MDB_FOLDER_RULES 0x8 /* Bits used in ulFlags in GetPublicFolderTable() */ -#define MDB_NON_IPM 0x10 -#define MDB_IPM 0x20 +#define MDB_NON_IPM 0x10 +#define MDB_IPM 0x20 /* Bits in PR_STORAGE_LIMIT_INFORMATION */ -#define MDB_LIMIT_BELOW 0x1 -#define MDB_LIMIT_ISSUE_WARNING 0x2 -#define MDB_LIMIT_PROHIBIT_SEND 0x4 -#define MDB_LIMIT_NO_CHECK 0x8 -#define MDB_LIMIT_DISABLED 0x10 +#define MDB_LIMIT_BELOW 0x1 +#define MDB_LIMIT_ISSUE_WARNING 0x2 +#define MDB_LIMIT_PROHIBIT_SEND 0x4 +#define MDB_LIMIT_NO_CHECK 0x8 +#define MDB_LIMIT_DISABLED 0x10 /* A define for "no quota infomation" when retrieving the quota information */ -#define MDB_QUOTA_NOQUOTA 0xFFFFFFFF +#define MDB_QUOTA_NOQUOTA 0xFFFFFFFF /*------------------------------------------------------------------------ * @@ -1729,40 +1640,28 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeNntpNewsfeed, LPEXCHANGENNTPNEWSFEED); // Use MAPI_MOVE for move option // Transfer methods -#define TRANSFER_COPYTO 1 -#define TRANSFER_COPYPROPS 2 -#define TRANSFER_COPYMESSAGES 3 -#define TRANSFER_COPYFOLDER 4 - - -#define EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(IPURE) \ - MAPIMETHOD(Config) \ - (THIS_ ULONG ulFlags, \ - ULONG ulTransferMethod) IPURE; \ - MAPIMETHOD(TransferBuffer) \ - (THIS_ ULONG cb, \ - LPBYTE lpb, \ - ULONG *lpcbProcessed) IPURE; \ - STDMETHOD_(BOOL, IsInterfaceOk) \ - (THIS_ ULONG ulTransferMethod, \ - REFIID refiid, \ - LPSPropTagArray lpptagList, \ - ULONG ulFlags) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeFastTransfer -DECLARE_MAPI_INTERFACE_(IExchangeFastTransfer, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(PURE) -}; -#undef IMPL +#define TRANSFER_COPYTO 1 +#define TRANSFER_COPYPROPS 2 +#define TRANSFER_COPYMESSAGES 3 +#define TRANSFER_COPYFOLDER 4 + +#define EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(IPURE) \ + MAPIMETHOD(Config) \ + (THIS_ ULONG ulFlags, ULONG ulTransferMethod) IPURE; \ + MAPIMETHOD(TransferBuffer) \ + (THIS_ ULONG cb, LPBYTE lpb, ULONG * lpcbProcessed) IPURE; \ + STDMETHOD_(BOOL, IsInterfaceOk) \ + (THIS_ ULONG ulTransferMethod, REFIID refiid, LPSPropTagArray lpptagList, ULONG ulFlags) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeFastTransfer +DECLARE_MAPI_INTERFACE_(IExchangeFastTransfer, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeFastTransfer, LPEXCHANGEFASTTRANSFER); - - /*------------------------------------------------------------------------ * * "IExchangeExportChanges" Interface Declaration @@ -1771,33 +1670,22 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeFastTransfer, LPEXCHANGEFASTTRANSFER); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Config) \ - (THIS_ LPSTREAM lpStream, \ - ULONG ulFlags, \ - LPUNKNOWN lpUnk, \ - LPSRestriction lpRestriction, \ - LPSPropTagArray lpIncludeProps, \ - LPSPropTagArray lpExcludeProps, \ - ULONG ulBufferSize) IPURE; \ - MAPIMETHOD(Synchronize) \ - (THIS_ ULONG FAR * lpulSteps, \ - ULONG FAR * lpulProgress) IPURE; \ - MAPIMETHOD(UpdateState) \ - (THIS_ LPSTREAM lpStream) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeExportChanges -DECLARE_MAPI_INTERFACE_(IExchangeExportChanges, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Config) \ + (THIS_ LPSTREAM lpStream, ULONG ulFlags, LPUNKNOWN lpUnk, LPSRestriction lpRestriction, \ + LPSPropTagArray lpIncludeProps, LPSPropTagArray lpExcludeProps, ULONG ulBufferSize) IPURE; \ + MAPIMETHOD(Synchronize) \ + (THIS_ ULONG FAR * lpulSteps, ULONG FAR * lpulProgress) IPURE; \ + MAPIMETHOD(UpdateState) \ + (THIS_ LPSTREAM lpStream) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeExportChanges +DECLARE_MAPI_INTERFACE_(IExchangeExportChanges, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges, LPEXCHANGEEXPORTCHANGES); @@ -1811,25 +1699,17 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges, LPEXCHANGEEXPORTCHANGES); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(IPURE) \ - MAPIMETHOD(ConfigForConversionStream) \ - (THIS_ LPSTREAM lpStream, \ - ULONG ulFlags, \ - LPUNKNOWN lpUnk, \ - LPSRestriction lpRestriction, \ - ULONG cValuesConversion, \ - LPSPropValue lpPropArrayConversion, \ - ULONG ulBufferSize) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeExportChanges2 -DECLARE_MAPI_INTERFACE_(IExchangeExportChanges2, IExchangeExportChanges) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) - EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(IPURE) \ + MAPIMETHOD(ConfigForConversionStream) \ + (THIS_ LPSTREAM lpStream, ULONG ulFlags, LPUNKNOWN lpUnk, LPSRestriction lpRestriction, ULONG cValuesConversion, \ + LPSPropValue lpPropArrayConversion, ULONG ulBufferSize) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeExportChanges2 +DECLARE_MAPI_INTERFACE_(IExchangeExportChanges2, IExchangeExportChanges){ + MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) + EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges2, LPEXCHANGEEXPORTCHANGES2); @@ -1843,36 +1723,25 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges2, LPEXCHANGEEXPORTCHANGES2); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEEXPORTCHANGES3_METHODS(IPURE) \ - MAPIMETHOD(ConfigForSelectiveSync) \ - (THIS_ LPSTREAM lpStream, \ - ULONG ulFlags, \ - LPUNKNOWN lpUnk, \ - LPENTRYLIST lpMsgList, \ - LPSRestriction lpRestriction, \ - LPSPropTagArray lpIncludeProps, \ - LPSPropTagArray lpExcludeProps, \ - ULONG ulBufferSize) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeExportChanges3 -DECLARE_MAPI_INTERFACE_(IExchangeExportChanges3, IExchangeExportChanges2) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) - EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(PURE) - EXCHANGE_IEXCHANGEEXPORTCHANGES3_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEEXPORTCHANGES3_METHODS(IPURE) \ + MAPIMETHOD(ConfigForSelectiveSync) \ + (THIS_ LPSTREAM lpStream, ULONG ulFlags, LPUNKNOWN lpUnk, LPENTRYLIST lpMsgList, LPSRestriction lpRestriction, \ + LPSPropTagArray lpIncludeProps, LPSPropTagArray lpExcludeProps, ULONG ulBufferSize) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeExportChanges3 +DECLARE_MAPI_INTERFACE_(IExchangeExportChanges3, IExchangeExportChanges2){ + MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE) + EXCHANGE_IEXCHANGEEXPORTCHANGES2_METHODS(PURE) EXCHANGE_IEXCHANGEEXPORTCHANGES3_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges3, LPEXCHANGEEXPORTCHANGES3); -typedef struct _ReadState -{ - ULONG cbSourceKey; - BYTE * pbSourceKey; - ULONG ulFlags; +typedef struct _ReadState { + ULONG cbSourceKey; + BYTE *pbSourceKey; + ULONG ulFlags; } READSTATE, *LPREADSTATE; /*------------------------------------------------------------------------ @@ -1883,53 +1752,32 @@ typedef struct _ReadState * *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Config) \ - (THIS_ LPSTREAM lpStream, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(UpdateState) \ - (THIS_ LPSTREAM lpStream) IPURE; \ - MAPIMETHOD(ImportMessageChange) \ - (THIS_ ULONG cpvalChanges, \ - LPSPropValue ppvalChanges, \ - ULONG ulFlags, \ - LPMESSAGE *lppmessage) IPURE; \ - MAPIMETHOD(ImportMessageDeletion) \ - (THIS_ ULONG ulFlags, \ - LPENTRYLIST lpSrcEntryList) IPURE; \ - MAPIMETHOD(ImportPerUserReadStateChange) \ - (THIS_ ULONG cElements, \ - LPREADSTATE lpReadState) IPURE; \ - MAPIMETHOD(ImportMessageMove) \ - (THIS_ ULONG cbSourceKeySrcFolder, \ - BYTE FAR * pbSourceKeySrcFolder, \ - ULONG cbSourceKeySrcMessage, \ - BYTE FAR * pbSourceKeySrcMessage, \ - ULONG cbPCLMessage, \ - BYTE FAR * pbPCLMessage, \ - ULONG cbSourceKeyDestMessage, \ - BYTE FAR * pbSourceKeyDestMessage, \ - ULONG cbChangeNumDestMessage, \ - BYTE FAR * pbChangeNumDestMessage) IPURE; - - -#undef INTERFACE -#define INTERFACE IExchangeImportContentsChanges -DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Config) \ + (THIS_ LPSTREAM lpStream, ULONG ulFlags) IPURE; \ + MAPIMETHOD(UpdateState) \ + (THIS_ LPSTREAM lpStream) IPURE; \ + MAPIMETHOD(ImportMessageChange) \ + (THIS_ ULONG cpvalChanges, LPSPropValue ppvalChanges, ULONG ulFlags, LPMESSAGE * lppmessage) IPURE; \ + MAPIMETHOD(ImportMessageDeletion) \ + (THIS_ ULONG ulFlags, LPENTRYLIST lpSrcEntryList) IPURE; \ + MAPIMETHOD(ImportPerUserReadStateChange) \ + (THIS_ ULONG cElements, LPREADSTATE lpReadState) IPURE; \ + MAPIMETHOD(ImportMessageMove) \ + (THIS_ ULONG cbSourceKeySrcFolder, BYTE FAR * pbSourceKeySrcFolder, ULONG cbSourceKeySrcMessage, \ + BYTE FAR * pbSourceKeySrcMessage, ULONG cbPCLMessage, BYTE FAR * pbPCLMessage, ULONG cbSourceKeyDestMessage, \ + BYTE FAR * pbSourceKeyDestMessage, ULONG cbChangeNumDestMessage, BYTE FAR * pbChangeNumDestMessage) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeImportContentsChanges +DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE)}; +#undef IMPL #define IMPL -DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges, - LPEXCHANGEIMPORTCONTENTSCHANGES); +DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges, LPEXCHANGEIMPORTCONTENTSCHANGES); /*------------------------------------------------------------------------ * @@ -1941,33 +1789,21 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges, * *-----------------------------------------------------------------------*/ - -#define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES2_METHODS(IPURE) \ - MAPIMETHOD(ConfigForConversionStream) \ - (THIS_ LPSTREAM lpStream, \ - ULONG ulFlags, \ - ULONG cValuesConversion, \ - LPSPropValue lpPropArrayConversion) IPURE; \ - MAPIMETHOD(ImportMessageChangeAsAStream) \ - (THIS_ ULONG cpvalChanges, \ - LPSPropValue ppvalChanges, \ - ULONG ulFlags, \ - LPSTREAM *lppstream) IPURE; \ - - -#undef INTERFACE -#define INTERFACE IExchangeImportContentsChanges2 -DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges2, IExchangeImportContentsChanges) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE) - EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES2_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES2_METHODS(IPURE) \ + MAPIMETHOD(ConfigForConversionStream) \ + (THIS_ LPSTREAM lpStream, ULONG ulFlags, ULONG cValuesConversion, LPSPropValue lpPropArrayConversion) IPURE; \ + MAPIMETHOD(ImportMessageChangeAsAStream) \ + (THIS_ ULONG cpvalChanges, LPSPropValue ppvalChanges, ULONG ulFlags, LPSTREAM * lppstream) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeImportContentsChanges2 +DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges2, IExchangeImportContentsChanges){ + MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE) + EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES2_METHODS(PURE)}; +#undef IMPL #define IMPL -DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges2, - LPEXCHANGEIMPORTCONTENTSCHANGES2); +DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges2, LPEXCHANGEIMPORTCONTENTSCHANGES2); /*------------------------------------------------------------------------ * @@ -1977,86 +1813,62 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges2, * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Config) \ - (THIS_ LPSTREAM lpStream, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(UpdateState) \ - (THIS_ LPSTREAM lpStream) IPURE; \ - MAPIMETHOD(ImportFolderChange) \ - (THIS_ ULONG cpvalChanges, \ - LPSPropValue ppvalChanges) IPURE; \ - MAPIMETHOD(ImportFolderDeletion) \ - (THIS_ ULONG ulFlags, \ - LPENTRYLIST lpSrcEntryList) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeImportHierarchyChanges -DECLARE_MAPI_INTERFACE_(IExchangeImportHierarchyChanges, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Config) \ + (THIS_ LPSTREAM lpStream, ULONG ulFlags) IPURE; \ + MAPIMETHOD(UpdateState) \ + (THIS_ LPSTREAM lpStream) IPURE; \ + MAPIMETHOD(ImportFolderChange) \ + (THIS_ ULONG cpvalChanges, LPSPropValue ppvalChanges) IPURE; \ + MAPIMETHOD(ImportFolderDeletion) \ + (THIS_ ULONG ulFlags, LPENTRYLIST lpSrcEntryList) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeImportHierarchyChanges +DECLARE_MAPI_INTERFACE_(IExchangeImportHierarchyChanges, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(PURE)}; +#undef IMPL #define IMPL -DECLARE_MAPI_INTERFACE_PTR(IExchangeImportHierarchyChanges, - LPEXCHANGEIMPORTHIERARCHYCHANGES); - -#define ulHierChanged (0x01) - -#define EXCHANGE_IEXCHANGECHANGEADVISESINK_METHODS(IPURE) \ - MAPIMETHOD_(ULONG, OnNotify) \ - (THIS_ ULONG ulFlags, \ - LPENTRYLIST lpEntryList) IPURE; \ - -#undef INTERFACE -#define INTERFACE IExchangeChangeAdviseSink -DECLARE_MAPI_INTERFACE_(IExchangeChangeAdviseSink, IUnknown) -{ - BEGIN_INTERFACE - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGECHANGEADVISESINK_METHODS(PURE) -}; -#undef IMPL +DECLARE_MAPI_INTERFACE_PTR(IExchangeImportHierarchyChanges, LPEXCHANGEIMPORTHIERARCHYCHANGES); + +#define ulHierChanged (0x01) + +#define EXCHANGE_IEXCHANGECHANGEADVISESINK_METHODS(IPURE) \ + MAPIMETHOD_(ULONG, OnNotify) \ + (THIS_ ULONG ulFlags, LPENTRYLIST lpEntryList) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeChangeAdviseSink +DECLARE_MAPI_INTERFACE_(IExchangeChangeAdviseSink, IUnknown){BEGIN_INTERFACE MAPI_IUNKNOWN_METHODS(PURE) + EXCHANGE_IEXCHANGECHANGEADVISESINK_METHODS(PURE)}; +#undef IMPL #define IMPL -DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdviseSink, - LPEXCHANGECHANGEADVISESINK); - -#define EXCHANGE_IEXCHANGECHANGEADVISOR_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(Config) \ - (THIS_ LPSTREAM lpStream, \ - LPGUID lpGUID, \ - LPEXCHANGECHANGEADVISESINK lpAdviseSink, \ - ULONG ulFlags) IPURE; \ - MAPIMETHOD(UpdateState) \ - (THIS_ LPSTREAM lpStream) IPURE; \ - MAPIMETHOD(AddKeys) \ - (THIS_ LPENTRYLIST lpEntryList) IPURE; \ - MAPIMETHOD(RemoveKeys) \ - (THIS_ LPENTRYLIST lpEntryList) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeChangeAdvisor -DECLARE_MAPI_INTERFACE_(IExchangeChangeAdvisor, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGECHANGEADVISOR_METHODS(PURE) -}; -#undef IMPL +DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdviseSink, LPEXCHANGECHANGEADVISESINK); + +#define EXCHANGE_IEXCHANGECHANGEADVISOR_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(Config) \ + (THIS_ LPSTREAM lpStream, LPGUID lpGUID, LPEXCHANGECHANGEADVISESINK lpAdviseSink, ULONG ulFlags) IPURE; \ + MAPIMETHOD(UpdateState) \ + (THIS_ LPSTREAM lpStream) IPURE; \ + MAPIMETHOD(AddKeys) \ + (THIS_ LPENTRYLIST lpEntryList) IPURE; \ + MAPIMETHOD(RemoveKeys) \ + (THIS_ LPENTRYLIST lpEntryList) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeChangeAdvisor +DECLARE_MAPI_INTERFACE_(IExchangeChangeAdvisor, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGECHANGEADVISOR_METHODS(PURE)}; +#undef IMPL #define IMPL -DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdvisor, - LPEXCHANGECHANGEADVISOR); +DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdvisor, LPEXCHANGECHANGEADVISOR); /*-------------------------------------------------------------------- * @@ -2066,27 +1878,19 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeChangeAdvisor, * *--------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEBADITEMCALLBACK_METHODS(IPURE) \ - MAPIMETHOD(BadItem) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPWSTR lpwszFolderName, \ - LPSBinary lpsbFolderEid, \ - ULONG cValues, \ - LPSPropValue lpPropArray) IPURE; - -#undef INTERFACE -#define INTERFACE IExchangeBadItemCallback -DECLARE_MAPI_INTERFACE_(IExchangeBadItemCallback, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEBADITEMCALLBACK_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEBADITEMCALLBACK_METHODS(IPURE) \ + MAPIMETHOD(BadItem) \ + (THIS_ HRESULT hResult, ULONG ulFlags, LPWSTR lpwszFolderName, LPSBinary lpsbFolderEid, ULONG cValues, \ + LPSPropValue lpPropArray) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeBadItemCallback +DECLARE_MAPI_INTERFACE_(IExchangeBadItemCallback, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEBADITEMCALLBACK_METHODS(PURE)}; +#undef IMPL #define IMPL -DECLARE_MAPI_INTERFACE_PTR(IExchangeBadItemCallback, - LPEXCHANGEBADITEMCALLBACK); +DECLARE_MAPI_INTERFACE_PTR(IExchangeBadItemCallback, LPEXCHANGEBADITEMCALLBACK); /*-------------------------------------------------------------------- * @@ -2096,35 +1900,27 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeBadItemCallback, * *--------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEMOVEUSERPROGRESS_METHODS(IPURE) \ - MAPIMETHOD(NextFolder) \ - (THIS_ ULONG ulFlags, \ - LPWSTR lpwszFolderName) IPURE; \ - MAPIMETHOD(Progress) \ - (THIS_ ULONG ulFlags, \ - ULONG ulCount, \ - ULONG ulTotal) IPURE; \ - MAPIMETHOD(Restart) \ - (THIS_ ULONG ulFlags) IPURE; \ - -#undef INTERFACE -#define INTERFACE IExchangeMoveUserProgress -DECLARE_MAPI_INTERFACE_(IExchangeMoveUserProgress, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEMOVEUSERPROGRESS_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEMOVEUSERPROGRESS_METHODS(IPURE) \ + MAPIMETHOD(NextFolder) \ + (THIS_ ULONG ulFlags, LPWSTR lpwszFolderName) IPURE; \ + MAPIMETHOD(Progress) \ + (THIS_ ULONG ulFlags, ULONG ulCount, ULONG ulTotal) IPURE; \ + MAPIMETHOD(Restart) \ + (THIS_ ULONG ulFlags) IPURE; + +#undef INTERFACE +#define INTERFACE IExchangeMoveUserProgress +DECLARE_MAPI_INTERFACE_(IExchangeMoveUserProgress, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMOVEUSERPROGRESS_METHODS(PURE)}; +#undef IMPL #define IMPL -DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, - LPEXCHANGEMOVEUSERPROGRESS); +DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, LPEXCHANGEMOVEUSERPROGRESS); // Internal flag for IMsgStore::CopyTo which tells the move user processing // that there are potential extended callback objects hanhing off of the // IMAPIProgress object. -#define MAPI_EXTENDEDCALLBACKS ((ULONG) 0x00000400) - +#define MAPI_EXTENDEDCALLBACKS ((ULONG)0x00000400) /*------------------------------------------------------------------------ * @@ -2132,21 +1928,21 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, * *-----------------------------------------------------------------------*/ -#define MAKE_SYNC_E(err) (MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, err)) -#define MAKE_SYNC_W(warn) (MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, warn)) +#define MAKE_SYNC_E(err) (MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, err)) +#define MAKE_SYNC_W(warn) (MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, warn)) -#define SYNC_E_UNKNOWN_FLAGS MAPI_E_UNKNOWN_FLAGS -#define SYNC_E_INVALID_PARAMETER E_INVALIDARG -#define SYNC_E_ERROR E_FAIL -#define SYNC_E_OBJECT_DELETED MAKE_SYNC_E(0x800) -#define SYNC_E_IGNORE MAKE_SYNC_E(0x801) -#define SYNC_E_CONFLICT MAKE_SYNC_E(0x802) -#define SYNC_E_NO_PARENT MAKE_SYNC_E(0x803) -#define SYNC_E_CYCLE MAKE_SYNC_E(0x804) -#define SYNC_E_UNSYNCHRONIZED MAKE_SYNC_E(0x805) +#define SYNC_E_UNKNOWN_FLAGS MAPI_E_UNKNOWN_FLAGS +#define SYNC_E_INVALID_PARAMETER E_INVALIDARG +#define SYNC_E_ERROR E_FAIL +#define SYNC_E_OBJECT_DELETED MAKE_SYNC_E(0x800) +#define SYNC_E_IGNORE MAKE_SYNC_E(0x801) +#define SYNC_E_CONFLICT MAKE_SYNC_E(0x802) +#define SYNC_E_NO_PARENT MAKE_SYNC_E(0x803) +#define SYNC_E_CYCLE MAKE_SYNC_E(0x804) +#define SYNC_E_UNSYNCHRONIZED MAKE_SYNC_E(0x805) -#define SYNC_W_PROGRESS MAKE_SYNC_W(0x820) -#define SYNC_W_CLIENT_CHANGE_NEWER MAKE_SYNC_W(0x821) +#define SYNC_W_PROGRESS MAKE_SYNC_W(0x820) +#define SYNC_W_CLIENT_CHANGE_NEWER MAKE_SYNC_W(0x821) /*------------------------------------------------------------------------ * @@ -2154,25 +1950,25 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, * *-----------------------------------------------------------------------*/ -#define SYNC_UNICODE 0x01 -#define SYNC_NO_DELETIONS 0x02 -#define SYNC_NO_SOFT_DELETIONS 0x04 -#define SYNC_READ_STATE 0x08 -#define SYNC_ASSOCIATED 0x10 -#define SYNC_NORMAL 0x20 -#define SYNC_NO_CONFLICTS 0x40 -#define SYNC_ONLY_SPECIFIED_PROPS 0x80 -#define SYNC_NO_FOREIGN_KEYS 0x100 -#define SYNC_LIMITED_IMESSAGE 0x200 -#define SYNC_CATCHUP 0x400 -#define SYNC_NEW_MESSAGE 0x800 // only applicable to ImportMessageChange() -#define SYNC_MSG_SELECTIVE 0x1000 // Used internally. Will reject if used by clients. -#define SYNC_BEST_BODY 0x2000 +#define SYNC_UNICODE 0x01 +#define SYNC_NO_DELETIONS 0x02 +#define SYNC_NO_SOFT_DELETIONS 0x04 +#define SYNC_READ_STATE 0x08 +#define SYNC_ASSOCIATED 0x10 +#define SYNC_NORMAL 0x20 +#define SYNC_NO_CONFLICTS 0x40 +#define SYNC_ONLY_SPECIFIED_PROPS 0x80 +#define SYNC_NO_FOREIGN_KEYS 0x100 +#define SYNC_LIMITED_IMESSAGE 0x200 +#define SYNC_CATCHUP 0x400 +#define SYNC_NEW_MESSAGE 0x800 // only applicable to ImportMessageChange() +#define SYNC_MSG_SELECTIVE 0x1000 // Used internally. Will reject if used by clients. +#define SYNC_BEST_BODY 0x2000 #define SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED 0x4000 -#define SYNC_PROGRESS_MODE 0x8000 // AirMapi progress mode -#define SYNC_FXRECOVERMODE 0x10000 -#define SYNC_DEFER_CONFIG 0x20000 -#define SYNC_FORCE_UNICODE 0x40000 // Forces server to return Unicode properties +#define SYNC_PROGRESS_MODE 0x8000 // AirMapi progress mode +#define SYNC_FXRECOVERMODE 0x10000 +#define SYNC_DEFER_CONFIG 0x20000 +#define SYNC_FORCE_UNICODE 0x40000 // Forces server to return Unicode properties /*------------------------------------------------------------------------ * @@ -2180,8 +1976,8 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, * *-----------------------------------------------------------------------*/ -#define SYNC_SOFT_DELETE 0x01 -#define SYNC_EXPIRY 0x02 +#define SYNC_SOFT_DELETE 0x01 +#define SYNC_EXPIRY 0x02 /*------------------------------------------------------------------------ * @@ -2189,7 +1985,7 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, * *-----------------------------------------------------------------------*/ -#define SYNC_READ 0x01 +#define SYNC_READ 0x01 /*------------------------------------------------------------------------ * @@ -2197,8 +1993,8 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, * *-----------------------------------------------------------------------*/ -#define MESSAGE_BEST_BODY 0x10 -#define MESSAGE_SEND_ENTRYID 0x20 +#define MESSAGE_BEST_BODY 0x10 +#define MESSAGE_SEND_ENTRYID 0x20 /*------------------------------------------------------------------------ * @@ -2208,7 +2004,6 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, #define SUPRESS_NOTIFICATIONS_ON_MY_ACTIONS 0x01000 - /*------------------------------------------------------------------------ * * "IExchangeFavorites" Interface Declaration @@ -2220,26 +2015,20 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMoveUserProgress, * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEFAVORITES_METHODS(IPURE) \ - MAPIMETHOD(GetLastError) \ - (THIS_ HRESULT hResult, \ - ULONG ulFlags, \ - LPMAPIERROR FAR * lppMAPIError) IPURE; \ - MAPIMETHOD(AddFavorites) \ - (THIS_ LPENTRYLIST lpEntryList) IPURE; \ - MAPIMETHOD(DelFavorites) \ - (THIS_ LPENTRYLIST lpEntryList) IPURE; \ - -#undef INTERFACE -#define INTERFACE IExchangeFavorites -DECLARE_MAPI_INTERFACE_(IExchangeFavorites, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEFAVORITES_METHODS(PURE) -}; +#define EXCHANGE_IEXCHANGEFAVORITES_METHODS(IPURE) \ + MAPIMETHOD(GetLastError) \ + (THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError) IPURE; \ + MAPIMETHOD(AddFavorites) \ + (THIS_ LPENTRYLIST lpEntryList) IPURE; \ + MAPIMETHOD(DelFavorites) \ + (THIS_ LPENTRYLIST lpEntryList) IPURE; -DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites, LPEXCHANGEFAVORITES); +#undef INTERFACE +#define INTERFACE IExchangeFavorites +DECLARE_MAPI_INTERFACE_(IExchangeFavorites, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEFAVORITES_METHODS(PURE)}; +DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites, LPEXCHANGEFAVORITES); /*------------------------------------------------------------------------ * @@ -2247,17 +2036,16 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites, LPEXCHANGEFAVORITES); * *-----------------------------------------------------------------------*/ -#define PR_AUTO_ADD_NEW_SUBS PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x5) -#define PR_NEW_SUBS_GET_AUTO_ADD PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x6) +#define PR_AUTO_ADD_NEW_SUBS PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin + 0x5) +#define PR_NEW_SUBS_GET_AUTO_ADD PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin + 0x6) /*------------------------------------------------------------------------ * * Properties used by the Offline Folders API * *-----------------------------------------------------------------------*/ -#define PR_OFFLINE_FLAGS PROP_TAG(PT_LONG, pidFolderMin+0x5) -#define PR_SYNCHRONIZE_FLAGS PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin+0x4) - +#define PR_OFFLINE_FLAGS PROP_TAG(PT_LONG, pidFolderMin + 0x5) +#define PR_SYNCHRONIZE_FLAGS PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin + 0x4) /*------------------------------------------------------------------------ * @@ -2265,10 +2053,10 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites, LPEXCHANGEFAVORITES); * *-----------------------------------------------------------------------*/ -#define OF_AVAILABLE_OFFLINE ((ULONG) 0x00000001) -#define OF_FORCE ((ULONG) 0x80000000) +#define OF_AVAILABLE_OFFLINE ((ULONG)0x00000001) +#define OF_FORCE ((ULONG)0x80000000) -#define SF_DISABLE_STARTUP_SYNC ((ULONG) 0x00000001) +#define SF_DISABLE_STARTUP_SYNC ((ULONG)0x00000001) /*------------------------------------------------------------------------ * @@ -2278,39 +2066,33 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites, LPEXCHANGEFAVORITES); * *-----------------------------------------------------------------------*/ -#define EXCHANGE_IEXCHANGEMESSAGECONVERSION_METHODS(IPURE) \ - MAPIMETHOD(OpenStream) \ - (THIS_ ULONG cValues, \ - LPSPropValue lpPropArray, \ - LPSTREAM FAR * lppStream) IPURE; -#undef INTERFACE -#define INTERFACE IExchangeMessageConversion -DECLARE_MAPI_INTERFACE_(IExchangeMessageConversion, IUnknown) -{ - MAPI_IUNKNOWN_METHODS(PURE) - EXCHANGE_IEXCHANGEMESSAGECONVERSION_METHODS(PURE) -}; -#undef IMPL +#define EXCHANGE_IEXCHANGEMESSAGECONVERSION_METHODS(IPURE) \ + MAPIMETHOD(OpenStream) \ + (THIS_ ULONG cValues, LPSPropValue lpPropArray, LPSTREAM FAR * lppStream) IPURE; +#undef INTERFACE +#define INTERFACE IExchangeMessageConversion +DECLARE_MAPI_INTERFACE_(IExchangeMessageConversion, + IUnknown){MAPI_IUNKNOWN_METHODS(PURE) EXCHANGE_IEXCHANGEMESSAGECONVERSION_METHODS(PURE)}; +#undef IMPL #define IMPL DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSION); -#define PR_MESSAGE_SITE_NAME PROP_TAG(PT_TSTRING, pidExchangeNonXmitReservedMin+0x7) -#define PR_MESSAGE_SITE_NAME_A PROP_TAG(PT_STRING8, pidExchangeNonXmitReservedMin+0x7) -#define PR_MESSAGE_SITE_NAME_W PROP_TAG(PT_UNICODE, pidExchangeNonXmitReservedMin+0x7) - -#define PR_MESSAGE_PROCESSED PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x8) +#define PR_MESSAGE_SITE_NAME PROP_TAG(PT_TSTRING, pidExchangeNonXmitReservedMin + 0x7) +#define PR_MESSAGE_SITE_NAME_A PROP_TAG(PT_STRING8, pidExchangeNonXmitReservedMin + 0x7) +#define PR_MESSAGE_SITE_NAME_W PROP_TAG(PT_UNICODE, pidExchangeNonXmitReservedMin + 0x7) -#define PR_MSG_BODY_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin-0x03) +#define PR_MESSAGE_PROCESSED PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin + 0x8) +#define PR_MSG_BODY_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x03) -#define PR_BILATERAL_INFO PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin-0x04) -#define PR_DL_REPORT_FLAGS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin-0x05) +#define PR_BILATERAL_INFO PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin - 0x04) +#define PR_DL_REPORT_FLAGS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin - 0x05) -#define PRIV_DL_HIDE_MEMBERS 0x00000001 -#define PRIV_DL_REPORT_TO_ORIG 0x00000002 +#define PRIV_DL_HIDE_MEMBERS 0x00000001 +#define PRIV_DL_REPORT_TO_ORIG 0x00000002 #define PRIV_DL_REPORT_TO_OWNER 0x00000004 -#define PRIV_DL_ALLOW_OOF 0x00000008 +#define PRIV_DL_ALLOW_OOF 0x00000008 /*--------------------------------------------------------------------------------- * @@ -2320,95 +2102,92 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI * if the message is not read, or NULL if it is read. * *---------------------------------------------------------------------------------*/ -#define PR_ABSTRACT PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x06) -#define PR_ABSTRACT_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x06) -#define PR_ABSTRACT_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x06) +#define PR_ABSTRACT PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin - 0x06) +#define PR_ABSTRACT_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin - 0x06) +#define PR_ABSTRACT_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin - 0x06) -#define PR_PREVIEW PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x07) -#define PR_PREVIEW_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x07) -#define PR_PREVIEW_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x07) +#define PR_PREVIEW PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin - 0x07) +#define PR_PREVIEW_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin - 0x07) +#define PR_PREVIEW_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin - 0x07) -#define PR_PREVIEW_UNREAD PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x08) -#define PR_PREVIEW_UNREAD_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x08) -#define PR_PREVIEW_UNREAD_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x08) +#define PR_PREVIEW_UNREAD PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin - 0x08) +#define PR_PREVIEW_UNREAD_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin - 0x08) +#define PR_PREVIEW_UNREAD_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin - 0x08) // // Informs IMAIL that full fidelity should be discarded for this message. // -#define PR_DISABLE_FULL_FIDELITY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x72) +#define PR_DISABLE_FULL_FIDELITY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin + 0x72) // file attributes for messages / folders // need to be in REN property range in order to replicate -#define PR_ATTR_HIDDEN PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x74) -#define PR_ATTR_SYSTEM PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x75) -#define PR_ATTR_READONLY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x76) +#define PR_ATTR_HIDDEN PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin + 0x74) +#define PR_ATTR_SYSTEM PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin + 0x75) +#define PR_ATTR_READONLY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin + 0x76) // Flag indicating whether msg has been read or not (read-only prop for now - not replicated). -#define PR_READ PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x29) +#define PR_READ PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin + 0x29) // Administrative security descriptor for a folder, if present. // -#define PR_ADMIN_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d21) +#define PR_ADMIN_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d21) // // Win32 compatible representation of folder/message security descriptor // -#define PR_WIN32_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d22) +#define PR_WIN32_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d22) // // TRUE if PR_NT_SECURITY_DESCRIPTOR describes non Win32 ACL semantics. // If this is set, components that use PR_WIN32_SECURITY_DESCRIPTOR cannot // allow modification of PR_NT_SECURITY_DESCRIPTOR (or PR_DEFAULT_MESSAGE_SD). // -#define PR_NON_WIN32_ACL PROP_TAG(PT_BOOLEAN, 0x3d23) +#define PR_NON_WIN32_ACL PROP_TAG(PT_BOOLEAN, 0x3d23) // // TRUE if any items in the folder contain item level ACLs // -#define PR_ITEM_LEVEL_ACL PROP_TAG(PT_BOOLEAN, 0x3d24) +#define PR_ITEM_LEVEL_ACL PROP_TAG(PT_BOOLEAN, 0x3d24) -#define PR_DAV_TRANSFER_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x0E84) +#define PR_DAV_TRANSFER_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x0E84) // // XML formatted versions of the NT SECURITY DESCRIPTOR properties -#define PR_NT_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2A) -#define PR_NT_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x2A) -#define PR_NT_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x2A) -#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2B) -#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x2B) -#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x2B) - +#define PR_NT_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2A) +#define PR_NT_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x2A) +#define PR_NT_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin + 0x2A) +#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x2B) +#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x2B) +#define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin + 0x2B) /*------------------------------------------------------------------------------------ -* -* OWA Info Property -* -*------------------------------------------------------------------------------------*/ -#define PR_OWA_URL PROP_TAG (PT_STRING8, pidRenMsgFldMin+0x71) - + * + * OWA Info Property + * + *------------------------------------------------------------------------------------*/ +#define PR_OWA_URL PROP_TAG(PT_STRING8, pidRenMsgFldMin + 0x71) //$ The value of this property ID will change in the future. Do not rely on //$ its current value. Rely on the define only. -#define PR_STORE_SLOWLINK PROP_TAG(PT_BOOLEAN, 0x7c0a) - +#define PR_STORE_SLOWLINK PROP_TAG(PT_BOOLEAN, 0x7c0a) /* * Registry locations of settings */ #if defined(WIN32) && !defined(MAC) -#define SZ_HPC_V2 "Software\\Microsoft\\Windows CE Services" -#define SZ_HPC_V2_MAJOR "MajorVersion" // = 2 -#define SZ_HPC_V2_MINOR "MinorVersion" // = 0 or 1 +#define SZ_HPC_V2 "Software\\Microsoft\\Windows CE Services" +#define SZ_HPC_V2_MAJOR "MajorVersion" // = 2 +#define SZ_HPC_V2_MINOR "MinorVersion" // = 0 or 1 -#define SZ_HPC_V1 "Software\\Microsoft\\Pegasus" -#define SZ_HPC_V1_MAJOR "MajorVersion" // = 1 Major and Minor numbers didn't appear -#define SZ_HPC_V1_MINOR "MinorVersion" // = 1 until after v1.0 was released -#define SZ_HPC_V1_0 "InstalledDir" // present for v1.0 +#define SZ_HPC_V1 "Software\\Microsoft\\Pegasus" +#define SZ_HPC_V1_MAJOR "MajorVersion" // = 1 Major and Minor numbers didn't appear +#define SZ_HPC_V1_MINOR "MinorVersion" // = 1 until after v1.0 was released +#define SZ_HPC_V1_0 "InstalledDir" // present for v1.0 #define SZ_OUTL_OST_OPTIONS "Software\\Microsoft\\Office\\8.0\\Outlook\\OST" #define SZ_NO_OST "NoOST" -#define NO_OST_FLAG_ALLOWED 0 // OST's are allowed on the machine -#define NO_OST_FLAG_CACHE_ONLY 1 // OST can only be used as a cache -#define NO_OST_FLAG_NOT_ALLOWED 2 // OST's are not allowed on the machine -#define NO_OST_FLAG_NO_CACHE 3 // OST's are not allowed as a cache -#define NO_OST_DEFAULT NO_OST_FLAG_ALLOWED +#define NO_OST_FLAG_ALLOWED 0 // OST's are allowed on the machine +#define NO_OST_FLAG_CACHE_ONLY 1 // OST can only be used as a cache +#define NO_OST_FLAG_NOT_ALLOWED 2 // OST's are not allowed on the machine +#define NO_OST_FLAG_NO_CACHE 3 // OST's are not allowed as a cache +#define NO_OST_DEFAULT NO_OST_FLAG_ALLOWED #endif /* @@ -2418,7 +2197,7 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI * sync events for that folder by specifying the corresponding GUID in * the NEWLOGON object. */ -#define PR_SYNCEVENT_SUPPRESS_GUID PROP_TAG( PT_BINARY, 0x3880 ) +#define PR_SYNCEVENT_SUPPRESS_GUID PROP_TAG(PT_BINARY, 0x3880) /* * The following are the well-known GUIDS for the different special folders. @@ -2427,7 +2206,7 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI * each folder. */ // {B2DC5B57-AF2D-4915-BAE3-90E5BDFB0070} -//static const GUID guidOutboxSyncEvents = +// static const GUID guidOutboxSyncEvents = //{ // 0xb2dc5b57, 0xaf2d, 0x4915, // { @@ -2436,7 +2215,7 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI //}; // // {2185EE91-28CD-4d9b-BFB4-BC49BB1DD8C0} -//static const GUID guidMTSInSyncEvents = +// static const GUID guidMTSInSyncEvents = //{ // 0x2185ee91, 0x28cd, 0x4d9b, // { @@ -2445,7 +2224,7 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI //}; // // {1BDBAFD3-1384-449b-A200-DE4745B07839} -//static const GUID guidMTSOutSyncEvents = +// static const GUID guidMTSOutSyncEvents = //{ // 0x1bdbafd3, 0x1384, 0x449b, // { @@ -2454,7 +2233,7 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI //}; // // {221ED74D-0B5C-4c0e-8807-23AFDD8AC2FF} -//static const GUID guidTransportTempFolderSyncEvents = +// static const GUID guidTransportTempFolderSyncEvents = //{ // 0x221ed74d, 0xb5c, 0x4c0e, // { @@ -2462,63 +2241,62 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI // } //}; - /* * Lock properties */ - //REVIEW:: some of these definitions appear both in MAPITAGS.H and EDKMDB.H - //one set of definitions should be removed -#define PR_LOCK_BRANCH_ID PROP_TAG( PT_I8, 0x3800 ) -#define PR_LOCK_RESOURCE_FID PROP_TAG( PT_I8, 0x3801 ) -#define PR_LOCK_RESOURCE_DID PROP_TAG( PT_I8, 0x3802 ) -#define PR_LOCK_RESOURCE_VID PROP_TAG( PT_I8, 0x3803 ) -#define PR_LOCK_ENLISTMENT_CONTEXT PROP_TAG( PT_BINARY, 0x3804 ) -#define PR_LOCK_TYPE PROP_TAG( PT_SHORT, 0x3805 ) -#define PR_LOCK_SCOPE PROP_TAG( PT_SHORT, 0x3806 ) -#define PR_LOCK_TRANSIENT_ID PROP_TAG( PT_BINARY, 0x3807 ) -#define PR_LOCK_DEPTH PROP_TAG( PT_LONG, 0x3808 ) -#define PR_LOCK_TIMEOUT PROP_TAG( PT_LONG, 0x3809 ) -#define PR_LOCK_EXPIRY_TIME PROP_TAG( PT_SYSTIME, 0x380a ) -#define PR_LOCK_GLID PROP_TAG( PT_BINARY, 0x380b ) -#define PR_LOCK_NULL_URL_W PROP_TAG( PT_UNICODE, 0x380c ) +// REVIEW:: some of these definitions appear both in MAPITAGS.H and EDKMDB.H +// one set of definitions should be removed +#define PR_LOCK_BRANCH_ID PROP_TAG(PT_I8, 0x3800) +#define PR_LOCK_RESOURCE_FID PROP_TAG(PT_I8, 0x3801) +#define PR_LOCK_RESOURCE_DID PROP_TAG(PT_I8, 0x3802) +#define PR_LOCK_RESOURCE_VID PROP_TAG(PT_I8, 0x3803) +#define PR_LOCK_ENLISTMENT_CONTEXT PROP_TAG(PT_BINARY, 0x3804) +#define PR_LOCK_TYPE PROP_TAG(PT_SHORT, 0x3805) +#define PR_LOCK_SCOPE PROP_TAG(PT_SHORT, 0x3806) +#define PR_LOCK_TRANSIENT_ID PROP_TAG(PT_BINARY, 0x3807) +#define PR_LOCK_DEPTH PROP_TAG(PT_LONG, 0x3808) +#define PR_LOCK_TIMEOUT PROP_TAG(PT_LONG, 0x3809) +#define PR_LOCK_EXPIRY_TIME PROP_TAG(PT_SYSTIME, 0x380a) +#define PR_LOCK_GLID PROP_TAG(PT_BINARY, 0x380b) +#define PR_LOCK_NULL_URL_W PROP_TAG(PT_UNICODE, 0x380c) /* * Lock flags */ -#define LOCK_NON_PERSISTENT 0x00000001 -#define LOCK_BLOCKING_MID_LOCK 0x00000002 -#define LOCK_NULL_RESOURCE 0x00000004 -#define LOCK_READ_ACCESS_CHECK_ONLY 0x00000008 -#define LOCK_WRITE_THROUGH_GOP 0x00010000 +#define LOCK_NON_PERSISTENT 0x00000001 +#define LOCK_BLOCKING_MID_LOCK 0x00000002 +#define LOCK_NULL_RESOURCE 0x00000004 +#define LOCK_READ_ACCESS_CHECK_ONLY 0x00000008 +#define LOCK_WRITE_THROUGH_GOP 0x00010000 // This bit is reserved and must not be set! -#define LOCK_RESERVED 0x80000000 +#define LOCK_RESERVED 0x80000000 /* * Unlock flags */ -#define UNLOCK_CHECKIN_ABORT 0x00000001 -#define UNLOCK_CHECKIN_KEEP_LOCKED 0x00000002 -#define UNLOCK_BLOCKING_MID_LOCK_ALL 0x00000004 -#define UNLOCK_BLOCKING_MID_LOCK_LOGON_ONLY 0x00000008 -#define UNLOCK_NULL_RESOURCE 0x00000010 -#define UNLOCK_WRITE_THROUGH_GOP 0x00010000 +#define UNLOCK_CHECKIN_ABORT 0x00000001 +#define UNLOCK_CHECKIN_KEEP_LOCKED 0x00000002 +#define UNLOCK_BLOCKING_MID_LOCK_ALL 0x00000004 +#define UNLOCK_BLOCKING_MID_LOCK_LOGON_ONLY 0x00000008 +#define UNLOCK_NULL_RESOURCE 0x00000010 +#define UNLOCK_WRITE_THROUGH_GOP 0x00010000 /* * Versioning flags for folder */ -#define wNonVersionedFolder ((WORD)0x0000) -#define wVersionedFolderSimple ((WORD)0x0001) -#define wVersionedFolderAuto ((WORD)0x0002) //When you auto version it is simple versioned as well. +#define wNonVersionedFolder ((WORD)0x0000) +#define wVersionedFolderSimple ((WORD)0x0001) +#define wVersionedFolderAuto ((WORD)0x0002) // When you auto version it is simple versioned as well. /* * Versioning operation codes for version rows in ptagVersionedOperation */ -#define fVersionedDelete ((ULONG)0x01) -#define fVersionedUnDelete ((ULONG)0x02) -#define fVersionedPin ((ULONG)0x04) -#define fVersionedUnPin ((ULONG)0x08) -#define fVersionedMoveIn ((ULONG)0x10) -#define fVersionedMoveOut ((ULONG)0x20) +#define fVersionedDelete ((ULONG)0x01) +#define fVersionedUnDelete ((ULONG)0x02) +#define fVersionedPin ((ULONG)0x04) +#define fVersionedUnPin ((ULONG)0x08) +#define fVersionedMoveIn ((ULONG)0x10) +#define fVersionedMoveOut ((ULONG)0x20) /*------------------------------------------------------------------------ * @@ -2527,28 +2305,28 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI * These are properties that will be used internally by local store. * Properties that are listed here are used in components other than the local store *-----------------------------------------------------------------------*/ -#define pidLISMsgFolderPropMin pidLocalStoreInternalMin+0xa0 // 0x65a0 -#define pidLISMsgFolderPropMax pidLocalStoreInternalMin+0xc0 // 0x65c0 +#define pidLISMsgFolderPropMin pidLocalStoreInternalMin + 0xa0 // 0x65a0 +#define pidLISMsgFolderPropMax pidLocalStoreInternalMin + 0xc0 // 0x65c0 -#define pidLISErrorCodeMin pidLISMsgFolderPropMin+0xa // 0x65aa -#define pidLISErrorCodeMax pidLISMsgFolderPropMin+0x10 // 0x65b0 +#define pidLISErrorCodeMin pidLISMsgFolderPropMin + 0xa // 0x65aa +#define pidLISErrorCodeMax pidLISMsgFolderPropMin + 0x10 // 0x65b0 -#define pidLISInterfacePropMin pidLocalStoreInternalMin+0xd0 // 0x65d0 -#define pidLISInterfacePropMax pidLocalStoreInternalMin+0xe0 // 0x65e0 +#define pidLISInterfacePropMin pidLocalStoreInternalMin + 0xd0 // 0x65d0 +#define pidLISInterfacePropMax pidLocalStoreInternalMin + 0xe0 // 0x65e0 -#define ptagLISSubfolders PROP_TAG( PT_BOOLEAN, pidLocalStoreInternalMin+0x0) -#define ptagLISUnreadCount PROP_TAG( PT_LONG, pidLocalStoreInternalMin+0x1) +#define ptagLISSubfolders PROP_TAG(PT_BOOLEAN, pidLocalStoreInternalMin + 0x0) +#define ptagLISUnreadCount PROP_TAG(PT_LONG, pidLocalStoreInternalMin + 0x1) -#define ptagLISErrorCode PROP_TAG( PT_LONG, pidLISErrorCodeMin+0x0) // PROP_TAG(PT_LONG, 0x65aa) -#define ptagLISErrorItemType PROP_TAG( PT_LONG, pidLISErrorCodeMin+0x1) // PROP_TAG(PT_LONG, 0x65ab) -#define ptagLISErrorOperation PROP_TAG( PT_LONG, pidLISErrorCodeMin+0x2) // PROP_TAG(PT_LONG, 0x65ac) -#define ptagLISErrorItemUrl PROP_TAG( PT_UNICODE, pidLISErrorCodeMin+0x3) // PROP_TAG(PT_UNICODE, 0x65ad) -#define ptagLISErrorSourceUrl PROP_TAG( PT_UNICODE, pidLISErrorCodeMin+0x4) // PROP_TAG(PT_UNICODE, 0x65ae) -#define ptagLISModifiedPropertyList PROP_TAG( PT_UNICODE, pidLISErrorCodeMin+0x5) // PROP_TAG(PT_UNICODE, 0x65af) -#define ptagLISExtendedErrorinfo PROP_TAG( PT_LONG, pidLISErrorCodeMin+0x6) // PROP_TAG(PT_LONG, 0x65b0) +#define ptagLISErrorCode PROP_TAG(PT_LONG, pidLISErrorCodeMin + 0x0) // PROP_TAG(PT_LONG, 0x65aa) +#define ptagLISErrorItemType PROP_TAG(PT_LONG, pidLISErrorCodeMin + 0x1) // PROP_TAG(PT_LONG, 0x65ab) +#define ptagLISErrorOperation PROP_TAG(PT_LONG, pidLISErrorCodeMin + 0x2) // PROP_TAG(PT_LONG, 0x65ac) +#define ptagLISErrorItemUrl PROP_TAG(PT_UNICODE, pidLISErrorCodeMin + 0x3) // PROP_TAG(PT_UNICODE, 0x65ad) +#define ptagLISErrorSourceUrl PROP_TAG(PT_UNICODE, pidLISErrorCodeMin + 0x4) // PROP_TAG(PT_UNICODE, 0x65ae) +#define ptagLISModifiedPropertyList PROP_TAG(PT_UNICODE, pidLISErrorCodeMin + 0x5) // PROP_TAG(PT_UNICODE, 0x65af) +#define ptagLISExtendedErrorinfo PROP_TAG(PT_LONG, pidLISErrorCodeMin + 0x6) // PROP_TAG(PT_LONG, 0x65b0) // Not in msgfolder prop range -#define ptagLISErrorLogUrl PROP_TAG( PT_UNICODE, pidLocalStoreInternalMin+0x70) // PROP_TAG(PT_UNICODE, 0x6570) +#define ptagLISErrorLogUrl PROP_TAG(PT_UNICODE, pidLocalStoreInternalMin + 0x70) // PROP_TAG(PT_UNICODE, 0x6570) // Ptags used between EXOLEDB and LSCache on client machine to pass // along the actual client SQL query from EXOLEDB to LSCache in the RES_COMMENT @@ -2557,18 +2335,18 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI // // ptagSql = The identifying property for the SQL restriction. // The value will be the original complete clause. -#define ptagSql PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x0) -#define ptagSqlSelect PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x1) -#define ptagSqlFrom PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x2) -#define ptagSqlWhere PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x3) -#define ptagSqlOrder PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x4) -#define ptagSqlGroup PROP_TAG(PT_UNICODE, pidLISInterfacePropMin+0x5) +#define ptagSql PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x0) +#define ptagSqlSelect PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x1) +#define ptagSqlFrom PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x2) +#define ptagSqlWhere PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x3) +#define ptagSqlOrder PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x4) +#define ptagSqlGroup PROP_TAG(PT_UNICODE, pidLISInterfacePropMin + 0x5) -#define PR_RULE_SERVER_RULE_ID PROP_TAG(PT_I8, pidLISMsgFolderPropMin+0x0) // Corresponding server RUID for LIS +#define PR_RULE_SERVER_RULE_ID PROP_TAG(PT_I8, pidLISMsgFolderPropMin + 0x0) // Corresponding server RUID for LIS // this is a hackish property to be used by sync event code to say that changes // need client refresh. The only valid value is TRUE. See #168797 for more info -#define PR_FORCE_CLIENT_REFRESH PROP_TAG(PT_BOOLEAN, pidLISMsgFolderPropMin+0x1) +#define PR_FORCE_CLIENT_REFRESH PROP_TAG(PT_BOOLEAN, pidLISMsgFolderPropMin + 0x1) /*------------------------------------------------------------------------ * @@ -2578,46 +2356,45 @@ DECLARE_MAPI_INTERFACE_PTR(IExchangeMessageConversion, LPEXCHANGEMESSAGECONVERSI *-----------------------------------------------------------------------*/ // Name and version of anti-virus product that performed the last scan of an item. -#define PR_ANTIVIRUS_VENDOR PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x45) // 0x0E85001E -#define PR_ANTIVIRUS_VERSION PROP_TAG(PT_LONG, pidStoreNonTransMin+0x46) // 0x0E860003 +#define PR_ANTIVIRUS_VENDOR PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x45) // 0x0E85001E +#define PR_ANTIVIRUS_VERSION PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x46) // 0x0E860003 // Results ot the last scan of an item. -#define PR_ANTIVIRUS_SCAN_STATUS PROP_TAG(PT_LONG, pidStoreNonTransMin+0x47) // 0x0E870003 +#define PR_ANTIVIRUS_SCAN_STATUS PROP_TAG(PT_LONG, pidStoreNonTransMin + 0x47) // 0x0E870003 // List of virus identification strings of all viruses found by the last scan, if virus has been cleaned // or detected, separated by commans. Empty string if no virus has been found. -#define PR_ANTIVIRUS_SCAN_INFO PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x48) // 0x0E88001F +#define PR_ANTIVIRUS_SCAN_INFO PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x48) // 0x0E88001F /* * Possible values of PR_ANTIVIRUS_SCAN_STATUS */ // Anti-virus product has completed scanning of an item, and found no virus. -#define ANTIVIRUS_SCAN_NO_VIRUS 0 +#define ANTIVIRUS_SCAN_NO_VIRUS 0 // Anti-virus product has detected a virus in an item, or assumed the item may contain a virus // based on item's properties, like filename or content type. -#define ANTIVIRUS_SCAN_VIRUS_PRESENT 1 +#define ANTIVIRUS_SCAN_VIRUS_PRESENT 1 // Anti-virus product has detected a virus in an item, and applied changes to remove the virus. // The item should be safe to use after modifications. -#define ANTIVIRUS_SCAN_VIRUS_CLEANED 2 +#define ANTIVIRUS_SCAN_VIRUS_CLEANED 2 // Anti-virus product has detected a virus in an item, and has requested that the message be // deleted. This item shouldn't be allowed to be opened. -#define ANTIVIRUS_SCAN_VIRUS_DELETED 3 +#define ANTIVIRUS_SCAN_VIRUS_DELETED 3 // Presents the same list as PR_DISPLAY_TO except uses the format "[addrtype1:addr1]; [addrtype2:addr2]" -#define PR_ADDR_TO PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x57) // 0x0E97 -#define PR_ADDR_TO_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x57) -#define PR_ADDR_TO_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x57) +#define PR_ADDR_TO PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x57) // 0x0E97 +#define PR_ADDR_TO_A PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x57) +#define PR_ADDR_TO_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin + 0x57) // Presents the same list as PR_DISPLAY_CC except uses the format "[addrtype1:addr1]; [addrtype2:addr2]" -#define PR_ADDR_CC PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x58) // 0x0E98 -#define PR_ADDR_CC_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x58) -#define PR_ADDR_CC_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x58) - +#define PR_ADDR_CC PROP_TAG(PT_TSTRING, pidStoreNonTransMin + 0x58) // 0x0E98 +#define PR_ADDR_CC_A PROP_TAG(PT_STRING8, pidStoreNonTransMin + 0x58) +#define PR_ADDR_CC_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin + 0x58) // This property IS NO LONGER USED. I've left it here to avoid possible build break. -#define ptagLISNewMail PROP_TAG(PT_BOOLEAN, 0x65c5) +#define ptagLISNewMail PROP_TAG(PT_BOOLEAN, 0x65c5) -#endif //EDKMDB_INCLUDED +#endif // EDKMDB_INCLUDED diff --git a/com/win32comext/mapi/src/mapiutil.cpp b/com/win32comext/mapi/src/mapiutil.cpp index e09e03c1d..b704c77f6 100644 --- a/com/win32comext/mapi/src/mapiutil.cpp +++ b/com/win32comext/mapi/src/mapiutil.cpp @@ -512,7 +512,7 @@ PyObject *PyMAPIObject_FromSPropValue(SPropValue *pv) default: printf("File %s: Unsupported MAPI property type 0x%X", __FILE__, PROP_TYPE(pv->ulPropTag)); - /* Dont set exception, as this prevents otherwise valid props from + /* Don't set exception, as this prevents otherwise valid props from being returned */ val = Py_None; diff --git a/com/win32comext/shell/demos/explorer_browser.py b/com/win32comext/shell/demos/explorer_browser.py index fb6f9b2a3..7aec82d99 100644 --- a/com/win32comext/shell/demos/explorer_browser.py +++ b/com/win32comext/shell/demos/explorer_browser.py @@ -35,7 +35,7 @@ def OnViewCreated(self, view): # be that view! try: pyview = unwrap(view) - print("and look - its a Python implemented view!", pyview) + print("and look - it's a Python implemented view!", pyview) except ValueError: pass diff --git a/com/win32comext/shell/demos/servers/empty_volume_cache.py b/com/win32comext/shell/demos/servers/empty_volume_cache.py index 63a729e85..b5fb32e15 100644 --- a/com/win32comext/shell/demos/servers/empty_volume_cache.py +++ b/com/win32comext/shell/demos/servers/empty_volume_cache.py @@ -87,14 +87,14 @@ def _GetDirectories(self): ] def _WalkCallback(self, arg, directory, files): - # callback function for os.path.walk - no need to be member, but its + # callback function for os.path.walk - no need to be member, but it's # close to the callers :) callback, total_list = arg for file in files: fqn = os.path.join(directory, file).lower() if file.endswith(".pyc") or file.endswith(".pyo"): # See below - total_list is None means delete files, - # otherwise it is a list where the result is stored. Its a + # otherwise it is a list where the result is stored. It's a # list simply due to the way os.walk works - only [0] is # referenced if total_list is None: diff --git a/com/win32comext/shell/demos/servers/folder_view.py b/com/win32comext/shell/demos/servers/folder_view.py index f7e8436e1..163297d9b 100644 --- a/com/win32comext/shell/demos/servers/folder_view.py +++ b/com/win32comext/shell/demos/servers/folder_view.py @@ -58,7 +58,7 @@ def _make_ids(s): # These strings are what the user sees and would be localized. -# XXX - its possible that the shell might persist these values, so +# XXX - it's possible that the shell might persist these values, so # this scheme wouldn't really be suitable in a real ap. IDS_UNSPECIFIED = _make_ids("unspecified") IDS_SMALL = _make_ids("small") @@ -529,7 +529,7 @@ def QueryContextMenu(self, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags): def InvokeCommand(self, ci): mask, hwnd, verb, params, dir, nShow, hotkey, hicon = ci - # this seems very convuluted, but its what the sample does :) + # this seems very convuluted, but it's what the sample does :) for verb_name, verb_id, flag in folderViewImplContextMenuIDs: if isinstance(verb, int): matches = verb == verb_id @@ -642,7 +642,7 @@ def GetAttributesOf(self, pidls, attrFlags): # Retrieves an OLE interface that can be used to carry out # actions on the specified file objects or folders. def GetUIObjectOf(self, hwndOwner, pidls, iid, inout): - assert len(pidls) == 1, "oops - arent expecting more than one!" + assert len(pidls) == 1, "oops - aren't expecting more than one!" assert len(pidls[0]) == 1, "assuming relative pidls!" item = pidl_to_item(pidls[0]) if iid == shell.IID_IContextMenu: @@ -780,7 +780,7 @@ def MapColumnToSCID(self, iCol): # IPersistFolder2 methods # Retrieves the PIDLIST_ABSOLUTE for the folder object. def GetCurFolder(self): - # The docs say this is OK, but I suspect its a problem in this case :) + # The docs say this is OK, but I suspect it's a problem in this case :) # assert self.pidl, "haven't been initialized?" return self.pidl diff --git a/com/win32comext/shell/demos/servers/shell_view.py b/com/win32comext/shell/demos/servers/shell_view.py index 61d53a81d..abd56bd57 100644 --- a/com/win32comext/shell/demos/servers/shell_view.py +++ b/com/win32comext/shell/demos/servers/shell_view.py @@ -175,7 +175,7 @@ def CompareIDs(self, param, id1, id2): def GetUIObjectOf(self, hwndOwner, pidls, iid, inout): # delegate to the shell. - assert len(pidls) == 1, "oops - arent expecting more than one!" + assert len(pidls) == 1, "oops - aren't expecting more than one!" pidl = pidls[0] folder, child_pidl = self._GetFolderAndPIDLForPIDL(pidl) try: diff --git a/com/win32comext/shell/shellcon.py b/com/win32comext/shell/shellcon.py index 37841a971..90a5073eb 100644 --- a/com/win32comext/shell/shellcon.py +++ b/com/win32comext/shell/shellcon.py @@ -856,12 +856,12 @@ def EIRESID(x): ASSOCF_OPEN_BYEXENAME = 0x00000002 # executable is being passed in ASSOCF_INIT_DEFAULTTOSTAR = 0x00000004 # treat "*" as the BaseClass ASSOCF_INIT_DEFAULTTOFOLDER = 0x00000008 # treat "Folder" as the BaseClass -ASSOCF_NOUSERSETTINGS = 0x00000010 # dont use HKCU -ASSOCF_NOTRUNCATE = 0x00000020 # dont truncate the return string +ASSOCF_NOUSERSETTINGS = 0x00000010 # don't use HKCU +ASSOCF_NOTRUNCATE = 0x00000020 # don't truncate the return string ASSOCF_VERIFY = 0x00000040 # verify data is accurate (DISK HITS) ASSOCF_REMAPRUNDLL = 0x00000080 # actually gets info about rundlls target if applicable ASSOCF_NOFIXUPS = 0x00000100 # attempt to fix errors if found -ASSOCF_IGNOREBASECLASS = 0x00000200 # dont recurse into the baseclass +ASSOCF_IGNOREBASECLASS = 0x00000200 # don't recurse into the baseclass ASSOCSTR_COMMAND = 1 # shell\verb\command string ASSOCSTR_EXECUTABLE = 2 # the executable part of command string diff --git a/com/win32comext/shell/src/PyIQueryAssociations.h b/com/win32comext/shell/src/PyIQueryAssociations.h index 416b6273e..5eaba23ac 100644 --- a/com/win32comext/shell/src/PyIQueryAssociations.h +++ b/com/win32comext/shell/src/PyIQueryAssociations.h @@ -18,12 +18,12 @@ enum { ASSOCF_OPEN_BYEXENAME = 0x00000002, // executable is being passed in ASSOCF_INIT_DEFAULTTOSTAR = 0x00000004, // treat "*" as the BaseClass ASSOCF_INIT_DEFAULTTOFOLDER = 0x00000008, // treat "Folder" as the BaseClass - ASSOCF_NOUSERSETTINGS = 0x00000010, // dont use HKCU - ASSOCF_NOTRUNCATE = 0x00000020, // dont truncate the return string + ASSOCF_NOUSERSETTINGS = 0x00000010, // don't use HKCU + ASSOCF_NOTRUNCATE = 0x00000020, // don't truncate the return string ASSOCF_VERIFY = 0x00000040, // verify data is accurate (DISK HITS) ASSOCF_REMAPRUNDLL = 0x00000080, // actually gets info about rundlls target if applicable ASSOCF_NOFIXUPS = 0x00000100, // attempt to fix errors if found - ASSOCF_IGNOREBASECLASS = 0x00000200, // dont recurse into the baseclass + ASSOCF_IGNOREBASECLASS = 0x00000200, // don't recurse into the baseclass }; typedef DWORD ASSOCF; #define LWSTDAPI STDAPI diff --git a/com/win32comext/shell/src/shell.cpp b/com/win32comext/shell/src/shell.cpp index 2222ef00b..27d51f8d6 100644 --- a/com/win32comext/shell/src/shell.cpp +++ b/com/win32comext/shell/src/shell.cpp @@ -241,7 +241,7 @@ PyObject *PyObject_FromPIDL(LPCITEMIDLIST pidl, BOOL bFreeSystemPIDL) } // The length may be too large to read (and causing an // exception deep inside Python doesn't always leave - // things in a good state! Its also inconvenient to + // things in a good state! It's also inconvenient to // always pass the size of the object - so explicitly // check we can read the memory. UINT cbdata = pidl->mkid.cb - sizeof(pidl->mkid.cb); diff --git a/com/win32comext/taskscheduler/test/test_addtask_1.py b/com/win32comext/taskscheduler/test/test_addtask_1.py index 284e3511e..5f1356af1 100644 --- a/com/win32comext/taskscheduler/test/test_addtask_1.py +++ b/com/win32comext/taskscheduler/test/test_addtask_1.py @@ -36,7 +36,7 @@ new_task.SetApplicationName("py.exe") new_task.SetPriority(taskscheduler.REALTIME_PRIORITY_CLASS) new_task.SetParameters( - "-c\"import win32ui,time;win32ui.MessageBox('why aint you doing no work ?');\"" + "-c\"import win32ui,time;win32ui.MessageBox('why ain't you doing no work ?');\"" ) new_task.SetCreator("test_addtask_1.py") new_task.SetAccountInformation(win32api.GetUserName(), None) diff --git a/isapi/src/PyExtensionObjects.cpp b/isapi/src/PyExtensionObjects.cpp index d2d44a1f7..19208c19f 100644 --- a/isapi/src/PyExtensionObjects.cpp +++ b/isapi/src/PyExtensionObjects.cpp @@ -121,7 +121,7 @@ extern "C" void WINAPI DoIOCallback(EXTENSION_CONTROL_BLOCK *ecb, PVOID pContext Py_DECREF(result); worked = TRUE; done: - // If the callback failed, then its likely this request will end + // If the callback failed, then it's likely this request will end // up hanging. So on error we nuke ourselves from the map then // call DoneWithSession. We still hold the GIL, so we should be // safe from races... diff --git a/isapi/threaded_extension.py b/isapi/threaded_extension.py index ecf24c846..310bbb84b 100644 --- a/isapi/threaded_extension.py +++ b/isapi/threaded_extension.py @@ -176,7 +176,7 @@ def HandleDispatchError(self, ecb): ) except ExtensionError: # The client disconnected without reading the error body - - # its probably not a real browser at the other end, ignore it. + # it's probably not a real browser at the other end, ignore it. pass except: print("FAILED to render the error message!") diff --git a/setup.py b/setup.py index f8954603f..4723757c5 100644 --- a/setup.py +++ b/setup.py @@ -174,7 +174,7 @@ def finalize_options(self, build_ext): # like Python, always use debug info, even in release builds # (note the compiler doesn't include debug info, so you only get - # basic info - but its better than nothing!) + # basic info - but it's better than nothing!) # For now use the temp dir - later we may package them, so should # maybe move them next to the output file. pch_dir = os.path.join(build_ext.build_temp) diff --git a/win32/Demos/eventLogDemo.py b/win32/Demos/eventLogDemo.py index f3a48b958..8c9a17efb 100644 --- a/win32/Demos/eventLogDemo.py +++ b/win32/Demos/eventLogDemo.py @@ -21,7 +21,7 @@ def ReadLog(computer, logType="Application", dumpEachRecord=0): if not objects: break for object in objects: - # get it for testing purposes, but dont print it. + # get it for testing purposes, but don't print it. msg = win32evtlogutil.SafeFormatMessage(object, logType) if object.Sid is not None: try: @@ -64,8 +64,8 @@ def ReadLog(computer, logType="Application", dumpEachRecord=0): def usage(): print("Writes an event to the event log.") - print("-w : Dont write any test records.") - print("-r : Dont read the event log") + print("-w : Don't write any test records.") + print("-r : Don't read the event log") print("-c : computerName : Process the log on the specified computer") print("-v : Verbose") print("-t : LogType - Use the specified log - default = 'Application'") diff --git a/win32/Demos/service/pipeTestService.py b/win32/Demos/service/pipeTestService.py index 27aec9255..484cec987 100644 --- a/win32/Demos/service/pipeTestService.py +++ b/win32/Demos/service/pipeTestService.py @@ -85,7 +85,7 @@ def DoProcessClient(self, pipeHandle, tid): ok = 0 # A secure service would handle (and ignore!) errors writing to the - # pipe, but for the sake of this demo we dont (if only to see what errors + # pipe, but for the sake of this demo we don't (if only to see what errors # we can get when our clients break at strange times :-) if ok: msg = ( diff --git a/win32/Demos/win32clipboardDemo.py b/win32/Demos/win32clipboardDemo.py index 1c1c9f5d0..094c0c852 100644 --- a/win32/Demos/win32clipboardDemo.py +++ b/win32/Demos/win32clipboardDemo.py @@ -34,7 +34,7 @@ def TestText(): SetClipboardText(text) got = GetClipboardData(win32con.CF_TEXT) # CF_TEXT always gives us 'bytes' back . - assert got == text_bytes, f"Didnt get the correct result back - '{got!r}'." + assert got == text_bytes, f"Didn't get the correct result back - '{got!r}'." finally: CloseClipboard() @@ -42,12 +42,12 @@ def TestText(): try: # CF_UNICODE text always gives unicode objects back. got = GetClipboardData(win32con.CF_UNICODETEXT) - assert got == text, f"Didnt get the correct result back - '{got!r}'." - assert isinstance(got, str), f"Didnt get the correct result back - '{got!r}'." + assert got == text, f"Didn't get the correct result back - '{got!r}'." + assert isinstance(got, str), f"Didn't get the correct result back - '{got!r}'." # CF_OEMTEXT is a bytes-based format. got = GetClipboardData(win32con.CF_OEMTEXT) - assert got == text_bytes, f"Didnt get the correct result back - '{got!r}'." + assert got == text_bytes, f"Didn't get the correct result back - '{got!r}'." # Unicode tests EmptyClipboard() @@ -57,8 +57,8 @@ def TestText(): SetClipboardData(win32con.CF_UNICODETEXT, text) # Get it in Unicode. got = GetClipboardData(win32con.CF_UNICODETEXT) - assert got == text, f"Didnt get the correct result back - '{got!r}'." - assert isinstance(got, str), f"Didnt get the correct result back - '{got!r}'." + assert got == text, f"Didn't get the correct result back - '{got!r}'." + assert isinstance(got, str), f"Didn't get the correct result back - '{got!r}'." # Close and open the clipboard to ensure auto-conversions take place. finally: @@ -68,12 +68,12 @@ def TestText(): try: # Make sure I can still get the text as bytes got = GetClipboardData(win32con.CF_TEXT) - assert got == text_bytes, f"Didnt get the correct result back - '{got!r}'." + assert got == text_bytes, f"Didn't get the correct result back - '{got!r}'." # Make sure we get back the correct types. got = GetClipboardData(win32con.CF_UNICODETEXT) - assert isinstance(got, str), f"Didnt get the correct result back - '{got!r}'." + assert isinstance(got, str), f"Didn't get the correct result back - '{got!r}'." got = GetClipboardData(win32con.CF_OEMTEXT) - assert got == text_bytes, f"Didnt get the correct result back - '{got!r}'." + assert got == text_bytes, f"Didn't get the correct result back - '{got!r}'." print("Clipboard text tests worked correctly") finally: CloseClipboard() @@ -127,7 +127,7 @@ def TestCustomFormat(): # Now read it back. data = GetClipboardData(fmt) loaded_object = pickle.loads(data) - assert pickle.loads(data) == pickled_object, "Didnt get the correct data!" + assert pickle.loads(data) == pickled_object, "Didn't get the correct data!" print("Clipboard custom format tests worked correctly") finally: diff --git a/win32/Demos/win32comport_demo.py b/win32/Demos/win32comport_demo.py index 2ee4c3c15..1596e4139 100644 --- a/win32/Demos/win32comport_demo.py +++ b/win32/Demos/win32comport_demo.py @@ -11,7 +11,7 @@ # This demo uses userlapped IO, so that none of the read or write operations actually block (however, # in this sample, the very next thing we do _is_ block - so it shows off the concepts even though it -# doesnt exploit them. +# doesn't exploit them. import msvcrt # For the getch() function. import sys diff --git a/win32/Demos/win32netdemo.py b/win32/Demos/win32netdemo.py index 35aecda2e..7900a81a3 100644 --- a/win32/Demos/win32netdemo.py +++ b/win32/Demos/win32netdemo.py @@ -87,7 +87,7 @@ def GroupEnum(): break if not resume: break - assert nmembers, "Couldnt find a single member in a single group!" + assert nmembers, "Couldn't find a single member in a single group!" print("Enumerated all the groups") @@ -115,7 +115,7 @@ def LocalGroupEnum(): break if not resume: break - assert nmembers, "Couldnt find a single member in a single group!" + assert nmembers, "Couldn't find a single member in a single group!" print("Enumerated all the local groups") @@ -206,7 +206,7 @@ def SetInfo(userName=None): def SetComputerInfo(): - "Doesnt actually change anything, just make sure we could ;-)" + "Doesn't actually change anything, just make sure we could ;-)" info = win32net.NetWkstaGetInfo(None, 502) # *sob* - but we can't! Why not!!! # win32net.NetWkstaSetInfo(None, 502, info) diff --git a/win32/Demos/win32wnet/testwnet.py b/win32/Demos/win32wnet/testwnet.py index ca913e58f..1ddbf7d7a 100644 --- a/win32/Demos/win32wnet/testwnet.py +++ b/win32/Demos/win32wnet/testwnet.py @@ -115,7 +115,7 @@ def TestGetUser(): u = win32wnet.WNetGetUser() print("Current global user is", repr(u)) if u != win32wnet.WNetGetUser(None): - raise RuntimeError("Default value didnt seem to work!") + raise RuntimeError("Default value didn't seem to work!") TestGetUser() diff --git a/win32/Lib/regutil.py b/win32/Lib/regutil.py index 983763732..2b55e043f 100644 --- a/win32/Lib/regutil.py +++ b/win32/Lib/regutil.py @@ -76,7 +76,7 @@ def RegisterPythonExe(exeFullPath, exeAlias=None, exeAppPath=None): of the filename is used. exeAppPath -- Not supported. """ - # Note - Dont work on win32s (but we dont care anymore!) + # Note - Don't work on win32s (but we don't care anymore!) if exeAppPath: raise error("Do not support exeAppPath argument currently") if exeAlias is None: @@ -125,7 +125,7 @@ def UnregisterNamedPath(name): def GetRegisteredNamedPath(name): - """Get a registered named path, or None if it doesnt exist.""" + """Get a registered named path, or None if it doesn't exist.""" keyStr = BuildDefaultPythonKey() + "\\PythonPath" if name: keyStr = keyStr + "\\" + name diff --git a/win32/Lib/win32serviceutil.py b/win32/Lib/win32serviceutil.py index 0552e5fc3..98bc9735a 100644 --- a/win32/Lib/win32serviceutil.py +++ b/win32/Lib/win32serviceutil.py @@ -835,7 +835,7 @@ def HandleCommandLine( # Note that we install the service before calling the custom option # handler, so if the custom handler fails, we have an installed service (from NT's POV) # but is unlikely to work, as the Python code controlling it failed. Therefore - # we remove the service if the first bit works, but the second doesnt! + # we remove the service if the first bit works, but the second doesn't! try: InstallService( serviceClassString, diff --git a/win32/Lib/win32verstamp.py b/win32/Lib/win32verstamp.py index a705c967f..1fe0a6b7f 100644 --- a/win32/Lib/win32verstamp.py +++ b/win32/Lib/win32verstamp.py @@ -121,7 +121,7 @@ def VS_VERSION_INFO(maj, min, sub, build, sdata, vdata, debug=0, is_dll=1): def stamp(pathname, options): # For some reason, the API functions report success if the file is open - # but doesnt work! Try and open the file for writing, just to see if it is + # but doesn't work! Try and open the file for writing, just to see if it is # likely the stamp will work! try: f = open(pathname, "a+b") diff --git a/win32/help/win32net.html b/win32/help/win32net.html index 36e351b1f..6d4d62e18 100644 --- a/win32/help/win32net.html +++ b/win32/help/win32net.html @@ -217,7 +217,7 @@

    Creating a share

    Selecting that link will show a number of different PySHARE_INFO -structures; lets assume we want to use the PySHARE_INFO_2 structure. +structures; let's assume we want to use the PySHARE_INFO_2 structure. So do you create this PySHARE_INFO_2 Object? It is really quite simple: diff --git a/win32/scripts/VersionStamp/vssutil.py b/win32/scripts/VersionStamp/vssutil.py index 0a2fb9fc6..1e8da2bbc 100644 --- a/win32/scripts/VersionStamp/vssutil.py +++ b/win32/scripts/VersionStamp/vssutil.py @@ -115,7 +115,7 @@ def SubstituteVSSInFile(projectName, inName, outName): if version.Label: break else: - print("Couldnt find a label in the sourcesafe project!") + print("Couldn't find a label in the sourcesafe project!") return # Setup some local helpers for the conversion strings. vss_label = version.Label diff --git a/win32/src/PerfMon/PerfObjectType.cpp b/win32/src/PerfMon/PerfObjectType.cpp index f6feb1732..b496b9941 100644 --- a/win32/src/PerfMon/PerfObjectType.cpp +++ b/win32/src/PerfMon/PerfObjectType.cpp @@ -129,7 +129,7 @@ void PyPERF_OBJECT_TYPE::Term() m_obPerfMonManager = NULL; } -// Get the counter objects that Im gunna use. +// Get the counter objects that I'm gunna use. BOOL PyPERF_OBJECT_TYPE::InitPythonObjects(PyObject *obCounters) { m_obCounters = obCounters; @@ -138,8 +138,8 @@ BOOL PyPERF_OBJECT_TYPE::InitPythonObjects(PyObject *obCounters) } // Init the memory layout of the win32 perfmon structures from the mapping manager. -// Doesnt keep a reference to the mapping manager, but assumes it will stay alive -// until Im term'd! +// Doesn't keep a reference to the mapping manager, but assumes it will stay alive +// until I'm term'd! // Also _removes_ the reference to the counters' and _adds_ a reference to // the PyPerMonManager object BOOL PyPERF_OBJECT_TYPE::InitMemoryLayout(MappingManager *pmm, PyPerfMonManager *obPerfMonManager) diff --git a/win32/src/PerfMon/PyPerfMonControl.h b/win32/src/PerfMon/PyPerfMonControl.h index e3b0a358c..8a450683e 100644 --- a/win32/src/PerfMon/PyPerfMonControl.h +++ b/win32/src/PerfMon/PyPerfMonControl.h @@ -5,7 +5,7 @@ // A PERF_OBJECT_TYPE // A number of PERF_COUNTER_DEFINITIONs -// dont manage these size better cos I cant be bothered! +// don't manage these size better cos I can't be bothered! const int MMCD_SERVICE_SIZE = 25; const int MMCD_EVENTSOURCE_SIZE = 25; diff --git a/win32/src/PerfMon/perfmondata.cpp b/win32/src/PerfMon/perfmondata.cpp index 26ba10099..053387996 100644 --- a/win32/src/PerfMon/perfmondata.cpp +++ b/win32/src/PerfMon/perfmondata.cpp @@ -171,7 +171,7 @@ DWORD APIENTRY OpenPerformanceData(LPWSTR lpDeviceNames) if (!dwOpenCount) { // open Eventlog interface // The memmapped file name is derived from the DLL name. // Later we may offer to look up a string resource, but not now! - // NOTE - We dont open the event log yet, as we may wish to open it with a custom name + // NOTE - We don't open the event log yet, as we may wish to open it with a custom name // open shared memory used by application to pass performance values hSharedMemory = OpenFileMapping(FILE_MAP_READ, FALSE, szFileMapping); diff --git a/win32/src/PyTime.cpp b/win32/src/PyTime.cpp index 214186a3e..502ed8787 100644 --- a/win32/src/PyTime.cpp +++ b/win32/src/PyTime.cpp @@ -151,7 +151,7 @@ PyTypeObject PyWinDateTimeType = { PyWinDateTimeType_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ - // we fill tp_base in at runtime; its not available statically. + // we fill tp_base in at runtime; it's not available statically. 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ diff --git a/win32/src/PyUnicode.cpp b/win32/src/PyUnicode.cpp index e185b7e80..b7382401e 100644 --- a/win32/src/PyUnicode.cpp +++ b/win32/src/PyUnicode.cpp @@ -21,7 +21,7 @@ BOOL PyWinObject_AsPfnAllocatedWCHAR(PyObject *stringObject, void *(*pfnAllocato if (buf == NULL) return FALSE; - /* We assume that we dont need more 'wide characters' for the result + /* We assume that we don't need more 'wide characters' for the result then the number of bytes in the input. Often we will need less, as the input may contain multi-byte chars, but we should never need more diff --git a/win32/src/PyWinTypes.h b/win32/src/PyWinTypes.h index a80d410bb..620aada9c 100644 --- a/win32/src/PyWinTypes.h +++ b/win32/src/PyWinTypes.h @@ -537,7 +537,7 @@ PYWINTYPES_EXPORT PyObject *PyWinMethod_NewHANDLE(PyObject *self, PyObject *args // A global function that does the right thing wrt closing a "handle". // The object can be either a PyHANDLE or an integer. -// If result is FALSE, a Python error is all setup (cf PyHANDLE::Close(), which doesnt set the Python error) +// If result is FALSE, a Python error is all setup (cf PyHANDLE::Close(), which doesn't set the Python error) PYWINTYPES_EXPORT BOOL PyWinObject_CloseHANDLE(PyObject *obHandle); PYWINTYPES_EXPORT BOOL PyWinObject_AsHKEY(PyObject *ob, HKEY *pRes); diff --git a/win32/src/PyWinTypesmodule.cpp b/win32/src/PyWinTypesmodule.cpp index e333de1ea..1564f84d5 100644 --- a/win32/src/PyWinTypesmodule.cpp +++ b/win32/src/PyWinTypesmodule.cpp @@ -1084,15 +1084,15 @@ PYWINTYPES_EXPORT WCHAR *GetPythonTraceback(PyObject *exc_type, PyObject *exc_va modStringIO = PyImport_ImportModule("io"); if (modStringIO == NULL) - GPEM_ERROR("cant import cStringIO"); + GPEM_ERROR("can't import cStringIO"); modTB = PyImport_ImportModule("traceback"); if (modTB == NULL) - GPEM_ERROR("cant import traceback"); + GPEM_ERROR("can't import traceback"); /* Construct a cStringIO object */ obFuncStringIO = PyObject_GetAttrString(modStringIO, "StringIO"); if (obFuncStringIO == NULL) - GPEM_ERROR("cant find cStringIO.StringIO"); + GPEM_ERROR("can't find cStringIO.StringIO"); obStringIO = PyObject_CallObject(obFuncStringIO, NULL); if (obStringIO == NULL) GPEM_ERROR("cStringIO.StringIO() failed"); @@ -1100,7 +1100,7 @@ PYWINTYPES_EXPORT WCHAR *GetPythonTraceback(PyObject *exc_type, PyObject *exc_va /* Get the traceback.print_exception function, and call it. */ obFuncTB = PyObject_GetAttrString(modTB, "print_exception"); if (obFuncTB == NULL) - GPEM_ERROR("cant find traceback.print_exception"); + GPEM_ERROR("can't find traceback.print_exception"); // Py3k has added an undocumented 'chain' argument which defaults to True // and causes all kinds of exceptions while trying to print a traceback! // This *could* be useful thought if we can tame it - later! @@ -1111,7 +1111,7 @@ PYWINTYPES_EXPORT WCHAR *GetPythonTraceback(PyObject *exc_type, PyObject *exc_va Py_None, // limit obStringIO, chain); if (argsTB == NULL) - GPEM_ERROR("cant make print_exception arguments"); + GPEM_ERROR("can't make print_exception arguments"); obResult = PyObject_CallObject(obFuncTB, argsTB); if (obResult == NULL) { @@ -1127,7 +1127,7 @@ PYWINTYPES_EXPORT WCHAR *GetPythonTraceback(PyObject *exc_type, PyObject *exc_va Py_DECREF(obFuncStringIO); obFuncStringIO = PyObject_GetAttrString(obStringIO, "getvalue"); if (obFuncStringIO == NULL) - GPEM_ERROR("cant find getvalue function"); + GPEM_ERROR("can't find getvalue function"); Py_DECREF(obResult); obResult = PyObject_CallObject(obFuncStringIO, NULL); if (obResult == NULL) diff --git a/win32/src/PythonService.cpp b/win32/src/PythonService.cpp index 48d65a540..181c97b50 100644 --- a/win32/src/PythonService.cpp +++ b/win32/src/PythonService.cpp @@ -599,7 +599,7 @@ static void PyService_InitPython() have_init = TRUE; // Often for a service, __argv[0] will be just "ExeName", rather // than "c:\path\to\ExeName.exe" - // This, however, shouldnt be a problem, as Python itself + // This, however, shouldn't be a problem, as Python itself // knows how to get the .EXE name when it needs. int pyargc; WCHAR **pyargv = CommandLineToArgvW(GetCommandLineW(), &pyargc); @@ -844,7 +844,7 @@ void WINAPI service_main(DWORD dwArgc, LPTSTR *lpszArgv) instance = LoadPythonServiceInstance(pe->klass, dwArgc, lpszArgv); // If Python has not yet registered the service control handler, then // we are in serious trouble - it is likely the service will enter a - // zombie state, where it wont do anything, but you can not start + // zombie state, where it won't do anything, but you can not start // another. Therefore, we still create register the handler, thereby // getting a handle, so we can immediately tell Windows the service // is rooted (that is a technical term!) @@ -899,7 +899,7 @@ void WINAPI service_main(DWORD dwArgc, LPTSTR *lpszArgv) // try to report the stopped status to the service control manager. Py_XDECREF(start); Py_XDECREF(instance); - if (pe && pe->sshStatusHandle) { // Wont be true if debugging. + if (pe && pe->sshStatusHandle) { // Won't be true if debugging. if (!SetServiceStatus(pe->sshStatusHandle, (stopWithError ? &stoppedErrorStatus : &stoppedStatus))) ReportAPIError(PYS_E_API_CANT_SET_STOPPED); } diff --git a/win32/src/_winxptheme.i b/win32/src/_winxptheme.i index 7b2b72bfa..3ef07bbb9 100644 --- a/win32/src/_winxptheme.i +++ b/win32/src/_winxptheme.i @@ -168,7 +168,7 @@ typedef long FLAGS; // class name) to provide the class an opportunity // to get the "best" match between the class and // the current theme. For example, a button might -// pass L"OkButton, Button" if its ID=ID_OK. If +// pass L"OkButton, Button" if it's ID=ID_OK. If // the current theme has an entry for OkButton, // that will be used. Otherwise, we fall back on // the normal Button entry. diff --git a/win32/src/win32apimodule.cpp b/win32/src/win32apimodule.cpp index f4a6dfdd9..026816e69 100644 --- a/win32/src/win32apimodule.cpp +++ b/win32/src/win32apimodule.cpp @@ -1927,7 +1927,7 @@ static PyObject *PyGetProfileSection(PyObject *self, PyObject *args) delete[] szRetBuf; size *= 2; } - szRetBuf = new TCHAR[size]; /* cant fail - may raise exception */ + szRetBuf = new TCHAR[size]; /* can't fail - may raise exception */ if (szRetBuf == NULL) { PyErr_SetString(PyExc_MemoryError, "Error allocating space for return buffer"); break; @@ -3273,7 +3273,7 @@ static BOOL PyWinObject_AsRegistryValue(PyObject *value, DWORD typ, BYTE **retDa } return FALSE; case REG_BINARY: - // ALSO handle ALL unknown data types here. Even if we cant support + // ALSO handle ALL unknown data types here. Even if we can't support // it natively, we should handle the bits. default: { PyWinBufferView pybuf(value, false, true); // None ok @@ -3353,7 +3353,7 @@ static PyObject *PyWinObject_FromRegistryValue(BYTE *retDataBuf, DWORD retDataSi break; } case REG_BINARY: - // ALSO handle ALL unknown data types here. Even if we cant support + // ALSO handle ALL unknown data types here. Even if we can't support // it natively, we should handle the bits. default: if (retDataSize == 0) { @@ -5185,8 +5185,8 @@ PyObject *PyEnumResourceLanguages(PyObject *self, PyObject *args) // Win32 Exception Handler. // // A recursive routine called by the exception handler! -// (I hope this doesnt wind too far on a stack overflow :-) -// Limited testing indicates it doesnt, and this can handle +// (I hope this doesn't wind too far on a stack overflow :-) +// Limited testing indicates it doesn't, and this can handle // a stack overflow fine. PyObject *MakeExceptionRecord(PEXCEPTION_RECORD pExceptionRecord) { diff --git a/win32/src/win32clipboardmodule.cpp b/win32/src/win32clipboardmodule.cpp index 8f552f691..9ffe4b076 100644 --- a/win32/src/win32clipboardmodule.cpp +++ b/win32/src/win32clipboardmodule.cpp @@ -863,7 +863,7 @@ static PyObject *py_set_clipboard_data(PyObject *self, PyObject *args) buf = pybuf.ptr(); bufSize = pybuf.len(); if ((PyBytes_Check(obhandle)) && (isTextFormat(format))) - bufSize++; // size doesnt include nulls! + bufSize++; // size doesn't include nulls! // else assume buffer needs no terminator... } handle = GlobalAlloc(GHND, bufSize); diff --git a/win32/src/win32gui.i b/win32/src/win32gui.i index c9fd1cf12..a59ae2823 100644 --- a/win32/src/win32gui.i +++ b/win32/src/win32gui.i @@ -6010,7 +6010,7 @@ PyGetClassName(PyObject *self, PyObject *args) return NULL; if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd)) return NULL; - // dont bother with lock - no callback possible. + // don't bother with lock - no callback possible. int nchars = GetClassName(hwnd, buf, sizeof buf/sizeof buf[0]); if (nchars==0) return PyWin_SetAPIError("GetClassName"); diff --git a/win32/src/win32net/win32netmisc.cpp b/win32/src/win32net/win32netmisc.cpp index 70213e28e..025665e36 100644 --- a/win32/src/win32net/win32netmisc.cpp +++ b/win32/src/win32net/win32netmisc.cpp @@ -373,7 +373,7 @@ static PyObject *PyNetShareEnum1(WCHAR *szServerName) return NULL; } - p_nr++; // next object (its a ++ because it is a typed pointer) + p_nr++; // next object (it's a ++ because it is a typed pointer) dwCount--; } while (dwCount); }; // if dwCount diff --git a/win32/src/win32net/win32netuser.cpp b/win32/src/win32net/win32netuser.cpp index d82c22f3e..e3977d4d1 100644 --- a/win32/src/win32net/win32netuser.cpp +++ b/win32/src/win32net/win32netuser.cpp @@ -511,7 +511,7 @@ PyObject *PyNetUserGetGroups(PyObject *self, PyObject *args) return NULL; } - p_nr++; // next object (its a ++ because it is a typed pointer!) + p_nr++; // next object (it's a ++ because it is a typed pointer!) dwCount--; } while (dwCount); }; // if (dwCount > 0) @@ -597,7 +597,7 @@ PyObject *PyNetUserGetLocalGroups(PyObject *self, PyObject *args) return NULL; } - p_nr++; // next object (its a ++ because it is a typed pointer!) + p_nr++; // next object (it's a ++ because it is a typed pointer!) dwCount--; } while (dwCount); }; // if (dwCount > 0) diff --git a/win32/src/win32pdhmodule.cpp b/win32/src/win32pdhmodule.cpp index 3c795fe31..5631da52a 100644 --- a/win32/src/win32pdhmodule.cpp +++ b/win32/src/win32pdhmodule.cpp @@ -665,7 +665,7 @@ static PyObject *PyGetFormattedCounterValue(PyObject *self, PyObject *args) else if (format & PDH_FMT_LARGE) rc = PyLong_FromLongLong(result.largeValue); else { - PyErr_SetString(PyExc_ValueError, "Dont know how to convert the result"); + PyErr_SetString(PyExc_ValueError, "Don't know how to convert the result"); rc = NULL; } PyObject *realrc = Py_BuildValue("iO", type, rc); @@ -731,7 +731,7 @@ static PyObject *PyPdhGetFormattedCounterArray(PyObject *self, PyObject *args) else if (format & PDH_FMT_LARGE) value = PyLong_FromLongLong(pItems[i].FmtValue.largeValue); else { - PyErr_SetString(PyExc_ValueError, "Dont know how to convert the result"); + PyErr_SetString(PyExc_ValueError, "Don't know how to convert the result"); Py_XDECREF(rc); Py_XDECREF(key); rc = NULL; diff --git a/win32/src/win32process.i b/win32/src/win32process.i index c7e95ddaa..beeb85981 100644 --- a/win32/src/win32process.i +++ b/win32/src/win32process.i @@ -460,7 +460,7 @@ static PyObject *myCreateRemoteThread(PyObject *self, PyObject *args) %native (CreateRemoteThread) myCreateRemoteThread; -// Wont expose ExitThread!!! May leak all sorts of things! +// Won't expose ExitThread!!! May leak all sorts of things! %{ diff --git a/win32/src/win32security_sspi.cpp b/win32/src/win32security_sspi.cpp index 021ca5c5f..32960b429 100644 --- a/win32/src/win32security_sspi.cpp +++ b/win32/src/win32security_sspi.cpp @@ -67,7 +67,7 @@ PySequenceMethods PySecBufferDesc_sequencemethods = { NULL, // objobjproc sq_contains; NULL, // binaryfunc sq_inplace_concat; NULL // intargfunc sq_inplace_repeat; -}; // ??? why isnt append included ??? +}; // ??? why isn't append included ??? // @object PySecBufferDesc|Sequence-like object that contains a group of buffers to be used with SSPI functions. // @comm This object is created using win32security.PySecBufferDescType(Version), where Version is an int that diff --git a/win32/src/win32wnet/win32wnet.cpp b/win32/src/win32wnet/win32wnet.cpp index c36d7e619..fe5c6ccb1 100644 --- a/win32/src/win32wnet/win32wnet.cpp +++ b/win32/src/win32wnet/win32wnet.cpp @@ -314,7 +314,7 @@ static PyObject *PyWNetEnumResource(PyObject *self, PyObject *args) // nothing hard & fast here, just a rough sizing..have to figure out something better later if (dwMaxCount == 0) // using 0 to mean a default - dwMaxCount = dwCount = 64; // lets default at 64 items + dwMaxCount = dwCount = 64; // let's default at 64 items else dwCount = dwMaxCount; // yes virginia, 0xffffffff is a LOT of items @@ -364,7 +364,7 @@ static PyObject *PyWNetEnumResource(PyObject *self, PyObject *args) return (ReturnError("Unable to create return list", "WNetEnumResource")); } - p_nr++; // next NETRESOURCE object (its a ++ because it is a typed pointer) + p_nr++; // next NETRESOURCE object (it's a ++ because it is a typed pointer) dwCount--; } while (dwCount); }; // if @@ -457,7 +457,7 @@ static PyObject *PyWNetGetUniversalName(PyObject *self, PyObject *args) // First get the buffer size. { - Py_BEGIN_ALLOW_THREADS char temp_buf[] = ""; // doesnt appear to like NULL!! + Py_BEGIN_ALLOW_THREADS char temp_buf[] = ""; // doesn't appear to like NULL!! errcode = WNetGetUniversalName(szLocalPath, level, &temp_buf, &length); Py_END_ALLOW_THREADS } diff --git a/win32/test/handles.py b/win32/test/handles.py index eb7152495..01b7f17ef 100644 --- a/win32/test/handles.py +++ b/win32/test/handles.py @@ -93,7 +93,7 @@ def testOtherHandle(self): # but the above doesn't really test everything - we want a way to # pass the handle directly into PyWinLong_AsVoidPtr. One way to # to that is to abuse win32api.GetProcAddress() - the 2nd param - # is passed to PyWinLong_AsVoidPtr() if its not a string. + # is passed to PyWinLong_AsVoidPtr() if it's not a string. # passing a handle value of '1' should work - there is something # at that ordinal win32api.GetProcAddress(sys.dllhandle, h) diff --git a/win32/test/test_pywintypes.py b/win32/test/test_pywintypes.py index 67c4a5afe..cf679b756 100644 --- a/win32/test/test_pywintypes.py +++ b/win32/test/test_pywintypes.py @@ -22,7 +22,7 @@ def testPyTimeFormat(self): def testPyTimePrint(self): # This used to crash with an invalid, or too early time. # We don't really want to check that it does cause a ValueError - # (as hopefully this wont be true forever). So either working, or + # (as hopefully this won't be true forever). So either working, or # ValueError is OK. try: t = pywintypes.Time(-2) diff --git a/win32/test/test_win32file.py b/win32/test/test_win32file.py index 159c45e67..ab5eac900 100644 --- a/win32/test/test_win32file.py +++ b/win32/test/test_win32file.py @@ -556,7 +556,7 @@ def testIter(self): self.assertEqual(set1, set2) def testBadDir(self): - dir = os.path.join(os.getcwd(), "a dir that doesnt exist", "*") + dir = os.path.join(os.getcwd(), "a dir that doesn't exist", "*") self.assertRaises(win32file.error, win32file.FindFilesIterator, dir) def testEmptySpec(self): @@ -724,7 +724,7 @@ def testEncrypt(self): except win32file.error as details: if details.winerror != winerror.ERROR_ACCESS_DENIED: raise - print("It appears this is not NTFS - cant encrypt/decrypt") + print("It appears this is not NTFS - can't encrypt/decrypt") win32file.DecryptFile(fname) finally: if f is not None: