Re: libusbK 64bit OS struct size

Travis <[email protected]>
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <[email protected]>
On 4/17/2014 4:22 AM, Ekkehard wrote:
> We are upon to use libusK with native 64 Delphi application, thus updating
> the pascal "bindings".
> My question is about the sizes of the structs
> in libusbk.h is defined
> typedef struct _KUSB_DRIVER_API
> {
> [...]
>
> 	//! fixed structure padding.
> 	UCHAR z_F_i_x_e_d[512 - sizeof(KUSB_DRIVER_API_INFO) -  sizeof(UINT_PTR) *
> KUSB_FNID_COUNT];
>
> } KUSB_DRIVER_API;
> typedef KUSB_DRIVER_API* PKUSB_DRIVER_API;
> C_ASSERT(sizeof(KUSB_DRIVER_API) == 512);
>
> My question is
> - does the 512 bytes overall size is the same in 32bit and 64bit version

Yes.

> - is UCHAR 8bit or 16bit

8bit always.

String chars are also 8bit (UTF-8 encoded)

> - is sizeof(UINT_PTR) 8 bytes or 4 bytes

8 bytes in 64bit
4 bytes in 32bit

Regards,
Travis

>
> I am asking sinze the struct size differs, while compiled with 64 bit Delphi
> compiler.
>
> Greetings Ekkehard
>
>
>
>
> --
> View this message in context: http://libusb.6.n5.nabble.com/libusbK-64bit-OS-struct-size-tp5713177.html
> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Libusb-win32-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.