.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Creating 64-bit interop dlls from an ActiveX component

Posted By:      Posted Date: October 10, 2010    Points: 0   Category :.NET Framework
Hi there,

I have generated a 64-bit version of an old ActiveX component. I now need to create the appropriate interop dlls to be able to use this component from some managed code. Here's what I've tried:

> tlbimp myDll.ocx /out:myDllInterop.dll /machine:x64

This generates the error:
TlbImp : error TI0000 : A single valid machine type compatible with the input type library must be specified

From this error, it appears that I might not have a 64-bit activeX component. But when I check it using DependencyWalker, it says it IS a 64-bit dll. Is it possible that the typelib info inside the ocx is only 32-bits. If so, how can I verify that? OleView doesn't give me enough info about the bit-ness of the tlb. And more importantly, how can I force a 64-bit typelib info to be embedded inside the ActiveX control?

I've also tried aximp, but it doesn't seem to have any option to specify a target machine type at all

Do I have to write my own tlbimp/aximp using the TypeLibConverter class? Can anyone point me in the right direction please?

View Complete Post

More Related Resource Links

64-bit ActiveX Interop Problem

Our sister company wrote an ActiveX component for interfacing to a device that they(we) sell.  I have developed a VS2008 C# interface to the OCX by placing their COM object on a windows form then communicating through the generated interop.  But this is not working when I try to run the application on Win7 64-bit.  When I try to create the form which in turn loads the OCX, I get the following error: COMException was caught.  Class not registered (Exception from HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)) The problem is not that the component is not registered.  I can see that the OCX is properly registered in the registry.  If I run their application it works fine with the registered OCX. I am able to debug the OCX.  I can see the constructor called on a 32-bit OS.  But the constructor is never called on a 64-bit OS.  There appears to be something wrong inside of the AxInterop.  I also tried regenerating the AxInterop in the development system running on a 64-bit OS.  I deleted and readded the component from the form.  But this did not change the problem. I am now at a complete loss as to where to look next.

Accessing ActiveX Component functionality from SSIS

Hi I have my SSIS Package, from which I need to access the functionality of an external application.  The external application have an API exposed in form of ActiveX Component.  I have to access that ActiveX components. Now, how to have that ActiveX components exposed to my SSIS package? What are the steps to access that ActiveX component ? Request you to reply at the earliest as this is a critical requirement.  Please note that I am very new to SSIS technology.  

Activex component not showing up in toolbox


I wish to have an ActiveX component on my webpage. When I choose Item and add the COM object, the control is not added on the toolbox? How Can I manually add the activeX component.

ActiveX component not displayed in WPF


Hello guys,

I need to display a PDF file inside of my application in Adobe's ActiveX coponent. In addition, I need to put it in my custom control. I use WindowsFormsHost to do this:

<WindowsFormsHost x:Name="WinFormsHost" Margin="1">
  <ctrl:PDFViewer x:Name="pdfViewer" />

And this is the source code of my PDFViewer class (there is a AxAcroPDF named axAcroPDFView contro

Referring multiple DataContract DLLs in one component



I am creating few WCF services. The number may be high. And we have used a pattern in each service to handle different targets. Now the issue is like each service is having 3 classes. And these three classes are similar in all sevrices with minor changes. These classes use corresponding data contracts in thier classes and the remaing logic is same. Now i am trying to reduce no of classes in each service. So I've added a class librray to solution and these classes are available in that library. And I am referring these library in each service. Since all services use this library, I am referring all data contracts in this newly created library.

My question is what is the impact of referring a dll(s) in class library. Is it ok to refer all dlls in one library and refer that library in each service? Earlier implementation is referring corresponding data contract dll in each service. Now all the data contracts are removed from services and moved to one library. Am I doing correct in terms of performance and maintainability?

calling CreateObject from web service...getting exception: Cannot create ActiveX component


I have created a web service in VB 2005 and this ws calls CreateObject to access an api. I can successfully call CreateObject from an application but not the web service(using the same code). I get the following error:


System.Exception: Cannot create ActiveX component.
   at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)

   at WebServicePAM.getPositionData.getPamString() in  c:\inetpub\wwwroot\WebServicePAM\App_Code\getPositionData.asmx.vb:line 60


