LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

About the 64bit coding

Hi,

 

I have read the guide "Porting 32-bit code to 64-bit code" within the cvi 2009's help. As to the specification, e.g., using 'ssize_t' instead of using 'int', I tried to modify the code :

 

ssize_t authenPanel; //the original define is "int  authenPanel"

 

SetPanelPos (authenPanel, monitorHeight-445, monitorWidth/6); 

 

then compile it with the X64 option, it gives an error:  "Type error in argument 3 to `InstallCtrlCallback'; found 'pointer to ssize_t function(int,int,int,pointer to void,int,int)' expected 'CtrlCallbackPtr'."

 

 At the same time, I have got such a warning " Warning: Conversion from 'ssize_t' to 'int' might lose data.", Please give an advise how to avoid such an error.

 

David

0 Kudos
Message 1 of 2
(2,921 Views)

Hi,

 

you can continue using int as long as your integer value will not exceed 32 bit, see the discussion here - you do not have to change to ssize_t until you need 64 bit values. Because in the near future panel size probably will not exceed 32 bit valeus this should be ok. Smiley Wink

0 Kudos
Message 2 of 2
(2,915 Views)