Contact us


All times are UTC - 8 hours



   [ 5 posts ] 
Author Message
User avatar
   


Joined: Mon Mar 07, 2005 11:11 pm
Posts: 869
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 Dynamic TWAIN ActiveX control in command line:
Code:
C:\>"C:Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\AxImp.exe" /source C:WINDOWS\system32\DynamicTwainCtrl.dll

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


The "DYNAMICTWAINCTRLLib.dll" file is the same as the "Interop.DYNAMICTWAINCTRLLib.dll" file while the "AxDYNAMICTWAINCTRLLib.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.

_________________
Michael
Technical Sales Team
http://www.dynamsoft.com/


   


Joined: Wed Jan 10, 2007 12:23 pm
Posts: 1
I tried the above, and the files were successfully created. I copied them into the obj\debug directory of my project but I still get the same error when I attempt to drag the control onto a form from the control list.

What to do now?

Thanks,
Josh


User avatar
   


Joined: Mon Mar 07, 2005 11:11 pm
Posts: 869
I have sent the DLL files to your registered email box.

Thanks.

_________________
Michael
Technical Sales Team
http://www.dynamsoft.com/


User avatar
   


Joined: Mon Mar 07, 2005 11:11 pm
Posts: 869
The possible cause of the problem may be the DLLs you created.

Most customers are able to drag the control into the form successfully by following the information above, but some are not able to. Because the DLLs they created are invalid.

You can email TWAIN support team at twainsupport@dynamsoft.com, and they will email you back with valid DLLs.

Thanks.

_________________
Michael
Technical Sales Team
http://www.dynamsoft.com/


User avatar
   


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

1. Drag the Dynamic 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 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 Twain control from the toolbox to the form for the 3rd time and the ActiveX control will be successfully imported this time.

Thanks.

_________________
Michael
Technical Sales Team
http://www.dynamsoft.com/


Display posts from previous:  Sort by  
   [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 2 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:
cron
Copyright © 2018 Dynamsoft | All Rights Reserved
dynamic designed by Dynamsoft team
Fatal: Not able to open ./cache/data_global.php