Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8064793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:28:44+00:00 2026-06-05T11:28:44+00:00

We have a WinRT component with business logic that internally massages a C++ unsigned

  • 0

We have a WinRT component with business logic that internally massages a C++ unsigned char buffer. We now want to feed that buffer from a C# byte[]. What would the perfect boundary look like, i.e., what would the signature of the SomeWinRTFunction function below be?

void SomeWinRTFunction(something containing bytes from managed land)
{
    IVector<unsigned char> something using the bytes given from managed land;
}

This kind of issue seems too new still for search engines to find it…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:28:45+00:00Added an answer on June 5, 2026 at 11:28 am

    In the C++ part, the method should accept a platform array of uint8 (the equivalent of C# byte).

    public ref class Class1 sealed
    {
    public:
        Class1();
        //readonly array
        void TestArray(const Platform::Array<uint8>^ intArray)
        {
    
        }
        //writeonly array
        void TestOutArray(Platform::WriteOnlyArray<uint8>^ intOutArray)
        {
    
        }
    
    };
    

    In the C# part pass the byte array:

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            Byte[] b = new Byte[2];
            b[0] = 1;
            var c = new Class1();
            c.TestArray(b);
            c.TestOutArray(b); 
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a StackPanel in my WinRT C# Metro app that I want to
I have an application I'm writing for Windows 8/WinRT that uses the StreamSocket API
I have the following in my WinRT component: public value struct WinRTStruct { int
It's been said that you can create a C++ WinRT component that you can
I have some code that is looking up group memberships from local groups on
I have a COM component that was originally written in Visual Studio 6. It
I have a program that still must target Windows XP (_WIN32_WINNT 0x501), as most
We have a dll that has been running fine on Vista and Win7 for
I have an out of browser app with silverlight. If I switch to winrt
I have an application build with VS2008 SP1a (9.0.30729.4148) on Windows 7 x64 that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.