Solved

passing memory into INPROC com objects

Posted on 2002-04-13
5
155 Views
Last Modified: 2013-11-20

I have a COM object dll that needs to process extremely large amounts of data that come from an application (5 to 6megs at a time).  My question is, is there a way I can simply pass a pointer into the COM object and let it release the memory when its done or do I have to send the memory through the com interface in something like a massive safe array?
0
Comment
Question by:Adept
  • 2
5 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 6938683
With an in-process COM server you can certainly do this since both your client application and the COM server share the same memory space.  It's not a good technique, however, since it violates the structure of COM.

All data to/from COM should be passed via the COM interface.  Even a large block of data like you have can be done.  The VARIANT type supports arrays.

You may want to rethink your use of COM altogether if this is a big issue.
0
 

Author Comment

by:Adept
ID: 6939931

when I instance memory in the app though and try to free it in the object I get major errors.  Is this supposed to happen?
0
 
LVL 32

Expert Comment

by:jhance
ID: 6940769
Hmmmm, "major errors", that really narrows things down...

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now