Hi All, I am working with clipboard. It stores data pointed to by using a void pointer. I have a managed object of a complext structrue containing native data (e.g. int, long) as well as objects of my own class and arrays of objects, pointers to objects etc. How to marshal that structure to unmanaged memory so I can store it in clipboard as binary object. Is there any other way to do this. Thanks Asif
Create an unmanaged IStream interface backed by a block of global unmanaged memory(e.g, CreateStreamOnHGlobal). Use the IStream methods to copy your complex structures from managed memory and then place the IStream interface pointer on the clipboard via the IDataObject interface. "Asif Khan" wrote in message news:ORnVpavwHHA.3588@TK2MSFTNGP06.phx.gbl... > Hi All, > > I am working with clipboard. It stores data pointed to by using a void > pointer. I have a managed object of a complext structrue containing native > data (e.g. int, long) as well as objects of my own class and arrays of > objects, pointers to objects etc. How to marshal that structure to > unmanaged memory so I can store it in clipboard as binary object. Is there > any other way to do this. > > Thanks > Asif >