Im trying to send a user defined structure from one exe to another.
In my sending executable i use the code below. I put 3 things in a structure and pass the structure using SendMessage
[code] ipatInput input;
input.type = "load";
input.token = token;
input.fileName = fileName;
cds.dwData = 0;
cds.cbData = sizeof(input);
cds.lpData = &input;
SendMessage(myhwnd, WM_COPYDATA, NULL, (LPARAM)&cds);
My receiving program receives the data but the filaName property inside the structure has a value. This only happends if fileName is greater then 15 characters (null terminated -> 16bytes?) I dont understand why. I keep seeing some stuff about marshaling but i dont understand. What do i need to do to get this full string across instead of just if its less then 16 characters.
Thank you so much for your help