RE: trouble with strings [C++]
Ok, my two cents, how about reading up on the C or C++ language before just trying to bash in code?
RtlCopyMemory is *not* the proper way to copy a string, &buffer[0] is useless, just hard-coding the value 10 is nonsense too, as this indicates the length of the data to be copied, not the size of the destination block :/
Go read some C tutorials, especially focus on pointers and arrays, and after that try to write a proper program. If you continue just trying like this, you will end up with a DLL full of buffer overflows, faulty pointers, messed up stacks, and it will not be stable and if used with data retrieved from the net, it will probably be a huge security risk too...
|