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 8614965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:15:13+00:00 2026-06-12T05:15:13+00:00

My issue, i am trying to convert and array of dynamic memory of type

  • 0

My issue, i am trying to convert and array of dynamic memory of type DWORD to a BYTE. Fair enough i can for loop through this and convert the DWORD into a BYTE per entry.

But is their a faster way to do this? to take a pointer to DWORD data and convert the whole piece of data into a pointer to BYTE data? such as using a memcpy operation?

I feel this is not possible, im not requesting an answer just an experienced opinion on my approach, as i have tried testing both approaches but seem to fail getting to a solution on my second solution.

Thanks for any input, again no answers just a point in the right direction. Nor is this a homework question, i felt that had to be mentioned.

  • 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-12T05:15:15+00:00Added an answer on June 12, 2026 at 5:15 am

    It really depends on what you’re trying to achieve in the end. If you’ve got, e.g:

    DWORD *x;
    x = new DWORD[100];
    
    // x gets filled in somehow
    

    And you just want to deal with each byte of each DWORD individually then doing something like you suggest (i.e. using e.g. memcpy) could be an option. You could, however, just deal with the array as a BYTE array usinga reinterpret_cast e.g.

    BYTE *y = reinterpret_cast<BYTE *>(x);
    

    Or something like that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to convert a float value to byte array using BitConverter.GetBytes(...) method.
I'm trying to convert an int to an byte array and then do base64
I have this issue trying to get all the text nodes in an HTML
I am having an issue trying to make a small text-fantasy type game involving
I am trying to convert this MSSQL QUERY to MYSQL Query looks like this
I am having an issue while trying to convert NSString to NSData and vice
I'm trying to convert some MYSQL querys to MYSQLI, but I'm having an issue,
I'm trying to convert some VB.net code into C# and having issues trying to
I am having issues with trying to convert an UTF-8 string to unicode. I
I am having an issue trying to deal with timezones in the JQuery date/time

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.