473,320 Members | 1,828 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,320 software developers and data experts.

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::Subdomain::ManagedCPP;

void AClass::OpenWindow()
{
// some implementaion
}

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

namespace OtherDomain.Framework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWindow();
}
}
}

I got the error CS0117: Domain.Subdomain.ManagedCPP.AClass does not
contain a definition for 'OpenWindow'

Anybody can help???
Thanks a lot

Oct 26 '06 #1
4 2868

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::Subdomain::ManagedCPP;

void AClass::OpenWindow()
{
// some implementaion
}

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

namespace OtherDomain.Framework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWindow();
}
}
}

I got the error CS0117: Domain.Subdomain.ManagedCPP.AClass 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::Subdomain::ManagedCPP;

void AClass::OpenWindow()
{
// some implementaion
}

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

namespace OtherDomain.Framework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWindow();
}
}
}

I got the error CS0117: Domain.Subdomain.ManagedCPP.AClass 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::Subdomain::ManagedCPP;
>
void AClass::OpenWindow()
{
// some implementaion
}
>
And now in C#, I have
using namespace Domain.Subdomain.ManagedCPP;
>
namespace OtherDomain.Framework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWindow();
}
}
}
>
I got the error CS0117: Domain.Subdomain.ManagedCPP.AClass 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
"inaccessible 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::Subdomain::ManagedCPP;

void AClass::OpenWindow()
{
// some implementaion
}

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

namespace OtherDomain.Framework.UI
{
public class BClass
{
public MethodA()
{
AClass.OpenWindow();
}
}
}

I got the error CS0117: Domain.Subdomain.ManagedCPP.AClass 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
"inaccessible 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
by: Thomas Tryde | last post by:
Simplified code. class A : object { m() {} } class B : objet { m() {} }
1
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: " +...
2
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'...
3
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...
0
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...
3
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...
1
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...
1
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 ...
4
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.