lpbyte

How to pass an array of bytes as a Pointer in C#

Hello, I have two questions.They both are concerning a void in C++,which I am trying to translate in C#. C++ code void Func_X_2(LPBYTE stream, DWORD key, BYTE keyByte) { stream[0] ^= (stream[0] + LOBYTE(LOWORD(key)) + keyByte); stream[1] ^= (stream[1] + HIBYTE(LOWORD(key)) + keyByte); stream[2] ^= (stream[2] + LOBYTE(HIWORD(key)) + ke...

How to easy convert LPBYTE to char[256] (used to read text from windows registry)

How I can convert LPBYTE to char [256]? When I read from Windows registry value: blah REG_SZ "blah some text" char value[256]; DWORD keytype = REG_SZ; DWORD dwCount = sizeof(value); RegQueryValueEx((HKEY)key, "blah", 0, &keytype, (LPBYTE)&value, &count); cout << "Read text from registry: " << value << endl; after cout this it shows...