I am trying to call C# code in a Cocos2d-x application (windows phone part).
I have add to my solution a Windows Phone Runtime Component to do this but in my C# project, i cannot implement an interface which is define the Windows Runtime Component project.
I followed this thread without success : Calling C# method from C++ code in WP8
Some code of my solution :
The interface in the windows phone runtime component which i'm trying to implement through a c# class
namespace WindowsPhoneRuntimeComponent
{
[Windows::Foundation::Metadata::WebHostHidden]
public interface class ICallback
{
public:
virtual void Exec( Platform::String ^Command, Platform::String ^Param);
};
}
The c# class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Runtime;
using WindowsPhoneRuntimeComponent;
namespace cocos2d
{
class CallbackImpl : ICallback // Here is the problem
{
}
}
In the C# class from the C# project, i can reference the windows runtime component calling "using WindowsPhoneRuntimeComponent;" but when i trying to call something from the namespace, or when i type "WindowsPhoneRuntimeComponent::something" there is nothing after "::".