Hi, I wonder if anyone can direct me to a win32 API or offer some logic
as to how I might copy memory to a specific location in an array.

What I am doing at the moment is copying an unsigned int into an unsigned char[].

The reason is to pass paramaters into a spawned thread, I need the array, as that
is the data I am passing for the thread to work on, but I have allowed for extra
unused memory from unsigned char[0] to unsigned char[24] to pass paramaters.

I used memcpy for this, but it seems I can only copy to the start of the array,
so I have one paramater I need, but I also need another.

So in essence I want to copy another unsigned int to unsigned char[4] (4 bytes
after the first)

I have looked at all the memory manipulation funcs on msdn, but none seem to
fit my needs.

I have no code to show because, well... I have no idea if this is even possible.

Thank you for taking the time to read.
Any tips or links very welcome.

Sorry if I took your time, but I realized solution.
I needed to prefix address referencer (&) to the dst param of memcpy and prepend
it with index number([4]).

Thank you for your patience.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.