ちゃっぴの監禁部屋

ガチガチに締めすぎて動きがとれなくなる。。。

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  405  : 記事  5  : コメント  12114  : トラックバック  134

ニュース

記事カテゴリ

書庫

日記カテゴリ

Communities

Personal Information

Console application も GUI application? のつづき

HWINSTA hWinSta = GetProcessWindowStation();
if (hWinSta)
{
DWORD dwLength = 0;
GetUserObjectInformation(hWinSta
                       , UOI_NAME
                       , NULL
                       , 0
                       , &dwLength);
if (dwLength)
{
    LPWSTR lpName = (LPWSTR)HeapAlloc(GetProcessHeap()
                                    , HEAP_GENERATE_EXCEPTIONS | HEAP_ZERO_MEMORY
                                    , dwLength);
    BOOL result = GetUserObjectInformation(hWinSta
                                         , UOI_NAME
                                         , lpName
                                         , dwLength
                                         , &dwLength);
    if (result)
    {
        wprintf_s(L"%s\n", lpName);
    }
    HeapFree(GetProcessHeap(), 0, lpName);
}

Batch logon 等 non-interactive な process で利用される SAWinSta とはなんぞや?

投稿日時 : 2007年12月27日 0:35

コメント

# mDYIDxLdDIhEfMUDhms 2011/12/17 19:54 http://www.coursconduite.com
The topic is pretty complicated for a beginner!...

# uKbaGlZBvlPEJWLUaY 2011/12/18 21:08 http://blackflats.info/
As I have expected, the writer blurted out..!

# pIGSvzLzHHTEWpGWP 2011/12/27 18:52 http://www.freeze247.com
Read, of course, far from my topic. But still, we can work together. How do you feel about trust management?!...

Post Feedback

タイトル
名前
Url:
コメント