This effectively truncates that name to 15 characters.Code:strncpy(mDevice, aDevice, sizeof(mDevice) - 1);
That is the message you got back. Look at the name -- it should be much more than 15 characters. How much more? That's what string classes such as CString and std::string are for -- unlimited length strings.Code:CreateFile on \\.\C:\Documents an=failed with error code: 2"