Re: byte order
- From: "Bruno van Dooren [MVP VC++]" <bruno_nos_pam_van_dooren@xxxxxxxxxxx>
- Date: Sun, 19 Nov 2006 10:53:59 +0100
int* p = new int[10];
int pval=(int)p;
callbackFoo(pval);
...
callbackFoo(int pval)
{
int* p=(int*)pval;
int ppp=pval[0]; ///Error the byte order are upsidedown.
}
Hi,
Why do you cast the pointer to an int?
The code you show does not cause any byte swapping by itself.
Is the int passed to a DLL built with another language or something? And
where does the callback function come from?
--
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"
.
- References:
- byte order
- From: Dave
- Re: byte order
- From: Victor Bazarov
- Re: byte order
- From: dave
- byte order
- Prev by Date: Re: byte order
- Next by Date: **** ReadKey******
- Previous by thread: Re: byte order
- Next by thread: Re: byte order
- Index(es):
Relevant Pages
|