471,337 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

COM Problem


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.InterfaceIsIDispatc h)]
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?

--
------------------------------------------
Jacek Jurkowski - Datacomp

--
------------------------------------------
Jacek Jurkowski - Datacomp

Sep 15 '08 #1
1 992
Check out the help documents on the ComVisible attribute class
[ComVisible(true)]

Hope this helps
Leon Lambert

Jacek Jurkowski wrote:
>
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.InterfaceIsIDispatc h)]
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?
Sep 15 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Kostatus | last post: by
117 posts views Thread by Peter Olcott | last post: by
18 posts views Thread by Ian Stanley | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.