bool RemoteSetFileDate( const char *name, long date ) { in_mx_entry in[2]; mx_entry out[1]; file_info_set_date_req acc; file_info_set_date_ret ret; if( SuppFileInfoId == 0 ) return( false ); SUPP_FILE_INFO_SERVICE( acc, REQ_FILE_INFO_SET_DATE ); acc.date = date; in[0].ptr = &acc; in[0].len = sizeof( acc ); in[1].ptr = name; in[1].len = (trap_elen)( strlen( name ) + 1 ); out[0].ptr = &ret; out[0].len = sizeof( ret ); TrapAccess( 2, in, 1, out ); if( ret.err != 0 ) { StashErrCode( ret.err, OP_REMOTE ); return( false ); } else { return( true ); } }
long RemoteGetFileDate( char *name ) { mx_entry in[2]; mx_entry out[1]; file_info_get_date_req acc; file_info_get_date_ret ret; if( SuppFileInfoId == 0 ) return( -1 ); SUPP_FILE_INFO_SERVICE( acc, REQ_FILE_INFO_GET_DATE ); in[0].ptr = &acc; in[0].len = sizeof( acc ); in[1].ptr = name; in[1].len = strlen( name ) + 1; out[0].ptr = &ret; out[0].len = sizeof( ret ); TrapAccess( 2, in, 1, out ); if( ret.err != 0 ) { StashErrCode( ret.err, OP_REMOTE ); return( -1 ); } else { return( ret.date ); } }