FreeRDP/winpr/libwinpr/wtsapi/wtsapi.h

45 lines
1.4 KiB
C
Raw Normal View History

/**
* WinPR: Windows Portable Runtime
* Windows Terminal Services API
*
* Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef WINPR_WTSAPI_PRIVATE_H
#define WINPR_WTSAPI_PRIVATE_H
#define WTSAPI_STUB_CALL_VOID(_name, ...) \
if (!g_Initialized) \
InitializeWtsApiStubs(); \
if (!g_WtsApi || !g_WtsApi->p ## _name) \
return; \
g_WtsApi->p ## _name ( __VA_ARGS__ )
#define WTSAPI_STUB_CALL_BOOL(_name, ...) \
if (!g_Initialized) \
InitializeWtsApiStubs(); \
if (!g_WtsApi || !g_WtsApi->p ## _name) \
return FALSE; \
return g_WtsApi->p ## _name ( __VA_ARGS__ )
#define WTSAPI_STUB_CALL_HANDLE(_name, ...) \
if (!g_Initialized) \
InitializeWtsApiStubs(); \
if (!g_WtsApi || !g_WtsApi->p ## _name) \
return NULL; \
return g_WtsApi->p ## _name ( __VA_ARGS__ )
#endif /* WINPR_WTSAPI_PRIVATE_H */