I'm having issues with redemption because Outlook 32 bit can be installed on a 64 bit machine. The RedemptionLoader doesn't determined the bit version of Outlook installed on a 64 bit machine. Has anyone run into this before?
The problem is that you can't use 32 bit DLLs in 64 bit processes. But there's a workaround I've found after a long period of search.
It's possible to run the 32 bit Redemption-DLL in a 32 bit DllHost.exe process. Now you're able to access this DllHost.exe*32 by your x64 or AnyCPU application, because THAT is possible.
That sounds complicated but is relatively simple.
First register your Redemption.dll (x86) on the system. I've done it this via:
regsvr32.exe "C:\Program Files (x86)\Redemption\Redemption.dll"
If you start your application without registering the Redemption.dll you'll get an exception like:
COMException: Retrieving the COM class factory for component with CLSID {29AB7A12-B531-450E-8F7A-EA94C2F3C05F} failed due to the following error: 80040154 Klasse nicht registriert (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Once the 32 bit DLL ist registered you need to add some keys and values to your Registry.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Wow6432Node\AppID\{29AB7A12-B531-450E-8F7A-EA94C2F3C05F}]
"DllSurrogate"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{29AB7A12-B531-450E-8F7A-EA94C2F3C05F}]
"AppID"="{29AB7A12-B531-450E-8F7A-EA94C2F3C05F}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\AppID\{29AB7A12-B531-450E-8F7A-EA94C2F3C05F}]
"DllSurrogate"=""
What's now happening when start your application is that the system starts a DllHost process which loads the Redemption.dll in a x86 environment. You will see a dllhost.exe*32 with a COM Surrogate description on task manager, after you've started your x64 application. All accesses to Redemption.dll will now be routed to the DllHost.
Of course you have to add these registry keys only on x64 systems with a x86 Outlook client ;)
Hope this will help some of you :)
RedemptionLoader does not determine Outlook bitness because it won't do you any good: it determines the bitness of the calling process and loads the appropriate version of Redemption (32 vs 64 bit), but that can raise an error if the bitness of your process/Redemption is different from the Outlook bitness. A 32 bit dll cannot be loaded by a 64 bit process.
See http://www.dimastr.com/redemption/faq.htm#ErrorCreatingRedemptionObject for more details.
It is possible to load a 32 bit DLL in a 64 bit PowerShell session. See my answer here for more details.
In short, you can use Start-Job -RunAs32 which loads a 32 Bit PowerShell version
Related
have web setup project created by VS 2010, when i setup this project all works fine, but when i check "repair" option i get error during installation.
MSI log file
Running process 'c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn ""' silently...
Process Call Result Code: '0' Process Exit Code: '1'.
The error indicates that IIS is in 32 bit mode, while this application is a 64 bit application and thus not compatible.
Trying 32 bit version of 'aspnet_regiis.exe'...
Reading registry value Path from key 'HKLM\Software\Microsoft\ASP.NET\4.0.30319.0'...
RESULT Path =
Running process 'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn ""' silently...
Process Call Result Code: '0' Process Exit Code: '1'.
The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.
I couldnt uderstand why both 32-bit and 64-bit versions of aspnet_regiis not compatible to application?
When i check "setup" not "repair" option, path param is set to my application and setup works fine, so maybe i have to change something in my setup project?
IIS6 is set to 64-bit mode by the way ;)
Thanks
If you support 32 and 64-bit systems you need separate setups for both.
http://blogs.msdn.com/b/heaths/archive/2008/01/15/different-packages-are-required-for-different-processor-architectures.aspx
so you'd run the appropriate aspnet exe for the system, that might solve some problems. You haven't said if your setup is x86 or x64, so it's hard to say what the exact issue might be. 32-bit processes cannot call 64-bit Dlls (and vice versa) so the 32-bit aspnet_regiis.exe can't call 64-bit assemblies in a 64-bit IIS, that's probably something to do with it.
That doesn't look like an MSI log file because it hasn't got all the info in there, like the MSI (s) (74:1C) [12:14:05:000]: type of intro, plust suff that would tell you if the call to the ProgramFiles folder is being redirected (look for WIN64DUALFOLDERS in the log).
I've written an ISAPI extension using Visual Studio 2012 on windows 7 that is a very simple passthrough wildcard extension. When compiled as 32 bit, and with the app pool set to allow 32 bit applications the filter works well. But when I compile as 64 bit (and change the pool to NOT allow 32 bit) I get a 500 error with the code 0x8007007f. 64 bit depends shows all green. There are no errors in the event log. I tried moving the DLL to C:\Windows\System32 but am getting the same error. Any help would be greatly appreciated.
Thanks
Marc
The reason might have been that the 64 bit DLL did not export the functions HttpExtensionProc and GetExtensionVersion, which the error name hints at:
Logfile:
Notification
EXECUTE_REQUEST_HANDLER
ErrorCode
The specified procedure could not be found.
(0x8007007f)
I had missed adding the .def file to the linker options in my project.
I have an ActiveX control which needs to be deployed in client machine and i am planning to do this by supplying installers to the clients .
I have made separate msi packages for 64 and 32 bit operating systems and it works properly.
However , i face a problem when it comes to 64 bit machines since i have the following requirement ,
In case of 32 bit machine install 32 bit ActiveX control.
In case of 64 bit machine install both 32 and 64 bit ActiveX control.
I read many articles stating hybrid installations cannot be done using basic msi installers ?
Can this be done using a single setup.exe file ?
A single MSI cannot both install files or registry to 64-bit locations on a 64-bit system and run on a 32-bit system. So assuming your 64-bit ActiveX control must be installed to or registered in a 64-bit location, you cannot do this in a single MSI.
If you have the premier edition of InstallShield 2012, this is one of the use cases of the Suite (or Suite/Advanced UI) project type. You must create two MSI files, and include them both in the suite with relevant eligibility conditions. (The exact conditions depend on whether you make the MSIs standalone or cumulative, but the 64-bit MSI should only be eligible if the platform has an architecture of x64.)
You can have both 32bit and 64bit components within a single installer and make it to decide what to install depending on the target platform as below.
1) Create two new features(one for 32 and one for 64) and add conditions to both of them.
for 32 bit -> Not VersionNT64
for 64 bit -> VersionNT64
2) Add both prerequisites and select appropriate (parent) feature for each one
I have application on windows server 2008 which gets request for connection via web. The connection is made through registry key. I get this error "The description for Event ID 9300 from source CUSTOMPROJECT Security 3335 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
ActiveX component can't create object
the message resource is present but the message is not found in the string/message table"
I would like to know is there a 64 bit version of advapi32.dll ?
On a 32-bit computer, all 32-bit programs store their files in C:\Program Files, and the system-wide library location is C:\System32.
On a 64-bit computer, 64-bit programs store their files in C:\Program Files, and the system-wide C:\Windows\System32 folder contains 64-bit libraries. 32-bit programs store their files in C:\Program Files (x86), and the system-wide folder is C:\Windows\SysWOW64.
The “WOW64” part of the name here refers to Microsoft’s “Windows 32-bit on Windows 64-bit” software, which is a part of the operating system. This allows Windows to run 32-bit programs on a 64-bit version of Windows. WoW64 redirects file access to ensure programs will work properly.
Here is a good article explaining it.
A quick google for advapi64.dll returns a fair number of results.
I also found this link:
http://social.msdn.microsoft.com/Forums/sk/netfx64bit/thread/410374d5-139a-47f9-9d5b-3851247f4024
Which indicates you should look for the 64-bit version of the file here:
%WinDir%\System32
I am getting the following error if I try to run the ASP.NET 4.0 website in a 64 bit machine with Enable 32 bit Applications flag set to false. (I have to set that to False, If I set it to true its working fine).
> "Could not load file or assembly 'Common.BL' or one of its dependencies. An attempt was made to load a program with an incorrect format.
And in the project properties the Target of Build is set to Any CPU.
Still I am getting the same error.
Can you guys please help me resolving this error. Anyhelp would be appreciated.
Thanks.
Sameer.
I'd focus on the "or one of its dependencies" portion of the error. Are you referencing a 32-bit assembly or one compiled for a different platform?
Ensure Common.BL is 64 bit. You can check this fairly easily. Check this out for help:
How to determine if a .NET assembly was built for x86 or x64?
Let's use that as a starting point, post the results. If it is a 32 bit and you are on IIS 6, then ALL of IIS must be set to run in 32 bit mode.
If you are in IIS 7 then you can set a specific app pool to run in 32 bit mode. Ensure you compile your code for 32 bit though.