Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Porting to x64: MFC x86 DLL implementing OLE Automation for MS Word, Access, DAO

$
0
0
Porting to x64: MFC x86 DLL implementing OLE Automation for MS Word, Access, DAO

I have an app written several years ago that I am porting to x64.
It consists of a VB.Net GUI using .Net 1.1 and several unmanaged C++ DLL's.

Updating the program went well. The VB.Net program runs well on .Net 4.0 and all the DLL's, except one, run fine as 64 bit DLL's. For the DLL that doesn't run as 64 bit I created a stub with that just returns SUCCESS for every function call.

The DLL that I have trouble with as 64 bit uses MFC and creates MS Word documents using OLE automation and updates an Access database using DAO.

Since MS Word and DAO are only available on 32 bit I created a COM server using a DLL Surrogate to run the code. The issue I am concerned with is using pointers to pass parameters back and forth.

Here is an example C++ prototype I am using:

DWORD dtmDBaseToTags
    ( IN const struct UserData_t * pzUserData
    , IN struct DataTag_t* pzDataTag
);

This function uses the names in pzDataTag to pull data from the Access database and put it into the struct pzUserData.

I don't think this will work over a COM / ActiveX boundary.

How can I access memory in a 32 bit process using a 64 bit pointer?

Will the ActiveX COM Server DLL be able to access the 64 bit memory?

What is the best course of action to take to port this code to 64 bit?





//========================== // Michael Fitzpatrick //==========================


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>