WebServicePAM is the web service.


I appreciate any suggestions. I have gone through the IIS settings and but have not been able to make any changes that will allow me to call CreateObject successfully.




ActiveX component can't create object error when trying to connect Analysis Server


I'm current on a SQL 2000 Standard Edition enviroment and when I launch the Analysis Server Manager, the Analysis Servers/database has a red box. I right-click, select connect and I get an error displaying:

"ActiveX component can't create object"


can someone point me to an article or a solution for this error.

grately appriciate it, thank you,


ActiveX component can't create object: 'Scripting.FileSystemObject'



I have a problem, on classic asp website.

This line of code is raising an error

Set objFile= CreateObject("Scripting.FileSystemObject")

This is the error

Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'Scripting.FileSystemObject'

My System

Windwos Server 2003 SP 2

The application pool for this website is using a user with administrator rights.

I already reinstalled Windows Script 5.7 for Windows Server 2003 and restarted the server.

Crystal reports 8 is installed on the server, I read some articles that said Crystal reports 8 could be the problem, buy they dont't say how to solve it.

I have installed RegMon as requested on this article but has been useless, can't find anything.



Creating your SharePoint Governance Plan

One of the most common questions that I get from prospects as I'm talking to them about the creation of a governance plan and process is what does it look like. In other words, there are materials available which describe what should be in a governance plan but there isn't a ton of guidance on what the process of creating a governance plan and process are.

Creating Paging for a Repeater Control

A common question is "How do I implement paging within a Repeater?" Although the beauty of the Repeater control is its flexibility, you're on your own for building most functions. ASP.NET 2.0 has included some new controls that provide paging, as does the DataGrid in ASP.NET 1.1. However, this tip shows you how to roll your own paging for a simple data viewer.

Creating an AJAX Repeater in ASP.NET MVC

The "TaskList" is a tried an true example of the most basic thing that you can do in any framework. Unfortunately, I had some problems finding a really good example of all the steps necessary to get a task list to work in ASP.NET MVC 1.0.

Creating a Generic Entity Framework 4.0 Repository

With .NET 4.0 right around the corner, I thought it would be cool to download Visual Studio 2010 beta 2 and start playing around with the next release of Entity Framework.

The initial release of Entity Framework came with a great deal of criticism. To make matters worse, there was a large uproar when it was rumored that Microsoft would be abandoning LINQ to SQL, in favor of Entity Framework. This was because, at the time, many developers felt Entity Framework was an inferior technology to LINQ to SQL. To set things right, Microsoft proactively moved forward with improving Entity Framework, in time for the 4.0 release of the .NET Framework. This is good news because my initial impressions, so far, have been nothing but positive.

Creating a Simple Class in C#

The second article in the C# Object-Oriented Programming tutorial describes how classes are created in C# and how behaviour, in the form of publicly visible and private, hidden methods can be added. This demonstrates some of the uses of encapsulation

Creating SharePoint items with CreateItemActivity

Instead of creating new list items from code in your workflow you can use CreateItemActivity. CreateItemActivity can be used for creating list items or files. Properties of interest for this activity are the following (most of them are self-explanatory):

Creating an Excel Spreadsheet programmatically using VB.NET

The Interoperability services make it very easy to work with COM Capable Applications such as Word and Excel. This article reveals using Excel from a managed application. Excel is the spreadsheet component of Microsoft Office 2000. The majority of Excel programmatic functionality is exposed through Automation via the type library Excel9.olb. The intention of this article is to express that a managed application can interrelate with Excel as a COM server.

Creating an Excel Spreadsheet and Adding Data to It Programmatically

The Interoperability services make it veryeasy to work with COM Capable Applications such as Word and Excel. Thisarticle reveals using Excel from a managed application. Excel is thespreadsheet component of Microsoft Office 2000. The majority of Excelprogrammatic functionality is exposed through Automation via the typelibrary Excel9.olb. The intention of this article is to express that amanaged application can interrelate with Excel as a COM server.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend