Interop and SIZE_T

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I've seen a few Win32 API functions with SIZE_T parameters mapped via
managed ints. Is this the most appropriate mapping or would an IntPtr be
better (thinking of future proofing for 64-bit windows)

Cheers,

Steve
 
| Hi all,
|
| I've seen a few Win32 API functions with SIZE_T parameters mapped via
| managed ints. Is this the most appropriate mapping or would an IntPtr be
| better (thinking of future proofing for 64-bit windows)
|
| Cheers,
|
| Steve

Yep, SIZE_T should be mapped via IntPtr's. SIZE_T is a platform dependent
type, 64 bit on a 64 bit OS, 32 bit on others.


Willy.
 
Back
Top