-1

Good day every one. I use function stat on windows to get information from file, but how i can get name from st_uid and st_gid (it's a short).

I use visual stydio 2015

1 Answers1

0

Most likely, you can't. stat is a POSIX function. The Windows function is actually called _stat to warn you it's not the same. And fundamentally, that's because the Windows user model differs a lot from the POSIX user model. Windows accounts and groups are not numbered, but use SID's. For instance, the SID of Everyone (group of all users) is S-1-1-0. Hence, the st_uid and st_gid fields returned by _stat are fairly meaningless.

MSalters
  • 173,980
  • 10
  • 155
  • 350