serializing a COM object
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
Is it possible to serialize a COM class for which you don't have the
source code? Obviously it won't work without the [Serializable]
attribute, which I can't add, and implementing ISerializable on a
derived class won't help because I don't have access to the private
fields that I would need to write to a file for the serialization to
be successful.
Is there a way to write the block of memory from a pointer? I could
use Marshal.StructureToPtr() to get a pointer to the object and
Marshal.SizeOf() to determine how much memory it takes up, and write
all of that to a binary file.
.
Relevant Pages
- RE: How to store values in app.config or settings.cs
... then serialize the objects out of and into xml in a file in the same folder ... I make a class like AppConfiguration which has app settings. ... //This line seems to only set the value in memory and not in the file. ... (microsoft.public.dotnet.languages.csharp) - Re: Dataset.WriteXML loses arrays / not preserving all data
... Thanks Cor. ... So you were able to see that the array is preserved in memory ... a class to wrap the array, serialize it to a stream and store it as a BLOB. ... (microsoft.public.dotnet.framework.adonet) - Re: B-Tree implementation
... representation when it is loaded into memory. ... Provide serialize and ... deserialize methods to retrieve and store the data. ... (microsoft.public.dotnet.framework) - Re: Any size limitation on the BinaryFormatter serialization
... BinaryFormatter can take a memory stream or any type of stream. ... > In my application, I'm planning to use BinaryFormatter to serialize a> potentially huge object to file (and, of course, deserialize back to> memory later). ... (microsoft.public.dotnet.general) - Re: Any size limitation on the BinaryFormatter serialization
... BinaryFormatter can take a memory stream or any type of stream. ... > In my application, I'm planning to use BinaryFormatter to serialize a> potentially huge object to file (and, of course, deserialize back to> memory later). ... (microsoft.public.dotnet.languages.csharp) |
|