.NET Framework Bookmark and Share   
 index > Managed Extensibility Framework > Error accessing a C++/CLI wrapper method from C#
 

Error accessing a C++/CLI wrapper method from C#

Hi,

I have written a C++/CLI wrapper around a native c++ to use it in managed c# environment. I will give a simple example of what I did and the issue I'm facing:

Native Lib:
class a
{

};
class b
{
    a Obj_a;

};
Wrapper DLL:
class a_wrap
{...
}

class b_wrap
{
     b * bnative;

public:
     void seta(a_wrap obj)
     {
           bnative->Obj_a = obj.getNative();
     }
}
Now in c# when a declare an object of b_wrap it works ok. But when I call the function B.seta(a_wrap someobject), it gives me the error:

error CS1501: No overload for method 'setsymbol' takes '1' arguments


It takes one argument. I have passed the right parameter type. What can be the issue??


Thanks,
Xeeez
xeeez
I don't even see a "setsymbol" method defined. Is this really the code you are using or did you forget something when writing this test code?
Geert van Horrik - CatenaLogic
Visit my blog: http://blog.catenalogic.com

Looking for a way to deploy your updates to all your clients? Try Updater!
Geert van Horrik

You can use google to search for other answers

Custom Search

More Threads

• editPoint.get_CodeElement(vsCMElement.vsCMElementEnum) returns null
• not able to call a vs 2005 c++ clr jni dll in java in machines without vs 2005?????
• how to add or integrate download accelerator to IE
• not able to call vs 2005 c++ "clr" jni dll in other machines without vs 2005???????
• Do you will support event subscribe and publish in future vesion fo MEF?
• MEF Component Composition designer
• Create a Ribbon Control for MS Project
• Unity IoC Newbie - Constructor Injection fail!
• How to import all implementations of specified interface.
• Catch the close event in word and Powerpoint for Override in Office Add-ins