Re: Shared memory and IDL [message #29283] |
Tue, 12 February 2002 02:33 |
Gert Van de Wouwer
Messages: 21 Registered: January 2002
|
Junior Member |
|
|
"Jean-Claude Maitre" <jeanclaude.maitre@med.ge.com> wrote in message
news:b1857f9.0202110331.428b6f46@posting.google.com...
> I would like to use shared memory in order to pass images from an
> application written in C and IDL.Does anybody know how to retrieve in
> IDL a segment of shared memory allocated in C ?
>
> Thanks
Hi,
the answers to my post 'Matrox Framegrabber Interface' may also be of
interest to you.
I think that if you want to allocate memory in C and continue to use this in
IDL, you need to use something like IDL_MakeTempArray. This doesnt work if
you use call_external (correct ne if i am wrong), so you need the
linkimage-method. The documentation in edg.pdf is'nt too complete...
I use the call external way in the following way:
in IDL:
image = bytarr(512,512)
call_external(mydll,...,image)
in C++
IDL_LONG IDL_CDECL myDll( int argc, void* argv[])
{
BYTE* pbImIn = (BYTE*)argv[0];
/* use pBImIn to process, or fill image */
...
}
regards,
Gert
|
|
|
Re: Shared memory and IDL [message #29295 is a reply to message #29283] |
Mon, 11 February 2002 11:12  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
jeanclaude.maitre@med.ge.com (Jean-Claude Maitre) writes:
> I would like to use shared memory in order to pass images from an
> application written in C and IDL.Does anybody know how to retrieve in
> IDL a segment of shared memory allocated in C ?
If you are on a Unix-type operating system, then Ed Korpela's VARRAY
package is probably exactly what you are looking for. [ Check down
the page where he talks about "shared memory". ]
If you are on Windows, then who knows?
Good luck,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|