TWAIN ActiveX Control, Plug-in, Scanner SDK, Component, HTTP Control/SDK

Dynamsoft TWAIN Products

Support Community for TWAIN Control/Component/SDK for Scanning Solutions
* Login   * Register
* FAQ    * Search

It is currently Thu Feb 09, 2012 10:09 am




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Failed to import the ActiveX control in Visual Studio 2005
PostPosted: Wed Aug 16, 2006 1:26 am 
Offline
User avatar

Joined: Mon Mar 07, 2005 11:11 pm
Posts: 866
Some Visual Studio 2005 users get the error message "Failed to import the ActiveX control. Please ensure it is properly registered" when they try dragging the control from the tool box into the form.

This is a bug of VS2005 that has been reported to Microsoft. The cause of the problem is the missing of the "Interop.DYNAMICTWAINCTRLLib.dll" file or the "AxInterop.DYNAMICTWAINCTRLLib.dll" file that should be created automatically by system when you add the control to the form.

To work around this problem temporarily, you can manually create these two files by using AxImp.exe with source code generation. You can use a command like:
Code:
AxImp /source activex_control_path_name

The following code shows the importing of the DWT ActiveX control in command line:
Code:
C:\>"C:Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\AxImp.exe" /source C:WINDOWS\system32\DynamicWebTwainCtrl.dll

And you can see the output as follows:
Code:
Generated Source: C:\AxDYNAMICWEBTWAINCTRLLib.cs
Generated Assembly: C:\DYNAMICWEBTWAINCTRLLib.dll
Generated Assembly: C:\AxDYNAMICWEBTWAINCTRLLib.dll


The "DYNAMICWEBTWAINCTRLLib.dll" file is the same as the "Interop.DYNAMICTWAINCTRLLib.dll" file while the "AxDYNAMICWEBTWAINCTRLLib.dll" is the same as the "AxInterop.DYNAMICTWAINCTRLLib.dll" file.

Then place these two files into the subdirectory "\obj\Debug" of your project.

After the above work is done, the ActiveX control can be used normally.

Thanks.

_________________
Robert
TWAIN Support Team
http://www.dynamsoft.com/
TWAIN ActiveX/Plug-in HTTP Control/SDK & TWAIN ActiveX Control, Scanner SDK, Component
Software Configuration Management | SCM Solution


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 14, 2007 10:55 pm 
Offline
User avatar

Joined: Mon Mar 07, 2005 11:11 pm
Posts: 866
There is another way that can create the 2 DLL files easily:

1. Drag the Dynamic Web Twain control from the toolbox to the form and the "Failed to import the ActiveX control. Please ensure it is properly registered." error occurs.
2. Select "Build -> Rebuild Solution" to rebuild the project.
3. Drag the Dynamic Web Twain control from the toolbox to the form for the 2nd time and the "Failed to import the ActiveX control. Please ensure it is properly registered." error occurs again.
4. Select "Build -> Rebuild Solution" to rebuild the project for the 2nd time.
5. Drag the Dynamic Web Twain control from the toolbox to the form for the 3rd time and the ActiveX control will be successfully imported this time.

Thanks.

_________________
Robert
TWAIN Support Team
http://www.dynamsoft.com/
TWAIN ActiveX/Plug-in HTTP Control/SDK & TWAIN ActiveX Control, Scanner SDK, Component
Software Configuration Management | SCM Solution


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

It is currently Thu Feb 09, 2012 10:09 am


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Copyright © 2010 Dynamsoft Corporation. All Rights Reserved. | Knowledge Base | Source Control Blog