> -----Original Message----- > From: owner-roottalk@hpsalo.cern.ch > [mailto:owner-roottalk@hpsalo.cern.ch]On Behalf Of Hector Alvarez Pol > Sent: Wednesday, March 17, 1999 8:50 AM > To: roottalk@hpsalo.cern.ch > Subject: Problems with TWinNTSystem class > > But the class is not there (trying the command .class TWinNTSystem gives > me an error message: class, struct, union or type TWinNTSystem not > defined). The header of this class is in the include directory. > > There is a dll file called Root_WinNT.dll which should contain the class, > so I tried in ROOT the command .L Root_WinNT.dll. But, after > this, the error > message is still present. TWinntSystem class is an implementation of TSystem class. You may access the last one via global pointer gSystem For example gSystem->Exec("dir"); - to perform some "MS DOS" -like command gSystem->Load("Root_html"); - to load dynamic library gSystem->HomeDirectory(); to get a pointer to your home directory gSystem->WorkingDirectory(); to get a pointer to the current home directory etc Have a look into the rootalias.C script supplied with the ROOT distribution for further examples: E:\users\root\tutorials>type E:\users\root\tutorials\rootalias.C //_______________________________________________ void edit(char *file) { char s[64], *e; if (e = getenv("EDITOR")) sprintf(s, "start %s %s", e, file); else sprintf(s, "start notepad %s", file); gSystem->Exec(s); } //_______________________________________________ void ls(char *path=0) { char s[256] = "dir /w "; if (path) strcat(s,path); gSystem->Exec(s); } //_______________________________________________ void dir(char *path=0) { char s[256] = "dir "; if (path) strcat(s,path); gSystem->Exec(s); } //_______________________________________________ char *pwd() { return gSystem->WorkingDirectory(); } //_______________________________________________ char *cd(char *path=0) { if (path) gSystem->ChangeDirectory(path); return pwd(); } [ ... ] This approach makes your code a kind of platform independed. Hope this helps. Valery > > Could you help me with this problem? Which method did you find is not available via that TSystem class ? Valery
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:30 MET