shaji said:
Hi,
Could anybody tell me how to access the individual bytes that consists
of a Windows LONGLONG value?
If there is a type available
sometype_t
one can do something like:
#include <stdio.h>
#include <string.h>
void show_sometype_by_byte (sometype_t bar)
{
unsigned char foo[sizeof bar];
size_t i;
/* if your compiler doesn't like this, make
foo an 'unsigned char *foo' and malloc
the space */
memcpy(foo, &bar, sizeof bar);
for (i = 0; i < sizeof bar; i++)
printf("%#o ", foo
);
putchar('\n');
/* if you malloced foo, then free it here */
}
This approach holds for some non-standard Windows type as well as
standard types.