I'm new to C++, so this may be a noobish question; I have the following function:
#define SAFECOPYLEN(dest, src, maxlen)                               \
{                                                                    \
    strncpy_s(dest, maxlen, src, _TRUNCATE);                          \
    dest[maxlen-1] = '\0';                                            \
}
short _stdcall CreateCustomer(char* AccountNo)
{
    char tmpAccountNumber[9];
    SAFECOPYLEN(tmpAccountNumber, AccountNo, 9);
    BSTR strAccountNumber = SysAllocStringByteLen(tmpAccountNUmber, 9);
    //Continue with other stuff here.
}
When I debug through this code, I pass in the account number "A101683" for example. When it does the SysAllocStringByteLen() part, the account number becomes a combination of Chinese symbols...
Anyone that can shed some light on this?