ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/CCSFinger/CCSFinger.cpp
(Generate patch)

Comparing CCSFinger/CCSFinger.cpp (file contents):
Revision 613 by douglas, 2005-12-12T18:30:01-08:00 vs.
Revision 614 by douglas, 2005-12-12T18:47:20-08:00

# Line 8 | Line 8
8   #include <tchar.h>
9   #include <signal.h>
10   #include <wtsapi32.h>
11 + #include <lm.h>
12  
13   #include <iostream>
14   #include <string>
# Line 30 | Line 31 | private:
31          struct Login
32          {
33                  std::string login, name, session;
34 <                Login(const std::string &login, const std::string &session) : login(login), session(session)
34 >                Login(const std::wstring &login, const std::wstring &session) : login(Utf8(login)), session(Utf8(session))
35                  {
36 +                        USER_INFO_11 *info;
37 +
38 +                        ::NetUserGetInfo(NULL, login.c_str(), 11, reinterpret_cast<LPBYTE *>(&info));
39 +
40 +                        name = Utf8(std::wstring(info->usri11_full_name).substr(0, 20));
41 +
42 +                        ::NetApiBufferFree(info);
43                  }
44                  bool operator<(const Login &login) const
45                  {
# Line 65 | Line 73 | public:
73  
74                                  ::WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, session->SessionId, WTSWinStationName, &session_, &size);
75  
76 <                                Login login(Utf8(name), Utf8(session_));
76 >                                Login login(name, session_);
77  
78                                  ::WTSFreeMemory(session_);
79  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines