Su Duy Trinh wrote:
Hi All,
    I have a field in a struct on CW defeine:
        int     pk;
    In VC++,I define a field for it with:
        WORD pk;
I usually avoid int data when doing Palm programming because CodeWarrior and VC++ default to treating it differently. I prefer to use either the Palm types or short and long.


    How can I sync between them?
    I also use:SyncHostToHHWord() to do this but it's wrong,
short hh,pc;
pc = 4;
hh = SyncHostToHHWord(pc);
is the correct usage of this function. If it's not working then you are probably doing something else wrong.


    If I have a another field in CodeWarrior(CW):
    char    name[45+1];
    In VC++,when I write conduit,How should I define for my struct record?
    char  name[45+1];
    or CString  name;
use the char array instead of the CString. this lets you use the same structure on both the Palm and the Conduit. this way, you can use the same header file that defines your structures in both your conduit and your Palm app which I've found makes it easier to keep changes consistent between the 2 applications.


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/


Reply via email to