Use the IDL_GetUserInfo() function to get information about the current session. This is the sort of information that can be used in the header of files produced by graphics drivers. It is used, for example, by the PostScript driver:
void IDL_GetUserInfo(IDL_USER_INFO *user_info)
where the IDL_USER_INFO struct is defined as:
typedef struct {
char *logname
char *homedir
char *pid
char host[64]
char wd[IDL_MAXPATH+1]
char date[25]
} IDL_USER_INFO