On Tue, 11 Nov 2008, Maurilio Longo wrote:
Hi Maurilio,
> GCC has this code inside libos2 which is linked with every program:
> -----------8<--------------------
> /* kbd4.c */
> #define INCL_KBD
> #include <os2.h>
> USHORT _THUNK_FUNCTION (Kbd16CharIn) ();
> USHORT KbdCharIn (PKBDKEYINFO pkbci, USHORT fWait, HKBD hkbd)
> {
> return ((USHORT)
> (_THUNK_PROLOG (4+2+2);
> _THUNK_FLAT (pkbci);
> _THUNK_SHORT (fWait);
> _THUNK_SHORT (hkbd);
> _THUNK_CALL (Kbd16CharIn)));
> }
> ----------->8--------------------
> __THUNK defines are inside os2thunk.h which I attach, I don't grasp completely
> what it does.
These are macros to pass parameters using some strictly defined
calling convention.
> Does this shed some light?
This function does not make anything more then calls 16bit OS2 API
function. OS2 needs special calling convention. But because it works
for 1-st thread then probably it's correctly called also by OWC so
the problem can be resolved externally to KbdCharIn().
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour