Thursday, October 9, 2008

Stellant Outside In Text Access C# Interface

I was working now mostly(almost 2 months and not finished yet!!!!) on a fulltext search engine development for our document management system.

Lucene.NET was the underlying search engine using by us.

Our company is now a Oracle Development partner as well!!!!!!!!So all the oracle development tools are available just like the Microsofts.

In that a content access library is there (in C and C++),which would give the text of a file.So that thing is useful for us in the fulltext search engine devlopment.

So last week my main job was to convert the api functions to C#.At first it didnt work for some silly parameters problems.One of my colleagues(asan-sen)just changed that and it was working smoothly now.

So the functions are the following:
[DllImport("sccda.dll",CallingConvention=CallingConvention.Cdecl,CharSet=CharSet.Auto)]
public static extern uint DAOpenDocument(ref uint hDoc,uint dwSpecType,IntPtr pSpec,uint dwFlags);
[DllImport("sccda.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
public static extern uint DACloseDocument(uint hDoc);
[DllImport("sccda.dll",CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern uint DAInit();
[DllImport("sccta.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern uint TAOpenText(uint hDoc, ref uint phText);
[DllImport("sccta.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern uint TACloseText(uint phText);
[DllImport("sccta.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern uint TAReadFirst(uint phText, IntPtr textData, uint bufferSize, ref uint pBufCount);
[DllImport("sccta.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public static extern uint TAReadNext(uint phText, IntPtr textData, uint bufferSize, ref uint pBufCount);

No comments: