Hi Michael,
You could use a s String, Strings are always DWORD aligned.
Sincerely,
Jeff Daniels
PowerBASIC Staff
You could use a s String, Strings are always DWORD aligned.
Sincerely,
Jeff Daniels
PowerBASIC Staff
struct misaligned_members { WORD w; DWORD dw; BYTE b; };
void ExpectsAlignedPointer(DWORD *pdw); void UnalignedPointerOkay(UNALIGNED DWORD *pdw); misaligned_members s; ExpectsAlignedPointer(&s.dw); // wrong UnalignedPointerOkay(&s.dw); // okay
misaligned_members *p = (misaligned_members) HeapAllocate(hheap, 0, sizeof(misaligned_members));
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: