Using IFilter from a 32-bit application on an x64 system

I need to use the IFilter interface from a 32-bit application on Windows x64 systems. This is easy for .doc files, as forffilt.dll supports both types of builds. However, I also need to get plain text from .docx and other file types. The first solution is to install Microsoft filter packages . However, only x64 version will be installed ... which means that my 32-bit application cannot use them. They work fine under 32-bit Windows.

Has anyone found a way around this?

+6
source share
3 answers

I found a way to install docx Filter Pack 32bits on a 64bit OS. For other file formats, the same.

  • Install a 32-bit filter package in a 32-bit OS;
  • Copy ifilters files to the "C: \ Program Files \ Common Files \ Microsoft Shared \ Filters" directory from the 32-bit OS to the "C: \ Program Files (x86) \ Common Files \ Microsoft Shared \ Filters" directory on the 64-bit OS .
  • Copy the following lines into the file "ifilter.reg" and execute the file:

File contents:

Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.docx\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_CLASSES_ROOT\.docm\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_CLASSES_ROOT\.dotx\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.docm\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.docx\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.dotx\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}] @="Office Open XML Format Word Persistent Handler" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered] [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{5A98B233-3C59-4B31-944C-0E560D85E6C3}" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}] @="Office Open XML Format Word Persistent Handler" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{5A98B233-3C59-4B31-944C-0E560D85E6C3}" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{5A98B233-3C59-4B31-944C-0E560D85E6C3}\InprocServer32] @="C:\\Program Files (x86)\\Common Files\\microsoft shared\\Filters\\offfiltx.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{5A98B233-3C59-4B31-944C-0E560D85E6C3}\InprocServer32] @="C:\\Program Files (x86)\\Common Files\\microsoft shared\\Filters\\offfiltx.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{5A98B233-3C59-4B31-944C-0E560D85E6C3}" 
+7
source

Enhancing Rui response using a Windows script registry for 3 file formats (Word, Excel, PowerPoint). Hope this will be a safe time for someone, as it works well:

 Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.docx\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_CLASSES_ROOT\.pptx\PersistentHandler] @="{4F46F75F-199F-4C63-8B7D-86D48FE7970C}" [HKEY_CLASSES_ROOT\.xlsx\PersistentHandler] @="{4887767F-7ADC-4983-B576-88FB643D6F79}" [HKEY_CLASSES_ROOT\.docm\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_CLASSES_ROOT\.pptm\PersistentHandler] @="{4F46F75F-199F-4C63-8B7D-86D48FE7970C}" [HKEY_CLASSES_ROOT\.xlsm\PersistentHandler] @="{4887767F-7ADC-4983-B576-88FB643D6F79}" [HKEY_CLASSES_ROOT\.dotx\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.docm\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.docx\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pptm\PersistentHandler] @="{4F46F75F-199F-4C63-8B7D-86D48FE7970C}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pptx\PersistentHandler] @="{4F46F75F-199F-4C63-8B7D-86D48FE7970C}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xlsm\PersistentHandler] @="{4887767F-7ADC-4983-B576-88FB643D6F79}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xlsx\PersistentHandler] @="{4887767F-7ADC-4983-B576-88FB643D6F79}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.dotx\PersistentHandler] @="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}] @="Office Open XML Format Word Persistent Handler" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{4F46F75F-199F-4C63-8B7D-86D48FE7970C}] @="Office Open XML Format PowerPoint Persistent Handler" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{4887767F-7ADC-4983-B576-88FB643D6F79}] @="Office Open XML Format Excel Persistent Handler" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered] [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{4F46F75F-199F-4C63-8B7D-86D48FE7970C}\PersistentAddinsRegistered] [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{4887767F-7ADC-4983-B576-88FB643D6F79}\PersistentAddinsRegistered] [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{5A98B233-3C59-4B31-944C-0E560D85E6C3}" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{4F46F75F-199F-4C63-8B7D-86D48FE7970C}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{DDFE337F-4987-4EC8-BDE3-133FA63D5D85}" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{4887767F-7ADC-4983-B576-88FB643D6F79}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{F90DFE0C-CBDF-41FF-8598-EDD8F222A2C8}" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}] @="Office Open XML Format Word Persistent Handler" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{4F46F75F-199F-4C63-8B7D-86D48FE7970C}] @="Office Open XML Format PowerPoint Persistent Handler" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{4887767F-7ADC-4983-B576-88FB643D6F79}] @="Office Open XML Format Excel Persistent Handler" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{4F46F75F-199F-4C63-8B7D-86D48FE7970C}\PersistentAddinsRegistered] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{4887767F-7ADC-4983-B576-88FB643D6F79}\PersistentAddinsRegistered] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{5A98B233-3C59-4B31-944C-0E560D85E6C3}" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{4F46F75F-199F-4C63-8B7D-86D48FE7970C}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{DDFE337F-4987-4EC8-BDE3-133FA63D5D85}" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{4887767F-7ADC-4983-B576-88FB643D6F79}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{F90DFE0C-CBDF-41FF-8598-EDD8F222A2C8}" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{5A98B233-3C59-4B31-944C-0E560D85E6C3}\InprocServer32] @="C:\\Program Files (x86)\\Common Files\\microsoft shared\\Filters\\offfiltx.dll" "ThreadingModel"="Both" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{DDFE337F-4987-4EC8-BDE3-133FA63D5D85}\InprocServer32] @="C:\\Program Files (x86)\\Common Files\\microsoft shared\\Filters\\offfiltx.dll" "ThreadingModel"="Both" [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{4887767F-7ADC-4983-B576-88FB643D6F79}\InprocServer32] @="C:\\Program Files (x86)\\Common Files\\microsoft shared\\Filters\\offfiltx.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{5A98B233-3C59-4B31-944C-0E560D85E6C3}\InprocServer32] @="C:\\Program Files (x86)\\Common Files\\microsoft shared\\Filters\\offfiltx.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{DDFE337F-4987-4EC8-BDE3-133FA63D5D85}\InprocServer32] @="C:\\Program Files (x86)\\Common Files\\microsoft shared\\Filters\\offfiltx.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F90DFE0C-CBDF-41FF-8598-EDD8F222A2C8}\InprocServer32] @="C:\\Program Files (x86)\\Common Files\\microsoft shared\\Filters\\offfiltx.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{5A98B233-3C59-4B31-944C-0E560D85E6C3}" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{4F46F75F-199F-4C63-8B7D-86D48FE7970C}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{DDFE337F-4987-4EC8-BDE3-133FA63D5D85}" [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{4F46F75F-199F-4C63-8B7D-86D48FE7970C}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}] @="{F90DFE0C-CBDF-41FF-8598-EDD8F222A2C8}" 
+3
source

As you found out, there is no established way to install 32-bit filters on a 64-bit system, see the answer from MSFT at the end of this post: How to install the 32-bit Office Filter package on a 64-bit system? .

The proposed solution is to create an auxiliary program for filtering and transferring data back to the main application.

There are several ways to make IPC on Windows, so choose the one that works for you. I created a service that uses WCF to easily create a remote proxy that makes the operation very transparent to the main application.

+1
source

Source: https://habr.com/ru/post/907894/


All Articles