Hi, I'm trying to pass a parameter to a thread, by using CreateThread(). Unfortunately, you have to pass LPVOID or void* as it's only parameter.

I'm trying to pass a structure to it, which should then be passed to another function to handle the data. I would make the structure a global, but it must be defined in a separate function I have.

I read somewhere that
Code:
if (sizeof(DATA) <= sizeof(void *))
then you can just cast it as a void*, but I don't know how to do that.

The structure is made like so

Header
Code:
struct Download
{
       char name[56];
       char outName[16];
};
Main Prog
Code:
int num_files;
...
num_files = x;
...
struct Download file[num_files];
Thanks for the help!