473,508 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom WordBreaker for SQL Server Full-text

1 New Member
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 http://www.sqljunkies.ddj.com/HowTo/...61DA96A5B.scuk. 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.

Ta
Mahesh

Here is my sample code.

[StructLayout(LayoutKind.Sequential)]
public struct TEXT_SOURCE
{
[MarshalAs(UnmanagedType.FunctionPtr)]
public delFillTextBuffer
pfnFillTextBuffer;
[MarshalAs(UnmanagedType.LPWStr)]
public string awcBuffer;
[MarshalAs(UnmanagedType.U4)]
public int iEnd;
[MarshalAs(UnmanagedType.U4)]
public int iCur;
}

[ComImport]
[Guid("CC906FF0-C058-101A-B554-08002B33B0E6")]
[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);
}

[ComImport]
[Guid("D53552C8-77E3-101A-B552-08002B33B0E6")]
[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)
{
System.Diagnostics.Trace.WriteLine(message);
}

#endregion

#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
0 3824

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

Similar topics

1
3918
by: Google Mike | last post by:
Tell me if this can be done, and if I have a misconception here. I am writing an app that will be served up in an app farm, and therefore I need to move the session information to the client, not...
1
7333
by: MacDermott | last post by:
I created a report to print labels, and it created a custom page size for the report. When I opened the properties of the printer driver I could see it listed - as Custom. Then I had to change...
9
13883
by: Nick | last post by:
the customError feature is not working. I have it setup as the help says in my web.config file. <customErrors defaultRedirect="DsAppError.aspx" mode="RemoteOnly"/> I tried in a couple...
2
2089
by: BentleyInc | last post by:
I wrote a DownloadRequestHandler to be used in http://server/DownloadDir and I've made the correct IIS settings for DownloadDir. Currently I'm having problem loading up some dependent assemblies....
5
2513
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
9
3445
by: Julien Biezemans | last post by:
Hi! Here is the problem: I'd like to restrict local filesystem stream operations to one directory just like a root jail. fopen('/file.bin') would actually open /some/path/file.bin. One goal...
27
45488
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
1
898
by: Max André Bündchen | last post by:
When a web method return a custom class, like a Employee definition, the proxy definition in the client recriate the definition of Employee using the public fields/properties of the original class....
0
1185
by: tksc234 | last post by:
Hello there. My question is related to full custom server controls. 1) The 'input' element that caused the postback already has 'Me.UniqueID' in its name field. I assumed, the value of postDataKey...
1
971
by: erbilkonuk | last post by:
Hi everyone, I have been developing a project that is composed of one windows service and one ASP.NET web site. The windows service and ASP.NET web site reside on the same server. I want to send...
0
7324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7382
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.