Questions tagged [marshalling]

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

Marshalling is the process of packing parameters to a message. The reverse process is called unmarshalling. The accurate definition of marshalling differs across programming languages such as Python, Java, and .NET, and in some contexts, is used interchangeably with serialization. The term is also used in RPC steps. For example marshalling in Java is the process of converting Java objects into XML format (JAXB).

Read more:

  1. Marshalling on WikiPedia
  2. Marshalling in Python
  3. Marshalling in Golang
  4. Marshalling in Java (JAXB)
  5. Marshalling in .NET
  6. Marshalling in Ruby
3730 questions
1
vote
1 answer

How to marshal a Hibernate object using JAXB via a public get with @XmlIDREF and lazy loading

In my Java program I want to marshal my Hibernate persistent objects to XML. For this i am using JAXB. The problem is when marshalling the object i got a NullPointerException. This is caused by the lazy load fetching strategy. When switching to…
1
vote
2 answers

Marshalling a Linked List

Apologies for duplicate posting. Hi I am having trouble marshalling a linked list from a DLL. ------C++ Structure and Function-------- struct localeInfo { WCHAR countryName[BUFFER_SIZE]; WCHAR localeName[BUFFER_SIZE]; localeInfo *next;…
Ashish
  • 75
  • 1
  • 1
  • 8
1
vote
0 answers

Debugging .NET assembly loaded from VC++ app using CCW

I apologize for the vague subject, but I'm inexperienced in this area, and couldn't come up with something more specific. I am debugging a third party application (written in VC++ 2005) that loads COM plugins. My plugin was written in C# 4.0. When…
Dave
  • 14,618
  • 13
  • 91
  • 145
1
vote
3 answers

JAXB: How do I marshal using field name when the return type is an interface?

If I have a class (A) that contains several properties of the same type (interface B). I've used the suggestion in http://jaxb.java.net/guide/Mapping_interfaces.html to use a combination of @XmlRootElement and @XmlAnyElement to get around the…
NickD
  • 11
  • 3
1
vote
1 answer

Marshaling C arrays in C#

Possible Duplicate: Marshaling c structures in c# Actual C structures: typedef struct procedure { char code[8]; }procedure; typedef struct p45_cldxed24 { procedure p45_cldxed[8]; }p45_cldxed24; What would be the equivalent C# structure for…
Raghuveer
  • 2,630
  • 3
  • 29
  • 59
1
vote
2 answers

Marshaling c structures in c#

i have one 'C' 'DLL' which can take structures as input, i have to call that dll from my c# program fallowing are the sample structures i have in c, i have to marshal those structures in my c# code is i'm doing correct or wrong? Actual C…
Raghuveer
  • 2,630
  • 3
  • 29
  • 59
1
vote
1 answer

The starting point Winforms to WPF

How will such a starting point for WPF? [STAThread] static void Main() { ClientClass remService = new ClientClass(); ObjRef obj = RemotingServices.Marshal(remService,"TcpClient"); // Create apllications…
Feor
  • 259
  • 3
  • 15
1
vote
0 answers

Changing the UI with remoteservice.marshal

The continuation of this theme WPF multithreading. Changing the interface of a third-party flow. Have not found the solution, not the problem dispatcher. Tell me how to properly interact with the remoteservice.marshal UI. after changes have asked me…
Feor
  • 259
  • 3
  • 15
1
vote
1 answer

Problems getting access to a STA object from another process

I have been trying something which may turn to be impossible in the end. It's been a long while since I've been in COM land. Consider two apps and a COM STA DLL. First app loads COM STA DLL as a plugin and this DLL tries to register itself…
wpfwannabe
  • 14,587
  • 16
  • 78
  • 129
1
vote
2 answers

Marshalling and Unmarshalling ResultSet: Dealing with empty strings

When I'm creating instances of domain objects from a ResultSet, should I convert Strings which are null to an empty String. Conversely, when writing to the database should empty Strings be converted to null Strings? What's best practise here? Or is…
mip
  • 1,886
  • 8
  • 26
  • 32
1
vote
1 answer

Calling Managed API Method with VARIANT Parameter Type from C#

I have an ActiveX DLL which I try to use in my C# application. Most interop methods work. I am having problems with the following method (the unmanaged definition): HRESULT SendData([in] long lChID, [in] short nIndex, [in] VARIANT vData, [out,…
J Pollack
  • 2,788
  • 3
  • 29
  • 43
1
vote
3 answers

.Net Keyboard Hook Extra KeyUp Event

I have a business requirement that for message boxes, the user cannot press the enter key to accept the default option, but has to press the key of the option. eg. Given a MessageBox with the options Yes/No, the user must press the Y or N keys. Now…
Cheval
  • 403
  • 4
  • 14
1
vote
2 answers

How to marshal an Exception to an IntPtr in C#

I want to keep a pointer to a managed Exception object in an unmanaged C assembly. I've tried a bunch of ways. This is the only one I've found that passes my very preliminary tests. Is there a better way? What I'd really like to do is handle the…
qxn
  • 17,162
  • 3
  • 49
  • 72
1
vote
1 answer

Nillable element getting redundant data in output file when using ObjectFactory

I'm creating a JAXBElement element with an ObjectFactory. The object is created with a null value, as the schema for this field indicates that it has a nillable attribute. During the marshalling to xml, the output file shows:
Assaf Adato
  • 237
  • 4
  • 14
1
vote
1 answer

How to Convert MultiDimensional Array to Single Dimensional array in C#?

I have one multi-dimensional array which contains binary data as [3,240]: byte[,] bData = (byte[,])objTran; // bdata is binary data with [3,240] which means it has 3 records each from 0,239 and 1,239 and 2,239. Now I am Marshalling this data to…
Bokambo
  • 4,204
  • 27
  • 79
  • 130