public static Int32 XT_PrepareSearch(ref PrepareSearchInfo PSInfo, IntPtr CPages) { ImportedMethods.XWFOutputMessage(string.Format( "C# Dll: XT_PrepareSearch called, PSInfo.lpSearchTerms = {0}, PSInfo.nFlags = {1}" , PSInfo.lpSearchTerms, PSInfo.nFlags)); //from the docs: CPages == IntPtr.Zero means unused code page if (CPages != IntPtr.Zero) { var codePages = (CodePages)Marshal.PtrToStructure(CPages, typeof(CodePages)); ImportedMethods.XWFOutputMessage(string.Format(", CPages = {0}, {1}, {2}, {3}, {4}" , codePages.nCodePage1 , codePages.nCodePage2 , codePages.nCodePage3 , codePages.nCodePage4 , codePages.nCodePage5), XWFOutputMessageFlags.NoLineBreak); } /* * //Adjusting search terms * PSInfo.lpSearchTerms = PSInfo.lpSearchTerms + "adjusted"; * PSInfo.nBufLen = (uint)(PSInfo.lpSearchTerms.Length + 1); * return 1; */ /* * from the docs: * * Return 1 if you have made adjustments to the search terms, * or 0 if not, or -1 if you are not happy with the current settings at all and want the X-Tension * to be unselected. Adjustments to the flags or the code pages are ignored. */ return(0); }
public static Int32 XT_PrepareSearch(ref PrepareSearchInfo PSInfo, IntPtr CPages) { ImportedMethods.XWFOutputMessage(string.Format( "C# Dll: XT_PrepareSearch called, PSInfo.lpSearchTerms = {0}, PSInfo.nFlags = {1}" , PSInfo.lpSearchTerms, PSInfo.nFlags)); //from the docs: CPages == IntPtr.Zero means unused code page if (CPages != IntPtr.Zero) { var codePages = (CodePages)Marshal.PtrToStructure(CPages, typeof(CodePages)); ImportedMethods.XWFOutputMessage(string.Format(", CPages = {0}, {1}, {2}, {3}, {4}" , codePages.nCodePage1 , codePages.nCodePage2 , codePages.nCodePage3 , codePages.nCodePage4 , codePages.nCodePage5), XWFOutputMessageFlags.NoLineBreak); } /* //Adjusting search terms PSInfo.lpSearchTerms = PSInfo.lpSearchTerms + "adjusted"; PSInfo.nBufLen = (uint)(PSInfo.lpSearchTerms.Length + 1); return 1; */ /* from the docs: Return 1 if you have made adjustments to the search terms, or 0 if not, or -1 if you are not happy with the current settings at all and want the X-Tension to be unselected. Adjustments to the flags or the code pages are ignored. */ return 0; }