On Sun, 2008-05-11 at 20:59 +0100, Mark Ellis wrote:
> On Sun, 2008-05-11 at 17:01 +0200, David Eriksson wrote:
> > 
> > On Sun, 2008-05-11 at 10:55 +0100, Mark Ellis wrote:
> > > On Fri, 2008-05-09 at 22:40 +0200, David Eriksson wrote:
> > > > 
> > > > On Tue, 2008-05-06 at 21:50 +0100, Mark Ellis wrote:
> > > > > Hi All
> > > > > 
> > > > > General inquiry, does anyone know why CeReadRecordProps and
> > > > > CeWriteRecordProps for rapi1 are inside an #if SIZEOF_VOID_P == 4 ?
> > > > > 
> > > > > After a brief browse I can't see anything obvious that would break. I
> > > > > also can't see this defined anywhere.
> > > > 
> > > > SIZEOF_VOID_P is defined in rapi_config.h (generated by the configure
> > > > script, i.e. AC_CHECK_SIZEOF(void *) in configure.ac.in)
> > > > 
> > > > If this #define is of my making, I think that it is because it is very
> > > > important that CEVALUNION.lpwstr is read and written as a 32-bit value
> > > > and same for CEVALUNION.blob.lpb
> > > > 
> > > 
> > > Thanks David, that should give me something to think about for a while.
> > 
> > For the sake of clarity: this would of course only be an issue on
> > platforms where a pointer is 64-bit.
> > 
> > 
> 
> I was expecting the problem here to be that interesting bit of pointer
> arithmetic, but it seems not.
> 
> On 64 bit, CEVALUNION is 16 bytes long, because CEBLOB is 16 bytes.
> CEVALUNION over the wire is 8 bytes. I guess the problem is because
> CEBLOB is a struct of 2 members, each member gets allocated on 64 bit
> boundaries, hence a 16 byte struct, even though they don't need this
> much space.
> 
> Compiler quirks aren't my strength, do you know how to force this to the
> correct size ? 
> 

Scratch that, it's obviously not a boundary issue, it's because it needs
64 bits for an LPBYTE, this is going to be more fun than I thought.....

Mark


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to