473,385 Members | 2,162 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,385 software developers and data experts.

Passing a pointer to an object in an ActiveX event

I have a class CMyObject, that I want to pass in an ActiveX event.

I have not as yet found a way of passing pointers in events - any one
knows how ?

//PseudoCode IDL
[id(1)] void HereComesMyObject(CMyObject*); // <- How ??

Aug 30 '06 #1
1 1384
Hi Lucy,

"Lucy Ludmiller" <no*****@myplace.comwrote in message
news:r6********************@bt.com...
>I have a class CMyObject, that I want to pass in an ActiveX event.

I have not as yet found a way of passing pointers in events - any one
knows how ?

//PseudoCode IDL
[id(1)] void HereComesMyObject(CMyObject*); // <- How ??
COM is about passing interface pointers not object pointers. So make
CMyObject a COM object implementing an interface like IMyObject.
When you want to be automation compatible (i.e. mostly necessary to function
in VB/VBA) you will need to pass an IDispatch pointer IIRC.

--
SvenC
Sep 1 '06 #2

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

Similar topics

2
by: Chaduke | last post by:
I wrote a simple client/server chat program and the client runs as an activex control within an asp page. I have the users logging into the page using widows authentication and I'm using...
58
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
17
by: LP | last post by:
Hello, Here's the scenario: Object A opens a Sql Db connection to execute number of SqlCommands. Then it needs to pass this connection to a constructor of object B which in turn executes more...
6
by: Max | last post by:
Last time I tried to explain this on another forum it didn't go too well, so I'll try my best and if you know what I'm talking about then please tell me how to do this. I have a class, inside I...
7
by: AMP | last post by:
Hello, I have this in form1: namespace Pass { public partial class Form1 : Form { public Form2 form2; public Form1() {
0
by: Lucy Ludmiller | last post by:
I am writing an ActiveX control wrapper for my C++ library. I would like to know how to return a C++ object in an event raised by the ActiveX control. For e.g: FireEvent(CMyObject) // <- How...
8
by: Ivan Liu | last post by:
Hi, I'd like to ask if passing an object as an pointer into a function evokes the copy constructor. Ivan
7
by: TS | last post by:
I was under the assumption that if you pass an object as a param to a method and inside that method this object is changed, the object will stay changed when returned from the method because the...
3
by: =?Utf-8?B?TWluZ3lp?= | last post by:
Hi, I have the following question regarding communicating with a OCX control using C#. Idon't have access to the ocx code, so my c# code is actually mimic the behavior of C++ counterparts....
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.