include: Change long to LONG in tom.idl.
diff --git a/include/tom.idl b/include/tom.idl
index f86c885..35be7f7 100644
--- a/include/tom.idl
+++ b/include/tom.idl
@@ -204,23 +204,23 @@
 {
     HRESULT GetName([retval, out]BSTR *pName);
     HRESULT GetSelection([retval, out]ITextSelection **ppSel);
-    HRESULT GetStoryCount([retval, out]long *pCount);
+    HRESULT GetStoryCount([retval, out]LONG *pCount);
     HRESULT GetStoryRanges([retval, out]ITextStoryRanges **ppStories);
-    HRESULT GetSaved([retval, out]long *pValue);
-    HRESULT SetSaved([in]long Value);
+    HRESULT GetSaved([retval, out]LONG *pValue);
+    HRESULT SetSaved([in]LONG Value);
     HRESULT GetDefaultTabStop([retval, out]float *pValue);
     HRESULT SetDefaultTabStop([in]float Value);
     HRESULT New();
-    HRESULT Open([in]VARIANT *pVar, [in]long Flags, [in]long CodePage);
-    HRESULT Save([in]VARIANT *pVar, [in]long Flags, [in]long CodePage);
-    HRESULT Freeze([retval, out]long *pCount);
-    HRESULT Unfreeze([retval, out]long *pCount);
+    HRESULT Open([in]VARIANT *pVar, [in]LONG Flags, [in]LONG CodePage);
+    HRESULT Save([in]VARIANT *pVar, [in]LONG Flags, [in]LONG CodePage);
+    HRESULT Freeze([retval, out]LONG *pCount);
+    HRESULT Unfreeze([retval, out]LONG *pCount);
     HRESULT BeginEditCollection();
     HRESULT EndEditCollection();
-    HRESULT Undo([in]long Count, [retval, out]long *prop);
-    HRESULT Redo([in]long Count, [retval, out]long *prop);
-    HRESULT Range([in]long cp1, [in]long cp2, [retval, out]ITextRange**ppRange);
-    HRESULT RangeFromPoint([in]long x, [in]long y, [retval, out]ITextRange**ppRange);
+    HRESULT Undo([in]LONG Count, [retval, out]LONG *prop);
+    HRESULT Redo([in]LONG Count, [retval, out]LONG *prop);
+    HRESULT Range([in]LONG cp1, [in]LONG cp2, [retval, out]ITextRange **ppRange);
+    HRESULT RangeFromPoint([in]LONG x, [in]LONG y, [retval, out]ITextRange **ppRange);
 }
 
 interface ITextFont;
