BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Wrapper of activex for existing unit

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Development
View previous topic :: View next topic  
Author Message
Salman
Guest





PostPosted: Wed Dec 06, 2006 10:09 pm    Post subject: Wrapper of activex for existing unit Reply with quote



I have a working Delphi unit, which works fine after including in any
Delphi application. However, now I want to use this functionality in
another application that is written in VB.NET/C#. Due to this reason, I
want to make this unit in an ActiveX and then import this to .NET.

Is there anyone who can guide me how to do that?

By the way, the unit file is based on socket programming.

Thansk,

Salman Bajwa.
Back to top
Wim Coenen
Guest





PostPosted: Thu Dec 07, 2006 10:37 pm    Post subject: Re: Wrapper of activex for existing unit Reply with quote



Salman wrote:
Quote:
I have a working Delphi unit, which works fine after including in any
Delphi application. However, now I want to use this functionality in
another application that is written in VB.NET/C#. Due to this reason, I
want to make this unit in an ActiveX and then import this to .NET.

Is there anyone who can guide me how to do that?

By the way, the unit file is based on socket programming.

Thansk,

Salman Bajwa.

In short:

Use "File - New" to create a new ActiveX library. In Borland Developer
Studio 2006,
it can be found under "Other - Delphi projects - ActiveX". Then use
"File - New"
again to create a new COM object in this ActiveX library.

Your new COM object "Foo" with COM interface "IFoo" will be generated
as the delphi
class "TFoo". Now add a "uses" reference to the unit you want to wrap,
and use the type
library editor to add methods to "IFoo". Implement those methods in
TFoo to expose
the functionality of your unit.

The resulting COM library can be wrapped by a .NET assembly with the
tlbimp utility.
Try "tlbimp /?" in a console.

Good luck,
WIC.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Development All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.