Aleksey Nagoga.


Hi All,

I need to share some text data between VBA and another non-dotnet application. The solution needs to be easily deployable as both application are on the client side and need to be hidden from a naked eye, meaning that I can't just create a text file in one app and read it from the other. (sensitive material like passwords may occasionally be sent as well)

I considered using shared memory files but VBA has a limited support for them and plus I may not always have neccesary permissons (see http://msdn2.microsoft.com/en-us/library/aa382954.aspx)

I know that I can still use plain text files and just encode the content, but it feels more like a workaround than a solution. So I was wondering what are the knowledgeable people out there use in these cases

It's a legacy code, so no dotnet sweetness can be used.

Thanks




Re: Ways of sharing data between VBA and another non-dotnet application.

HappyGene


Aleksey ,

What's your second app's platform or dev environment Can you roll it up into a call from VBA

:) Gene







Re: Ways of sharing data between VBA and another non-dotnet application.

Aleksey Nagoga.

Delphi 7. 

I thought about writing an ActiveX dll that would work in a similar way to Application object in ASP.Net and use file system as the storage for the key/value pair array. That's the only real solution I can think of now, that why I posted this question hoping that there maybe other interesting options.

Alex






Re: Ways of sharing data between VBA and another non-dotnet application.

HappyGene

Alex,

You can start a DDE conversation from VBA to another DDE participant. When I first used Delphi 10 years ago it had a DDE library. If that's still the case, simply expose (or publish) the 'topic' from your Delphi app and VBA will find it. As of the Win95 era, it would find it out-of-process, too.

It happens entirely in memory unless the mutual memory file that houses the link is swapped. But that still should be seamless, although a split second slower.

Does that help any

:) Gene






Re: Ways of sharing data between VBA and another non-dotnet application.

Aleksey Nagoga.

Thanks, Gene. We ended up creating a non-activex dll that exposes 2 methods SetValue and GetValue and uses registry as a temporary data storage. VBA accesses those methods just fine so we went with this solution. Last time I played with DDE was about 10 years ago and I didn't feel like spending time refreshing my memory Smile. But thank you for taking time and sharing your thoughts, I appreciate it very much.

Alex