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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:57:52+00:00 2026-05-15T13:57:52+00:00

I am using ReadProcessMemory in C# output is bytes[] . I want to covert

  • 0

I am using ReadProcessMemory in C# output is bytes[]. I want to covert this to string. How to do that? My code is below..

!ReadProcessMemory(appProcess.Handle, mbi.BaseAddress, buffer, mbi.RegionSize, ref nRead))
{
    int lastError = Marshal.GetLastWin32Error();

    if (lastError != 0)
        throw new ApplicationException(string.Format("ReadProcessMemory returned Win32 Error {0}", lastError));
}

I am using string szData = Encoding.UTF8.GetString(buffer); and i am getting the below output.. how to get valid string

�#y��Actx Actx �ȶ�+eMZ�Actx Actx Actx ��ؚ~���������������MZ�j��xIlj�u�z�uy�u͙�u�}�u:�u��If�՜��D$f��f�4$��5Q�G”��L[���T_�N�b�l”���aa1wa��[�ۖ+3�����⯚*�e%��m�v�a�����S�+ ��b�r��o���V�G�q�1)v��*��[k<�CP�C�FYYE^i>�o �R��敠{�u�B3�����w�/���E�{U-��v|5�馘���U1�7�ҡ��[�@# P^�J�
S4����S�<���� ���cD$�$ډD$$���&,�}�34���e��_��U����V�,I�
R��}��=63S�L���M�z[�|�v�{Y^OZ�q<2�#u�c7��dzx����8�.��’h��Jsw���V�J�4)���˧JV@c�z�R��~i�
��c0g�r�|
e����e�t2�!. �+�X*m�@�U9�5�������������E
��q
�n�’s�Yi��
�������H�����vG�Z�O� �0d��C͕����{D %�@�C���Y�M_E
�6�;3�v��c��Ʌ1]�y}�ldu�����@t���A�h�9#�SVG���zfnuy�osKђ�N��q�OD$������E0�v�؃�������������sȶ1+e�����?�������5��h0MZ��D$��M�z�uB|�u�;�ulj�uy�u���'��H[���&���
BEGINTHM�y[������RESCDIRRESCSEG{��"~��������D-x�.MZ���.�z�uB|�u�;�uK�u�E�uy�u�&��__�5����DD�.9���WU����~~�z==G�dd��]]�2+�ss��
�����OOѣ��D””fT**~;���
����FF����)k���(<���y�^^�

���v���;d22Vt::N

�II�
H$$l�\���]���nC����bb�9���1������7�yy����2���Cn77Y�mm�������d�NN�I����ll��VV�������%�ee��zz�G���o����xx�J%%o..r8$W���s��Ǘ��Q���#���|�tt�>!�KK�a���
�������pp�|>>Bq����ff��HH�����aa�j55_�WW�i���������X:”������8���+���”3�ii����p���3���-���<“������ ���I�UU�P((x���z���Y��� ���

e������1�BB��hh��AA�)���Z–w{��˨TT�m���,:��cc��||��ww��{{
����kk��ooT���P00��gg}V++���b����M����vvE��ʝ��@��ɇ�}}����YYɎGG
����A��g����_���E���#���S����rr[����u������=��jL&&Zl66A~??���O���\h44�Q��4�������qqs���Sb11?*R���eF##^���(0�7��
�/�� 6$���=���&���iN''�����uu ���tX,,.4-6��nn�ZZ�[����RRMv;;a����}��{R))>���q^//�����SSh���_ValidateTexInfoatToResourceFormat��y��{��"~����{��"~����RESCSEG�\�Ѕȶ1+e����ȶ1+e�������?�������'��P��W��n��W������9$�?������MZ��L$V3��y�t�ы��;T$t��F�Ѓx�u���ID�����ts
.r�.��-�������@.MxX� p���O�.rsrc��lp���
�r�aaI��dGS��pOBB�W.�6t��g����MZ�����u��u�v�u���u��u��u�&\w~��u���u���u���u��\w�\w�=�uA\w��u@��u��uئ�u�D�u���uZ�u;��uܔ�u

  • 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-05-15T13:57:53+00:00Added an answer on May 15, 2026 at 1:57 pm

    You are reading raw binary data from a process, that will be a string only by accident. If it is a string at all, it is definitely not going to be encoded in UTF8. That’s a format that you’d only ever see in files or data sent across the Internet. The in-memory representation of strings are ASCII or UTF-16.

    But start out dumping this data in the same kind of format the debugger uses in the Debug + Windows + Memory 1 window. You can find the code to do so in this post.

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

Sidebar

Related Questions

When using ReadProcessMemory to read memory of an executable file, the first two bytes
I'm trying to read a process memory using the following code: void readdata(HANDLE phandle,
I'm using ReadProcessMemory in order to get 4 bytes. The function allows me to
Using ValueInjecter, I often find myself writing code like this: var foo1 = new
I am using a readprocessmemory class and have got it to work for reading
I tried using both ReadProcessMemory() and WriteProcessMemory() in my application,but in both cases I
Using a populated Table Type as the source for a TSQL-Merge. I want to
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly
Using import datetime in python, is it possible to take a formatted time/date string

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.