Question

i am new to visual c++.. I had a method in .h file something like this:

  public:
   void DoSomething();

Here i need to pass byte array as parameter and i need to implement it in .cpp file.. I am working on windows phone 8 for this i need to include visual c++ project of windows phone run time component. I need to use this method in c# class and pass the byte array from there. But i dont know how to declare a byte array method in c++. can any one please help me to find the solution.

Was it helpful?

Solution

In C++/CX, what you're using for a Runtime Component, the signature would look like this (assuming you have a ref class):

void DoSomething(const Platform::Array<uint8>^ something);

This could be called from C# directly by passing in a byte[].

OTHER TIPS

public:
   void DoSomething(Byte *);

Or

public:
   void DoSomething(unsigned char *);

for exemple.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top