I'm creating Windows Runtime Component (c++) to use it later in windows phone 8.1 application (c#). My problem is preety simple but I cannot find any answer to it:
I need to create a method which take string/char */anything which is filepath as parameter and pass it to external method which takes char * as parameter.
I've tried with std::string, String^, char *. But I still get errors like such types are not supported (not in String^ case) or some other one.
Is there some simple answer which tells me how should I do this?
Code samples with errors
beginning
#include "pch.h"
#include "Class1.h"
using namespace Platform;
namespace WindowsRuntimeComponent2
{
public ref class Class1 sealed
{
various types:
int Foo(std::string param) {
cause: Foo': signature of public member contains native type 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' WindowsRuntimeComponent2
and few more containing same information about string's dependencies
int Foo(char * param) {
cause: 'Foo': signature of public member contains native type 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' WindowsRuntimeComponent2
int Foo(String^ photoPath) {
this one do not cause any errors but I don't know how to parse it to my char *
.