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#
  4. WIA initialize object problem

WIA initialize object problem

Scheduled Pinned Locked Moved C#
csharpcomhelpphpvisual-studio
4 Posts 4 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.
  • G Offline
    G Offline
    Gindi Bar Yahav
    wrote on last edited by
    #1

    Hey, I got a project to make an video application (that I can see myself on windows form). The problem is that I dont know how to do that kind of things, so I searched the net and found the WIA COM and thinking of using it. I found that article: WIA Scripting and .NET[^] But for some reason my computter says that the COM "WIALib" not exists... so I continued search and found that: http://www.codeguru.com/forum/showthread.php?t=439027[^] But for some reason, the line

    CommonDialogClass class1 = new CommonDialogClass();

    Gives me an problem

    Error 2 Interop type 'WIA.CommonDialogClass' cannot be embedded. Use the applicable interface instead. C:\Users\Yahav\Documents\Visual Studio 2010\Projects\ControlCamera\ControlCamera\Form1.cs 69 40 ControlCamera

    and the same for that:

    DeviceManager manager = new DeviceManagerClass();

    Someone can explain me why? Thank you very very moch! Yahav.

    Gindi Bar Yahav - Web & Software developer.

    E 1 Reply Last reply
    0
    • G Gindi Bar Yahav

      Hey, I got a project to make an video application (that I can see myself on windows form). The problem is that I dont know how to do that kind of things, so I searched the net and found the WIA COM and thinking of using it. I found that article: WIA Scripting and .NET[^] But for some reason my computter says that the COM "WIALib" not exists... so I continued search and found that: http://www.codeguru.com/forum/showthread.php?t=439027[^] But for some reason, the line

      CommonDialogClass class1 = new CommonDialogClass();

      Gives me an problem

      Error 2 Interop type 'WIA.CommonDialogClass' cannot be embedded. Use the applicable interface instead. C:\Users\Yahav\Documents\Visual Studio 2010\Projects\ControlCamera\ControlCamera\Form1.cs 69 40 ControlCamera

      and the same for that:

      DeviceManager manager = new DeviceManagerClass();

      Someone can explain me why? Thank you very very moch! Yahav.

      Gindi Bar Yahav - Web & Software developer.

      E Offline
      E Offline
      Erik Rude
      wrote on last edited by
      #2

      an explanation may be available here.. http://connect.microsoft.com/VisualStudio/feedback/details/508465/interop-type-onenote-application-cannot-be-embedded[^] Basically instead of DeviceManagerClass() use DeviceManager(). I'm going to test if this works in my implementation (where I'm not using DeviceManager but an ESRI.ArcGIS.esriSystem.AOInitializeClass). I know it's late, but I spent a bit of time trying to get here.

      H 1 Reply Last reply
      0
      • E Erik Rude

        an explanation may be available here.. http://connect.microsoft.com/VisualStudio/feedback/details/508465/interop-type-onenote-application-cannot-be-embedded[^] Basically instead of DeviceManagerClass() use DeviceManager(). I'm going to test if this works in my implementation (where I'm not using DeviceManager but an ESRI.ArcGIS.esriSystem.AOInitializeClass). I know it's late, but I spent a bit of time trying to get here.

        H Offline
        H Offline
        hazem001
        wrote on last edited by
        #3

        hello i cant understand it all can u explain .... WIA.CommonDialog Class' cannot be embedded. Use the applicable interface instead. please ..

        N 1 Reply Last reply
        0
        • H hazem001

          hello i cant understand it all can u explain .... WIA.CommonDialog Class' cannot be embedded. Use the applicable interface instead. please ..

          N Offline
          N Offline
          NEspinosa
          wrote on last edited by
          #4

          In the properties of assembly, Change "Embed Interop Types" To 'False'

          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