Thanks for the reply
"What makes you think you've got access to the data at 0x00123ABC?"
The code is in a dll, which is loaded by the program. The memory in question has at least read permission.
"I'd expect even the first program to crash."
The first function works fine.
Refering to the...
If I understand your post correctly you are new to C++, in which case you would do well to concentrate on the purely C++ language aspects and forget about which particular compiler you happen to be using.
I'm writing a memory viewer which can both display a block of process memory and dump it to file. The following function works fine.
void SomeFunction(void)
{
char* buf = (char*) 0x00123ABC;
for(int i = 0; i < bigNumber; i++)
{
fprintf(fp, "%x", *buf);
}
}
However if I try this below...
>Why isn't stream_size just an integer?
>It would save all this casting...
>myStream = *((int*) db->stream_size);
Good question. Partly because it suited me of old and hasn't been subsequently amended in the
development process. Partly for aesthetic reasons - which shouldn't figure at all...
Thank you for your advice. I have solved the problem of the 'skipped' bytes.
My source file is a C file, e.g. foo.c
Here is my code till now (bare essentials). My problem now is how to allocate enough memory dynamically in order to read in fairly large files (3-5Mb). Although I know the...
Yes, I am compiling with Visual C++.
The reason I was taking the address of the pointer was because most of the code used to be in functions, passed a pointer to struct. I moved my code back up into main to see if it would cure the problem and kinda forgot to change it. The code now works in...
I get this wierd output, both to file and screen. At certain points, I think at 32 or 36 bytes in, the data reads in ok but writing out seems write ahead or skip bytes, writing the *member variable oddly, with part of the next variable, *member_size added on.
I feel that maybe I am seeing some...
I am having problems accessing certain structure members, namely char* members. Instead of reading along the Char* array, it is incrementing it. What am I doing wrong?
#include <stdio.h>
#include <stdlib.h>
#define NAME 1162690894 // read as 4 bytes, spells NAME
void prnt_block( struct...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.