Click here to Skip to main content
11,641,081 members (59,180 online)
Click here to Skip to main content

Tagged as

Using a 32-bit COM Object from a 64-bit Application

, 16 Oct 2011 CPOL 22.3K 10
Rate this:
Please Sign up or sign in to vote.
How to edit the Registry to allow 64-bit applications to access 32-bit COM objects.

I have an application that I wanted to be 64-bit for some work being done for a third party DLL, but I have a 32-bit DLL that I need to use in the same application.

By modifying the Registry, you can allow a 64-bit app to use a 32-bit COM object.

  1. Locate your COM object GUID under HKey_Classes_Root/Wow6432Node/CLSID.
  2. Once located, add a new REG_SZ (string) value. The name should be AppID and the data should be the same COM object GUID you have just searched for.
  3. Add a new key under HKey_Classes_Root/Wow6432Node/AppID. The new key should be called the same as the COM object GUID.
  4. Under the new key you just added, add a new REG_SZ (string) value, and call it DllSurrogate. Leave the value empty.
  5. Create a new key under HKey_Local_Machine/Software/Classes/AppID, if it doesn't already exist. Again, the new key should be called the same as the COM object's GUID. No values are necessary to be added under this key.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

ARBebopKid
Software Developer State of Arkansas & Zycron
United States United States
Bryan Lee learned to code on a RadioShack Color computer II.

You may also be interested in...

Comments and Discussions

 
QuestionCan't make it work Pin
Member 1033089114-Oct-13 7:59
memberMember 1033089114-Oct-13 7:59 
Hi

Please help me. I have made the changes, but i can't still make it works. Here are the registry
lines i had changed


1. Locate your COM object GUID under the HKey_Classes_Root/Wow6432Node/CLSID

2. Once located add a new REG_SZ (string) Value. Name should be AppID and data
should be the same COM object GUID you have just searched for


[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{ECFC47AC-6BF2-47D8-8D86-0D7112232664}\AppID]
@="{ECFC47AC-6BF2-47D8-8D86-0D7112232664}"


3. Add a new key under HKey_Classes_Root/Wow6432Node/AppID .The new key should
be called the same as the com object GUID

4. Under the new key you just added, add a new REG_SZ (string) Value, and call
it DllSurrogate. Leave the value empty


[HKEY_CLASSES_ROOT\Wow6432Node\AppID\{ECFC47AC-6BF2-47D8-8D86-0D7112232664}\DllSurrogate]


5. Create a new Key under HKey_Local_Machine/Software/Classes/AppID if it doesn't
already exist. Again the new key should be called the same as the COM object's
GUID. No values are necessary to be added under this key.


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{ECFC47AC-6BF2-47D8-8D86-0D7112232664}]

Thanks in advace.

Jorge Matheus
QuestionNice trick Pin
skydger7-Oct-13 1:56
memberskydger7-Oct-13 1:56 
QuestionAwesome tip! Pin
zeroth100010-Sep-13 13:10
memberzeroth100010-Sep-13 13:10 
QuestionWhy it's become much slower when use in 64bit than when in 32bit Pin
Sophy Huang4-Aug-13 21:59
memberSophy Huang4-Aug-13 21:59 
QuestionIt works on my 64bit application when access 32it improc server. Pin
Sophy Huang10-Jul-13 21:53
memberSophy Huang10-Jul-13 21:53 
QuestionEvents Pin
Member 8890102-Apr-13 5:47
memberMember 8890102-Apr-13 5:47 
QuestionI have issue. Pin
paragpatel3114-Dec-12 0:47
memberparagpatel3114-Dec-12 0:47 
AnswerRe: I have issue. Pin
BryanLeeWilliams14-Dec-12 4:31
memberBryanLeeWilliams14-Dec-12 4:31 
GeneralYou're welcome and thanks for the 5! Pin
USABebopKid8-Dec-11 3:30
memberUSABebopKid8-Dec-11 3:30 
GeneralReason for my vote of 5 Works fine under Win7-x64 and saves ... Pin
MrRexx8-Dec-11 2:02
memberMrRexx8-Dec-11 2:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150731.1 | Last Updated 16 Oct 2011
Article Copyright 2011 by ARBebopKid
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid