all groups > dotnet interop > september 2004 >
You're in the

dotnet interop

group:

Using third-party OCX from Windows Service


Using third-party OCX from Windows Service Neils Christoffersen
9/30/2004 6:53:02 AM
dotnet interop:
I've been tasked with upgrading a VB 6 app to .NET. The current app runs
constantly and has a GUI interface, however, the GUI is not necessary so I am
planning to implement the functionality as a Windows Service.

Unfortunately, I need to use the facilities provided by a third-party
(Sterling Commerce Connect:Direct) OCX control. The control does not have a
GUI component, it just exports some public properties, functions, and events.

My question is how to use this control from within the .NET service. Can I
just use tlbimp to wrap it like I would a regular COM DLL, or is there some
other way to go about this?

Re: Using third-party OCX from Windows Service Eric
9/30/2004 10:27:28 AM
[quoted text, click to view]

Normally you could just make a reference to a COM component, but that
won't work with Connect Direct because the typelib isn't internal in
the cdauto.dll.

You should be able to import the cdauto.tlb file.

AddThis Social Bookmark Button