home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / win32 / 3081 < prev    next >
Encoding:
Text File  |  1993-01-25  |  3.4 KB  |  78 lines

  1. Newsgroups: comp.os.ms-windows.programmer.win32
  2. Path: sparky!uunet!psinntp!nstn.ns.ca!cs.dal.ca!iisat!mkseast!dale
  3. From: dale@mkseast.uucp (Dale Gass)
  4. Subject: Re: Getting user/kernel CPU times for current process...
  5. Organization: Mortice Kern Systems, Atlantic Canada Branch
  6. Date: Mon, 25 Jan 1993 19:26:36 GMT
  7. Message-ID: <1993Jan25.192636.4184@mkseast.uucp>
  8. References: <1993Jan17.143256.1671@mkseast.uucp> <1993Jan21.170810.7614@microsoft.com>
  9. Lines: 67
  10.  
  11. alistair@microsoft.com (Alistair Banks) writes:
  12. >In article <1993Jan17.143256.1671@mkseast.uucp> dale@mkseast.uucp (Dale Gass) writes:
  13. >>I'm trying to find a way to for a proces to find out the the amount of CPU 
  14. >>time (user and system if possible) that it (and it's children, if possible) 
  15. >>have consumed.
  16. >
  17. >You'll find all this information available through the win32
  18. >registry APIs - 
  19.  
  20. Where exactly in the registry would this information be??  Where would
  21. it's location be documented?  (I don't mind any lack of documentation
  22. if the information were in a place where I could find it with regedit...)
  23.  
  24. > if you're debugging/disassembling any code today,
  25. >you'll find that we won't be using those APIs in future, and that they'll
  26. >go away. 
  27.  
  28. Well, between July and October beta's, a bunch of stuff that I was using
  29. moved/disappeared in the registry, so I'm not too confident of the undocumented
  30. registry items being more stable than undocumented API's...  
  31.  
  32. Such changes are certainly excusable in these early betas, but will (are?) 
  33. these registry items documented anywhere eventually?  Whether it's a
  34. registry item or an API, I seem to be on my own finding this information.
  35.  
  36. > The full registry functionality was somewhat later to be
  37. >implemented, and so early utilities used APIs which are only
  38. >temporary - the great advantage in using the registry is that these
  39. >statistics can be gatherd for any process on any machine, local or
  40. >remote 
  41.  
  42. Hmmm.  Between the July->October betas, I noticed what I think was a trend
  43. in the other direction:
  44.  
  45.     I was using the registry to grab information about users, such as
  46.     their home directories, etc..  This I stumbled across in
  47.     SECURITY\SAM\Domains\Account\Users\HomeDir, etc...  (Things
  48.     were a little screwy in the Reigstry format, though; sometimes
  49.     the "type" field was used to hold the actual data; a bit 
  50.     disconcerting but not too hard to figure out...)
  51.  
  52.     In the October release, these registry entries have disappeared,
  53.     and I see no equivalents...  After a bit of digging, I found
  54.     a suite of undocumented API's: LsaOpenPolicy(), LsaLookupSids(),
  55.     LsaClose(), etc., etc...  (Lsa is the "local security authority"
  56.     according to a comment in winerror.h.)
  57.  
  58.     Now, I don't mind using a registry entry to get the same
  59.     information that I can from the Lsa calls, but the info just
  60.     doesn't appear to be there...
  61.  
  62. So where can I find another user's home directory, script, etc., in a
  63. MicroSoft-condoned way??
  64.  
  65. > [we don't document APIs which are going away and which we know to
  66. > be temporary, another great Microsoft tradition!] -- Alistair
  67.  
  68. While this is certainly understandable, it is frustrating when the only
  69. way to access certain information (another user's home directory, for
  70. example) appears to be via undocumented calls.  I don't mind undocumented
  71. API's for-internal-use-only, if there is a developer level point of
  72. access for that same information...
  73.  
  74. -dale
  75. -- 
  76.  Dale Gass, Mortice Kern Systems, Atlantic Canada Branch
  77. Business: dale@east.mks.com, Pleasure: dale@mkseast.uucp
  78.