64-bit compatibility

Nov 18, 2009 at 1:30 PM

I just wanted to let you or anyone else looking at this library know that it is not 64-bit compatible at the present time.  There are a few instances of comparing an IntPtr object against an Int object.  On a 32-bit platform, this is perfectly valid, since IntPtr is 32-bit, and Int relates to Int32.

But, on a 64-bit platform...since it uses a different data model where pointers and integer objects don't have the same size, an IntPtr is 64-bit, while Int still relates to Int32.  This causes a math overflow exception during comparisons.

I'm working on updating the code to handle this.  It should just be a matter of changing any IntPtr/Int comparisons to IntPtr/IntPtr comparisons.


Also, an FYI to anyone looking for an alternative sync package...OpenNetCF's Desktop.Communication library also doesn't work on a 64-bit platform...at least not the latest version of the source on Codeplex.

Nov 18, 2009 at 2:02 PM

I just had to change all instances of:

(int)base.handle == INVALID_HANDLE_VALUE


base.handle == new IntPtr(INVALID_HANDLE_VALUE)


This resolved the issue.  But, there's still some issues with database handling that I couldn't resolve.

Nov 18, 2009 at 6:44 PM

I have updated the source code to handle the IntPtr representations of HANDLEs and have posted a 1.2 beta with the changes. Please test and let me know if all is working. Please let me know specifically which problems you are having with the database code.