Windows Image Acquisition 2.0 for XP

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Gidday,

Anyone in here used WIA before?

I want to be able to connect to a digital camera via USB and access the
images. I was hoping WIA would be all I need but it doesn't see my camera
(Sony DSC-F717). Does the camera being used need some kind of compliant
driver? Or should any XP-recognised digital camera work?

I know I can tap into the supplied software that came with the camera but
this app will be used for multiple camera types (including Nikon) and I'd
rather avoid having to add code for each new camera that comes out. A more
generic approach would be best.

Code I am using to select camera follows (coded in VB6 but same effect in
VB.Net):

Dim objWIA As WIA.CommonDialog
Dim objDevice As WIA.Device

Set objWIA = New WIA.CommonDialog

Set objDevice = objWIA.ShowSelectDevice(UnspecifiedDeviceType, False)
MsgBox objDevice.DeviceID

Very simple but produces this error:

Run-time error '-2145320939 (80210015)':

No WIA device of the selected type is available.

I've also tried setting the devicetype to camera but same deal.


Any help appreciated...

Cheers
 
Hi Herfried,

Yeah, I had the code bit figured out... I wasn't sure why my camera couldn't
be seen but it turns out that the camera has to be in the PTP USB mode for
XP to see it using WIA (and also for it to show under Scanners and Cameras
in Control Panel)... as soon as I flicked it over XP saw it... and my code
works great...

Cheers
 
Hi Bob,

I am glad it works.
If you still have any question, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Bob" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: Re: Windows Image Acquisition 2.0 for XP
| Date: Fri, 24 Oct 2003 23:53:57 +1000
| Lines: 26
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 202-44-189-210.nexnet.net.au 202.44.189.210
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.
phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:149970
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Hi Herfried,
|
| Yeah, I had the code bit figured out... I wasn't sure why my camera
couldn't
| be seen but it turns out that the camera has to be in the PTP USB mode for
| XP to see it using WIA (and also for it to show under Scanners and Cameras
| in Control Panel)... as soon as I flicked it over XP saw it... and my code
| works great...
|
| Cheers
|
|
| | > * "Bob" <[email protected]> scripsit:
| > > Anyone in here used WIA before?
| >
| > You will find a sample for WIA (bug in C#) here:
| >
| > <http://www.codeproject.com/dotnet/wiascriptingdotnet.asp?target=wia>
| >
| > --
| > Herfried K. Wagner
| > MVP · VB Classic, VB.NET
| > <http://www.mvps.org/dotnet>
|
|
|
 
WIA in Windows 7

I have been trying to use WIA in VB6, under Windows 7.

I add 'Microsoft Windows Image Acquisition Library v2.0' to Project Components.

When I add a WIA.CommonDialog to a form, I get a 'System Error &H80004005 (-2147467259)' dialog.

Anyone know why this might be?
 
Back
Top