• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 696
  • Last Modified:

Calling X64 COM from VBA

What is the best method for manipulating an x64 COM API from VBA or VB6.  I need to make calls against the API and return values.  I expect to need to make some sort of .Net Wrapper because you cannot load the x64 dlls into a 32bit runtime, I am looking for design recommendations on the communication between the processes.  I would prefer a good MSDN reference, because I need to prove definitively a best practice.  I have already tried searching MSDN to no avail, so I am turning to the experts.

TIA

Corey
0
Corey Scheich
Asked:
Corey Scheich
  • 4
  • 3
1 Solution
 
grayeCommented:
The following is a pretty good article on "going the other way"... (from 64 app to 32bit DLL).   The concepts are the same... you essentially need to have two applications running (your 32-bit app and a separate "out of process" 64-bit app to host the 64-bit DLL).   The two then talk to each other via IPC (as described in the article).
http://dnjonline.com/article.aspx?ID=jun07_access3264
This is all a bit deep.... so tell us more about what you're doing and perhaps we can suggest another approach
0
 
Corey ScheichDeveloperAuthor Commented:
Nice article. Thanks..  we are working with a software that runs as an explorer shell extension on a x64 computer.  My customer however has relied on vba macros for some time because of large company over zealous IT that takes months or years to approve and deliver on custom software.  Anyway they need a concrete solution for working with excel a 32 bit activeX control and the x64 explorer shell extension.
0
 
grayeCommented:
That's just not gonna work...   however, you *can* still use the 32-bit version of the Explorer in x64-based OSs.   There is a 32-bit version in C:\Windows\SysWOW64
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Corey ScheichDeveloperAuthor Commented:
graye,

I have tried starting the 32bit version of Explorer on an x64 machine and it started the x64 version.  (no *32 after it in the process tree)  I feel with a well laid out Object structure and proxy classes for the 32bit and 64bit sides it could work.  I don't see why you had the change of heart?

Corey
0
 
grayeCommented:
There are a few web sites out there that talk about using the 32-bit Windows Explorer under a 64-bit OS.   There are generally two techniques... a registry tweak to launch the 32-bit version and the other technique which uses the 32-bit *Internet* Explorer to browse local files.   Personally, the 32-bit Internet explorer sounds a bit easier to do.
The original idea of writing a proxy app to marshal data between the two worlds is still a valid approach... however, if you're trying to get a 32-bit ActiveX control to work in the 64-bit Explorer, and also interact with VBA/Excell... then that's gonna bit more complicated.  I had first assumed that the proxy app would have 1 and only 1 connection (to the Explorer)... and not also support the exposure of interfaces to other outside "clients".
0
 
Corey ScheichDeveloperAuthor Commented:
Actually the activeX control is loaded on the 32 bit side, and I agree it would have been much more complicated, though I have seen it done using some sort of webcontrol trickery, which is way past me at this point.  I'll look into the 32 bit explorer option a bit.  Thanks for the information.
0
 
Corey ScheichDeveloperAuthor Commented:
Thank you we are going to use the proxy approach using IPC probably .NET Remoting
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now