On Sat, 08 Nov 2008, Przemyslaw Czerpak wrote: Hi David,
> The mutex locking is correct. > Next candidate are GTOS2 internals. > BTW have you tried to enable tracing? > It would help us to locate the problem quite fast. If you will have problems with tracing then please tests code below. It's rtl/gtos2/gtos2.c hb_gt_os2_ReadKey() replacement. best regards, Przemek static int hb_gt_os2_ReadKey( PHB_GT pGT, int iEventMask ) { int ch; /* next char if any */ HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_ReadKey(%p,%d)", pGT, iEventMask)); printf("1. hb_gt_os2_ReadKey()\r\n");fflush(stdout); /* zero out keyboard event record */ memset( s_key, 0, sizeof( KBDKEYINFO ) ); printf("2. hb_gt_os2_ReadKey()\r\n");fflush(stdout); /* Get next character without wait */ KbdCharIn( s_key, IO_NOWAIT, ( HKBD ) * s_hk ); printf("3. hb_gt_os2_ReadKey()\r\n");fflush(stdout); /* extended key codes have 00h or E0h as chChar */ if( ( s_key->fbStatus & KBDTRF_EXTENDED_CODE ) && ( s_key->chChar == 0x00 || s_key->chChar == 0xE0 ) ) { /* It was an extended function key lead-in code, so read the actual function key and then offset it by 256, unless extended keyboard events are allowed, in which case offset it by 512 */ if( ( s_key->chChar == 0xE0 ) && ( iEventMask & INKEY_RAW ) ) ch = ( int ) s_key->chScan + 512; else ch = ( int ) s_key->chScan + 256; } else if ( s_key->fbStatus & KBDTRF_FINAL_CHAR_IN ) ch = ( int ) s_key->chChar; else ch = 0; ch = hb_gt_dos_keyCodeTranslate( ch ); printf("4. hb_gt_os2_ReadKey()\r\n");fflush(stdout); if( ch == 0 ) ch = HB_GTSELF_MOUSEREADKEY( pGT, iEventMask ); printf("5. hb_gt_os2_ReadKey()\r\n");fflush(stdout); return ch; } _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour