|
-
Oct 12th, 2011, 01:58 AM
#1
Thread Starter
New Member
[RESOLVED] problem scanning with VB6 and WIA
Hi!
Finally I've found some infos for scanning with VB6 and WIA with Microsoft Windows Image Aquisition Library 2. Unfortunately I have a problem:
After I've added the component to the tools list, there are 2 new components in the list: DeviceManager and CommonDialog. But I can't drop CommonDialog to a form and I get an error: "System error &H80004005 (-2147467259)".
Even the source code
Dim cmdg As CommonDialog
Dim img As ImageFile
Set img = cmdg.ShowAcquireImage
produces an error: "Run-time error '91': Object variable or With block variable not set".
wiaaut.dll should be registered correctly in Win.7 because it's there from the beginning and "Regsvr32 wiaaut.dll" was also successful.
I've googled some times but couldn't find a solution.
And why do the old CommonDialog (i.e. for FileOpen etc.) and the new one have the same name although they don't have anything common?
Thanks
PW
-
Oct 12th, 2011, 07:49 AM
#2
Re: problem scanning with VB6 and WIA
Welcome to the forums.
Were these registered with elevated privileges?
Is this a 64 bit operating system? If so, search forum for: regsvr32 Win7 64
-
Oct 12th, 2011, 08:15 AM
#3
Thread Starter
New Member
Re: problem scanning with VB6 and WIA
>Welcome to the forums.
thanks
>Were these registered with elevated privileges?
yes, as admin
>Is this a 64 bit operating system?
no, Win.7 Enterpr. SR1 x32
-
Oct 12th, 2011, 08:53 AM
#4
Re: problem scanning with VB6 and WIA
Just because somebody named some class the same as some other class in an unrelated library you wouldn't expect them to do the same thing.
WIA.CommonDialog simply implements a number of WIA dialogs in one class.
During the period between XP SP2 and Vista concerns arose over DRM issues with some WIA operations. So Microsoft gutted out a lot of functionality and along the way they broke a few things (and do not plan to fix them). One of these things is the way CommonDialog is constructed. It can no longer be sited on a Form as a Control since it is missing several important ActiveX properties for a control.
This is a well-known issue first surfaced in 2006 and pretty much anybody who didn't skip all of the Vista Developer materials Microsoft put out should know about it. Skipped Vista? You snooze, you lose!
You can declare an instance of WIA.CommonDialog and invoke it yet though. See:
[RESOLVED] WIA Commondialog issue with Windows7
-
Oct 13th, 2011, 03:41 AM
#5
Thread Starter
New Member
-
Oct 14th, 2011, 08:04 AM
#6
Re: problem scanning with VB6 and WIA
 Originally Posted by pitwi
Although WIA was in the list of references, there was a 2nd entry and as soon as I activated it, everything worked well. Don't know why but it works. 
Any more details you can offer on this?
Like the name of this "2nd entry" in References, and what you mean when you say you "activated" it?
Could be helpful to others.
-
Oct 14th, 2011, 09:42 AM
#7
Thread Starter
New Member
Re: problem scanning with VB6 and WIA
> Any more details you can offer on this?
>
>Like the name of this "2nd entry" in References
It's the same as the first: "Microsoft Windows Image Acquisition Library v2.0"
> and what you mean when you say you "activated" it?
In the menu /Project/References/
-
Oct 14th, 2011, 10:20 AM
#8
Re: [RESOLVED] problem scanning with VB6 and WIA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|