it's been awhile since I've done any real C++ development, but I'm trying to
create a managed interface to some COM libraries that don't implement
IDispatch or come with type libraries, so that pretty much means C++.
I have a managed class, MainClass, and an unmanaged class EventSink, the
managed class needs to create an instance of EventSink and set
EventSink._owner = this;
the EventSink class needs to call methods on the _owner member.
I have the following which complies fine. if I change the gcroot declaration
to use the actual type of MainClass I get lots and lots of errors. How can
I resolve this?
MainClass.h
#include "EventSink.h"
[CLSCompliant(true)]
public ref class MainClass : public System::ComponentModel::Component {
//full implementation in header file
}
EventSink.h
#include <vcclr.h>
class EngineSink :
public CComObjectRoot,...
{
public:
// gcroot<MainClass^> _owner;
gcroot<System::Object^> _owner;
//full implementation in header file
} 4 1182
Hi Scott, I have the following which complies fine. if I change the gcroot
declarationto use the actual type of MainClass I get lots and lots of errors. How
canI resolve this?
In order to let me better understand the question, could you please help
provide the following information:
Which type of the errors you got when wrapping the MainClass in the gcroot
template?
Do you have the same problem when you wrap a simple custom managed class in
the gcroot template?
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
I've since gotten the solution to compile. I moved some of the
implementation code out of the header file and into the .cpp file, and then
added
ref class Parent; in the Child header file.
*sigh*
"Gary Chang[MSFT]" <v-******@online.microsoft.com> wrote in message
news:JE**************@TK2MSFTNGXA01.phx.gbl... Hi Scott,
I have the following which complies fine. if I change the gcroot declarationto use the actual type of MainClass I get lots and lots of errors. How canI resolve this?
In order to let me better understand the question, could you please help provide the following information:
Which type of the errors you got when wrapping the MainClass in the gcroot template?
Do you have the same problem when you wrap a simple custom managed class in the gcroot template?
Thanks!
Best regards,
Gary Chang Microsoft Community Support -------------------- Get Secure! ¡§C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default...sdn/nospam.asp &SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bruce W...1 |
last post by:
I've been learning about PHP for a couple of weeks. With includes, PHP
scripts, and HTML I can see where a large and complex website could
easily turn in to a big hairy mess with files all over...
|
by: davidw |
last post by:
I am using microsoft development enviroment 2003. I created a solution, and
have some projects, I put the root dir as my IIS home, and each project has
their own directory, so it is like
...
|
by: Andy |
last post by:
Hi, all
I am trying to design a parser for C program using C++. Currently what
I did for syntax tree is to design a class for each nontermials in the
grammar, and use inherentance to link them....
|
by: TokiDoki |
last post by:
Hello there,
I have been programming python for a little while, now. But as I am
beginning to do more complex stuff, I am running into small organization
problems.
It is possible that what I...
|
by: Greg Cyrus |
last post by:
"How to organize a Web-Project with DLL-Projects and Forms-Authentication"
Hi,
i would like to create a multi-tier solution with many projects using
ASP.NET such like presentation, biz-logic,...
|
by: Rudderius |
last post by:
Hey,
I'm working on a winform app in VS 2005. I'm wondering if someone knows
some best practices on how to organize the toolstrips.
I have a menuToolStrip and some other toolstrips. As in many...
|
by: Daniel N |
last post by:
I am new to .net and want to organize my code better. I am writing in vb.net
and the code for my main form is nearing 50-60 pages and would like to
create another file like a class, module or code...
|
by: tommaso.gastaldi |
last post by:
I have a solution with 1 project on which I am working on say Pr1
I have another solution with another project, say Pr2.
Source file in the existing Pr2 are organized within several nested...
|
by: Jchick |
last post by:
Boy, this should be a simple bit of code but I can't figure out how to
make it happen.
I have a CSV file shows up in a directory that has 4 fields that need
to be printed on labels. Each line of...
|
by: Larry Bud |
last post by:
Been working with .net 2 since January, and am in the middle of my
first large project.
It's becoming obvious that one must organize their code well in a
large project to make maintenance...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
| |