Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2004, 08:45 PM
Authorized User
 
Join Date: Jul 2003
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to stalker Send a message via MSN to stalker
Default PLEASE HELP: exe ==> DLL

Hello! I'm really new to C#.

I have this really basic cs exe and I want to make it a DLL so I can call it as an ActiveX Object thru a webpage (HTA).

I know i need to get it some parametere(s) like a unique GUID and PROGID:

[ComVisible(true), GuidAttribute(" get a unique guid here")]
[ProgId("Your.progid")]

I just don't know how! can you please help me? hhow do I make my exe into a DLL (I knwo the compiler sintax, just need the diffeences between DLL and EXE code)
 
Old November 4th, 2004, 03:14 AM
Kep Kep is offline
Authorized User
 
Join Date: Aug 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Create a new Class Library project and then set the projects properties.

Under Common Properties|General set the Output Type to Class Library.
Under the Configuration Properties|Build you should find the Register For COM Interop option. Set this to TRUE.

You'll also need to give the assembly a strong name. Check in the visual studio help about how to do this.

There's also a COM interop example supplied with Visual Studio.

Kep.
 
Old November 4th, 2004, 09:43 AM
Authorized User
 
Join Date: Jul 2003
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to stalker Send a message via MSN to stalker
Default

Oh! thx.

But is there anyway to do it with notepad. I dont do apps with visual studio, only with TextPad (that is almost like notepad).

If that is the only way Ill get a copy in my college of VS. but if there is another way i'd like to know.. I heard of a program called regasm or smthg like that.

Thanks for the help!
 
Old November 4th, 2004, 06:16 PM
Kep Kep is offline
Authorized User
 
Join Date: Aug 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm sure you can do it without the IDE but I wouldn't know how.
I know the command line option for the compiler (to create a DLL) is /t:library but I think you need another application to register for COM.

Kep.





Similar Threads
Thread Thread Starter Forum Replies Last Post
dll and exe wbalazyman C# 1 April 1st, 2007 09:29 AM
Membership: aspnet_sql.exe -> aspnet_regsql.exe ricpue BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 August 9th, 2006 11:40 PM
Using a ActiveX DLL in a Standard EXE earendall74 Beginning VB 6 2 November 24th, 2004 01:39 PM
IS IT DLL OR EXE? augustine General .NET 2 October 4th, 2004 12:43 AM
ActiveX Exe and Dll Vasudevan VB How-To 1 September 26th, 2003 07:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.