//-------------------------------------------------------------------> // FileOpenExclusiveTest.pkg // // Use to determine if a file can be opened exclusively. Traps // the exclusive error and tries. DF_File_Opened seems to only // work for files opened in the same view or application. // // Returns DFTrue if available for exclusive open //-------------------------------------------------------------------> Function DoCheckForExclusiveAccess Handle hoFile Returns Integer Boolean bExclusive Integer bOpened Move (False) To bExclusive Send ignore_error To Error_object_id 4177 // (error_info_object(current_object)) 4177 Open hoFile mode df_exclusive If (found) Begin Move (True) To bExclusive End Send trap_error To Error_object_id 4177 // (error_info_object(current_object)) 4177 Close hoFile Function_Return bExclusive End_Function // DoCheckForExclusiveAccess