LRESULT CALLBACK ControlWindowProcedure( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { PHB_ITEM pBlock = ( PHB_ITEM ) GetProp( hwnd, TEXT( "BLOCKCALLBACK" ) ); long lRet; if( pBlock ) { if( hb_itemType( pBlock ) == HB_IT_POINTER ) { hb_vmPushSymbol( hb_dynsymSymbol( ( ( PHB_SYMB ) pBlock )->pDynSym ) ); hb_vmPushNil(); } else { hb_vmPushEvalSym(); hb_vmPush( pBlock ); } hb_vmPushNumInt( ( HB_PTRUINT ) hwnd ); hb_vmPushInteger( msg ); hb_vmPushNumInt( ( HB_PTRUINT ) wParam ); hb_vmPushNumInt( ( HB_PTRUINT ) lParam ); hb_vmDo( 4 ); lRet = ( long ) hb_parnint( -1 ); return lRet; } return DefWindowProc( hwnd, msg, wParam, lParam ); }
static HB_FOFFSET s_fileSize( PHB_FILE pFile ) { PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; s_pushMethod( pIO, IOUSR_SIZE ); hb_vmPush( pFile->pFileItm ); hb_vmDo( 1 ); return ( HB_FOFFSET ) hb_parnint( -1 ); }
static HB_BOOL hb_numParam( int iParam, HB_MAXINT * plNum ) { if( HB_ISNUM( iParam ) ) { *plNum = hb_parnint( iParam ); return HB_TRUE; } hb_errRT_BASE_SubstR( EG_ARG, 1089, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); *plNum = 0; return HB_FALSE; }
static HB_FOFFSET s_fileSeek( PHB_FILE pFile, HB_FOFFSET nOffset, HB_USHORT uiFlags ) { PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; s_pushMethod( pIO, IOUSR_SEEK ); hb_vmPush( pFile->pFileItm ); hb_vmPushNumInt( ( HB_MAXINT ) nOffset ); hb_vmPushInteger( uiFlags ); hb_vmDo( 3 ); return ( HB_FOFFSET ) hb_parnint( -1 ); }