Quote:> Hello guys,
> I wanted know If any one tried to convert some Windows Win32 function
> calls like GetLastError(),GetFileAttributes(),GetCurrentDirectory(),CreateFile()....for
Hello Sunil.
One neat thing about Linuxish OSs is that the manual is furnished. If
you read of a system call or a utility you can read the manual page for
that function or utility and see for yourself how it's prototyped, what
it returns, and what it says when it errs out. If that's not enough
information, you can actually read the code for the library functions
yourself and see what's going on.
Once you get back to your Linux box, type "man perror" and see if that's
what you're looking for as far as a GetLastError() equivalent. If it's
not, "man -k foo" will give you a list of all the manual pages -- or, in
Linuxish parlance, "man pages" -- that deal with foo. Since you're
looking for error messages, try "man -k error". If that's a little more
about errors than you wanted to know, typing "man -k error | grep foo"
will tell you all the man pages that talk about errors *and* foo. You
can learn more about grep by typing "man grep".
fstat() will tell you lots of things about the target file. To find out
how to call it, type "man fstat" and read the man page that appears.
getpwd() will tell you your Present Working Directory. man getpwd
There's two different ways to create a file. If all you care about is
getting it opened, you can use the bog standard ANSI C fopen(), fead(),
fwrite(), fseek(), ftell(), and fclose(). If you need more control over
how you open your files, open() and its compatriots are what you want to
be using rather than fopen().
[...]
> same as CreateFile()....
> Please reply
> Sunil Kumar Sodanapalli
Ask in Usenet; answers in Usenet.
HTH
--
The appearance of my E-mail address in any venue does not in and of itself
constitute a solicitation of bulk or commercial E-mail.
I don't want unsolicited commercial E-mail.