Discussion:
LoadIFilter problem
(too old to reply)
b***@yahoo.com
2006-09-14 09:48:28 UTC
Permalink
Hello,
I am using code like this:
...
//load filter and read the text from documents.
CComPtr<IUnknown> unk;
HRESULT hr = LoadIFilter(A2W(tempfile.c_str()), NULL, (void**)&unk);

if (hr != S_OK) {
cout << "creation of IFilter failed" << endl;
return 0;
}
...

Then I extract the text from the documents. This is working well for
DOC, XLS and PPT files. But for RTF files it gives me hr as a large
negative value (about -2GB). I am unable to find out why error is
coming only for RTF docs.

Any guidance into solving the problem or going ahead with its analysis
would be very useful.
Thanks in advance.
Best regards,
B.
b***@yahoo.com
2006-09-15 06:32:26 UTC
Permalink
Ok, I found the answer to my problem: RTF is treated as a Third-party
filter as given here
http://www.dotlucene.net/documentation/MicrosoftOfficeDocumentsP.html

Follow the procedure for registering and installing rtffilt.dll and the
thing works.

Thanks for your help everybody.
Post by b***@yahoo.com
Hello,
...
//load filter and read the text from documents.
CComPtr<IUnknown> unk;
HRESULT hr = LoadIFilter(A2W(tempfile.c_str()), NULL, (void**)&unk);
if (hr != S_OK) {
cout << "creation of IFilter failed" << endl;
return 0;
}
...
Then I extract the text from the documents. This is working well for
DOC, XLS and PPT files. But for RTF files it gives me hr as a large
negative value (about -2GB). I am unable to find out why error is
coming only for RTF docs.
Any guidance into solving the problem or going ahead with its analysis
would be very useful.
Thanks in advance.
Best regards,
B.
Yeshh
2006-10-18 10:34:01 UTC
Permalink
Hello bilaribilari,

Congrats for solving your problem. By the way, I am Yesh. I am new to
IFilter and Sharepoint. I have stuck up with a problem similar or may be
different from what you are facing.

Let me explain you briefly:
I wrote an custom filter which extracts the contents from my own file
extension.
I am able to register the DLL in the system and by executing FILTREG , I can
see that the filter is registered.
But when I test this IFilter using FiltDump <filename>, I am getting an error
Error 0x8007007e Loading IFilter

I am not aware What has gone wrong. Can you please guide me.


Thanks and Regards
Yesh
Post by b***@yahoo.com
Ok, I found the answer to my problem: RTF is treated as a Third-party
filter as given here
http://www.dotlucene.net/documentation/MicrosoftOfficeDocumentsP.html
Follow the procedure for registering and installing rtffilt.dll and the
thing works.
Thanks for your help everybody.
Post by b***@yahoo.com
Hello,
...
//load filter and read the text from documents.
CComPtr<IUnknown> unk;
HRESULT hr = LoadIFilter(A2W(tempfile.c_str()), NULL, (void**)&unk);
if (hr != S_OK) {
cout << "creation of IFilter failed" << endl;
return 0;
}
...
Then I extract the text from the documents. This is working well for
DOC, XLS and PPT files. But for RTF files it gives me hr as a large
negative value (about -2GB). I am unable to find out why error is
coming only for RTF docs.
Any guidance into solving the problem or going ahead with its analysis
would be very useful.
Thanks in advance.
Best regards,
B.
Loading...