|
[quote=louisfeng;22891]Uhh, did you actually try to run this code? Did it actually print out “xsi”? Try this with 7.5 SDK:
Application app = Application();
char hi[] = "xsi";
CString msg(hi);
app.LogMessage(msg);
And tell me what it prints out.
actually it does indeed work for me, yes.
you using the default options for the compiler? If you changed something like making the char type unsigned, you could get getting into trouble. Also, do you have more than one version of Softimage on your computer—which could mean a risk of picking up the wrong SDK. You can verify that by renaming temporarily the directory of the other Softimage installation.
Also, if you are also using MFC, can you check with the debugger if it is calling XSI’s CString and not MFC’s class of the same name, you can test this by tracing in the debugger or by declaring XSI::CString instead of just CString. I’ll have to check my copy of the SDK is different, but it looks to be the same.
btw to convert that ‘name’ into the exact type the function required, the notation would be (const char*)name, but you’re not supposed to need it.
|