April 7th, 2010, 10:43 AM
Visual C++ to Borland C++ data exchange
I'm working on a project that involves making two dlls: one of them is in Borland C++ (file1-bc.dll), the other one is in Visual C++ (file2-vc.dll). Right now I'm prototyping and trying to make them as simple as possible and to see data being exchanged from one side to another. The working scenario is as follows: file2.dll uses LoadLibrary("file1-bc.dll") and FindProcAddress to invoke methods to obtain data from file1-bc.dll.
Came to the point of loading a set of information; using a std::list seemed like a good idea. Although both projects are compiling and linking ok, when I try to use on one side a list created on the other side; the program crashes (Access Violation).
I tried instantiating the list on file2-vc.dll and passing it as an argument to be filled in the other dll: at the very first attempt of using it inside file1-bc.dll the program crashes
I tried instantiating the list inside file1-bc.dll and returning it to the caller: still got a crash
The list is filled with pointers to a custom defined structure (see the attached SavedUrlItem.h). So it's a std::list<SavedUrlItem*>
And here are my questions:
- can this approach work?
- if yes what would need to change (perhaps in the project settings) to make it work
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!