Top "Marshalling" questions

Marshalling is the process of transforming the memory representation of an object to a data format suitable for storage or transmission

C# to C++ process with WM_COPYDATA passing struct with strings

From a c# program I want to use WM_COPYDATA with SendMessage to communicate with a legacy c++/cli MFC …

c# interop c++-cli marshalling wm-copydata
How to generate end tag for empty element in XML using JAXB

I'm generating XML using JAXB. But JAXB is generating an empty Tag closing it self. But my client want separate …

java xml jaxb marshalling java-6
Difference between Microsoft's Bond and Google's Protocol Buffers

Recently (January 2015) Microsoft open-sourced Bond, their framework for working with schematized data. In many aspects it is similar to Google's …

serialization marshalling protocol-buffers bond
Fixed Size Array of Structure type

how do I declare fixed-size array of a structure type in C# : [StructLayout(LayoutKind.Sequential,Pack=1), Serializable] public unsafe struct …

c# arrays struct marshalling unsafe
How can I throw an Exception with a certain HResult?

I want to test the following code: private bool TestException(Exception ex) { if ((Marshal.GetHRForException(ex) & 0xFFFF) == 0x4005) { return …

c# exception testing marshalling hresult
Using BigDecimal in JAXB marshalling

I have a REST webservice with JAXB fields annotations. For example, @XmlAccessorType(XmlAccessType.PROPERTY) public class MyClass{ private BigDecimal sum; //+ …

java rest jaxb marshalling
How to use writeStringArray() and readStringArray() in a Parcel

I recently came across a very stupid (at least from my point of view) implementation inside Androids Parcel class. Suppose …

java android marshalling parcelable parcel
Why does LayoutKind.Sequential work differently if a struct contains a DateTime field?

Why does LayoutKind.Sequential work differently if a struct contains a DateTime field? Consider the following code (a console app …

c# datetime marshalling structlayout
Marshal.Copy, copying an array of IntPtr into an IntPtr

I can't figure out how does the Copy(IntPtr[], Int32, IntPtr, Int32) method works. I though it could copy the …

c# arrays copy marshalling intptr
Conversion in .net: Native Utf-8 <-> Managed String

I created those two methods to convert Native utf-8 strings (char*) into managed string and vice versa. The following code …

c# string utf-8 marshalling native