Re: Get ASCII value for character when higher than 127
- From: ssetz@xxxxxx
- Date: Wed, 06 Jun 2007 01:50:02 -0700
On 5 jun, 18:29, MrAsm <m...@xxxxxxx> wrote:
However, this is my C++ and C# code, that works.
On 5 jun, 17:54, Alex Blekhman <x...@xxxxxxxxx> wrote:
I think that because of wrong `free' calls the process'
memory became corrupted. That's why you see weird problems.
MrAsm, you are not using the same way to XOR as I do, so your
endresult will be different than mine. Maybe that is why your code
works correct? Since I do save the ascii values to the text file, I
cannot imagine that the binary part is the problem.
I've removed all the illegal free-commands. It still isn't clear to me
when you need to free a char and when not, but if you guys say that
they have to go, I wouldn't doubt that ;-)
Still, I keep having the same problems.
The reason why I use string& in stead of just string is because
someone told me to (I think it was in the sample code made by Alex)
All my code comes from samples that I find on the internet. I need to
do something, find a sample that does is, and am glad if it does
work!!
For example, you asked me "We are in C++ world, why do you use malloc/
calloc instead of new?" Well, I found this code in a sample, and it
seemed to do what I wanted, get a string from a PUNICODE_STRING that I
want to write to a textfile. You now say that it is wrong to do it
this way, but I really have no idea why. I'll try to use your hints,
but am not sure if I will get it to work. Again, I have no C++
knowledge what so ever, and don't have the time to get it either, this
project should be finished as soon as possible.
Unfortunately, my boss thinks that when you know how to program C#,
you also know C++. And that of course is not really the case.
So, any more tips on why sometimes my '\0' character gets converted to
the wrong int value, depending on the character that's before it, are
very welcome, since I hardly know what I am doing ;-)
I'd prefer to adjust something to my code in stead of rewriting parts
all over again (like trying a complete new XOR, or writing binary in
stead of int values to text), since it seems to work most of the
times, only not all the time.
So I must be really close to getting something that works completely.
If I have to rewrite complete parts of my code I'm afraid it will take
longer until I get it finished :-(
Thanks again,
Sandra
.
- Follow-Ups:
- References:
- Prev by Date: Re: get unzipped?
- Next by Date: Re: Why does VS2005 show errors in standard include files?????
- Previous by thread: Re: Get ASCII value for character when higher than 127
- Next by thread: Re: Get ASCII value for character when higher than 127
- Index(es):
Relevant Pages
|
Loading