@@ -234,54 +234,54 @@
 {
     HRESULT GetText([retval, out]BSTR *pbstr);
     HRESULT SetText([in]BSTR bstr);
-    HRESULT GetChar([retval, out]long *pch);
-    HRESULT SetChar([in]long ch);
+    HRESULT GetChar([retval, out]LONG *pch);
+    HRESULT SetChar([in]LONG ch);
     HRESULT GetDuplicate([retval, out]ITextRange **ppRange);
     HRESULT GetFormattedText([retval, out]ITextRange **ppRange);
     HRESULT SetFormattedText([in]ITextRange *pRange);
-    HRESULT GetStart([retval, out]long *pcpFirst);
-    HRESULT SetStart([in]long cpFirst);
-    HRESULT GetEnd([retval, out]long *pcpLim);
-    HRESULT SetEnd([in]long cpLim);
+    HRESULT GetStart([retval, out]LONG *pcpFirst);
+    HRESULT SetStart([in]LONG cpFirst);
+    HRESULT GetEnd([retval, out]LONG *pcpLim);
+    HRESULT SetEnd([in]LONG cpLim);
     HRESULT GetFont([retval, out]ITextFont **pFont);
     HRESULT SetFont([in]ITextFont *pFont);
     HRESULT GetPara([retval, out]ITextPara **ppPara);
     HRESULT SetPara([in]ITextPara *pPara);
-    HRESULT GetStoryLength([retval, out]long *pcch);
-    HRESULT GetStoryType([retval, out]long *pValue);
-    HRESULT Collapse([in]long bStart);
-    HRESULT Expand([in]long Unit, [retval, out]long *pDelta);
-    HRESULT GetIndex([in]long Unit, [retval, out]long *pIndex);
-    HRESULT SetIndex([in]long Unit, [in]long Index, [in]long Extend);
-    HRESULT SetRange([in]long cpActive, [in]long cpOther);
-    HRESULT InRange([in]ITextRange *pRange, [retval, out]long *pb);
-    HRESULT InStory([in]ITextRange *pRange, [retval, out]long *pb);
-    HRESULT IsEqual([in]ITextRange *pRange, [retval, out]long *pb);
+    HRESULT GetStoryLength([retval, out]LONG *pcch);
+    HRESULT GetStoryType([retval, out]LONG *pValue);
+    HRESULT Collapse([in]LONG bStart);
+    HRESULT Expand([in]LONG Unit, [retval, out]LONG *pDelta);
+    HRESULT GetIndex([in]LONG Unit, [retval, out]LONG *pIndex);
+    HRESULT SetIndex([in]LONG Unit, [in]LONG Index, [in]LONG Extend);
+    HRESULT SetRange([in]LONG cpActive, [in]LONG cpOther);
+    HRESULT InRange([in]ITextRange *pRange, [retval, out]LONG *pb);
+    HRESULT InStory([in]ITextRange *pRange, [retval, out]LONG *pb);
+    HRESULT IsEqual([in]ITextRange *pRange, [retval, out]LONG *pb);
     HRESULT Select();
-    HRESULT StartOf([in]long Unit, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT EndOf([in]long Unit, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT Move([in]long Unit, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveStart([in]long Unit, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveEnd([in]long Unit, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveWhile([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveStartWhile([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveEndWhile([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveUntil([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveStartUntil([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveEndUntil([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT FindText([in]BSTR bstr, [in]long cch, [in]long Flags, [retval, out]long *pLength);
-    HRESULT FindTextStart([in]BSTR bstr, [in]long cch, [in]long Flags, [retval, out]long *pLength);
-    HRESULT FindTextEnd([in]BSTR bstr, [in]long cch, [in]long Flags, [retval, out]long *pLength);
-    HRESULT Delete([in]long Unit, [in]long Count, [retval, out]long *pDelta);
+    HRESULT StartOf([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT EndOf([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT Move([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveStart([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveEnd([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveStartWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveEndWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveStartUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveEndUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT FindText([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
+    HRESULT FindTextStart([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
+    HRESULT FindTextEnd([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
+    HRESULT Delete([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
     HRESULT Cut([out]VARIANT *pVar);
     HRESULT Copy([out]VARIANT *pVar);
-    HRESULT Paste([in]VARIANT *pVar, [in]long Format);
-    HRESULT CanPaste([in]VARIANT *pVar, [in]long Format, [retval, out]long *pb);
-    HRESULT CanEdit([retval, out]long *pb);
-    HRESULT ChangeCase([in]long Type);
-    HRESULT GetPoint([in]long Type, [out]long *cx, [out]long *cy);
-    HRESULT SetPoint([in]long x, [in]long y, [in]long Type, [in]long Extend);
-    HRESULT ScrollIntoView([in]long Value);
+    HRESULT Paste([in]VARIANT *pVar, [in]LONG Format);
+    HRESULT CanPaste([in]VARIANT *pVar, [in]LONG Format, [retval, out]LONG *pb);
+    HRESULT CanEdit([retval, out]LONG *pb);
+    HRESULT ChangeCase([in]LONG Type);
+    HRESULT GetPoint([in]LONG Type, [out]LONG *cx, [out]LONG *cy);
+    HRESULT SetPoint([in]LONG x, [in]LONG y, [in]LONG Type, [in]LONG Extend);
+    HRESULT ScrollIntoView([in]LONG Value);
     HRESULT GetEmbeddedObject([retval, out]IUnknown **ppv);
 }
 
@@ -291,15 +291,15 @@
 ]
 interface ITextSelection : ITextRange
 {
-    HRESULT GetFlags([retval, out]long *pFlags);
-    HRESULT SetFlags([in]long Flags);
-    HRESULT GetType([retval, out]long *pType);
-    HRESULT MoveLeft([in]long Unit, [in]long Count, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT MoveRight([in]long Unit, [in]long Count, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT MoveUp([in]long Unit, [in]long Count, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT MoveDown([in]long Unit, [in]long Count, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT HomeKey([in]long Unit, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT EndKey([in]long Unit, [in]long Extend, [retval, out]long *pDelta);
+    HRESULT GetFlags([retval, out]LONG *pFlags);
+    HRESULT SetFlags([in]LONG Flags);
+    HRESULT GetType([retval, out]LONG *pType);
+    HRESULT MoveLeft([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT MoveRight([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT MoveUp([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT MoveDown([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT HomeKey([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT EndKey([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
     HRESULT TypeText([in]BSTR bstr);
 }
 
@@ -311,59 +311,59 @@
 {
     HRESULT GetDuplicate([retval, out]ITextFont **ppFont);
     HRESULT SetDuplicate([in]ITextFont *pFont);
-    HRESULT CanChange([out]long *pB);
-    HRESULT IsEqual([in]ITextFont *pFont, [retval, out]long *pB);
-    HRESULT Reset([in]long Value);
-    HRESULT GetStyle([retval, out]long *pValue);
-    HRESULT SetStyle([in]long Value);
-    HRESULT GetAllCaps([retval, out]long *pValue);
-    HRESULT SetAllCaps([in]long Value);
-    HRESULT GetAnimation([retval, out]long *pValue);
-    HRESULT SetAnimation([in]long Value);
-    HRESULT GetBackColor([retval, out]long *pValue);
-    HRESULT SetBackColor([in]long Value);
-    HRESULT GetBold([retval, out]long *pValue);
-    HRESULT SetBold([in]long Value);
-    HRESULT GetEmboss([retval, out]long *pValue);
-    HRESULT SetEmboss([in]long Value);
-    HRESULT GetForeColor([retval, out]long *pValue);
-    HRESULT SetForeColor([in]long Value);
-    HRESULT GetHidden([retval, out]long *pValue);
-    HRESULT SetHidden([in]long Value);
-    HRESULT GetEngrave([retval, out]long *pValue);
-    HRESULT SetEngrave([in]long Value);
-    HRESULT GetItalic([retval, out]long *pValue);
-    HRESULT SetItalic([in]long Value);
-    HRESULT GetKerning([retval, out]long *pValue);
-    HRESULT SetKerning([in]long Value);
-    HRESULT GetLanguageID([retval, out]long *pValue);
-    HRESULT SetLanguageID([in]long Value);
+    HRESULT CanChange([out]LONG *pB);
+    HRESULT IsEqual([in]ITextFont *pFont, [retval, out]LONG *pB);
+    HRESULT Reset([in]LONG Value);
+    HRESULT GetStyle([retval, out]LONG *pValue);
+    HRESULT SetStyle([in]LONG Value);
+    HRESULT GetAllCaps([retval, out]LONG *pValue);
+    HRESULT SetAllCaps([in]LONG Value);
+    HRESULT GetAnimation([retval, out]LONG *pValue);
+    HRESULT SetAnimation([in]LONG Value);
+    HRESULT GetBackColor([retval, out]LONG *pValue);
+    HRESULT SetBackColor([in]LONG Value);
+    HRESULT GetBold([retval, out]LONG *pValue);
+    HRESULT SetBold([in]LONG Value);
+    HRESULT GetEmboss([retval, out]LONG *pValue);
+    HRESULT SetEmboss([in]LONG Value);
+    HRESULT GetForeColor([retval, out]LONG *pValue);
+    HRESULT SetForeColor([in]LONG Value);
+    HRESULT GetHidden([retval, out]LONG *pValue);
+    HRESULT SetHidden([in]LONG Value);
+    HRESULT GetEngrave([retval, out]LONG *pValue);
+    HRESULT SetEngrave([in]LONG Value);
+    HRESULT GetItalic([retval, out]LONG *pValue);
+    HRESULT SetItalic([in]LONG Value);
+    HRESULT GetKerning([retval, out]LONG *pValue);
+    HRESULT SetKerning([in]LONG Value);
+    HRESULT GetLanguageID([retval, out]LONG *pValue);
+    HRESULT SetLanguageID([in]LONG Value);
     HRESULT GetName([retval, out]BSTR *pValue);
     HRESULT SetName([in]BSTR Value);
-    HRESULT GetOutline([retval, out]long *pValue);
-    HRESULT SetOutline([in]long Value);
-    HRESULT GetPosition([retval, out]long *pValue);
-    HRESULT SetPosition([in]long Value);
-    HRESULT GetProtected([retval, out]long *pValue);
-    HRESULT SetProtected([in]long Value);
-    HRESULT GetShadow([retval, out]long *pValue);
-    HRESULT SetShadow([in]long Value);
-    HRESULT GetSize([retval, out]long *pValue);
-    HRESULT SetSize([in]long Value);
-    HRESULT GetSmallCaps([retval, out]long *pValue);
-    HRESULT SetSmallCaps([in]long Value);
+    HRESULT GetOutline([retval, out]LONG *pValue);
+    HRESULT SetOutline([in]LONG Value);
+    HRESULT GetPosition([retval, out]LONG *pValue);
+    HRESULT SetPosition([in]LONG Value);
+    HRESULT GetProtected([retval, out]LONG *pValue);
+    HRESULT SetProtected([in]LONG Value);
+    HRESULT GetShadow([retval, out]LONG *pValue);
+    HRESULT SetShadow([in]LONG Value);
+    HRESULT GetSize([retval, out]LONG *pValue);
+    HRESULT SetSize([in]LONG Value);
+    HRESULT GetSmallCaps([retval, out]LONG *pValue);
+    HRESULT SetSmallCaps([in]LONG Value);
     HRESULT GetSpacing([retval, out]float *pValue);
     HRESULT SetSpacing([in]float Value);
-    HRESULT GetStrikeThrough([retval, out]long *pValue);
-    HRESULT SetStrikeThrough([in]long Value);
-    HRESULT GetSubscript([retval, out]long *pValue);
-    HRESULT SetSubscript([in]long Value);
-    HRESULT GetSuperscript([retval, out]long *pValue);
-    HRESULT SetSuperscript([in]long Value);
-    HRESULT GetUnderline([retval, out]long *pValue);
-    HRESULT SetUnderline([in]long Value);
-    HRESULT GetWeight([retval, out]long *pValue);
-    HRESULT SetWeight([in]long Value);
+    HRESULT GetStrikeThrough([retval, out]LONG *pValue);
+    HRESULT SetStrikeThrough([in]LONG Value);
+    HRESULT GetSubscript([retval, out]LONG *pValue);
+    HRESULT SetSubscript([in]LONG Value);
+    HRESULT GetSuperscript([retval, out]LONG *pValue);
+    HRESULT SetSuperscript([in]LONG Value);
+    HRESULT GetUnderline([retval, out]LONG *pValue);
+    HRESULT SetUnderline([in]LONG Value);
+    HRESULT GetWeight([retval, out]LONG *pValue);
+    HRESULT SetWeight([in]LONG Value);
 }
 
 [
@@ -374,52 +374,52 @@
 {
     HRESULT GetDuplicate([retval, out]ITextPara **ppPara);
     HRESULT SetDuplicate([in]ITextPara *pPara);
-    HRESULT CanChange([out]long *pB);
-    HRESULT IsEqual([in]ITextPara *pPara, [retval, out]long *pB);
-    HRESULT Reset([in]long Value);
-    HRESULT GetStyle([retval, out]long *pValue);
-    HRESULT SetStyle([in]long Value);
-    HRESULT GetAlignment([retval, out]long *pValue);
-    HRESULT SetAlignment([in]long Value);
-    HRESULT GetHyphenation([retval, out]long *pValue);
-    HRESULT SetHyphenation([in]long Value);
+    HRESULT CanChange([out]LONG *pB);
+    HRESULT IsEqual([in]ITextPara *pPara, [retval, out]LONG *pB);
+    HRESULT Reset([in]LONG Value);
+    HRESULT GetStyle([retval, out]LONG *pValue);
+    HRESULT SetStyle([in]LONG Value);
+    HRESULT GetAlignment([retval, out]LONG *pValue);
+    HRESULT SetAlignment([in]LONG Value);
+    HRESULT GetHyphenation([retval, out]LONG *pValue);
+    HRESULT SetHyphenation([in]LONG Value);
     HRESULT GetFirstLineIndent([retval, out]float *pValue);
-    HRESULT GetKeepTogether([retval, out]long *pValue);
-    HRESULT SetKeepTogether([in]long Value);
-    HRESULT GetKeepWithNext([retval, out]long *pValue);
-    HRESULT SetKeepWithNext([in]long Value);
+    HRESULT GetKeepTogether([retval, out]LONG *pValue);
+    HRESULT SetKeepTogether([in]LONG Value);
+    HRESULT GetKeepWithNext([retval, out]LONG *pValue);
+    HRESULT SetKeepWithNext([in]LONG Value);
     HRESULT GetLeftIndent([retval, out]float *pValue);
     HRESULT GetLineSpacing([retval, out]float *pValue);
-    HRESULT GetLineSpacingRule([retval, out]long *pValue);
-    HRESULT GetListAlignment([retval, out]long *pValue);
-    HRESULT SetListAlignment([in]long Value);
-    HRESULT GetListLevelIndex([retval, out]long *pValue);
-    HRESULT SetListLevelIndex([in]long Value);
-    HRESULT GetListStart([retval, out]long *pValue);
-    HRESULT SetListStart([in]long Value);
-    HRESULT GetListTab([retval, out]long *pValue);
-    HRESULT SetListTab([in]long Value);
-    HRESULT GetListType([retval, out]long *pValue);
-    HRESULT SetListType([in]long Value);
-    HRESULT GetNoLineNumber([retval, out]long *pValue);
-    HRESULT SetNoLineNumber([in]long Value);
-    HRESULT GetPageBreakBefore([retval, out]long *pValue);
-    HRESULT SetPageBreakBefore([in]long Value);
+    HRESULT GetLineSpacingRule([retval, out]LONG *pValue);
+    HRESULT GetListAlignment([retval, out]LONG *pValue);
+    HRESULT SetListAlignment([in]LONG Value);
+    HRESULT GetListLevelIndex([retval, out]LONG *pValue);
+    HRESULT SetListLevelIndex([in]LONG Value);
+    HRESULT GetListStart([retval, out]LONG *pValue);
+    HRESULT SetListStart([in]LONG Value);
+    HRESULT GetListTab([retval, out]LONG *pValue);
+    HRESULT SetListTab([in]LONG Value);
+    HRESULT GetListType([retval, out]LONG *pValue);
+    HRESULT SetListType([in]LONG Value);
+    HRESULT GetNoLineNumber([retval, out]LONG *pValue);
+    HRESULT SetNoLineNumber([in]LONG Value);
+    HRESULT GetPageBreakBefore([retval, out]LONG *pValue);
+    HRESULT SetPageBreakBefore([in]LONG Value);
     HRESULT GetRightIndent([retval, out]float *pValue);
     HRESULT SetRightIndent([in]float Value);
     HRESULT SetIndents([in]float StartIndent, [in]float LeftIndent, [in]float RightIndent);
-    HRESULT SetLineSpacing([in]long LineSpacingRule, [in]float LineSpacing);
+    HRESULT SetLineSpacing([in]LONG LineSpacingRule, [in]float LineSpacing);
     HRESULT GetSpaceAfter([retval, out]float *pValue);
     HRESULT SetSpaceAfter([in]float Value);
     HRESULT GetSpaceBefore([retval, out]float *pValue);
     HRESULT SetSpaceBefore([in]float Value);
     HRESULT GetWindowControl([retval, out]float *pValue);
     HRESULT SetWindowControl([in]float Value);
-    HRESULT GetTabCount([retval, out]long *pCount);
-    HRESULT AddTab([in]float tbPos, [in]long tbAlign, [in]long tbLeader);
+    HRESULT GetTabCount([retval, out]LONG *pCount);
+    HRESULT AddTab([in]float tbPos, [in]LONG tbAlign, [in]LONG tbLeader);
     HRESULT ClearAllTabs();
     HRESULT DeleteTab([in]float tbPos);
-    HRESULT GetTab([in]long iTab, [out]float *ptbPos, [out]long *ptbAlign, [out]long *ptbLeader);
+    HRESULT GetTab([in]LONG iTab, [out]float *ptbPos, [out]LONG *ptbAlign, [out]LONG *ptbLeader);
 }
 
 [
@@ -429,6 +429,6 @@
 interface ITextStoryRanges : IDispatch
 {
     HRESULT _NewEnum([retval, out]IUnknown **ppUnkEnum);
-    HRESULT Item([in]long Index, [retval, out]ITextRange **ppRange);
-    HRESULT GetCount([retval, out]long *pCount);
+    HRESULT Item([in]LONG Index, [retval, out]ITextRange **ppRange);
+    HRESULT GetCount([retval, out]LONG *pCount);
 }