Tlbimp.exe creats DLL with no constructors

Tlbimp.exe creats DLL with no constructors

am 21.04.2008 20:48:01 von QSIDeveloper

I need to add a method to a VB6 OCX that we are consuming with C# (VS 2005)
Unfortunately the person that created the original DLL to reference in the
C# code is not available. When I create a DLL using TLBIMP QDWorkFlowAx.OCX
/namespace:AxQDWorkFlow and then try to build the C# code I get a compile
error stating ‘the type AxQDassembly. QDassemblyAxClass has no constructors
defined’

I don’t see anything in the TLBIMP doc that covers this.

I also have tried creating a new VB control and a C# consumer for that
control with the same result.

RE: Tlbimp.exe creats DLL with no constructors

am 22.04.2008 05:36:13 von jialge

Hello QSIDeveloper,

For ActiveX control developed by VB6, we do not use tlbimp to generate its
net wrapper (interop assemblies) because AxtiveX controls require a
AxHost. Instead, we use the tool: aximp, which can be found in the
directory: C:\program files\Microsoft Visual Studio.NET\FrameworkSDK\Bin\.
You can run the command as:

aximp QDWorkFlowAx.OCX

and it will generate two interop dlls: QDWorkFlowAx.dll and
AxQDWorkFlowAx.dll

AxQDWorkFlowAx.dll contains the constructor we need to create the ActiveX
control.

For more information, I personally recommend the book "Professional Visual
Basic Interoperability - COM and VB6 to .NET" written by Billy Holli, and
Rockford Lhotka. In its Chapter 13, it introduce the interop between .NET
and ActiveX control in very detail.

If you have any other concerns or questions, feel free to let me know.

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove ¡®online.¡¯)
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx .
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

RE: Tlbimp.exe creats DLL with no constructors

am 23.04.2008 15:30:00 von QSIDeveloper

Thank you that worked.

"Jialiang Ge [MSFT]" wrote:

> Hello QSIDeveloper,
>
> For ActiveX control developed by VB6, we do not use tlbimp to generate its
> .net wrapper (interop assemblies) because AxtiveX controls require a
> AxHost. Instead, we use the tool: aximp, which can be found in the
> directory: C:\program files\Microsoft Visual Studio.NET\FrameworkSDK\Bin\.
> You can run the command as:
>
> aximp QDWorkFlowAx.OCX
>
> and it will generate two interop dlls: QDWorkFlowAx.dll and
> AxQDWorkFlowAx.dll
>
> AxQDWorkFlowAx.dll contains the constructor we need to create the ActiveX
> control.
>
> For more information, I personally recommend the book "Professional Visual
> Basic Interoperability - COM and VB6 to .NET" written by Billy Holli, and
> Rockford Lhotka. In its Chapter 13, it introduce the interop between .NET
> and ActiveX control in very detail.
>
> If you have any other concerns or questions, feel free to let me know.
>
> Regards,
> Jialiang Ge (jialge@online.microsoft.com, remove ¡®online.¡¯)
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx .
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>