473,499 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

COM objects

First time I tried to write a COM object.
I'm having this as code:
================================================>
....
namespace QuotesDLL
{
[Guid("53D4E200-38B0-4925-9708-A96484BAF822")]
public interface QuoteInterface
{
[DispId(1)]
bool addQuote(string quote);
[DispId(2)]
string getQuote(string [] args);
[DispId(3)]
string getQuote();
}

[Guid("F4A45909-85FE-496c-AC5D-39380B92DE23")]
public class QuoteSystem : QuoteInterface
{ ...
<=============================================== ==
that's all good, right? Those methods in the interface are made public in
the implementation. Does it hurt to make other methods private? addQuote()
uses saveQuotes() and that's declared private, that's not interfering with
the whole "COM object"-idea, is it?

now I try to compile it, in debug mode all goes well, but I get:
RegAsm warning: No types were registered
Assembly exported to '...\QuotesDLL\bin\Debug\QuotesDLL.tlb', and the type
library was registered successfully

trying to compile it in Release mode, I get a build error:
COM Interop registration failed. There are no registrable types in the built
assembly.

manual run on the debug dll:
RegAsm warning: No registry script will be produced since there are no types
to register

I've checked the registry and I can find the interfaceid, but not the class
that implements the interface.
I have no experience whatsoever with writing COM objects, so I don't know
what to do or what goes wrong.
And on final level, how do I call the COM object using mIRC? The command
works as follows:
/comopen name progid
name: some name for the connection
but what is progid in this case? QuotesDLL? QuoteSystem? QuoteInteface? The
upper hex number or the lower hex number?
thx so much!
Nov 15 '05 #1
1 3155
> >now I try to compile it, in debug mode all goes well, but I get:
RegAsm warning: No types were registered
Assembly exported to '...\QuotesDLL\bin\Debug\QuotesDLL.tlb', and the typelibrary was registered successfully


See if it helpst to mark the QuoteSystem class with
[ComVisible(true)].


still the same
and why do I get a different error on the Release-configuration build?
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8231
by: dasod | last post by:
I would like to know if my method to remove list objects is correct in this small test program. It seems to me that there might be a simplier way, but I'm afraid I don't know enough about list...
9
1863
by: Aguilar, James | last post by:
Hey guys. A new question: I want to use an STL libarary to hold a bunch of objects I create. Actually, it will hold references to the objects, but that's beside the point, for the most part. ...
6
2546
by: Alfonso Morra | last post by:
I have written the following code, to test the concept of storing objects in a vector. I encounter two run time errors: 1). myClass gets destructed when pushed onto the vector 2). Prog throws a...
3
3007
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements -...
8
1841
by: Lüpher Cypher | last post by:
Hi, Suppose we have a hierarchical class structure that looks something like this: Object | +-- Main | +-- Object1
161
7679
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
7
8203
by: Jo | last post by:
Hi, How can i differentiate between static and dynamic allocated objects? For example: void SomeFunction1() { CObject *objectp = new CObject; CObject object;
21
2188
by: George Exarchakos | last post by:
Hi everyone, I'd like your help... Can we have a std::list<BASEwhere BASE be the base class of a class hierarchy? I want to add to this list objects that are inherited from BASE class but not...
27
2524
by: SasQ | last post by:
Hello. I wonder if literal constants are objects, or they're only "naked" values not contained in any object? I have read that literal constants may not to be allocated by the compiler. If the...
14
5975
by: Jess | last post by:
Hello, I learned that there are five kinds of static objects, namely 1. global objects 2. object defined in namespace scope 3. object declared static instead classes 4. objects declared...
0
7178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.