The Winamp Remote Control suite
a remote control client and plugin for Winamp 2.x, 5.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ContextInfo.cpp
Go to the documentation of this file.
1 #include "windows.h"
2 
3 #pragma hdrstop
4 
5 #include "ContextInfo.h"
6 
7 namespace WinampRemote
8 {
9 
10 namespace Context
11 {
12 
13 
14 ContextInfo::ContextInfo() : m_computername(), m_username()
15 {
16  char NameBuf[MAX_COMPUTERNAME_LENGTH + 1];
17  char ComputerBuf [MAX_COMPUTERNAME_LENGTH + 1];
18 
19  unsigned long BufLen;
20  BufLen = MAX_COMPUTERNAME_LENGTH + 1;
21  GetComputerName(ComputerBuf, &BufLen);
22  BufLen = MAX_COMPUTERNAME_LENGTH + 1;
23  GetUserName(NameBuf, &BufLen);
24  m_computername = ComputerBuf;
25  m_username = NameBuf;
26 }
27 
28 } // end of namespace Context
29 } // end of namespace WinampRemote