This is something I would have considered trivial several years ago... It's been awhile since I've dabbled in C or C++ and I'm having an issue that is now causing a migraine.
I am receiving an error for the following code:
CompressFile::CompressFile(wchar_t *WorkingDirectory, wchar_t *File)
{
int bzipError = BZ_OK;
wprintf(L"Attempting to compress %s%s\n", WorkingDirectory, File);
wchar_t FileRawInput[MAX_PATH];
wcsncpy(FileRawInput, WorkingDirectory, sizeof(FileRawInput));
wcsncat(FileRawInput, File, sizeof(FileRawInput));
wchar_t bzipCompressedOutput[MAX_PATH];
wcsncpy(bzipCompressedOutput, FileRawInput, sizeof(bzipCompressedOutput));
wcscat(bzipCompressedOutput, L".bz2");
wprintf(L"Output of string bzip: %s\n", bzipCompressedOutput);
wprintf(L"Output of string raw: %s\n", FileRawInput);
}
I am receiving this the following error on line 8:
Unhandled exception at 0x64F4C6D1 in ias-agent.exe: 0xC00001A5: An invalid exception handler routine has been detected (parameters: 0x00000003).
I've already gone the distance to avoid using the string
class, and I'd like to keep it that way for the time being. All I am trying to do, is add two strings together for RawFileInput
and then add the value of RawFileInput
to bzipCompressionOutput
and finally, concatenate .bz2
to the end of bzipCompressionOutput
.