473,473 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Windows Image Acquisition 2.0 for XP

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
Nov 20 '05 #1
3 7447
* "Bob" <bo*@nospam.com> 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>
Nov 20 '05 #2
Bob
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bn************@ID-208219.news.uni-berlin.de...
* "Bob" <bo*@nospam.com> 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>

Nov 20 '05 #3

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" <bo*@nospam.com>
| References: <OT**************@tk2msftngp13.phx.gbl>
<bn************@ID-208219.news.uni-berlin.de>
| 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: <#G**************@TK2MSFTNGP09.phx.gbl>
| 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!TK2MSFTN GP08.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
|
|
| "Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
| news:bn************@ID-208219.news.uni-berlin.de...
| > * "Bob" <bo*@nospam.com> 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>
|
|
|

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Richard Smith via .NET 247 | last post by:
Hi I'm trying to use WIA for the scanning of an application i'mworking on at the moment, however i don't want the UI it givesyou and woud like to be able to define the properties such asthe scanning...
1
by: Ryan Melville | last post by:
Hi, I need to use WIA (Windows Image Acquisition) from managed C++. Is there a "new and improved" way to access WIA from managed C++ (i.e., through .net)? Or, is it the same COM calls as from...
4
by: Simon Verona | last post by:
I'm using wia in a vb.net project to capture images from a scanner.. This works fine. However, I want to control the way that images are scanned - ie B+W, Greyscale and resolution etc, but can't...
6
by: Bob | last post by:
Hi, Can anybody who has used Windows Image Acquisition library 2.0 for XP tell me how to get it to scan ALL documents loaded in the document feeder of a scanner. I have only ever used it to do...
3
by: Roberto Hernández | last post by:
I try to use the Windows Image Acquisition (WIA) with a sample in vb.net but it takes only back photos and also at low resolution. How can I put ther resolution at 640x480? I have a Labtec webcam...
3
by: Nicholas Lee | last post by:
I am using Visual Studio 2005 and wish to program using managed C++ code. I am writing an application to take still images from a webcam. I have created an interop 'reference' to the platform...
113
by: dan | last post by:
For writing a Windows desktop application, how much harder is it to use the Windows C API than C#/.NET, assuming the coding is done in an editor? What specific aspects were more difficult? I'm...
3
by: aghajanzadeh | last post by:
I'm developing an asp.net application with c#. In one of its pages I need to connect to a scanner and aquire image from it. Is it possible at all? If yes, is there any commercially published...
0
by: wachucky | last post by:
hi all, i try to use WIA 2.0 for my project which use scanner, it works fine..but i'm don't know how to detect wether the scanner is connected to the pc or not. i like to prompt a message when the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.