Since the size of this parameter changes with the bitness, you would be
better off using a parameter type that also changes with bitness.  size_t
or ssize_t would probably be better choices.  size_t is unsigned, ssize_t
is signed.

Rick

On Sat, Sep 20, 2014 at 8:57 AM, Sahananda (Jon) Wolfers <
sahana...@windhorse.biz> wrote:

> Hi all,
>
> A question about the types of parameters created by rexxMethod.
> This is related to bug 1281 <https://sourceforge.net/p/oorexx/bugs/1281/> 
> which
> I am looking at in Mark's absence.
>
> Notification messages from windows return values in WPARAM & LPARAM which
> are provided as arguments (rexx string containing a decimal number) to
> ooDialog event handling methods.
>
> By convention, the 32bit WParam often contains two values, one in the
> hiword and one in the loword.
> There are c++ macros hiword and loword to extract those values.
>
> With 64 bits, big-endianly the highword is now the third word and the
> lowword is the fourth.
>
> Mark has supplied wrappers for the hiword and lowword macros, code as
> follows:
>
>> *RexxMethod1(int16_t, dlgutil_shiWord_cls, int32_t, dw) { return
>> HIWORD(dw); }*
>> RexxMethod1(int16_t, dlgutil_sloWord_cls, int32_t, dw) { return
>> LOWORD(dw); }
>> RexxMethod1(uint16_t, dlgutil_hiWord_cls, uint32_t, dw) { return
>> HIWORD(dw); }
>> RexxMethod1(uint16_t, dlgutil_loWord_cls, uint32_t, dw) { return
>> LOWORD(dw); }
>
> accessed as .dlgUtil~hiword & .dlgUtil~loword.
>
>
> This works fine on 32bit systems.
> It also works ok on 64bit systems *EXCEPT* if the first two words contain
> anything other than 0s.
>
> It turns out that some data is placed in those first words in the response
> from at least the WM_VSCROLL Message.
> The rexxMethod throws an overflow error for the dw parameter *int32_t* or
> *uint32_t*.
>
> I think that all would need to be done to fix oodUtilities.cpp is to
> change the type of the dw parameter to *int64_t* or *uint64_t*.
>
> Does that sound right?
>
> I don't have a 64bit system, so even if I remembered how to build
> ooDialog, I wouldn't be able to test it.  Can someone run with this?
>
> thanks,
>
> Jon
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.  Video for Nerds.  Stuff that Matters.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to