IS_ISI - Debug Build not working!
A little help with an InSim connection problem please! I just converted my project from Visual Studio 2003 (C++) to Visual Studio 2008 (C++) and it builds perfectly fine. I can't however connect with the "debug" version of the application although the "release" build works perfectly fine. I have been adding onto the app using release but I know I will need to use the debugging tools by the end of this project so if you have any help.

After sending the InSim Init packet LFS is telling me: "InSim: guest name must end with zero". The "guest name" is the IName[] field correct? Cause that ends in zero, actually all the names did... I am pretty confused why this used to work, and does work in release but not in debug builds so I am looking for help. Please and thanks in advance.
Debug builds tend to fill fresh allocated memory with certain debug values (like 0xBADF00D), while a release build will likely contain either zeros or just whatever junk is left there by previous freed memory by your process. Obviously without seeing the code it is difficult to tell but that could be one likely cause (as in, you're not initialising some memory properly and the contents are undefined, or you are not properly terminating some string with a null)
Thanks for the reply and I'll paste in a bit of code here if it works. I know that the code has the null-terminator in it, and like I said it worked on VS 2003 in both Debug and Release builds. But maybe something with this is different...


IS_ISI i; memset(&i, 0, sizeof(IS_ISI));
i.Size = sizeof(IS_ISI);
i.Type = ISP_ISI;
i.ReqI = 1;
i.Flags |= ISF_MCI;
i.Interval = 0; //Don't use MCI's unless turned on later.
strcpy_s(i.IName, 16, "Prj NmHere\0");
strcpy_s(i.Admin, 16, "adminpass");

The code to send the packet over the network has worked for months and months so I doubt I need much more code then what I put. Prj NmHere is NOT the name I am actually using, although it is the same length. I tried putting a manual null-terminator as you can see, although it didn't help my situation. Any other thoughts?

FGED GREDG RDFGDR GSFDG