Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. I am getting 'ICaptureGraphBuilder2' : missing storage-class or type specifiers

I am getting 'ICaptureGraphBuilder2' : missing storage-class or type specifiers

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpvisual-studiographicsgame-dev
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yaminisridaran
    wrote on last edited by
    #1

    I am trying to capture video from web cam.I am using ICaptureGraphBuilder2. I am getting compilation error 'ICaptureGraphBuilder2' : missing storage-class or type specifiers 'CLSID_CaptureGraphBuilder2' : undeclared identifier I am using VC6 and visual studio 2003 I have install the directx sdk I have include the dshow.h I have included the lib files in project settings. Quartz.lib Strmiids.lib strmbasd.lib wmvcore.lib wmstub.lib Msvcrtd.libWinmm.lib I have included the paths in the tools->options->directories but after doing all this I am getting this compilation error messages. Please any body help me. S.Yamini

    L 1 Reply Last reply
    0
    • Y yaminisridaran

      I am trying to capture video from web cam.I am using ICaptureGraphBuilder2. I am getting compilation error 'ICaptureGraphBuilder2' : missing storage-class or type specifiers 'CLSID_CaptureGraphBuilder2' : undeclared identifier I am using VC6 and visual studio 2003 I have install the directx sdk I have include the dshow.h I have included the lib files in project settings. Quartz.lib Strmiids.lib strmbasd.lib wmvcore.lib wmstub.lib Msvcrtd.libWinmm.lib I have included the paths in the tools->options->directories but after doing all this I am getting this compilation error messages. Please any body help me. S.Yamini

      L Offline
      L Offline
      liur17
      wrote on last edited by
      #2

      the Class ICaptureGraphBuilder2 is defined in strmif.h; and the CLSID_CaptureGraphBuilder2 is defined in uuids.h

      Y 1 Reply Last reply
      0
      • L liur17

        the Class ICaptureGraphBuilder2 is defined in strmif.h; and the CLSID_CaptureGraphBuilder2 is defined in uuids.h

        Y Offline
        Y Offline
        yaminisridaran
        wrote on last edited by
        #3

        I tried it with visual studio 2005 and it works great. Thanks for ur help. \ Can i know how can I capture and store the picture streams. S.Yamini

        L 1 Reply Last reply
        0
        • Y yaminisridaran

          I tried it with visual studio 2005 and it works great. Thanks for ur help. \ Can i know how can I capture and store the picture streams. S.Yamini

          L Offline
          L Offline
          liur17
          wrote on last edited by
          #4

          I wrote below function in VC6 one year ago, maybe it can give you some hints. BOOL CMyClass::CaptureImage(LPCSTR szFileName) { if (pVMRWindowlessControl== NULL) return FALSE; BYTE* lpImage = NULL; if (pVMRWindowlessControl->GetCurrentImage(&lpImage) == S_OK) { BITMAPFILEHEADER hdr; DWORD dwSize, dwWritten; LPBITMAPINFOHEADER pDib = (LPBITMAPINFOHEADER)lpImage; //创建文件供写入 HANDLE hFile = CreateFile(szFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (hFile == INVALID_HANDLE_VALUE) return FALSE; //初始化BITMAP文件头 dwSize = DibSizeImage(pDib); hdr.bfType = BFT_BITMAP; hdr.bfSize = dwSize + sizeof(BITMAPFILEHEADER); hdr.bfReserved1 = 0; hdr.bfReserved2 = 0; hdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + pDib->biSize + DibPaletteSize(pDib); //写入文件头及内容 WriteFile(hFile, (LPCVOID)&hdr, sizeof(BITMAPFILEHEADER), &dwWritten, 0); WriteFile(hFile, (LPCVOID)pDib, dwSize, &dwWritten, 0); CloseHandle(hFile); CoTaskMemFree(lpImage); } return TRUE; }

          Y 1 Reply Last reply
          0
          • L liur17

            I wrote below function in VC6 one year ago, maybe it can give you some hints. BOOL CMyClass::CaptureImage(LPCSTR szFileName) { if (pVMRWindowlessControl== NULL) return FALSE; BYTE* lpImage = NULL; if (pVMRWindowlessControl->GetCurrentImage(&lpImage) == S_OK) { BITMAPFILEHEADER hdr; DWORD dwSize, dwWritten; LPBITMAPINFOHEADER pDib = (LPBITMAPINFOHEADER)lpImage; //创建文件供写入 HANDLE hFile = CreateFile(szFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (hFile == INVALID_HANDLE_VALUE) return FALSE; //初始化BITMAP文件头 dwSize = DibSizeImage(pDib); hdr.bfType = BFT_BITMAP; hdr.bfSize = dwSize + sizeof(BITMAPFILEHEADER); hdr.bfReserved1 = 0; hdr.bfReserved2 = 0; hdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + pDib->biSize + DibPaletteSize(pDib); //写入文件头及内容 WriteFile(hFile, (LPCVOID)&hdr, sizeof(BITMAPFILEHEADER), &dwWritten, 0); WriteFile(hFile, (LPCVOID)pDib, dwSize, &dwWritten, 0); CloseHandle(hFile); CoTaskMemFree(lpImage); } return TRUE; }

            Y Offline
            Y Offline
            yaminisridaran
            wrote on last edited by
            #5

            Thanks.After trying it I will let u know S.Yamini

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups