If ((file _ stream = fopen (filename, "a+")= = null)// Open the file.
Fprintf(file_stream, lr _ eval _ string ("{your relevance}");
The following is the complete code
Int id, scid// define two plastic variables that hold vuser information.
Char * group// define and save the groupname.
char * filename = " c:\ \ work . log "; //Create the storage log file manually.
Long file _ stream;
If ((file _ stream = fopen (filename, "a+")= = null)// Open the file.
{
Lr_error_message ("Cannot open %s", file name);
return- 1;
}
lr _ whoami(& amp; id & amp; Group & scid); //Get variables
lr_save_datetime("%H:%M:%S ",DATE_NOW + TIME_NOW," times "); //Get the current time and judge the user login time.
if(id & gt; 0)
{
Fprintf(file_stream, "vuser user information: time =% s, ID =% d, group =% s, SCID =% d, Uname =% s \ n", LR _ eval _ string ("{times} "), ID, group, SCID, LR _.
}
fclose(file _ stream);