c++ - How can I store marshaled data? -


I have an RPC com interface that passes data from a customer to the service's data, on the client side, Temporarily store and be placed in the queue so that it can be processed later on the Yuri thread (it should be done on the Yuri thread because it is where visual and visual model objects are required to be made).

The structure is slightly complex and it indicates other structures and variable length strings.

Question - Is there an easy way to catch the full "blob" of the dashed memory of the car or do I need to duplicate the same structure and recreate it myself, so I later added it to Yuri Thread Can I process? At present, it looks like repeating the same strokes, but replaces LPCWB with CCOMBR etc., which looks like meeless and useless ...

thanks

Unless you need to understand the data, you can consider it as a sequence of bytes. The only thing that you need to know is how much data you have, then you can do something like this:

  std :: vector & lt; Unint8_t & gt; Buf; Buf.resize (length); Mempi (& amp; buff [0], source, length);  

And after that, assuming your vector is still almost

  memcpy (dest, & buf [0], buf.size () );  

If this is not scope the vector will be free.

The only thing that can be a little harder can be getting the length. It may require some knowledge of the data sent, but there is no need to open the data otherwise.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -