What is wrong with this way of initializing vfw drivers?
C / C++ / MFC
3
Posts
2
Posters
0
Views
1
Watching
-
ICINFO icinfo;
HIC hic;icinfo.dwSize = sizeof(icinfo); icinfo.fccType = ICTYPE\_VIDEO; char szNoWideChar\[128\]; for (int i = 0; ICInfo(ICTYPE\_VIDEO, i, &icinfo); i++) { hic = ICOpen(icinfo.fccType, icinfo.fccHandler, ICMODE\_QUERY); if (hic) { ICGetInfo(hic, &icinfo, sizeof(icinfo)); WideCharToMultiByte(CP\_ACP, 0, icinfo.szDescription, -1, szNoWideChar, sizeof szNoWideChar, NULL, NULL); SendMessage(GetDlgItem(ghWnd, IDC\_COMPRESSORS), LB\_ADDSTRING, -1, (LPARAM)szNoWideChar); } }
This causes a user breakpoint the first time i reach the
for (int i =...
statement. Why? All input appreceated! -Rune Svendsen -
ICINFO icinfo;
HIC hic;icinfo.dwSize = sizeof(icinfo); icinfo.fccType = ICTYPE\_VIDEO; char szNoWideChar\[128\]; for (int i = 0; ICInfo(ICTYPE\_VIDEO, i, &icinfo); i++) { hic = ICOpen(icinfo.fccType, icinfo.fccHandler, ICMODE\_QUERY); if (hic) { ICGetInfo(hic, &icinfo, sizeof(icinfo)); WideCharToMultiByte(CP\_ACP, 0, icinfo.szDescription, -1, szNoWideChar, sizeof szNoWideChar, NULL, NULL); SendMessage(GetDlgItem(ghWnd, IDC\_COMPRESSORS), LB\_ADDSTRING, -1, (LPARAM)szNoWideChar); } }
This causes a user breakpoint the first time i reach the
for (int i =...
statement. Why? All input appreceated! -Rune SvendsenDon't forget to zeroinit the structure.
How low can you go ?
(MS rant) -
Don't forget to zeroinit the structure.
How low can you go ?
(MS rant)Already tried that, didn't work :( thanks anyway man.