473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

COM/ATL interfacing problem


Hi !

I'm encountering problems with a COM interface I defined. My .idl file
contains definitions for all the methods of the interface and some
class is implementing them. But when I add my object (a control in this
case) in some test app, and browse the interfaces it defines, all my
definitions have changed !

As an example, I define the following interface and class in the .idl
file :
// TestATL.idl file
[
uuid(F1C4329F-71C7-435b-ADE3-43A5A454EE7D),
object,
dual,
helpstring("COMTest interface")
]
interface ICOMTest : IUnknown
{
[id(1)] HRESULT TestMethod([in, out] ICOMTest **retVal);
[id(2), helpstring("method TestMethod2")] HRESULT
TestMethod2([in,out] IUnknown** in0);
}

[
uuid(A4752AC3-6003-4c38-86EC-8A5CCDFC671B),
version(1.0),
control,
helpstring("COMTest coclass")
]
coclass CCOMTest
{
[default] interface IComTest;
}
// End of TestATL.idl

The single method is implemented in the corresponding class CComTest.
I'm only deriving my class from ICOMTest, and implementing AddRef,
Release and QueryInterface myself.
I then create a small .NET app with a single form. I open the toolbox
and add my control to the list, and then to the form. Now the Object
Browser shows my lib, I browse to the ICOMTest interface, and here's
what I see for the definition of TestMethod :
public abstract new void TestMethod ( TestATLLib.CCOMTest retVal )

So the HRESULT return value disappears, and I can't get it, and more
than that, the ICOMTest parameter becomes a CCOMTest, which is really
annoying the purpose of interfaces is to hide the implementation !!

So did I did something wrong ? And what should I do so that my method
looks like the definition I gave when I browse it from an app that uses
it ?

Thanks !
--
kettch
------------------------------------------------------------------------
kettch's Profile: http://www.hightechtalks.com/m819
View this thread: http://www.hightechtalks.com/t2342316

Jan 25 '06 #1
0 830

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

Similar topics

0
by: 2mc | last post by:
All, I'm getting a better handle on Python and NumPy. I've found solutions to many of my questions. Thanks to all. I would like to interface Python (in WinXP) with another program through...
4
by: Chuck Amadi | last post by:
Hi all Anyone know a good Pygresql Tutorial for Interfacing between Python & Postgresql . Cheers Chuck
12
by: David Walker | last post by:
Hi I have a program which I need to interface with a webpage - the webpage will accept an input (probably a 'post' string from the program) and then will process it and needs to return a value. ...
4
by: Shaurya Anand | last post by:
I would like to know more about Interfacing hardware devices through .NET. We're students and what we're trying to do is control our robots with printer or serial port interfacing... very similar...
3
by: Kevin | last post by:
Hi All I got some good responses from some of you guys regarding me serial port interfacing problem that I posted a little while back. However your help leaded me to this link belo ...
2
by: headware | last post by:
I'm relatively new to ASP.NET and ADO.NET, but I have a basic design question regarding the use of web services and APS.NET applications. Right now we have an application that uses web services to...
1
by: Neil | last post by:
Our hosting company's server went down a few days ago. After they fixed it, our PHP Page and Database are not interfacing. They are not believing me that I have done nothing on my end in several...
1
by: keliie | last post by:
Hello, I've recently completed a database that tracks my food purchases and inventory and I want to add another piece to the database that tracks sales. Our company's waitstaff enters order...
2
by: abhay | last post by:
hi,i m interfacing gsm modem to my microcontroller.i need to send sms through it. i am using AT commands for that.the command to send sms (AT+ CMGS) terminates with ctrl-Z.now in my program i hav...
6
by: dev | last post by:
hi i want to know about interfacing or accessing a serial port using c-program please help me with an example thanks for whom who reply me soon
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.