G
G
Gamemaker2014-10-31 14:05:19
C++ / C#
Gamemaker, 2014-10-31 14:05:19

How to make std::list 12 bytes?

I'm working on a reverse library written in VS2003 .NET. One of the structures from there has a std::list, which has a certain offset and a size of 12 bytes, followed by other properties. I'm writing in VS2010 and I have sizeof(std::list) 16 bytes. This structure must be transferred to the library and processed there somehow. If I pass in a structure with a list size of 16 bytes, of course the property values ​​that follow the list are shifted by 4 bytes. Question: how do I use, or where can I get a std::list of 12 bytes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Zhilin, 2017-06-15
@Anton3

  1. Copy from VS2003 headers to your headerstd::listmy_list.h
  2. If there is written in the headers , then when calling the function, you can pass in order to push the list that you need eitherstd::list&reinterpret_cast<std::list&>(my_list_instance)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question