wtsapi32.c 6.27 KB
Newer Older
Ulrich Czekalla's avatar
Ulrich Czekalla committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/* Copyright 2005 Ulrich Czekalla
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
15
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Ulrich Czekalla's avatar
Ulrich Czekalla committed
16 17 18 19 20 21 22 23 24 25 26 27
 */

#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "wtsapi32.h"
#include "wine/debug.h"

WINE_DEFAULT_DEBUG_CHANNEL(wtsapi);

28
static HMODULE WTSAPI32_hModule;
Ulrich Czekalla's avatar
Ulrich Czekalla committed
29 30 31

BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
32
    TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
Ulrich Czekalla's avatar
Ulrich Czekalla committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

    switch (fdwReason) {
        case DLL_PROCESS_ATTACH:
        {
            DisableThreadLibraryCalls(hinstDLL);
            WTSAPI32_hModule = hinstDLL;
            break;
        }
        case DLL_PROCESS_DETACH:
        {
            break;
        }
    }

    return TRUE;
}

50 51 52 53 54 55 56 57 58 59 60 61 62
/************************************************************
 *                WTSCloseServer  (WTSAPI32.@)
 */
void WINAPI WTSCloseServer(HANDLE hServer)
{
    FIXME("Stub %p\n", hServer);
}

/************************************************************
 *                WTSDisconnectSession  (WTSAPI32.@)
 */
BOOL WINAPI WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait)
{
63
    FIXME("Stub %p 0x%08x %d\n", hServer, SessionId, bWait);
64
    return TRUE;
65 66 67 68 69 70 71 72
}

/************************************************************
 *                WTSEnumerateProcessesA  (WTSAPI32.@)
 */
BOOL WINAPI WTSEnumerateProcessesA(HANDLE hServer, DWORD Reserved, DWORD Version,
    PWTS_PROCESS_INFOA* ppProcessInfo, DWORD* pCount)
{
73
    FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
74
          ppProcessInfo, pCount);
75 76 77 78 79 80 81

    if (!ppProcessInfo || !pCount) return FALSE;

    *pCount = 0;
    *ppProcessInfo = NULL;

    return TRUE;
82 83 84 85 86 87 88 89
}

/************************************************************
 *                WTSEnumerateProcessesW  (WTSAPI32.@)
 */
BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version,
    PWTS_PROCESS_INFOW* ppProcessInfo, DWORD* pCount)
{
90
    FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
91
          ppProcessInfo, pCount);
92 93 94 95 96 97 98

    if (!ppProcessInfo || !pCount) return FALSE;

    *pCount = 0;
    *ppProcessInfo = NULL;

    return TRUE;
99 100 101 102 103
}

/************************************************************
 *                WTSEnumerateEnumerateSessionsA  (WTSAPI32.@)
 */
104
BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version,
105 106
    PWTS_SESSION_INFOA* ppSessionInfo, DWORD* pCount)
{
107
    FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
108
          ppSessionInfo, pCount);
109 110 111 112 113 114 115

    if (!ppSessionInfo || !pCount) return FALSE;

    *pCount = 0;
    *ppSessionInfo = NULL;

    return TRUE;
116 117 118 119 120
}

/************************************************************
 *                WTSEnumerateEnumerateSessionsW  (WTSAPI32.@)
 */
121
BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version,
122 123
    PWTS_SESSION_INFOW* ppSessionInfo, DWORD* pCount)
{
124
    FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
125
          ppSessionInfo, pCount);
126 127 128 129 130 131 132

    if (!ppSessionInfo || !pCount) return FALSE;

    *pCount = 0;
    *ppSessionInfo = NULL;

    return TRUE;
133 134
}

Huw Davies's avatar
Huw Davies committed
135 136 137 138 139 140 141 142 143
/************************************************************
 *                WTSFreeMemory (WTSAPI32.@)
 */
void WINAPI WTSFreeMemory(PVOID pMemory)
{
    FIXME("Stub %p\n", pMemory);
    return;
}

Robert Reif's avatar
Robert Reif committed
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
/************************************************************
 *                WTSOpenServerA (WTSAPI32.@)
 */
HANDLE WINAPI WTSOpenServerA(LPSTR pServerName)
{
    FIXME("(%s) stub\n", debugstr_a(pServerName));
    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    return NULL;
}

/************************************************************
 *                WTSOpenServerW (WTSAPI32.@)
 */
HANDLE WINAPI WTSOpenServerW(LPWSTR pServerName)
{
    FIXME("(%s) stub\n", debugstr_w(pServerName));
    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    return NULL;
}

164 165 166 167 168 169 170 171 172 173 174
/************************************************************
 *                WTSQuerySessionInformationA  (WTSAPI32.@)
 */
BOOL WINAPI WTSQuerySessionInformationA(
    HANDLE hServer,
    DWORD SessionId,
    WTS_INFO_CLASS WTSInfoClass,
    LPSTR* Buffer,
    DWORD* BytesReturned)
{
    /* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */
175
    FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
176 177 178 179
        Buffer, BytesReturned);

    return FALSE;
}
Ulrich Czekalla's avatar
Ulrich Czekalla committed
180 181 182 183 184 185 186 187 188 189 190 191

/************************************************************
 *                WTSQuerySessionInformationW  (WTSAPI32.@)
 */
BOOL WINAPI WTSQuerySessionInformationW(
    HANDLE hServer,
    DWORD SessionId,
    WTS_INFO_CLASS WTSInfoClass,
    LPWSTR* Buffer,
    DWORD* BytesReturned)
{
    /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */
192
    FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
Ulrich Czekalla's avatar
Ulrich Czekalla committed
193 194 195 196 197 198 199 200 201 202 203
        Buffer, BytesReturned);

    return FALSE;
}

/************************************************************
 *                WTSWaitSystemEvent (WTSAPI32.@)
 */
BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD Mask, DWORD* Flags)
{
    /* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */
204
    FIXME("Stub %p 0x%08x %p\n", hServer, Mask, Flags);
Ulrich Czekalla's avatar
Ulrich Czekalla committed
205 206
    return FALSE;
}
207 208 209 210 211 212 213 214 215

/************************************************************
 *                WTSRegisterSessionNotification (WTSAPI32.@)
 */
BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags)
{
    FIXME("Stub %p 0x%08x\n", hWnd, dwFlags);
    return FALSE;
}
216 217 218 219 220 221 222 223 224

/************************************************************
 *                WTSUnRegisterSessionNotification (WTSAPI32.@)
 */
BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd)
{
    FIXME("Stub %p\n", hWnd);
    return FALSE;
}