Home Index classes Index static functions Index enumerations Index structure types

{System_functions|_CSharp}


CLASS {System_functions|_CSharp} , NATIVE, UNTESTED, BYTES, STOPPING, BYTES, BITWISE, ABSTRACT :



System functions (to work platform independent way with things which usually are very dependent from a platform).


IMPORT : {String_functions} , {File_path} .



------------------------------------------ 'Platform dependent information'

        

FUN Is_int32 ==> BOOL



FUN Is_int64 ==> BOOL



FUN Platform_info|rmation ==> STR



FUNCTION Dot_net_version ==> STR , NATIVE



FUNCTION Windows_ver|sion ==> STR , NATIVE



FUN TEST|_stage ==> BOOL , NATIVE



FUNCTION Maximum_recursion|_deep ==> INT , NATIVE



FUN Set_maximum_recursion|_deep ( INT Desired|_value ) , NATIVE



--------------------------------------------------------------- 'INT range'

 

CONSTANT INT :

          MAX_INT|EGER_32_VALUE = 0x7FFF_FFFF

          MIN_INT|EGER_32_VALUE = 0x8000_0000 .



------------------------------------- 'command line, environment variables'

      

FUN Count_param|eters_in_command_line ==> INT , NATIVE



FUN Parameter|_in_command_line_by_index (
     
INT Index|_of_parameter ) ==> STR



FUNCTION Get_command_line ==> STR , NATIVE , DEPRECATED('Parameter, Count_param')



FUN Get_environment_var|iable (
     
STR Name|_of_variable ) ==> STR , NATIVE



FUNCTION Computer_name ==> STR , NATIVE



FUNCTION User_name ==> STR , NATIVE



----------------------------------------------------- 'special directories'

   

FUN Set_working_dir|ectory (
     
STR Path|_directory ) , NATIVE



FUN Get_working_dir|ectory ==> STR , NATIVE



FUN Get_windows_dir|ectory ==> STR , NATIVE



------------------------------------------------- 'application directories'

       

FUN Start_dir|ectory_of_executable_if_available ==> STR



FUNCTION Application_name ==> STR



FUNCTION Get_application_data_dir ==> STR



FUN Get_recent_files_dir ==> STR



FUN Get_temp_dir || Get_temporary_dir|ectory ==> STR


CONSTANT INT {special_folders} :

          APPLICATION_DATA = 26

          COMMON_APPLICATION_DATE = 35

          COMMON_DESKTOP_DIR|ECTORY = 25

          COMMON_DOCUMENTS = 46

          COMMON_FAVORITES = 31

          COMMON_PROGRAMS = 32

          COMMON_START_MENU = 22

          COMMON_STARTUP = 24

          COOKIES|_DIRECTORY = 33

          DESKTOP_DIR|ECTORY = 16

          FONTS|_DIRECTORY = 20

          HISTORY|_DIRECTORY = 34

          INTERNET_CACHE = 32

          LOCAL_APPLICATION_DATA = 28

          MY_DOCUMENTS = 5

          MY_PICTURES = 39

          NETWORK_SHORTCUTS = 19

          NON_LOCALIZED_STATUP = 29

          PRINTERS = 4

          PRINT_HOOD = 27

          PROGRAMS = 2

          RECENT|_FILES = 8

          SEND_TO|_DIRECTORY = 9

          START_MENU = 11

          STARTUP|_DIRECTORY = 7

          SYSTEM|_DIRECTORY = 37

          USER_PROFILE = 40

          WINDOWS|_DIRECTORY = 36 .



FUN Get_special_dir|ectory (
     
INT Sp|ecial_filder_index ) ==> STR , NATIVE , IF Sp IS CONST, THEN Sp IN {special_folders} : @" RESULT = Environment.GetFolderPath(" " (System.Environment.SpecialFolder)X_Sp);" .



------------------------------------------------ 'execute external program'

Take into attention that it is not possible to launch external applications from any sources at the TEST time.        

CONSTANT INT :

          EXECUTE_REDIRECT_OUT||REDIR_OUT = 1

          EXECUTE_REDIRECT_ERR||REDIR_ERR = 2

          EXECUTE_REDIRECT_IN||REDIR_IN = 4

          EXECUTE_HIDDEN|_AS_POSSIBLE||EXEC_HIDDEN = 8

          EXECUTE_RUNAS||EXECUTE_RUN_AS = 16 .



FUN Execute_program|_and_wait_until_ended_redirect_output (
     
STR App|lication_path ,
     
STR Param|eters ,
     
INT Redirect|_output_error ) ==> STR



FUN Start_program_ok (
     
STR App|lication_path ,
     
STR Param|eters ) ==> BOOL



FUN Start_program|_and_forget (
     
STR App|lication_path ,
     
STR Param|eters )



FUN Program_run_as|_and_forget (
     
STR App|lication_path ,
     
STR Param|eters )



FUN Start_file|_not_necessary_executable (
     
STR Dok|ument_path )



FUN Start_program_hidden (
     
STR App|lication_path ,
     
STR Param|eters )



--------------------------------------------------------------- 'mode test'

 

FUN Stop_if_test ( STR T|est_must_be_present )



--------------------------------------------------------- 'profiler helper'

 

FUN Profiler_save_reset|_counters , NATIVE



------------------------------------------------------------------- 'sound'

  

FUN System_beep , NATIVE



FUN System_tone_beep (
     
INT Freq|uency ,
     
INT Dur|ation ) , NATIVE



------------------------------------------------------------------- 'sleep'

 

FUNCTION Sleep|_milliseconds (
     
INT M|illiseconds ) , NATIVE



---------------------------------------------------- 'internal object info'

  

FUN Ref_count (
     
{Object} Obj|ect_inspecting ) ==> INT , NATIVE



FUN Total_obj_index (
     
{Object} Obj|ect_of_any_class ) ==> INT , NATIVE



----------------------------------------------------------- 'miscellaneous'

             

FUNCTION Allocate_bytes (
     
BYTE Buffer|_bytes [] ,
     
INT Size|_allocate ) , NATIVE



FUN Save_strings_to_file (
     
STR S|trings_to_save [] ,
     
STR Path|_file ) , NATIVE



FUN Absolute_path|_from_relative_path (
     
STR Path|_relative ) ==> STR , NATIVE



FUN Trace_levels ==> INT , NATIVE



FUN Trace_fun|ction (
     
INT Level|_of_stack_0_is_current_function_Trace_fun ) ==> STR , NATIVE



FUN Trace_counter (
     
INT Level|_of_stack_0_is_current_function_Trace_fun ) ==> INT , NATIVE



FUN Trace_stack ( INT Max_levels ) ==> STR



FUN Byte|_from_integer (
     
INT Value|_to_get_lower_byte_only ) ==> BYTE , NATIVE



FUN Copy_bytes|_from_one_array_to_another (
     
BYTE Dest|ination_array [*] ,
     
BYTE Source|_array [*] )



FUN Copy_int|egers_from_one_array_to_another (
     
INT Dest|ination_array [*] ,
     
INT Source|_array [*] )



FUN Fill_bytes (
     
BYTE Dest|ination_array [*] ,
     
BYTE Value|_to_fill_with ) , NATIVE



FUN Fill_int|egers (
     
INT Dest|ination_array [*] ,
     
INT Value|_to_fill_with ) , NATIVE



FUN Real_as_array_of_bytes (
     
REAL R|eal_value ,
     
BYTE A|rray_bytes|_preallocated_8_items [] ) , NATIVE


END