473,657 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compie error CS0117

B.
Hi I have two projects, one written in MC++, and the other in C#.
In MC++ header file, I have:

namespace Domain
{
namespace Subdomain
{
namespace ManagedCPP
{
public class AClass
{
static void OpenWindow();
};
}
}
}

In MC++ cpp file: I have:

using namespace Domain::Subdoma in::ManagedCPP;

void AClass::OpenWin dow()
{
// some implementaion
}

And now in C#, I have
using namespace Domain.Subdomai n.ManagedCPP;

namespace OtherDomain.Fra mework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWind ow();
}
}
}

I got the error CS0117: Domain.Subdomai n.ManagedCPP.AC lass does not
contain a definition for 'OpenWindow'

Anybody can help???
Thanks a lot

Oct 26 '06 #1
4 2886

B. wrote:
Hi I have two projects, one written in MC++, and the other in C#.
In MC++ header file, I have:

namespace Domain
{
namespace Subdomain
{
namespace ManagedCPP
{
public class AClass
{
static void OpenWindow();
};
}
}
}

In MC++ cpp file: I have:

using namespace Domain::Subdoma in::ManagedCPP;

void AClass::OpenWin dow()
{
// some implementaion
}

And now in C#, I have
using namespace Domain.Subdomai n.ManagedCPP;

namespace OtherDomain.Fra mework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWind ow();
}
}
}

I got the error CS0117: Domain.Subdomai n.ManagedCPP.AC lass does not
contain a definition for 'OpenWindow'

Anybody can help???
Thanks a lot
Have you tried using the ildasm utility to examine the DLL generated by
the managed C++ compiler to see what the class structure looks like
after the compiler is finished with it?

Oct 26 '06 #2
B.

Bruce Wood wrote:
B. wrote:
Hi I have two projects, one written in MC++, and the other in C#.
In MC++ header file, I have:

namespace Domain
{
namespace Subdomain
{
namespace ManagedCPP
{
public class AClass
{
static void OpenWindow();
};
}
}
}

In MC++ cpp file: I have:

using namespace Domain::Subdoma in::ManagedCPP;

void AClass::OpenWin dow()
{
// some implementaion
}

And now in C#, I have
using namespace Domain.Subdomai n.ManagedCPP;

namespace OtherDomain.Fra mework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWind ow();
}
}
}

I got the error CS0117: Domain.Subdomai n.ManagedCPP.AC lass does not
contain a definition for 'OpenWindow'

Anybody can help???
Thanks a lot

Have you tried using the ildasm utility to examine the DLL generated by
the managed C++ compiler to see what the class structure looks like
after the compiler is finished with it?

No I didn't. However, I use F12 on AClass at C# side, it opens metadata
of AClass and it says struct AClass{} and no method in side at all.

Oct 26 '06 #3

B. wrote:
Bruce Wood wrote:
B. wrote:
Hi I have two projects, one written in MC++, and the other in C#.
In MC++ header file, I have:
>
namespace Domain
{
namespace Subdomain
{
namespace ManagedCPP
{
public class AClass
{
static void OpenWindow();
};
}
}
}
>
In MC++ cpp file: I have:
>
using namespace Domain::Subdoma in::ManagedCPP;
>
void AClass::OpenWin dow()
{
// some implementaion
}
>
And now in C#, I have
using namespace Domain.Subdomai n.ManagedCPP;
>
namespace OtherDomain.Fra mework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWind ow();
}
}
}
>
I got the error CS0117: Domain.Subdomai n.ManagedCPP.AC lass does not
contain a definition for 'OpenWindow'
>
Anybody can help???
Thanks a lot
Have you tried using the ildasm utility to examine the DLL generated by
the managed C++ compiler to see what the class structure looks like
after the compiler is finished with it?


No I didn't. However, I use F12 on AClass at C# side, it opens metadata
of AClass and it says struct AClass{} and no method in side at all.
Well, I'm rusty on my C++ access modifiers, so I can't say for sure,
but you said simply "static void OpenWindow". What's the default access
for a method in C++? In C# it's "internal", which would mean
"inaccessib le to other assemblies"...? Perhaps you need to specifically
say "public static void OpenWindow"?

Oct 26 '06 #4
B.
I actually had modifiers "public" specified.

