M
MyCatAlex
Guest
I copied GitHub CaptureToFile project and tried to compile it. It actually compiled and I started the debut, the things went on but then I got switched to another project and that demanded Windows SDK 8.1. I downloaded and installed it and now I got one compile error where there were none. It affects this function (file capture.cpp):
HRESULT CCapture::QueryInterface(REFIID riid, void** ppv)
{
static const QITAB qit[] =
{
QITABENT(CCapture, IMFSourceReaderCallback),
{ 0 },
}; <== Error pointer
return QISearch(this, qit, riid, ppv);
}
The error message points to line 202 which is indicated in the code sample and it says:
Severity Code Description Project File Line Suppression State
Error C2220 warning treated as error - no 'object' file generated MFCaptureToFile c:\cplusplus_projects\mfcapturetofile\mfcapturetofile\capture.cpp 202
Severity Code Description Project File Line Suppression State
Warning C4838 conversion from 'DWORD' to 'int' requires a narrowing conversion MFCaptureToFile c:\cplusplus_projects\mfcapturetofile\mfcapturetofile\capture.cpp 202
Now, HRESULT is 32 bit which is DWORD, but I don't see any 16 bit Int.
I need help.
Thank you, MyCatAlex
Continue reading...
HRESULT CCapture::QueryInterface(REFIID riid, void** ppv)
{
static const QITAB qit[] =
{
QITABENT(CCapture, IMFSourceReaderCallback),
{ 0 },
}; <== Error pointer
return QISearch(this, qit, riid, ppv);
}
The error message points to line 202 which is indicated in the code sample and it says:
Severity Code Description Project File Line Suppression State
Error C2220 warning treated as error - no 'object' file generated MFCaptureToFile c:\cplusplus_projects\mfcapturetofile\mfcapturetofile\capture.cpp 202
Severity Code Description Project File Line Suppression State
Warning C4838 conversion from 'DWORD' to 'int' requires a narrowing conversion MFCaptureToFile c:\cplusplus_projects\mfcapturetofile\mfcapturetofile\capture.cpp 202
Now, HRESULT is 32 bit which is DWORD, but I don't see any 16 bit Int.
I need help.
Thank you, MyCatAlex
Continue reading...