COM Problem


J

Jacek Jurkowski

What do I have to do to make COM visible library?

I made a AlicjaKomax.dll with ComVisibility set to true
in sollution properties. In some circumstances I cannot
use "Register for COM" setting so I just build a dll with
one class inside:

namespace Alicja.AlicjaKomax
{
[Guid("42149a77-cbd3-49ec-a58b-aedd7a71ea81")]
public interface KomaxInterface
{
String Weryfikuj(String pPlikDefinicji, String pSerwer, String
pBazaDanych, Boolean pZintegrowaneLogowanie,
String pUzytkownik, String pHaslo, String pListaTabel, Boolean
pCichyTryb, Boolean pBrakMozliwosciPrzerwania);
}

[Guid("27e83ebf-fa02-47db-a896-420324ffeb65"),
InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface KomaxEvents
{
}

[Guid("d07618ed-3126-46e5-ad92-9f333b7f85b8"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(KomaxEvents))]
public class Komax : KomaxInterface
{
public String Weryfikuj(String pPlikDefinicji, String pSerwer,
String pBazaDanych, Boolean pZintegrowaneLogowanie,
String pUzytkownik, String pHaslo, String pListaTabel, Boolean
pCichyTryb, Boolean pBrakMozliwosciPrzerwania)
{
}
}
}

I register that dll with regasm -tlb:AlicjaKomax.tlb AlicjaKomax.dll command
and RegAsm returns
a success of that operation. But every time I'm trying to use my new library
from FoxPro i got
message. COM ERROR: System Cannot find the file specified. What else do i
have to do, to export
my class to COM properly?

--
 
Ad

Advertisements

L

Leon Lambert

Check out the help documents on the ComVisible attribute class
[ComVisible(true)]

Hope this helps
Leon Lambert
 

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