Bruce Wood wrote:
B. wrote:
Bruce Wood wrote:
B. wrote:
Hi I have two projects, one written in MC++, and the other in C#.
In MC++ header file, I have:

namespace Domain
{
namespace Subdomain
{
namespace ManagedCPP
{
public class AClass
{
static void OpenWindow();
};
}
}
}

In MC++ cpp file: I have:

using namespace Domain::Subdoma in::ManagedCPP;

void AClass::OpenWin dow()
{
// some implementaion
}

And now in C#, I have
using namespace Domain.Subdomai n.ManagedCPP;

namespace OtherDomain.Fra mework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWind ow();
}
}
}

I got the error CS0117: Domain.Subdomai n.ManagedCPP.AC lass does not
contain a definition for 'OpenWindow'

Anybody can help???
Thanks a lot
>
Have you tried using the ildasm utility to examine the DLL generated by
the managed C++ compiler to see what the class structure looks like
after the compiler is finished with it?

No I didn't. However, I use F12 on AClass at C# side, it opens metadata
of AClass and it says struct AClass{} and no method in side at all.

Well, I'm rusty on my C++ access modifiers, so I can't say for sure,
but you said simply "static void OpenWindow". What's the default access
for a method in C++? In C# it's "internal", which would mean
"inaccessib le to other assemblies"...? Perhaps you need to specifically
say "public static void OpenWindow"?
Oct 30 '06 #5

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

Similar topics

2
4186
by: Thomas Tryde | last post by:
Simplified code. class A : object { m() {} } class B : objet { m() {} }
1
1090
by: Kerem Gümrükcü | last post by:
Hi, i get this error when i try to compile my code. But why, ...everything seems to be ok! When i try to get some files extension with this: "File Extension: " + Path.GetExtension(e.FullPath) + " created...";
2
2052
by: Patrick Huffer | last post by:
When I open a certain page, I receive a "Compilation Error" as follows: Compiler Error Message: CS0117: 'System.Web.UI.HtmlControls.HtmlForm' does not contain a definition for 'ValidateInput' Source Error: Line 712: this.EnableViewStateMac = true; Line 713: this.SmartNavigation = true; Line 714: this.Request.ValidateInput();
3
2042
by: Justin Dutoit | last post by:
Hey. I have the error CS0117 'BusinessLayer' does not contain a definition for 'MySoapHeader'. Below is a link to the asmx source, and the code which calls the web service. MS seems to do the same thing at http://www.dotnetjunkies.com/QuickStart/aspplus/default.aspx?url=/quickstart /aspplus/doc/secureservices.aspx I'd appreciate any help. Thanks Justin Dutoit
0
949
by: Justin Dutoit | last post by:
Hey. Take a look at this link. http://justindutoit.port5.com/QuickshopDocs/businesslayer.asmx.txt When I call the web service, I have the error CS0117 'BusinessLayer' does not contain a definition for 'MySoapHeader'. Below is the code which calls the web service. MS seems to do the same thing without any problems at http://www.dotnetjunkies.com/QuickStart/aspplus/default.aspx?url=/quickstart
3
1112
by: Nikhil Patel | last post by:
Hi all, I have a drop down in an asp.net form defined as below: <asp:DropDownList id="dropDownLeaseType" runat="server" OnSelectedIndexChanged="LeaseTypeChanged"></asp:DropDownList> I have declared a javascript function as below: <SCRIPT type="text/javascript"> function LeaseTypeChanged() { WebComboWinningStructure.SelectedIndex =
1
6786
by: Luis Esteban Valencia | last post by:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0117: 'System.Data.DataTable' does not contain a definition for 'WriteXml' Source Error:
1
1052
by: manas | last post by:
hi, I am using showDialogModal to create a popup... the intial page is webform1.aspx and the popup page is error.aspx, I have the <base target="_self"> in webform1.aspx and the code i used is submit1.Attributes.Add("onclick","window.showModalDialog('error.aspx','BaseWork','dialogWidth:400px;dialogHeight:300px;');"); The error is :
4
2306
by: Neo Geshel | last post by:
Just moved to C# from VB.NET, frustrated to hell and back by inability to get much-copied (from about 20+ different resources) literal example to work. Master Page content: <meta name="keywords" content="<asp:Literal ID="ltrlKeywords" Runat="server" />"></meta> Code-Behind:
0
8844
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8621
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7354
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6177
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1734
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.