Create an Entry Point in a DLL

B

bboule

Hi

I have developped a dll that I want to use in another program !
here is my code :

using System;
using System.Collections.Generic;
using System.Text;

namespace NameSpace
{
/// <summary>
/// Main Entry Point.
/// </summary>
public class MyClass
{
public static void Main(string[] args)
{ .... }

}
}

But how can I tell my class or function that it is entrypoint ????

many thx

Cedric Petter
 
N

Nicholas Paldino [.NET/C# MVP]

Cedric,

Why do you want to specify the entry point?

The entry point is used to indicate that is where the program is to
start when started in a new app domain. If you run this program in another
process or another app domain, then you don't have to know where the entry
point is, it will be handled automatically for you.

If you want to run it in the same app domain, then you really should
take the functionality of the other program and refactor it out into a
library, and access the functionality that way.

Hope this helps.
 
B

bboule

Nicholas

I need to specify the entry point cause I need to use my dll in a
installer !
and when I specify the dll, it ask me the entry point !

do you understand ??

many thx


Nicholas Paldino [.NET/C# MVP] a écrit :
Cedric,

Why do you want to specify the entry point?

The entry point is used to indicate that is where the program is to
start when started in a new app domain. If you run this program in another
process or another app domain, then you don't have to know where the entry
point is, it will be handled automatically for you.

If you want to run it in the same app domain, then you really should
take the functionality of the other program and refactor it out into a
library, and access the functionality that way.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi

I have developped a dll that I want to use in another program !
here is my code :

using System;
using System.Collections.Generic;
using System.Text;

namespace NameSpace
{
/// <summary>
/// Main Entry Point.
/// </summary>
public class MyClass
{
public static void Main(string[] args)
{ .... }

}
}

But how can I tell my class or function that it is entrypoint ????

many thx

Cedric Petter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top