473,394 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,394 software developers and data experts.

ref struct in mc++ to c#

Hi,
I wrote a classlibrary in vs 2005 mc++ and declered inside it a struct like
this:
public ref struct FGBITParam

{

public:

FGBITParam()

{

sAuxName ="";

hWnd=IntPtr::Zero ;

}

String^ sAuxName;

IntPtr hWnd;

};

Then i wrote a secound mc++ classlibrary that have a referance to the first
class library and implement a function as a member of ref class the get the
struct from the first classlibrary as a parameter.

I then wrote a c# application that use referance to the two classlibrary
above and try to call to the function of the class in the secound
classlibrary and pass it a prametr of type FGBITParam and i get this error:

error CS1501: No overload for method get one arg...

Why????

Thanks
Dec 20 '06 #1
2 1809
"dave" <dp*****@elbit.co.ilwrote in message news:O8***************@TK2MSFTNGP06.phx.gbl...
Hi,
I wrote a classlibrary in vs 2005 mc++ and declered inside it a struct like this:
public ref struct FGBITParam

{

public:

FGBITParam()

{

sAuxName ="";

hWnd=IntPtr::Zero ;

}

String^ sAuxName;

IntPtr hWnd;

};

Then i wrote a secound mc++ classlibrary that have a referance to the first class library
and implement a function as a member of ref class the get the struct from the first
classlibrary as a parameter.

I then wrote a c# application that use referance to the two classlibrary above and try to
call to the function of the class in the secound classlibrary and pass it a prametr of
type FGBITParam and i get this error:

error CS1501: No overload for method get one arg...

Why????

Thanks


First, it's Impossible to answer such question when you only post the least relevant part of
the code. Second, you better post this to the C++ NG at
microsoft.public.dotnet.languages.vc, this issue is not C# related.

Willy.
Dec 20 '06 #2
I wrote a classlibrary in vs 2005 mc++ and declered inside it a struct
like
this:
<SNIP>
Then i wrote a secound mc++ classlibrary that have a referance to the
first class library and implement a function as a member of ref class
the get the struct from the first classlibrary as a parameter.

I then wrote a c# application that use referance to the two
classlibrary above and try to call to the function of the class in the
secound classlibrary and pass it a prametr of type FGBITParam and i
get this error:

error CS1501: No overload for method get one arg...

Why????
Unfortunately, you didn't post the relevant portion of the code that caused
the error. The struct isn't the cause of the error. Likely, the problem is
between the method declaration in the second mc++ class library and the calling
site of the C# application.

Best Regards,
Dustin Campbell
Developer Express Inc.
Dec 20 '06 #3

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

Similar topics

0
by: Daniel Lidström | last post by:
Hi, I've been trying a long time now to generate some XML using MC++ and XmlSerializer. I have a piece of C# code that produces exactly what I want, but I simply can't get the MC++ code to write...
7
by: Urs Wigger | last post by:
In a C++ project, I have the following struct definition: struct GridModeDataT { double dVal1; double dVal2; double dVal3; long ...
7
by: Dirk Reske | last post by:
Hello, if I have a P/Invoke method: open(STRUCT1 str, STRUCT2 str2); is there a way to pass <null> for a struct in C#? How can I solve this? thx
1
by: Urs Wigger | last post by:
In a Managed C++ module, I have a function returning an integer as output parameter: bool Func1( int __gc *iout) { *iout = 33; return true; } Calling Func1 from a C# application works...
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a...
2
by: Lev | last post by:
Hi, I have some code that does reflection on an assembly I load. When I try to get the attributes on one of the methods implemented in the assembly, the MC++ version does not return anything....
8
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
12
by: Author | last post by:
I know the basic differences between a struct and a class, but apparently not good enough to know why some types/concepts are implemented as struct whereas most types are implemented as class. For...
6
by: arnuld | last post by:
I am unable to add anything to this structI can't understand why I am getting a Segfault: #include <stdio.h> struct macd {
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
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
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
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,...
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.