일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 수직적 확장
- 고정 IP주소를 가진 네트워크 어댑터를 검색할 수 없습니다.
- 운영관리제어의 축소
- VMware
- View Connection
- 클라우드 제공자
- 커뮤니티 클라우드
- 수평적 확장
- IT 자원
- Error 1720
- 클라우드 서비스 소유자
- Virtual Private Cloud
- 정수형 데이터타입
- 클라우드 보안 취약성
- DHCP 설정
- Community Cloud
- VMWare View Connection Serve
- 클라우드 자원 관리자
- 멀티테넌시
- 가상 프라이빗 클라우드
- DHCP 설치
- 도메인 사용자 또는 그룹을 확인할 수 없습니다.
- 온 프레미스
- 온디맨드식
- dhcp
- VMWare vSphere
- 클라우드 소비자
- 자원 풀링
- 이 컴퓨터는 도메인의 구성원이 아닙니다.
- 제한된 이식성
- Today
- Total
한 걸음씩..
[Windows] 현재 로그인한 유저 이름 알아오기 본문
Windows 환경에서 로그인 중인 유저 이름을 알아올 수 있다.
WinAPI 사용하는 방법
BOOL WINAPI GetUserName( _Out_ LPTSTR lpBuffer, _Inout_ LPDWORD lpnSize );
Parameters
- lpBuffer [out]
A pointer to the buffer to receive the user's logon name. If this buffer is not large enough to contain the entire user name, the function fails. A buffer size of (UNLEN + 1) characters will hold the maximum length user name including the terminating null character. UNLEN is defined in Lmcons.h.
- lpnSize [in, out]
On input, this variable specifies the size of the lpBuffer buffer, in TCHARs. On output, the variable receives the number of TCHARs copied to the buffer, including the terminating null character.
If lpBuffer is too small, the function fails and GetLastError returns ERROR_INSUFFICIENT_BUFFER. This parameter receives the required buffer size, including the terminating null character.
LPTSTR UserName;
size_t requiredSize;
_tgetenv_s( &requiredSize, NULL, 0, _T("USERNAME") );
UserName = (LPTSTR) malloc( requiredSize );
if ( UserName != NULL )
{
_tgetenv_s( &requiredSize, UserName, requiredSize, _T("USERNAME") );
}
'프로그래밍' 카테고리의 다른 글
[MFC] MessageMap 매크로 함수 풀이 (0) | 2013.10.02 |
---|---|
[MFC] 윈도우 핸들 정리 (0) | 2013.10.01 |
[Device Driver] Device Object 자료구조 (0) | 2013.09.05 |
[Device Driver] Driver Object 자료구조 (0) | 2013.09.04 |
[Device Driver] IRP Dispatch Routine (0) | 2013.09.03 |