Hi Matt,
I like your approach and Mike's
suggestions. His way of embedding OpenDX sounds very nice.
As to whether you can use the Image viewer
from C calls, I'm not sure, either, because I've never tried running a network
through C calls. I recall Pelkie explaining to me that the Image module
has a bunch of stuff in it that wraps other modules like Display and
Camera, and I think Image is unduly intimate with the GUI, so it makes sense it
might not be available as such, but Mike seems to have a
workaround.
There is a module in the VPE called
socketconnect. I looked and couldn't find it while trying to answer your
last message. Glad you found it. It isn't implemented on my dear
Windows version, but I looked at the code, and it has a flippin' sweet protocol:
1. integer length of buffer to send 2. the buffer. Then you close the
socket. Internally, it treats that buffer as a serialized version of a DX
Object and deserializes it. On your client, that means you need to take
your data, create a DX Object, and then turn that Object into a string.
The command you will use to serialize is
Object _dxfExportBin_Buffer(Object o, int*
size, void **buffer);
It returns NULL on error and your input o
on success. I'm telling you about this command b/c I don't recall seeing
it in the docs even though it is exported from one of the libs.
If you want to implement a shared memory
copy, you can start from socketconnect.c.
Drew
