By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Custom WordBreaker for SQL Server Full-text

P: 1
Hi Guys,

I am having some issues with developing a custom word breaker component for SQL2005 Full-text search and would appreciate if some one can help me.

I have implemented the class with the guidance from this great article with the test app, the breaker works fine. when I implement this class into SQL server 2005, I get different error messages. First I got, "No Signatures Found" which I overcame by applying "exec sp_fulltext_service 'verify_signature', 0". Now I get "The Specified Procedure could not be found." Using the LRTEST tool, I get the following error.

LRTEST /b /c:{E9A7B457-B7E5-3D7A-B7C9-FA4AA63BF78B} "C#"

dll loaded: C:\WINDOWS\system32\mscoree.dll
dll version 2.0.50727.3053
file create time: 7-25-2008 11:16a
file last write time: 7-25-2008 11:16a
FileVersion: '2.0.50727.3053 (netfxsp.050727-3000)'
FileDescription: 'Microsoft .NET Runtime Execution Engine'
CompanyName: 'Microsoft Corporation'
ProductName: 'Microsoft« .NET Framework'
Wordbreaker requires license: Yes
fatal exception caught
exception code: 0xc0000005
exception address 0XE80010C2
attempted write at address 0XE80010C2
eax: 0x36fffec
ebx: 0
ecx: 0x923398
edx: 0x6f9b0
edi: 0
esi: 0
ebp: 0x6fa24
eip: 0xe80010c2
esp: 0x6f988
fatal exception code 0xc0000005

Here is my signatures in the WordBreaker Class.

public void Init(bool fQuery, int maxTokenSize, out bool license)

public void BreakText(ref TEXT_SOURCE textSource, IWordSink wordSink, IPhraseSink phraseSink)

public void GetLicenseToUse(out string license)

Any suggestions, help will be much appreciated.


Here is my sample code.

public struct TEXT_SOURCE
public delFillTextBuffer
public string awcBuffer;
public int iEnd;
public int iCur;

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown )]
public interface IPhraseSink
void PutSmallPhrase([MarshalAs(UnmanagedType.LPWStr)] string pwcNoun,
[MarshalAs(UnmanagedType.U4)] int cwcNoun,
[MarshalAs(UnmanagedType.LPWStr)] string pwcModifier,
[MarshalAs(UnmanagedType.U4)] int cwcModifier,
[MarshalAs(UnmanagedType.U4)] int ulAttachmentType);
void PutPhrase([MarshalAs(UnmanagedType.LPWStr)] string pwcPhrase,
[MarshalAs(UnmanagedType.U4)] int cwcPhrase);

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown )]
public interface IWordBreaker
void Init([MarshalAs(UnmanagedType.Bool)] bool fQuery,
[MarshalAs(UnmanagedType.U4)] int maxTokenSize,
[MarshalAs(UnmanagedType.Bool)] out bool pfLicense);
void BreakText([MarshalAs(UnmanagedType.Struct)] TEXT_SOURCE pTextSource,
[MarshalAs(UnmanagedType.Interface)] IWordSink pWordSink,
[MarshalAs(UnmanagedType.Interface)] IPhraseSink pPhraseSink);
void GetLicenseToUse([MarshalAs(UnmanagedType.LPWStr)] out string ppwcsLicense);

public class WordBreaker : ServicedComponent, IWordBreaker
#region Constructor

public WordBreaker()
System.Diagnostics.Trace.WriteLine("Inside Default Constructor");
System.Diagnostics.Trace.WriteLine(string.Format(" Calling Assembly Name {0}", System.Reflection.Assembly.GetCallingAssembly().Fu llName));


public void WriteMessage(string message)


#region Implementation of IWordBreaker

public void Init(bool fQuery, int maxTokenSize, out bool pfLicense)
System.Diagnostics.Trace.WriteLine("Inside Init MS");
this.cwcMaxToken = maxTokenSize;

pfLicense = true;

public void BreakText(ref TEXT_SOURCE textSource, IWordSink wordSink, IPhraseSink phraseSink)
System.Diagnostics.Trace.WriteLine("Inside BreakText");

Feb 27 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.