All return values are UINT now.
return TRUE;
}
-static WIN32ERROR audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src, int size)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src, int size)
{
int frames;
int cframes;
- WIN32ERROR ret = CHANNEL_RC_OK;
+ UINT ret = CHANNEL_RC_OK;
int encoded_size;
BYTE* encoded_data;
int rbytes_per_frame;
return NULL;
}
-static WIN32ERROR audin_alsa_free(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_alsa_free(IAudinDevice* device)
{
AudinALSADevice* alsa = (AudinALSADevice*) device;
return FALSE;
}
-static WIN32ERROR audin_alsa_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_alsa_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket)
{
int bs;
AudinALSADevice* alsa = (AudinALSADevice*) device;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_alsa_open(IAudinDevice* device, AudinReceive receive, void* user_data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_alsa_open(IAudinDevice* device, AudinReceive receive, void* user_data)
{
int tbytes_per_frame;
AudinALSADevice* alsa = (AudinALSADevice*) device;
return ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR audin_alsa_close(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_alsa_close(IAudinDevice* device)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
AudinALSADevice* alsa = (AudinALSADevice*) device;
if (alsa->stopEvent)
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR audin_alsa_parse_addin_args(AudinALSADevice* device, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_alsa_parse_addin_args(AudinALSADevice* device, ADDIN_ARGV* args)
{
int status;
DWORD flags;
#define freerdp_audin_client_subsystem_entry alsa_freerdp_audin_client_subsystem_entry
#endif
-WIN32ERROR freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
AudinALSADevice* alsa;
- WIN32ERROR error;
+ UINT error;
alsa = (AudinALSADevice*) calloc(1, sizeof(AudinALSADevice));
if (!alsa)
#include <freerdp/addin.h>
#include <winpr/stream.h>
-#include <winpr/win32error.h>
#include <freerdp/freerdp.h>
#include "audin_main.h"
rdpContext* rdpcontext;
};
-static WIN32ERROR audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
- WIN32ERROR error;
+ UINT error;
wStream* out;
UINT32 Version;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
return error;
}
-static WIN32ERROR audin_send_incoming_data_pdu(IWTSVirtualChannelCallback* pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_send_incoming_data_pdu(IWTSVirtualChannelCallback* pChannelCallback)
{
BYTE out_data[1];
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
return callback->channel->Write(callback->channel, 1, out_data, NULL);
}
-static WIN32ERROR audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin;
UINT32 i;
BYTE* fm;
- WIN32ERROR error;
+ UINT error;
wStream* out;
UINT32 NumFormats;
audinFormat format;
return error;
}
-static WIN32ERROR audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCallback, UINT32 NewFormat)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCallback, UINT32 NewFormat)
{
- WIN32ERROR error;
+ UINT error;
wStream* out;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
return error;
}
-static WIN32ERROR audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallback, UINT32 Result)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallback, UINT32 Result)
{
- WIN32ERROR error;
+ UINT error;
wStream* out;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
return error;
}
-static WIN32ERROR audin_receive_wave_data(BYTE* data, int size, void* user_data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_receive_wave_data(BYTE* data, int size, void* user_data)
{
- WIN32ERROR error;
+ UINT error;
wStream* out;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) user_data;
return error;
}
-static WIN32ERROR audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin;
audinFormat* format;
UINT32 initialFormat;
UINT32 FramesPerPacket;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
Stream_Read_UINT32(s, FramesPerPacket);
Stream_Read_UINT32(s, initialFormat);
return error;
}
-static WIN32ERROR audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
AUDIN_PLUGIN * audin = (AUDIN_PLUGIN*) callback->plugin;
UINT32 NewFormat;
audinFormat* format;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
Stream_Read_UINT32(s, NewFormat);
return error;
}
-static WIN32ERROR audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
{
- WIN32ERROR error;
+ UINT error;
BYTE MessageId;
Stream_Read_UINT8(data, MessageId);
return error;
}
-static WIN32ERROR audin_on_close(IWTSVirtualChannelCallback* pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_on_close(IWTSVirtualChannelCallback* pChannelCallback)
{
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DEBUG_DVC("...");
return error;
}
-static WIN32ERROR audin_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel* pChannel, BYTE* Data, int* pbAccept,
IWTSVirtualChannelCallback** ppCallback)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
{
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) pPlugin;
(IWTSListenerCallback*) audin->listener_callback, NULL);
}
-static WIN32ERROR audin_plugin_terminated(IWTSPlugin* pPlugin)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_plugin_terminated(IWTSPlugin* pPlugin)
{
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) pPlugin;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DEBUG_DVC("...");
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_register_device_plugin(IWTSPlugin* pPlugin, IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_register_device_plugin(IWTSPlugin* pPlugin, IAudinDevice* device)
{
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) pPlugin;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, ADDIN_ARGV* args)
{
PFREERDP_AUDIN_DEVICE_ENTRY entry;
FREERDP_AUDIN_DEVICE_ENTRY_POINTS entryPoints;
- WIN32ERROR error;
+ UINT error;
entry = (PFREERDP_AUDIN_DEVICE_ENTRY) freerdp_load_channel_addin_entry("audin", (LPSTR) name, NULL, 0);
return CHANNEL_RC_OK;
}
-WIN32ERROR audin_set_subsystem(AUDIN_PLUGIN* audin, char* subsystem)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT audin_set_subsystem(AUDIN_PLUGIN* audin, char* subsystem)
{
free(audin->subsystem);
audin->subsystem = _strdup(subsystem);
return CHANNEL_RC_OK;
}
-WIN32ERROR audin_set_device_name(AUDIN_PLUGIN* audin, char* device_name)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT audin_set_device_name(AUDIN_PLUGIN* audin, char* device_name)
{
free(audin->device_name);
audin->device_name = _strdup(device_name);
DWORD flags;
COMMAND_LINE_ARGUMENT_A* arg;
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) pPlugin;
- WIN32ERROR error;
+ UINT error;
flags = COMMAND_LINE_SIGIL_NONE | COMMAND_LINE_SEPARATOR_COLON;
#define DVCPluginEntry audin_DVCPluginEntry
#endif
-WIN32ERROR DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
ADDIN_ARGV* args;
AUDIN_PLUGIN* audin;
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/cmdline.h>
-#include <winpr/win32error.h>
#include <freerdp/addin.h>
#include <freerdp/codec/dsp.h>
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) arg;
const size_t raw_size = opensles->frames_per_packet * opensles->bytes_per_channel;
int rc = CHANNEL_RC_OK;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DWORD status;
DEBUG_DVC("opensles=%p", opensles);
return NULL;
}
-static WIN32ERROR audin_opensles_free(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_opensles_free(IAudinDevice* device)
{
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
return FALSE;
}
-static WIN32ERROR audin_opensles_set_format(IAudinDevice* device,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_opensles_set_format(IAudinDevice* device,
audinFormat* format, UINT32 FramesPerPacket)
{
int bs;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_opensles_open(IAudinDevice* device, AudinReceive receive,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_opensles_open(IAudinDevice* device, AudinReceive receive,
void* user_data)
{
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
return ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR audin_opensles_close(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_opensles_close(IAudinDevice* device)
{
- WIN32ERROR error;
+ UINT error;
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
DEBUG_DVC("device=%p", device);
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR audin_opensles_parse_addin_args(AudinOpenSLESDevice* device,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_opensles_parse_addin_args(AudinOpenSLESDevice* device,
ADDIN_ARGV* args)
{
- WIN32ERROR status;
+ UINT status;
DWORD flags;
COMMAND_LINE_ARGUMENT_A* arg;
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
opensles_freerdp_audin_client_subsystem_entry
#endif
-WIN32ERROR freerdp_audin_client_subsystem_entry(
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_audin_client_subsystem_entry(
PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
AudinOpenSLESDevice* opensles;
- WIN32ERROR error;
+ UINT error;
DEBUG_DVC("pEntryPoints=%p", pEntryPoints);
#include <winpr/string.h>
#include <winpr/thread.h>
#include <winpr/cmdline.h>
-#include <winpr/win32error.h>
#include <err.h>
#include <errno.h>
return TRUE;
}
-static WIN32ERROR audin_oss_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_oss_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket)
{
AudinOSSDevice* oss = (AudinOSSDevice*)device;
BYTE* buffer = NULL, *encoded_data;
int tmp, buffer_size, encoded_size;
AudinOSSDevice* oss = (AudinOSSDevice*)arg;
- WIN32ERROR error;
+ UINT error;
DWORD status;
if (arg == NULL)
if ((pcm_handle = open(dev_name, O_RDONLY)) < 0)
{
OSS_LOG_ERR("sound dev open failed", errno);
- error = (WIN32ERROR)ERROR_INTERNAL_ERROR;
+ error = ERROR_INTERNAL_ERROR;
goto err_out;
}
return NULL;
}
-static WIN32ERROR audin_oss_open(IAudinDevice *device, AudinReceive receive, void *user_data) {
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_oss_open(IAudinDevice *device, AudinReceive receive, void *user_data) {
AudinOSSDevice *oss = (AudinOSSDevice*)device;
oss->receive = receive;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_oss_close(IAudinDevice *device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_oss_close(IAudinDevice *device)
{
- WIN32ERROR error;
+ UINT error;
AudinOSSDevice *oss = (AudinOSSDevice*)device;
if (device == NULL)
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_oss_free(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_oss_free(IAudinDevice* device)
{
AudinOSSDevice *oss = (AudinOSSDevice*)device;
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR audin_oss_parse_addin_args(AudinOSSDevice *device, ADDIN_ARGV *args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_oss_parse_addin_args(AudinOSSDevice *device, ADDIN_ARGV *args)
{
int status;
char* str_num, *eptr;
#define freerdp_audin_client_subsystem_entry oss_freerdp_audin_client_subsystem_entry
#endif
-WIN32ERROR freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV *args;
AudinOSSDevice *oss;
- WIN32ERROR error;
+ UINT error;
oss = (AudinOSSDevice*)calloc(1, sizeof(AudinOSSDevice));
if (!oss)
#include <winpr/crt.h>
#include <winpr/cmdline.h>
-#include <winpr/win32error.h>
#include <pulse/pulseaudio.h>
}
}
-static WIN32ERROR audin_pulse_connect(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_pulse_connect(IAudinDevice* device)
{
pa_context_state_t state;
AudinPulseDevice* pulse = (AudinPulseDevice*) device;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_pulse_free(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_pulse_free(IAudinDevice* device)
{
AudinPulseDevice* pulse = (AudinPulseDevice*) device;
return FALSE;
}
-static WIN32ERROR audin_pulse_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_pulse_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket)
{
int bs;
pa_sample_spec sample_spec = { 0 };
int encoded_size;
BYTE* encoded_data;
AudinPulseDevice* pulse = (AudinPulseDevice*) userdata;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
/* There is a race condition here where we may receive this callback
* before the buffer has been set up in the main code. It's probably
}
-static WIN32ERROR audin_pulse_close(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_pulse_close(IAudinDevice* device)
{
AudinPulseDevice* pulse = (AudinPulseDevice*) device;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_pulse_open(IAudinDevice* device, AudinReceive receive, void* user_data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_pulse_open(IAudinDevice* device, AudinReceive receive, void* user_data)
{
pa_stream_state_t state;
pa_buffer_attr buffer_attr = { 0 };
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR audin_pulse_parse_addin_args(AudinPulseDevice* device, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_pulse_parse_addin_args(AudinPulseDevice* device, ADDIN_ARGV* args)
{
int status;
DWORD flags;
#define freerdp_audin_client_subsystem_entry pulse_freerdp_audin_client_subsystem_entry
#endif
-WIN32ERROR freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
AudinPulseDevice* pulse;
- WIN32ERROR error;
+ UINT error;
pulse = (AudinPulseDevice*) calloc(1, sizeof(AudinPulseDevice));
if (!pulse)
{
AudinWinmmDevice* winmm = (AudinWinmmDevice*) dwInstance;
PWAVEHDR pWaveHdr;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
MMRESULT mmResult;
switch(uMsg)
return 0;
}
-static WIN32ERROR audin_winmm_free(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_winmm_free(IAudinDevice* device)
{
UINT32 i;
AudinWinmmDevice* winmm = (AudinWinmmDevice*) device;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_winmm_close(IAudinDevice* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_winmm_close(IAudinDevice* device)
{
DWORD status;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
AudinWinmmDevice* winmm = (AudinWinmmDevice*) device;
SetEvent(winmm->stopEvent);
return error;
}
-static WIN32ERROR audin_winmm_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_winmm_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket)
{
UINT32 i;
AudinWinmmDevice* winmm = (AudinWinmmDevice*) device;
return FALSE;
}
-static WIN32ERROR audin_winmm_open(IAudinDevice* device, AudinReceive receive, void* user_data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_winmm_open(IAudinDevice* device, AudinReceive receive, void* user_data)
{
AudinWinmmDevice* winmm = (AudinWinmmDevice*) device;
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR audin_winmm_parse_addin_args(AudinWinmmDevice* device, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_winmm_parse_addin_args(AudinWinmmDevice* device, ADDIN_ARGV* args)
{
int status;
DWORD flags;
#define freerdp_audin_client_subsystem_entry winmm_freerdp_audin_client_subsystem_entry
#endif
-WIN32ERROR freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
AudinWinmmDevice* winmm;
- WIN32ERROR error;
+ UINT error;
winmm = (AudinWinmmDevice*) calloc(1, sizeof(AudinWinmmDevice));
if (!winmm)
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/stream.h>
-#include <winpr/win32error.h>
#include <freerdp/codec/dsp.h>
#include <freerdp/codec/audio.h>
} audin_server;
-static WIN32ERROR audin_server_select_format(audin_server_context* context, int client_format_index)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_server_select_format(audin_server_context* context, int client_format_index)
{
audin_server* audin = (audin_server*) context;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_server_send_version(audin_server* audin, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_server_send_version(audin_server* audin, wStream* s)
{
ULONG written;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_server_recv_version(audin_server* audin, wStream* s, UINT32 length)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_server_recv_version(audin_server* audin, wStream* s, UINT32 length)
{
UINT32 Version;
return CHANNEL_RC_OK;
}
-static WIN32ERROR audin_server_send_formats(audin_server* audin, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_server_send_formats(audin_server* audin, wStream* s)
{
int i;
UINT32 nAvgBytesPerSec;
return WTSVirtualChannelWrite(audin->audin_channel, (PCHAR) Stream_Buffer(s), Stream_GetPosition(s), &written) ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR audin_server_recv_formats(audin_server* audin, wStream* s, UINT32 length)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_server_recv_formats(audin_server* audin, wStream* s, UINT32 length)
{
int i;
- WIN32ERROR success = CHANNEL_RC_OK;
+ UINT success = CHANNEL_RC_OK;
if (length < 8)
{
return success;
}
-static WIN32ERROR audin_server_send_open(audin_server* audin, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_server_send_open(audin_server* audin, wStream* s)
{
ULONG written;
return WTSVirtualChannelWrite(audin->audin_channel, (PCHAR) Stream_Buffer(s), Stream_GetPosition(s), &written) ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR audin_server_recv_open_reply(audin_server* audin, wStream* s, UINT32 length)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_server_recv_open_reply(audin_server* audin, wStream* s, UINT32 length)
{
UINT32 Result;
- WIN32ERROR success = CHANNEL_RC_OK;
+ UINT success = CHANNEL_RC_OK;
if (length < 4)
{
return success;
}
-static WIN32ERROR audin_server_recv_data(audin_server* audin, wStream* s, UINT32 length)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT audin_server_recv_data(audin_server* audin, wStream* s, UINT32 length)
{
AUDIO_FORMAT* format;
int sbytes_per_sample;
BYTE* src;
int size;
int frames;
- WIN32ERROR success = CHANNEL_RC_OK;
+ UINT success = CHANNEL_RC_OK;
if (audin->context.selected_client_format < 0)
{
HANDLE ChannelEvent;
DWORD BytesReturned = 0;
audin_server* audin = (audin_server*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DWORD status;
buffer = NULL;
if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntry")
set(ENTRY_POINT_IMPORT "extern BOOL VCAPITYPE ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS);")
else()
- set(ENTRY_POINT_IMPORT "extern WIN32ERROR ${ENTRY_POINT_NAME}();")
+ set(ENTRY_POINT_IMPORT "extern UINT ${ENTRY_POINT_NAME}();")
endif()
set(${STATIC_ENTRY}_IMPORTS "${${STATIC_ENTRY}_IMPORTS}\n${ENTRY_POINT_IMPORT}")
set(${STATIC_ENTRY}_TABLE "${${STATIC_ENTRY}_TABLE}\n\t{ \"${STATIC_MODULE_CHANNEL}\", ${ENTRY_POINT_NAME} },")
*/
#include "tables.h"
-#include <winpr/win32error.h>
${CLIENT_STATIC_ENTRY_IMPORTS}
#include "cliprdr_main.h"
#include "cliprdr_format.h"
-WIN32ERROR cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
{
UINT32 index;
UINT32 position;
CLIPRDR_FORMAT* formats = NULL;
CLIPRDR_FORMAT_LIST formatList;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (!context->custom)
{
return error;
}
-WIN32ERROR cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
{
CLIPRDR_FORMAT_LIST_RESPONSE formatListResponse;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(cliprdr->log, WLOG_DEBUG, "ServerFormatListResponse");
return error;
}
-WIN32ERROR cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
{
CLIPRDR_FORMAT_DATA_REQUEST formatDataRequest;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(cliprdr->log, WLOG_DEBUG, "ServerFormatDataRequest");
return error;
}
-WIN32ERROR cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
{
CLIPRDR_FORMAT_DATA_RESPONSE formatDataResponse;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(cliprdr->log, WLOG_DEBUG, "ServerFormatDataResponse");
#ifndef __CLIPRDR_FORMAT_H
#define __CLIPRDR_FORMAT_H
-#include <winpr/win32error.h>
-
-WIN32ERROR cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
-WIN32ERROR cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
-WIN32ERROR cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
-WIN32ERROR cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
+UINT cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
+UINT cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
+UINT cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
+UINT cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
#endif /* __CLIPRDR_FORMAT_H */
return s;
}
-WIN32ERROR cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* s)
{
UINT32 pos;
UINT32 dataLen;
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
pos = Stream_GetPosition(s);
WLog_INFO(TAG, "}");
}
-static WIN32ERROR cliprdr_process_general_capability(cliprdrPlugin* cliprdr, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_process_general_capability(cliprdrPlugin* cliprdr, wStream* s)
{
UINT32 version;
UINT32 generalFlags;
CLIPRDR_CAPABILITIES capabilities;
CLIPRDR_GENERAL_CAPABILITY_SET generalCapabilitySet;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (!context)
{
return error;
}
-static WIN32ERROR cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, wStream* s, UINT16 length, UINT16 flags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, wStream* s, UINT16 length, UINT16 flags)
{
UINT16 index;
UINT16 lengthCapability;
UINT16 cCapabilitiesSets;
UINT16 capabilitySetType;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
Stream_Read_UINT16(s, cCapabilitiesSets); /* cCapabilitiesSets (2 bytes) */
Stream_Seek_UINT16(s); /* pad1 (2 bytes) */
return error;
}
-static WIN32ERROR cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, wStream* s, UINT16 length, UINT16 flags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, wStream* s, UINT16 length, UINT16 flags)
{
CLIPRDR_MONITOR_READY monitorReady;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(cliprdr->log, WLOG_DEBUG, "MonitorReady");
return error;
}
-static WIN32ERROR cliprdr_process_filecontents_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_process_filecontents_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
{
CLIPRDR_FILE_CONTENTS_REQUEST request;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(cliprdr->log, WLOG_DEBUG, "FileContentsRequest");
return error;
}
-static WIN32ERROR cliprdr_process_filecontents_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_process_filecontents_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
{
CLIPRDR_FILE_CONTENTS_RESPONSE response;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(cliprdr->log, WLOG_DEBUG, "FileContentsResponse");
return error;
}
-static WIN32ERROR cliprdr_process_lock_clipdata(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_process_lock_clipdata(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
{
CLIPRDR_LOCK_CLIPBOARD_DATA lockClipboardData;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(cliprdr->log, WLOG_DEBUG, "LockClipData");
return error;
}
-static WIN32ERROR cliprdr_process_unlock_clipdata(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_process_unlock_clipdata(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
{
CLIPRDR_UNLOCK_CLIPBOARD_DATA unlockClipboardData;
CliprdrClientContext* context = cliprdr_get_client_interface(cliprdr);
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(cliprdr->log, WLOG_DEBUG, "UnlockClipData");
return error;
}
-static WIN32ERROR cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
{
UINT16 msgType;
UINT16 msgFlags;
UINT32 dataLen;
- WIN32ERROR error;
+ UINT error;
Stream_Read_UINT16(s, msgType); /* msgType (2 bytes) */
Stream_Read_UINT16(s, msgFlags); /* msgFlags (2 bytes) */
* Callback Interface
*/
-WIN32ERROR cliprdr_client_capabilities(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_capabilities(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities)
{
wStream* s;
CLIPRDR_GENERAL_CAPABILITY_SET* generalCapabilitySet;
return cliprdr_packet_send(cliprdr, s);
}
-WIN32ERROR cliprdr_temp_directory(CliprdrClientContext* context, CLIPRDR_TEMP_DIRECTORY* tempDirectory)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_temp_directory(CliprdrClientContext* context, CLIPRDR_TEMP_DIRECTORY* tempDirectory)
{
int length;
wStream* s;
return cliprdr_packet_send(cliprdr, s);
}
-WIN32ERROR cliprdr_client_format_list(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_format_list(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList)
{
wStream* s;
UINT32 index;
return cliprdr_packet_send(cliprdr, s);
}
-WIN32ERROR cliprdr_client_format_list_response(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_format_list_response(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
{
wStream* s;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) context->handle;
return cliprdr_packet_send(cliprdr, s);
}
-WIN32ERROR cliprdr_client_lock_clipboard_data(CliprdrClientContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_lock_clipboard_data(CliprdrClientContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
{
wStream* s;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) context->handle;
return cliprdr_packet_send(cliprdr, s);;
}
-WIN32ERROR cliprdr_client_unlock_clipboard_data(CliprdrClientContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_unlock_clipboard_data(CliprdrClientContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
{
wStream* s;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) context->handle;
return cliprdr_packet_send(cliprdr, s);
}
-WIN32ERROR cliprdr_client_format_data_request(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_format_data_request(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
{
wStream* s;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) context->handle;
return cliprdr_packet_send(cliprdr, s);
}
-WIN32ERROR cliprdr_client_format_data_response(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_format_data_response(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
{
wStream* s;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) context->handle;
return cliprdr_packet_send(cliprdr, s);
}
-WIN32ERROR cliprdr_client_file_contents_request(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_file_contents_request(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
{
wStream* s;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) context->handle;
return cliprdr_packet_send(cliprdr, s);
}
-WIN32ERROR cliprdr_client_file_contents_response(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_client_file_contents_response(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
{
wStream* s;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) context->handle;
static wListDictionary* g_InitHandles = NULL;
static wListDictionary* g_OpenHandles = NULL;
-WIN32ERROR cliprdr_add_init_handle_data(void* pInitHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_add_init_handle_data(void* pInitHandle, void* pUserData)
{
if (!g_InitHandles)
g_InitHandles = ListDictionary_New(TRUE);
}
}
-WIN32ERROR cliprdr_add_open_handle_data(DWORD openHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_add_open_handle_data(DWORD openHandle, void* pUserData)
{
void* pOpenHandle = (void*) (size_t) openHandle;
}
}
-static WIN32ERROR cliprdr_virtual_channel_event_data_received(cliprdrPlugin* cliprdr,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_virtual_channel_event_data_received(cliprdrPlugin* cliprdr,
void* pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
wStream* data_in;
LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
cliprdrPlugin* cliprdr;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
cliprdr = (cliprdrPlugin*) cliprdr_get_open_handle_data(openHandle);
wStream* data;
wMessage message;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
while (1)
{
return NULL;
}
-static WIN32ERROR cliprdr_virtual_channel_event_connected(cliprdrPlugin* cliprdr, LPVOID pData, UINT32 dataLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_virtual_channel_event_connected(cliprdrPlugin* cliprdr, LPVOID pData, UINT32 dataLength)
{
UINT32 status;
- WIN32ERROR error;
+ UINT error;
status = cliprdr->channelEntryPoints.pVirtualChannelOpen(cliprdr->InitHandle,
&cliprdr->OpenHandle, cliprdr->channelDef.name, cliprdr_virtual_channel_open_event);
return CHANNEL_RC_OK;
}
-static WIN32ERROR cliprdr_virtual_channel_event_disconnected(cliprdrPlugin* cliprdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_virtual_channel_event_disconnected(cliprdrPlugin* cliprdr)
{
UINT rc;
return CHANNEL_RC_OK;
}
-static WIN32ERROR cliprdr_virtual_channel_event_terminated(cliprdrPlugin* cliprdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_virtual_channel_event_terminated(cliprdrPlugin* cliprdr)
{
cliprdr_remove_init_handle_data(cliprdr->InitHandle);
static VOID VCAPITYPE cliprdr_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
cliprdrPlugin* cliprdr;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
cliprdr = (cliprdrPlugin*) cliprdr_get_init_handle_data(pInitHandle);
#define __CLIPRDR_MAIN_H
#include <winpr/stream.h>
-#include <winpr/win32error.h>
#include <freerdp/svc.h>
#include <freerdp/addin.h>
typedef struct cliprdr_plugin cliprdrPlugin;
wStream* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, UINT32 dataLen);
-WIN32ERROR cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* data_out);
+UINT cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* data_out);
CliprdrClientContext* cliprdr_get_client_interface(cliprdrPlugin* cliprdr);
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/stream.h>
-#include <winpr/win32error.h>
#include <freerdp/channels/log.h>
#include "cliprdr_main.h"
return s;
}
-WIN32ERROR cliprdr_server_packet_send(CliprdrServerPrivate* cliprdr, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_server_packet_send(CliprdrServerPrivate* cliprdr, wStream* s)
{
UINT32 pos;
BOOL status;
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR cliprdr_server_capabilities(CliprdrServerContext* context, CLIPRDR_CAPABILITIES* capabilities)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_capabilities(CliprdrServerContext* context, CLIPRDR_CAPABILITIES* capabilities)
{
wStream* s;
CLIPRDR_GENERAL_CAPABILITY_SET* generalCapabilitySet;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_monitor_ready(CliprdrServerContext* context, CLIPRDR_MONITOR_READY* monitorReady)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_monitor_ready(CliprdrServerContext* context, CLIPRDR_MONITOR_READY* monitorReady)
{
wStream* s;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_format_list(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST* formatList)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_format_list(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST* formatList)
{
wStream* s;
UINT32 index;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_format_list_response(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_format_list_response(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
{
wStream* s;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_lock_clipboard_data(CliprdrServerContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_lock_clipboard_data(CliprdrServerContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
{
wStream* s;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_unlock_clipboard_data(CliprdrServerContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_unlock_clipboard_data(CliprdrServerContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
{
wStream* s;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_format_data_request(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_format_data_request(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
{
wStream* s;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_format_data_response(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_format_data_response(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
{
wStream* s;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_file_contents_request(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_file_contents_request(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
{
wStream* s;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_file_contents_response(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_file_contents_response(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
{
wStream* s;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return cliprdr_server_packet_send(cliprdr, s);
}
-static WIN32ERROR cliprdr_server_receive_general_capability(CliprdrServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_general_capability(CliprdrServerContext* context, wStream* s)
{
UINT32 version;
UINT32 generalFlags;
return CHANNEL_RC_OK;
}
-static WIN32ERROR cliprdr_server_receive_capabilities(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_capabilities(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
UINT16 index;
UINT16 cCapabilitiesSets;
UINT16 capabilitySetType;
UINT16 lengthCapability;
- WIN32ERROR error;
+ UINT error;
WLog_DBG(TAG, "CliprdrClientCapabilities");
return CHANNEL_RC_OK;
}
-static WIN32ERROR cliprdr_server_receive_temporary_directory(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_temporary_directory(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
int length;
WCHAR* wszTempDir;
CLIPRDR_TEMP_DIRECTORY tempDirectory;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
size_t slength;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if ((slength = Stream_GetRemainingLength(s)) < 520)
{
return error;
}
-static WIN32ERROR cliprdr_server_receive_format_list(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_format_list(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
UINT32 index;
UINT32 dataLen;
CLIPRDR_FORMAT* formats = NULL;
CLIPRDR_FORMAT_LIST formatList;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
dataLen = header->dataLen;
asciiNames = (header->msgFlags & CB_ASCII_NAMES) ? TRUE : FALSE;
return error;
}
-static WIN32ERROR cliprdr_server_receive_format_list_response(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_format_list_response(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_FORMAT_LIST_RESPONSE formatListResponse;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientFormatListResponse");
return error;
}
-static WIN32ERROR cliprdr_server_receive_lock_clipdata(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_lock_clipdata(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_LOCK_CLIPBOARD_DATA lockClipboardData;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientLockClipData");
return error;
}
-static WIN32ERROR cliprdr_server_receive_unlock_clipdata(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_unlock_clipdata(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_UNLOCK_CLIPBOARD_DATA unlockClipboardData;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientUnlockClipData");
return error;
}
-static WIN32ERROR cliprdr_server_receive_format_data_request(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_format_data_request(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_FORMAT_DATA_REQUEST formatDataRequest;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientFormatDataRequest");
return error;
}
-static WIN32ERROR cliprdr_server_receive_format_data_response(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_format_data_response(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_FORMAT_DATA_RESPONSE formatDataResponse;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientFormatDataResponse");
return error;
}
-static WIN32ERROR cliprdr_server_receive_filecontents_request(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_filecontents_request(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_FILE_CONTENTS_REQUEST request;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientFileContentsRequest");
return error;
}
-static WIN32ERROR cliprdr_server_receive_filecontents_response(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_filecontents_response(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_FILE_CONTENTS_RESPONSE response;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientFileContentsResponse");
return error;
}
-static WIN32ERROR cliprdr_server_receive_pdu(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
- WIN32ERROR error;
+ UINT error;
WLog_DBG(TAG, "CliprdrServerReceivePdu: msgType: %d msgFlags: 0x%08X dataLen: %d",
header->msgType, header->msgFlags, header->dataLen);
return error;
}
-static WIN32ERROR cliprdr_server_init(CliprdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_init(CliprdrServerContext* context)
{
UINT32 generalFlags;
CLIPRDR_CAPABILITIES capabilities;
CLIPRDR_MONITOR_READY monitorReady;
CLIPRDR_GENERAL_CAPABILITY_SET generalCapabilitySet;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
- WIN32ERROR error;
+ UINT error;
ZeroMemory(&capabilities, sizeof(capabilities));
ZeroMemory(&monitorReady, sizeof(monitorReady));
return error;
}
-WIN32ERROR cliprdr_server_read(CliprdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT cliprdr_server_read(CliprdrServerContext* context)
{
wStream* s;
int position;
DWORD BytesReturned;
CLIPRDR_HEADER header;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
- WIN32ERROR error;
+ UINT error;
DWORD status;
s = cliprdr->s;
HANDLE ChannelEvent;
CliprdrServerContext* context = (CliprdrServerContext*) arg;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
- WIN32ERROR error;
+ UINT error;
ChannelEvent = context->GetEventHandle(context);
return NULL;
}
-static WIN32ERROR cliprdr_server_open(CliprdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_open(CliprdrServerContext* context)
{
void* buffer = NULL;
DWORD BytesReturned = 0;
return CHANNEL_RC_OK;
}
-static WIN32ERROR cliprdr_server_close(CliprdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_close(CliprdrServerContext* context)
{
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
return CHANNEL_RC_OK;
}
-static WIN32ERROR cliprdr_server_start(CliprdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_start(CliprdrServerContext* context)
{
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
- WIN32ERROR error;
+ UINT error;
if (!cliprdr->ChannelHandle)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR cliprdr_server_stop(CliprdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_stop(CliprdrServerContext* context)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
if (cliprdr->StopEvent)
return cliprdr->ChannelEvent;
}
-static WIN32ERROR cliprdr_server_check_event_handle(CliprdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT cliprdr_server_check_event_handle(CliprdrServerContext* context)
{
return cliprdr_server_read(context);
}
#include <winpr/sysinfo.h>
#include <winpr/cmdline.h>
#include <winpr/collections.h>
-#include <winpr/win32error.h>
#include <freerdp/addin.h>
};
typedef struct _DISP_PLUGIN DISP_PLUGIN;
-WIN32ERROR disp_send_display_control_monitor_layout_pdu(DISP_CHANNEL_CALLBACK* callback, UINT32 NumMonitors, DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT disp_send_display_control_monitor_layout_pdu(DISP_CHANNEL_CALLBACK* callback, UINT32 NumMonitors, DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors)
{
- WIN32ERROR status;
+ UINT status;
wStream* s;
UINT32 type;
UINT32 index;
return status;
}
-WIN32ERROR disp_recv_display_control_caps_pdu(DISP_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT disp_recv_display_control_caps_pdu(DISP_CHANNEL_CALLBACK* callback, wStream* s)
{
DISP_PLUGIN* disp;
return CHANNEL_RC_OK;
}
-WIN32ERROR disp_recv_pdu(DISP_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT disp_recv_pdu(DISP_CHANNEL_CALLBACK* callback, wStream* s)
{
UINT32 type;
UINT32 length;
}
}
-static WIN32ERROR disp_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT disp_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
{
DISP_CHANNEL_CALLBACK* callback = (DISP_CHANNEL_CALLBACK*) pChannelCallback;
return disp_recv_pdu(callback, data);
}
-static WIN32ERROR disp_on_close(IWTSVirtualChannelCallback* pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT disp_on_close(IWTSVirtualChannelCallback* pChannelCallback)
{
free(pChannelCallback);
return CHANNEL_RC_OK;
}
-static WIN32ERROR disp_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT disp_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel* pChannel, BYTE* Data, int* pbAccept,
IWTSVirtualChannelCallback** ppCallback)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR disp_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT disp_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
{
- WIN32ERROR status;
+ UINT status;
DISP_PLUGIN* disp = (DISP_PLUGIN*) pPlugin;
disp->listener_callback = (DISP_LISTENER_CALLBACK*) calloc(1, sizeof(DISP_LISTENER_CALLBACK));
return status;
}
-static WIN32ERROR disp_plugin_terminated(IWTSPlugin* pPlugin)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT disp_plugin_terminated(IWTSPlugin* pPlugin)
{
free(pPlugin);
return CHANNEL_RC_OK;
* Channel Client Interface
*/
-WIN32ERROR disp_send_monitor_layout(DispClientContext* context, UINT32 NumMonitors, DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT disp_send_monitor_layout(DispClientContext* context, UINT32 NumMonitors, DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors)
{
DISP_PLUGIN* disp = (DISP_PLUGIN*) context->handle;
DISP_CHANNEL_CALLBACK* callback = disp->listener_callback->channel_callback;
#define DVCPluginEntry disp_DVCPluginEntry
#endif
-WIN32ERROR DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DISP_PLUGIN* disp;
DispClientContext* context;
static void dvcman_channel_free(void* channel);
-static WIN32ERROR dvcman_get_configuration(IWTSListener* pListener, void** ppPropertyBag)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT dvcman_get_configuration(IWTSListener* pListener, void** ppPropertyBag)
{
*ppPropertyBag = NULL;
return ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR dvcman_create_listener(IWTSVirtualChannelManager* pChannelMgr,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT dvcman_create_listener(IWTSVirtualChannelManager* pChannelMgr,
const char* pszChannelName, UINT32 ulFlags,
IWTSListenerCallback* pListenerCallback, IWTSListener** ppListener)
{
}
}
-static WIN32ERROR dvcman_register_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name, IWTSPlugin* pPlugin)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT dvcman_register_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name, IWTSPlugin* pPlugin)
{
DVCMAN* dvcman = ((DVCMAN_ENTRY_POINTS*) pEntryPoints)->dvcman;
return (IWTSVirtualChannelManager*) dvcman;
}
-WIN32ERROR dvcman_load_addin(IWTSVirtualChannelManager* pChannelMgr, ADDIN_ARGV* args, rdpSettings* settings)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT dvcman_load_addin(IWTSVirtualChannelManager* pChannelMgr, ADDIN_ARGV* args, rdpSettings* settings)
{
DVCMAN_ENTRY_POINTS entryPoints;
PDVC_PLUGIN_ENTRY pDVCPluginEntry = NULL;
IWTSPlugin* pPlugin;
DVCMAN_LISTENER* listener;
DVCMAN* dvcman = (DVCMAN*) pChannelMgr;
- WIN32ERROR error;
+ UINT error;
ArrayList_Free(dvcman->channels);
free(dvcman);
}
-WIN32ERROR dvcman_init(IWTSVirtualChannelManager* pChannelMgr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT dvcman_init(IWTSVirtualChannelManager* pChannelMgr)
{
int i;
IWTSPlugin* pPlugin;
DVCMAN* dvcman = (DVCMAN*) pChannelMgr;
- WIN32ERROR error;
+ UINT error;
for (i = 0; i < dvcman->num_plugins; i++)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR dvcman_write_channel(IWTSVirtualChannel* pChannel, UINT32 cbSize, BYTE* pBuffer, void* pReserved)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT dvcman_write_channel(IWTSVirtualChannel* pChannel, UINT32 cbSize, BYTE* pBuffer, void* pReserved)
{
- WIN32ERROR status;
+ UINT status;
DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) pChannel;
EnterCriticalSection(&(channel->lock));
return status;
}
-static WIN32ERROR dvcman_close_channel_iface(IWTSVirtualChannel* pChannel)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT dvcman_close_channel_iface(IWTSVirtualChannel* pChannel)
{
DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) pChannel;
return CHANNEL_RC_OK;
}
-WIN32ERROR dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, const char* ChannelName)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, const char* ChannelName)
{
int i;
int bAccept;
DrdynvcClientContext* context;
IWTSVirtualChannelCallback* pCallback;
DVCMAN* dvcman = (DVCMAN*) pChannelMgr;
- WIN32ERROR error;
+ UINT error;
if (!(channel = dvcman_channel_new(pChannelMgr, ChannelId, ChannelName)))
{
return ERROR_INTERNAL_ERROR;
}
-WIN32ERROR dvcman_open_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT dvcman_open_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId)
{
DVCMAN_CHANNEL* channel;
IWTSVirtualChannelCallback* pCallback;
- WIN32ERROR error;
+ UINT error;
channel = (DVCMAN_CHANNEL*) dvcman_find_channel_by_id(pChannelMgr, ChannelId);
return CHANNEL_RC_OK;
}
-WIN32ERROR dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId)
{
DVCMAN_CHANNEL* channel;
IWTSVirtualChannel* ichannel;
DrdynvcClientContext* context;
DVCMAN* dvcman = (DVCMAN*) pChannelMgr;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
channel = (DVCMAN_CHANNEL*) dvcman_find_channel_by_id(pChannelMgr, ChannelId);
return CHANNEL_RC_OK;
}
-WIN32ERROR dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, UINT32 length)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, UINT32 length)
{
DVCMAN_CHANNEL* channel;
return CHANNEL_RC_OK;
}
-WIN32ERROR dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, wStream* data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, wStream* data)
{
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
DVCMAN_CHANNEL* channel;
size_t dataSize = Stream_GetRemainingLength(data);
return cb;
}
-WIN32ERROR drdynvc_send(drdynvcPlugin* drdynvc, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT drdynvc_send(drdynvcPlugin* drdynvc, wStream* s)
{
- WIN32ERROR status;
+ UINT status;
if (!drdynvc)
{
return status;
}
-WIN32ERROR drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId, BYTE* data, UINT32 dataSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId, BYTE* data, UINT32 dataSize)
{
wStream* data_out;
unsigned long pos = 0;
UINT32 cbChId;
UINT32 cbLen;
unsigned long chunkLength;
- WIN32ERROR status;
+ UINT status;
WLog_DBG(TAG, "write_data: ChannelId=%d size=%d", ChannelId, dataSize);
return CHANNEL_RC_OK;
}
-static WIN32ERROR drdynvc_send_capability_response(drdynvcPlugin* drdynvc)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_send_capability_response(drdynvcPlugin* drdynvc)
{
- WIN32ERROR status;
+ UINT status;
wStream* s;
WLog_DBG(TAG, "capability_response");
return status;
}
-static WIN32ERROR drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
- WIN32ERROR status;
+ UINT status;
WLog_DBG(TAG, "capability_request Sp=%d cbChId=%d", Sp, cbChId);
return val;
}
-static WIN32ERROR drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
unsigned long pos;
- WIN32ERROR status;
+ UINT status;
UINT32 ChannelId;
wStream* data_out;
- WIN32ERROR channel_status;
+ UINT channel_status;
if (drdynvc->state == DRDYNVC_STATE_CAPABILITIES)
{
return status;
}
-static WIN32ERROR drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
- WIN32ERROR status;
+ UINT status;
UINT32 Length;
UINT32 ChannelId;
return dvcman_receive_channel_data(drdynvc->channel_mgr, ChannelId, s);
}
-static WIN32ERROR drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
UINT32 ChannelId;
return dvcman_receive_channel_data(drdynvc->channel_mgr, ChannelId, s);
}
-static WIN32ERROR drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
int value;
- WIN32ERROR error;
+ UINT error;
UINT32 ChannelId;
wStream* data_out;
return error;
}
-static WIN32ERROR drdynvc_order_recv(drdynvcPlugin* drdynvc, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_order_recv(drdynvcPlugin* drdynvc, wStream* s)
{
int value;
int Cmd;
static wListDictionary* g_InitHandles = NULL;
static wListDictionary* g_OpenHandles = NULL;
-WIN32ERROR drdynvc_add_init_handle_data(void* pInitHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT drdynvc_add_init_handle_data(void* pInitHandle, void* pUserData)
{
if (!g_InitHandles)
g_InitHandles = ListDictionary_New(TRUE);
}
}
-WIN32ERROR drdynvc_add_open_handle_data(DWORD openHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT drdynvc_add_open_handle_data(DWORD openHandle, void* pUserData)
{
void* pOpenHandle = (void*) (size_t) openHandle;
}
}
-static WIN32ERROR drdynvc_virtual_channel_event_data_received(drdynvcPlugin* drdynvc,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_virtual_channel_event_data_received(drdynvcPlugin* drdynvc,
void* pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
wStream* data_in;
LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
drdynvcPlugin* drdynvc;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
drdynvc = (drdynvcPlugin*) drdynvc_get_open_handle_data(openHandle);
wStream* data;
wMessage message;
drdynvcPlugin* drdynvc = (drdynvcPlugin*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
while (1)
{
return NULL;
}
-static WIN32ERROR drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc, LPVOID pData, UINT32 dataLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc, LPVOID pData, UINT32 dataLength)
{
UINT32 status;
UINT32 index;
ADDIN_ARGV* args;
rdpSettings* settings;
- WIN32ERROR error;
+ UINT error;
status = drdynvc->channelEntryPoints.pVirtualChannelOpen(drdynvc->InitHandle,
&drdynvc->OpenHandle, drdynvc->channelDef.name, drdynvc_virtual_channel_open_event);
return error;
}
-static WIN32ERROR drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc)
{
- WIN32ERROR status;
+ UINT status;
if (MessageQueue_PostQuit(drdynvc->queue, 0) && (WaitForSingleObject(drdynvc->thread, INFINITE) == WAIT_FAILED))
{
return status;
}
-static WIN32ERROR drdynvc_virtual_channel_event_terminated(drdynvcPlugin* drdynvc)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_virtual_channel_event_terminated(drdynvcPlugin* drdynvc)
{
drdynvc_remove_init_handle_data(drdynvc->InitHandle);
free(drdynvc);
static void VCAPITYPE drdynvc_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
drdynvcPlugin* drdynvc;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
drdynvc = (drdynvcPlugin*) drdynvc_get_init_handle_data(pInitHandle);
drdynvcPlugin* drdynvc;
DrdynvcClientContext* context;
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
- WIN32ERROR error;
+ UINT error;
drdynvc = (drdynvcPlugin*) calloc(1, sizeof(drdynvcPlugin));
#include <winpr/synch.h>
#include <freerdp/settings.h>
#include <winpr/collections.h>
-#include <winpr/win32error.h>
#include <freerdp/api.h>
#include <freerdp/svc.h>
IWTSVirtualChannelManager* channel_mgr;
};
-WIN32ERROR drdynvc_write_data(drdynvcPlugin* plugin, UINT32 ChannelId, BYTE* data, UINT32 data_size);
+UINT drdynvc_write_data(drdynvcPlugin* plugin, UINT32 ChannelId, BYTE* data, UINT32 data_size);
#endif
#include <winpr/print.h>
#include <winpr/stream.h>
#include <freerdp/channels/log.h>
-#include <winpr/win32error.h>
-
#include "drdynvc_main.h"
HANDLE ChannelEvent;
DWORD BytesReturned;
DrdynvcServerContext* context;
- WIN32ERROR error = ERROR_INTERNAL_ERROR;
+ UINT error = ERROR_INTERNAL_ERROR;
context = (DrdynvcServerContext*) arg;
return NULL;
}
-static WIN32ERROR drdynvc_server_start(DrdynvcServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_server_start(DrdynvcServerContext* context)
{
context->priv->ChannelHandle = WTSVirtualChannelOpen(context->vcm, WTS_CURRENT_SESSION, "drdynvc");
return CHANNEL_RC_OK;
}
-static WIN32ERROR drdynvc_server_stop(DrdynvcServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drdynvc_server_stop(DrdynvcServerContext* context)
{
- WIN32ERROR error;
+ UINT error;
SetEvent(context->priv->StopEvent);
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
return file;
}
-static WIN32ERROR drive_process_irp_create(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_create(DRIVE_DEVICE* drive, IRP* irp)
{
int status;
void* key;
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp_close(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_close(DRIVE_DEVICE* drive, IRP* irp)
{
void* key;
DRIVE_FILE* file;
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp_read(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_read(DRIVE_DEVICE* drive, IRP* irp)
{
DRIVE_FILE* file;
UINT32 Length;
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp_write(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_write(DRIVE_DEVICE* drive, IRP* irp)
{
DRIVE_FILE* file;
UINT32 Length;
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp_query_information(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_query_information(DRIVE_DEVICE* drive, IRP* irp)
{
DRIVE_FILE* file;
UINT32 FsInformationClass;
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp_set_information(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_set_information(DRIVE_DEVICE* drive, IRP* irp)
{
DRIVE_FILE* file;
UINT32 FsInformationClass;
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp_query_volume_information(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_query_volume_information(DRIVE_DEVICE* drive, IRP* irp)
{
UINT32 FsInformationClass;
wStream* output = irp->output;
/* http://msdn.microsoft.com/en-us/library/cc241518.aspx */
-static WIN32ERROR drive_process_irp_silent_ignore(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_silent_ignore(DRIVE_DEVICE* drive, IRP* irp)
{
UINT32 FsInformationClass;
wStream* output = irp->output;
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp_query_directory(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_query_directory(DRIVE_DEVICE* drive, IRP* irp)
{
char* path = NULL;
int status;
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp_directory_control(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_directory_control(DRIVE_DEVICE* drive, IRP* irp)
{
switch (irp->MinorFunction)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR drive_process_irp_device_control(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp_device_control(DRIVE_DEVICE* drive, IRP* irp)
{
Stream_Write_UINT32(irp->output, 0); /* OutputBufferLength */
return irp->Complete(irp);
}
-static WIN32ERROR drive_process_irp(DRIVE_DEVICE* drive, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_process_irp(DRIVE_DEVICE* drive, IRP* irp)
{
- WIN32ERROR error;
+ UINT error;
irp->IoStatus = STATUS_SUCCESS;
IRP* irp;
wMessage message;
DRIVE_DEVICE* drive = (DRIVE_DEVICE*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
while (1)
{
return NULL;
}
-static WIN32ERROR drive_irp_request(DEVICE* device, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_irp_request(DEVICE* device, IRP* irp)
{
DRIVE_DEVICE* drive = (DRIVE_DEVICE*) device;
if (!MessageQueue_Post(drive->IrpQueue, NULL, 0, (void*) irp, NULL))
return CHANNEL_RC_OK;
}
-static WIN32ERROR drive_free(DEVICE* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_free(DEVICE* device)
{
DRIVE_DEVICE* drive = (DRIVE_DEVICE*) device;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (MessageQueue_PostQuit(drive->IrpQueue, 0) && (WaitForSingleObject(drive->thread, INFINITE) == WAIT_FAILED))
{
return error;
}
-WIN32ERROR drive_register_drive_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* name, char* path)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT drive_register_drive_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* name, char* path)
{
int i, length;
DRIVE_DEVICE* drive;
- WIN32ERROR error;
+ UINT error;
#ifdef WIN32
/*
UINT sys_code_page = 0;
-WIN32ERROR DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
{
RDPDR_DRIVE* drive;
- WIN32ERROR error;
+ UINT error;
#ifdef WIN32
char* dev;
int len;
ECHO_LISTENER_CALLBACK* listener_callback;
};
-static WIN32ERROR echo_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT echo_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
{
ECHO_CHANNEL_CALLBACK* callback = (ECHO_CHANNEL_CALLBACK*) pChannelCallback;
BYTE* pBuffer = Stream_Pointer(data);
return callback->channel->Write(callback->channel, cbSize, pBuffer, NULL);
}
-static WIN32ERROR echo_on_close(IWTSVirtualChannelCallback* pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT echo_on_close(IWTSVirtualChannelCallback* pChannelCallback)
{
ECHO_CHANNEL_CALLBACK* callback = (ECHO_CHANNEL_CALLBACK*) pChannelCallback;
return CHANNEL_RC_OK;
}
-static WIN32ERROR echo_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT echo_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel* pChannel, BYTE* Data, int* pbAccept,
IWTSVirtualChannelCallback** ppCallback)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR echo_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT echo_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
{
ECHO_PLUGIN* echo = (ECHO_PLUGIN*) pPlugin;
(IWTSListenerCallback*) echo->listener_callback, NULL);
}
-static WIN32ERROR echo_plugin_terminated(IWTSPlugin* pPlugin)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT echo_plugin_terminated(IWTSPlugin* pPlugin)
{
ECHO_PLUGIN* echo = (ECHO_PLUGIN*) pPlugin;
#define DVCPluginEntry echo_DVCPluginEntry
#endif
-WIN32ERROR DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
ECHO_PLUGIN* echo;
echo = (ECHO_PLUGIN*) pEntryPoints->GetPlugin(pEntryPoints, "echo");
} echo_server;
-static WIN32ERROR echo_server_open_channel(echo_server* echo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT echo_server_open_channel(echo_server* echo)
{
DWORD Error;
HANDLE hEvent;
HANDLE ChannelEvent;
DWORD BytesReturned = 0;
echo_server* echo = (echo_server*) arg;
- WIN32ERROR error;
+ UINT error;
DWORD status;
if ((error = echo_server_open_channel(echo)))
return NULL;
}
-static WIN32ERROR echo_server_open(echo_server_context* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT echo_server_open(echo_server_context* context)
{
echo_server* echo = (echo_server*) context;
return CHANNEL_RC_OK;
}
-static WIN32ERROR echo_server_close(echo_server_context* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT echo_server_close(echo_server_context* context)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
echo_server* echo = (echo_server*) context;
if (echo->thread)
#include "encomsp_main.h"
-static WIN32ERROR encomsp_read_header(wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_read_header(wStream* s, ENCOMSP_ORDER_HEADER* header)
{
if (Stream_GetRemainingLength(s) < ENCOMSP_ORDER_HEADER_SIZE)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR encomsp_write_header(wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_write_header(wStream* s, ENCOMSP_ORDER_HEADER* header)
{
Stream_Write_UINT16(s, header->Type); /* Type (2 bytes) */
Stream_Write_UINT16(s, header->Length); /* Length (2 bytes) */
return CHANNEL_RC_OK;
}
-static WIN32ERROR encomsp_read_unicode_string(wStream* s, ENCOMSP_UNICODE_STRING* str)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_read_unicode_string(wStream* s, ENCOMSP_UNICODE_STRING* str)
{
ZeroMemory(str, sizeof(ENCOMSP_UNICODE_STRING));
return pInterface;
}
-WIN32ERROR encomsp_virtual_channel_write(encomspPlugin* encomsp, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT encomsp_virtual_channel_write(encomspPlugin* encomsp, wStream* s)
{
- WIN32ERROR status;
+ UINT status;
if (!encomsp)
return ERROR_INVALID_HANDLE;
return status;
}
-static WIN32ERROR encomsp_recv_filter_updated_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_filter_updated_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_FILTER_UPDATED_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_application_created_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_application_created_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_APPLICATION_CREATED_PDU pdu;
- WIN32ERROR error;
+ UINT error;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_application_removed_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_application_removed_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_APPLICATION_REMOVED_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_window_created_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_window_created_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_WINDOW_CREATED_PDU pdu;
- WIN32ERROR error;
+ UINT error;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_window_removed_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_window_removed_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_WINDOW_REMOVED_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_show_window_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_show_window_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_SHOW_WINDOW_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_participant_created_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_participant_created_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_PARTICIPANT_CREATED_PDU pdu;
- WIN32ERROR error;
+ UINT error;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_participant_removed_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_participant_removed_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_PARTICIPANT_REMOVED_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_change_participant_control_level_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_change_participant_control_level_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_send_change_participant_control_level_pdu(EncomspClientContext* context, ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* pdu)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_send_change_participant_control_level_pdu(EncomspClientContext* context, ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* pdu)
{
wStream* s;
encomspPlugin* encomsp;
- WIN32ERROR error;
+ UINT error;
encomsp = (encomspPlugin*) context->handle;
return encomsp_virtual_channel_write(encomsp, s);
}
-static WIN32ERROR encomsp_recv_graphics_stream_paused_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_graphics_stream_paused_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_recv_graphics_stream_resumed_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_graphics_stream_resumed_pdu(encomspPlugin* encomsp, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
EncomspClientContext* context;
ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = encomsp_get_client_interface(encomsp);
return error;
}
-static WIN32ERROR encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
ENCOMSP_ORDER_HEADER header;
while (Stream_GetRemainingLength(s) > 0)
static wListDictionary* g_InitHandles = NULL;
static wListDictionary* g_OpenHandles = NULL;
-WIN32ERROR encomsp_add_init_handle_data(void* pInitHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT encomsp_add_init_handle_data(void* pInitHandle, void* pUserData)
{
if (!g_InitHandles)
{
}
}
-WIN32ERROR encomsp_add_open_handle_data(DWORD openHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT encomsp_add_open_handle_data(DWORD openHandle, void* pUserData)
{
void* pOpenHandle = (void*) (size_t) openHandle;
return status;
}
-static WIN32ERROR encomsp_virtual_channel_event_data_received(encomspPlugin* encomsp,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_virtual_channel_event_data_received(encomspPlugin* encomsp,
void* pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
wStream* data_in;
LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
encomspPlugin* encomsp;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
encomsp = (encomspPlugin*) encomsp_get_open_handle_data(openHandle);
wStream* data;
wMessage message;
encomspPlugin* encomsp = (encomspPlugin*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
encomsp_process_connect(encomsp);
return NULL;
}
-static WIN32ERROR encomsp_virtual_channel_event_connected(encomspPlugin* encomsp, LPVOID pData, UINT32 dataLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_virtual_channel_event_connected(encomspPlugin* encomsp, LPVOID pData, UINT32 dataLength)
{
UINT32 status;
- WIN32ERROR error;
+ UINT error;
status = encomsp->channelEntryPoints.pVirtualChannelOpen(encomsp->InitHandle,
&encomsp->OpenHandle, encomsp->channelDef.name, encomsp_virtual_channel_open_event);
return CHANNEL_RC_OK;
}
-static WIN32ERROR encomsp_virtual_channel_event_disconnected(encomspPlugin* encomsp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_virtual_channel_event_disconnected(encomspPlugin* encomsp)
{
UINT rc;
}
-static WIN32ERROR encomsp_virtual_channel_event_terminated(encomspPlugin* encomsp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_virtual_channel_event_terminated(encomspPlugin* encomsp)
{
encomsp_remove_init_handle_data(encomsp->InitHandle);
free(encomsp);
static void VCAPITYPE encomsp_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
encomspPlugin* encomsp;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
encomsp = (encomspPlugin*) encomsp_get_init_handle_data(pInitHandle);
EncomspClientContext* context;
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
BOOL isFreerdp = FALSE;
- WIN32ERROR error;
+ UINT error;
encomsp = (encomspPlugin*) calloc(1, sizeof(encomspPlugin));
if (!encomsp)
#define TAG CHANNELS_TAG("encomsp.server")
-static WIN32ERROR encomsp_read_header(wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_read_header(wStream* s, ENCOMSP_ORDER_HEADER* header)
{
if (Stream_GetRemainingLength(s) < ENCOMSP_ORDER_HEADER_SIZE)
return ERROR_INVALID_DATA;
#endif
-static WIN32ERROR encomsp_recv_change_participant_control_level_pdu(EncomspServerContext* context, wStream* s, ENCOMSP_ORDER_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_recv_change_participant_control_level_pdu(EncomspServerContext* context, wStream* s, ENCOMSP_ORDER_HEADER* header)
{
int beg, end;
ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
beg = ((int) Stream_GetPosition(s)) - ENCOMSP_ORDER_HEADER_SIZE;
return error;
}
-static WIN32ERROR encomsp_server_receive_pdu(EncomspServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_server_receive_pdu(EncomspServerContext* context, wStream* s)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
ENCOMSP_ORDER_HEADER header;
while (Stream_GetRemainingLength(s) > 0)
DWORD BytesReturned;
ENCOMSP_ORDER_HEADER* header;
EncomspServerContext* context;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DWORD status;
context = (EncomspServerContext*) arg;
return NULL;
}
-static WIN32ERROR encomsp_server_start(EncomspServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_server_start(EncomspServerContext* context)
{
context->priv->ChannelHandle = WTSVirtualChannelOpen(context->vcm, WTS_CURRENT_SESSION, "encomsp");
return CHANNEL_RC_OK;
}
-static WIN32ERROR encomsp_server_stop(EncomspServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_server_stop(EncomspServerContext* context)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
SetEvent(context->priv->StopEvent);
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
};
typedef struct _PARALLEL_DEVICE PARALLEL_DEVICE;
-static WIN32ERROR parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp)
{
char* path = NULL;
int status;
return irp->Complete(irp);
}
-static WIN32ERROR parallel_process_irp_close(PARALLEL_DEVICE* parallel, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT parallel_process_irp_close(PARALLEL_DEVICE* parallel, IRP* irp)
{
if (close(parallel->file) < 0)
{
return irp->Complete(irp);
}
-static WIN32ERROR parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
{
UINT32 Length;
UINT64 Offset;
return irp->Complete(irp);
}
-static WIN32ERROR parallel_process_irp_write(PARALLEL_DEVICE* parallel, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT parallel_process_irp_write(PARALLEL_DEVICE* parallel, IRP* irp)
{
UINT32 len;
UINT32 Length;
return irp->Complete(irp);
}
-static WIN32ERROR parallel_process_irp_device_control(PARALLEL_DEVICE* parallel, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT parallel_process_irp_device_control(PARALLEL_DEVICE* parallel, IRP* irp)
{
Stream_Write_UINT32(irp->output, 0); /* OutputBufferLength */
return irp->Complete(irp);
}
-static WIN32ERROR parallel_process_irp(PARALLEL_DEVICE* parallel, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT parallel_process_irp(PARALLEL_DEVICE* parallel, IRP* irp)
{
- WIN32ERROR error;
+ UINT error;
switch (irp->MajorFunction)
{
IRP* irp;
wMessage message;
PARALLEL_DEVICE* parallel = (PARALLEL_DEVICE*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
while (1)
{
return NULL;
}
-static WIN32ERROR parallel_irp_request(DEVICE* device, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT parallel_irp_request(DEVICE* device, IRP* irp)
{
PARALLEL_DEVICE* parallel = (PARALLEL_DEVICE*) device;
return CHANNEL_RC_OK;
}
-static WIN32ERROR parallel_free(DEVICE* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT parallel_free(DEVICE* device)
{
- WIN32ERROR error;
+ UINT error;
PARALLEL_DEVICE* parallel = (PARALLEL_DEVICE*) device;
if (MessageQueue_PostQuit(parallel->queue, 0) && (WaitForSingleObject(parallel->thread, INFINITE) == WAIT_FAILED))
#define DeviceServiceEntry parallel_DeviceServiceEntry
#endif
-WIN32ERROR DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
{
char* name;
char* path;
size_t length;
RDPDR_PARALLEL* device;
PARALLEL_DEVICE* parallel;
- WIN32ERROR error;
+ UINT error;
device = (RDPDR_PARALLEL*) pEntryPoints->device;
name = device->Name;
t->tm_hour, t->tm_min, t->tm_sec);
}
-static WIN32ERROR printer_cups_write_printjob(rdpPrintJob* printjob, BYTE* data, int size)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_cups_write_printjob(rdpPrintJob* printjob, BYTE* data, int size)
{
rdpCupsPrintJob* cups_printjob = (rdpCupsPrintJob*) printjob;
rdpContext* rdpcontext;
};
-static WIN32ERROR printer_process_irp_create(PRINTER_DEVICE* printer_dev, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_process_irp_create(PRINTER_DEVICE* printer_dev, IRP* irp)
{
rdpPrintJob* printjob = NULL;
return irp->Complete(irp);
}
-static WIN32ERROR printer_process_irp_close(PRINTER_DEVICE* printer_dev, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_process_irp_close(PRINTER_DEVICE* printer_dev, IRP* irp)
{
rdpPrintJob* printjob = NULL;
return irp->Complete(irp);
}
-static WIN32ERROR printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp)
{
UINT32 Length;
UINT64 Offset;
rdpPrintJob* printjob = NULL;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
Stream_Read_UINT32(irp->input, Length);
Stream_Read_UINT64(irp->input, Offset);
return irp->Complete(irp);
}
-static WIN32ERROR printer_process_irp_device_control(PRINTER_DEVICE* printer_dev, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_process_irp_device_control(PRINTER_DEVICE* printer_dev, IRP* irp)
{
Stream_Write_UINT32(irp->output, 0); /* OutputBufferLength */
return irp->Complete(irp);
}
-static WIN32ERROR printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp)
{
- WIN32ERROR error;
+ UINT error;
switch (irp->MajorFunction)
{
case IRP_MJ_CREATE:
IRP* irp;
PRINTER_DEVICE* printer_dev = (PRINTER_DEVICE*) arg;
HANDLE obj[] = {printer_dev->event, printer_dev->stopEvent};
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
while (1)
{
return NULL;
}
-static WIN32ERROR printer_irp_request(DEVICE* device, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_irp_request(DEVICE* device, IRP* irp)
{
PRINTER_DEVICE* printer_dev = (PRINTER_DEVICE*) device;
return CHANNEL_RC_OK;
}
-static WIN32ERROR printer_free(DEVICE* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_free(DEVICE* device)
{
IRP* irp;
PRINTER_DEVICE* printer_dev = (PRINTER_DEVICE*) device;
- WIN32ERROR error;
+ UINT error;
SetEvent(printer_dev->stopEvent);
if (WaitForSingleObject(printer_dev->thread, INFINITE) == WAIT_FAILED)
return CHANNEL_RC_OK;
}
-WIN32ERROR printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* printer)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* printer)
{
char* port;
UINT32 Flags;
UINT32 CachedFieldsLen;
BYTE* CachedPrinterConfigData;
PRINTER_DEVICE* printer_dev;
- WIN32ERROR error;
+ UINT error;
port = malloc(10);
if (!port)
#define DeviceServiceEntry printer_DeviceServiceEntry
#endif
-WIN32ERROR DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
{
int i;
char* name;
rdpPrinter** printers;
RDPDR_PRINTER* device;
rdpPrinterDriver* driver = NULL;
- WIN32ERROR error;
+ UINT error;
#ifdef WITH_CUPS
driver = printer_cups_get_driver();
pcFreePrinter Free;
};
-typedef WIN32ERROR (*pcWritePrintJob) (rdpPrintJob* printjob, BYTE* data, int size);
+typedef UINT (*pcWritePrintJob) (rdpPrintJob* printjob, BYTE* data, int size);
typedef void (*pcClosePrintJob) (rdpPrintJob* printjob);
struct rdp_print_job
t->tm_hour, t->tm_min, t->tm_sec);
}
-static WIN32ERROR printer_win_write_printjob(rdpPrintJob* printjob, BYTE* data, int size)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT printer_win_write_printjob(rdpPrintJob* printjob, BYTE* data, int size)
{
rdpWinPrintJob* win_printjob = (rdpWinPrintJob*) printjob;
return pInterface;
}
-WIN32ERROR rail_send(railPlugin* rail, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send(railPlugin* rail, wStream* s)
{
- WIN32ERROR status;
+ UINT status;
if (!rail)
{
return status;
}
-WIN32ERROR rail_send_channel_data(railPlugin* rail, void* data, size_t length)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_channel_data(railPlugin* rail, void* data, size_t length)
{
wStream* s = NULL;
* Callback Interface
*/
-WIN32ERROR rail_client_execute(RailClientContext* context, RAIL_EXEC_ORDER* exec)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_execute(RailClientContext* context, RAIL_EXEC_ORDER* exec)
{
char* exeOrFile;
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_exec_order(rail, exec);
}
-WIN32ERROR rail_client_activate(RailClientContext* context, RAIL_ACTIVATE_ORDER* activate)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_activate(RailClientContext* context, RAIL_ACTIVATE_ORDER* activate)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_activate_order(rail, activate);
}
-WIN32ERROR rail_send_client_sysparam(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_sysparam(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
{
wStream* s;
int length;
railPlugin* rail = (railPlugin*) context->handle;
- WIN32ERROR error;
+ UINT error;
length = RAIL_SYSPARAM_ORDER_LENGTH;
return error;
}
-WIN32ERROR rail_client_system_param(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_system_param(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (sysparam->params & SPI_MASK_SET_HIGH_CONTRAST)
{
return error;
}
-WIN32ERROR rail_server_system_param(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_server_system_param(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
{
return CHANNEL_RC_OK; /* stub - should be registered by client */
}
-WIN32ERROR rail_client_system_command(RailClientContext* context, RAIL_SYSCOMMAND_ORDER* syscommand)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_system_command(RailClientContext* context, RAIL_SYSCOMMAND_ORDER* syscommand)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_syscommand_order(rail, syscommand);
}
-WIN32ERROR rail_client_handshake(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_handshake(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_handshake_order(rail, handshake);
}
-WIN32ERROR rail_server_handshake(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_server_handshake(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake)
{
return CHANNEL_RC_OK; /* stub - should be registered by client */
}
-WIN32ERROR rail_client_handshake_ex(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_handshake_ex(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_handshake_ex_order(rail, handshakeEx);
}
-WIN32ERROR rail_server_handshake_ex(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_server_handshake_ex(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
{
return CHANNEL_RC_OK; /* stub - should be registered by client */
}
-WIN32ERROR rail_client_notify_event(RailClientContext* context, RAIL_NOTIFY_EVENT_ORDER* notifyEvent)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_notify_event(RailClientContext* context, RAIL_NOTIFY_EVENT_ORDER* notifyEvent)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_notify_event_order(rail, notifyEvent);
}
-WIN32ERROR rail_client_window_move(RailClientContext* context, RAIL_WINDOW_MOVE_ORDER* windowMove)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_window_move(RailClientContext* context, RAIL_WINDOW_MOVE_ORDER* windowMove)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_window_move_order(rail, windowMove);
}
-WIN32ERROR rail_server_local_move_size(RailClientContext* context, RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_server_local_move_size(RailClientContext* context, RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
{
return CHANNEL_RC_OK; /* stub - should be registered by client */
}
-WIN32ERROR rail_server_min_max_info(RailClientContext* context, RAIL_MINMAXINFO_ORDER* minMaxInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_server_min_max_info(RailClientContext* context, RAIL_MINMAXINFO_ORDER* minMaxInfo)
{
return CHANNEL_RC_OK; /* stub - should be registered by client */
}
-WIN32ERROR rail_client_information(RailClientContext* context, RAIL_CLIENT_STATUS_ORDER* clientStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_information(RailClientContext* context, RAIL_CLIENT_STATUS_ORDER* clientStatus)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_status_order(rail, clientStatus);
}
-WIN32ERROR rail_client_system_menu(RailClientContext* context, RAIL_SYSMENU_ORDER* sysmenu)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_system_menu(RailClientContext* context, RAIL_SYSMENU_ORDER* sysmenu)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_sysmenu_order(rail, sysmenu);
}
-WIN32ERROR rail_client_language_bar_info(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_language_bar_info(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_langbar_info_order(rail, langBarInfo);
}
-WIN32ERROR rail_server_language_bar_info(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_server_language_bar_info(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
{
return CHANNEL_RC_OK; /* stub - should be registered by client */
}
-WIN32ERROR rail_server_execute_result(RailClientContext* context, RAIL_EXEC_RESULT_ORDER* execResult)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_server_execute_result(RailClientContext* context, RAIL_EXEC_RESULT_ORDER* execResult)
{
return CHANNEL_RC_OK; /* stub - should be registered by client */
}
-WIN32ERROR rail_client_get_appid_request(RailClientContext* context, RAIL_GET_APPID_REQ_ORDER* getAppIdReq)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_client_get_appid_request(RailClientContext* context, RAIL_GET_APPID_REQ_ORDER* getAppIdReq)
{
railPlugin* rail = (railPlugin*) context->handle;
return rail_send_client_get_appid_req_order(rail, getAppIdReq);
}
-WIN32ERROR rail_server_get_appid_response(RailClientContext* context, RAIL_GET_APPID_RESP_ORDER* getAppIdResp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_server_get_appid_response(RailClientContext* context, RAIL_GET_APPID_RESP_ORDER* getAppIdResp)
{
return CHANNEL_RC_OK; /* stub - should be registered by client */
}
static wListDictionary* g_InitHandles = NULL;
static wListDictionary* g_OpenHandles = NULL;
-WIN32ERROR rail_add_init_handle_data(void* pInitHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_add_init_handle_data(void* pInitHandle, void* pUserData)
{
if (!g_InitHandles)
{
}
}
-WIN32ERROR rail_add_open_handle_data(DWORD openHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_add_open_handle_data(DWORD openHandle, void* pUserData)
{
void* pOpenHandle = (void*) (size_t) openHandle;
}
}
-static WIN32ERROR rail_virtual_channel_event_data_received(railPlugin* rail,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rail_virtual_channel_event_data_received(railPlugin* rail,
void* pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
wStream* data_in;
LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
railPlugin* rail;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
rail = (railPlugin*) rail_get_open_handle_data(openHandle);
wStream* data;
wMessage message;
railPlugin* rail = (railPlugin*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
while (1)
{
return NULL;
}
-static WIN32ERROR rail_virtual_channel_event_connected(railPlugin* rail, LPVOID pData, UINT32 dataLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rail_virtual_channel_event_connected(railPlugin* rail, LPVOID pData, UINT32 dataLength)
{
- WIN32ERROR status;
+ UINT status;
status = rail->channelEntryPoints.pVirtualChannelOpen(rail->InitHandle,
&rail->OpenHandle, rail->channelDef.name, rail_virtual_channel_open_event);
return CHANNEL_RC_OK;
}
-static WIN32ERROR rail_virtual_channel_event_disconnected(railPlugin* rail)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rail_virtual_channel_event_disconnected(railPlugin* rail)
{
UINT rc;
if (MessageQueue_PostQuit(rail->queue, 0) && (WaitForSingleObject(rail->thread, INFINITE) == WAIT_FAILED))
static VOID VCAPITYPE rail_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
railPlugin* rail;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
rail = (railPlugin*) rail_get_init_handle_data(pInitHandle);
RailClientContext* context;
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
BOOL isFreerdp = FALSE;
- WIN32ERROR error;
+ UINT error;
rail = (railPlugin*) calloc(1, sizeof(railPlugin));
if (!rail)
typedef struct rail_plugin railPlugin;
RailClientContext* rail_get_client_interface(railPlugin* rail);
-WIN32ERROR rail_send_channel_data(railPlugin* rail, void* data, size_t length);
+UINT rail_send_channel_data(railPlugin* rail, void* data, size_t length);
#endif /* FREERDP_CHANNEL_CLIENT_RAIL_MAIN_H */
#include "rail_orders.h"
-static WIN32ERROR rail_write_unicode_string(wStream* s, RAIL_UNICODE_STRING* unicode_string)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rail_write_unicode_string(wStream* s, RAIL_UNICODE_STRING* unicode_string)
{
if (!Stream_EnsureRemainingCapacity(s, 2 + unicode_string->length))
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rail_write_unicode_string_value(wStream* s, RAIL_UNICODE_STRING* unicode_string)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rail_write_unicode_string_value(wStream* s, RAIL_UNICODE_STRING* unicode_string)
{
if (unicode_string->length > 0)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rail_send_pdu(railPlugin* rail, wStream* s, UINT16 orderType)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_pdu(railPlugin* rail, wStream* s, UINT16 orderType)
{
UINT16 orderLength;
return rail_send_channel_data(rail, Stream_Buffer(s), orderLength);
}
-WIN32ERROR rail_write_high_contrast(wStream* s, RAIL_HIGH_CONTRAST* highContrast)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_write_high_contrast(wStream* s, RAIL_HIGH_CONTRAST* highContrast)
{
highContrast->colorSchemeLength = highContrast->colorScheme.length + 2;
Stream_Write_UINT32(s, highContrast->flags); /* flags (4 bytes) */
return rail_write_unicode_string(s, &highContrast->colorScheme); /* colorScheme */
}
-WIN32ERROR rail_read_server_exec_result_order(wStream* s, RAIL_EXEC_RESULT_ORDER* execResult)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_server_exec_result_order(wStream* s, RAIL_EXEC_RESULT_ORDER* execResult)
{
if (Stream_GetRemainingLength(s) < 8)
{
return rail_read_unicode_string(s, &execResult->exeOrFile) ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR; /* exeOrFile */
}
-WIN32ERROR rail_read_server_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_server_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam)
{
BYTE body;
return CHANNEL_RC_OK;
}
-WIN32ERROR rail_read_server_minmaxinfo_order(wStream* s, RAIL_MINMAXINFO_ORDER* minmaxinfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_server_minmaxinfo_order(wStream* s, RAIL_MINMAXINFO_ORDER* minmaxinfo)
{
if (Stream_GetRemainingLength(s) < 20)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rail_read_server_localmovesize_order(wStream* s, RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_server_localmovesize_order(wStream* s, RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
{
UINT16 isMoveSizeStart;
return CHANNEL_RC_OK;
}
-WIN32ERROR rail_read_server_get_appid_resp_order(wStream* s, RAIL_GET_APPID_RESP_ORDER* getAppidResp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_server_get_appid_resp_order(wStream* s, RAIL_GET_APPID_RESP_ORDER* getAppidResp)
{
if (Stream_GetRemainingLength(s) < 516)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rail_read_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbarInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbarInfo)
{
if (Stream_GetRemainingLength(s) < 4)
{
Stream_Write_UINT32(s, clientStatus->flags); /* flags (4 bytes) */
}
-WIN32ERROR rail_write_client_exec_order(wStream* s, RAIL_EXEC_ORDER* exec)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_write_client_exec_order(wStream* s, RAIL_EXEC_ORDER* exec)
{
- WIN32ERROR error;
+ UINT error;
Stream_Write_UINT16(s, exec->flags); /* flags (2 bytes) */
Stream_Write_UINT16(s, exec->exeOrFile.length); /* exeOrFileLength (2 bytes) */
Stream_Write_UINT16(s, exec->workingDir.length); /* workingDirLength (2 bytes) */
return error;
}
-WIN32ERROR rail_write_client_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_write_client_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam)
{
BYTE body;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
Stream_Write_UINT32(s, sysparam->param); /* systemParam (4 bytes) */
Stream_Write_UINT32(s, langbarInfo->languageBarStatus); /* languageBarStatus (4 bytes) */
}
-WIN32ERROR rail_recv_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_recv_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake, wStream* s)
{
RailClientContext* context = rail_get_client_interface(rail);
- WIN32ERROR error;
+ UINT error;
if ((error = rail_read_handshake_order(s, handshake)))
{
return error;
}
-WIN32ERROR rail_recv_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* handshakeEx, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_recv_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* handshakeEx, wStream* s)
{
RailClientContext* context = rail_get_client_interface(rail);
- WIN32ERROR error;
+ UINT error;
if ((error = rail_read_handshake_ex_order(s, handshakeEx)))
{
return error;
}
-WIN32ERROR rail_recv_exec_result_order(railPlugin* rail, RAIL_EXEC_RESULT_ORDER* execResult, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_recv_exec_result_order(railPlugin* rail, RAIL_EXEC_RESULT_ORDER* execResult, wStream* s)
{
RailClientContext* context = rail_get_client_interface(rail);
- WIN32ERROR error;
+ UINT error;
ZeroMemory(execResult, sizeof(RAIL_EXEC_RESULT_ORDER));
return error;
}
-WIN32ERROR rail_recv_server_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_recv_server_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam, wStream* s)
{
RailClientContext* context = rail_get_client_interface(rail);
- WIN32ERROR error;
+ UINT error;
if ((error = rail_read_server_sysparam_order(s, sysparam)))
{
return error;
}
-WIN32ERROR rail_recv_server_minmaxinfo_order(railPlugin* rail, RAIL_MINMAXINFO_ORDER* minMaxInfo, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_recv_server_minmaxinfo_order(railPlugin* rail, RAIL_MINMAXINFO_ORDER* minMaxInfo, wStream* s)
{
RailClientContext* context = rail_get_client_interface(rail);
- WIN32ERROR error;
+ UINT error;
if ((error = rail_read_server_minmaxinfo_order(s, minMaxInfo)))
{
return error;
}
-WIN32ERROR rail_recv_server_localmovesize_order(railPlugin* rail, RAIL_LOCALMOVESIZE_ORDER* localMoveSize, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_recv_server_localmovesize_order(railPlugin* rail, RAIL_LOCALMOVESIZE_ORDER* localMoveSize, wStream* s)
{
RailClientContext* context = rail_get_client_interface(rail);
- WIN32ERROR error;
+ UINT error;
if ((error = rail_read_server_localmovesize_order(s, localMoveSize)))
{
return error;
}
-WIN32ERROR rail_recv_server_get_appid_resp_order(railPlugin* rail, RAIL_GET_APPID_RESP_ORDER* getAppIdResp, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_recv_server_get_appid_resp_order(railPlugin* rail, RAIL_GET_APPID_RESP_ORDER* getAppIdResp, wStream* s)
{
RailClientContext* context = rail_get_client_interface(rail);
- WIN32ERROR error;
+ UINT error;
if ((error = rail_read_server_get_appid_resp_order(s, getAppIdResp)))
{
return error;
}
-WIN32ERROR rail_recv_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* langBarInfo, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_recv_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* langBarInfo, wStream* s)
{
RailClientContext* context = rail_get_client_interface(rail);
- WIN32ERROR error;
+ UINT error;
if ((error = rail_read_langbar_info_order(s, langBarInfo)))
{
return error;
}
-WIN32ERROR rail_order_recv(railPlugin* rail, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_order_recv(railPlugin* rail, wStream* s)
{
UINT16 orderType;
UINT16 orderLength;
- WIN32ERROR error;
+ UINT error;
if ((error = rail_read_pdu_header(s, &orderType, &orderLength)))
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rail_send_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_HANDSHAKE_ORDER_LENGTH);
if (!s)
return error;
}
-WIN32ERROR rail_send_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_HANDSHAKE_EX_ORDER_LENGTH);
if (!s)
{
return error;
}
-WIN32ERROR rail_send_client_status_order(railPlugin* rail, RAIL_CLIENT_STATUS_ORDER* clientStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_status_order(railPlugin* rail, RAIL_CLIENT_STATUS_ORDER* clientStatus)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_CLIENT_STATUS_ORDER_LENGTH);
if (!s)
return error;
}
-WIN32ERROR rail_send_client_exec_order(railPlugin* rail, RAIL_EXEC_ORDER* exec)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_exec_order(railPlugin* rail, RAIL_EXEC_ORDER* exec)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
size_t length;
length = RAIL_EXEC_ORDER_LENGTH +
return error;
}
-WIN32ERROR rail_send_client_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam)
{
wStream* s;
int length;
- WIN32ERROR error;
+ UINT error;
length = RAIL_SYSPARAM_ORDER_LENGTH;
return error;
}
-WIN32ERROR rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (sysparam->params & SPI_MASK_SET_HIGH_CONTRAST)
{
return error;
}
-WIN32ERROR rail_send_client_activate_order(railPlugin* rail, RAIL_ACTIVATE_ORDER* activate)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_activate_order(railPlugin* rail, RAIL_ACTIVATE_ORDER* activate)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_ACTIVATE_ORDER_LENGTH);
if (!s)
return error;
}
-WIN32ERROR rail_send_client_sysmenu_order(railPlugin* rail, RAIL_SYSMENU_ORDER* sysmenu)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_sysmenu_order(railPlugin* rail, RAIL_SYSMENU_ORDER* sysmenu)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_SYSMENU_ORDER_LENGTH);
if (!s)
return error;
}
-WIN32ERROR rail_send_client_syscommand_order(railPlugin* rail, RAIL_SYSCOMMAND_ORDER* syscommand)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_syscommand_order(railPlugin* rail, RAIL_SYSCOMMAND_ORDER* syscommand)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_SYSCOMMAND_ORDER_LENGTH);
if (!s)
return error;
}
-WIN32ERROR rail_send_client_notify_event_order(railPlugin* rail, RAIL_NOTIFY_EVENT_ORDER* notifyEvent)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_notify_event_order(railPlugin* rail, RAIL_NOTIFY_EVENT_ORDER* notifyEvent)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_NOTIFY_EVENT_ORDER_LENGTH);
if (!s)
return error;
}
-WIN32ERROR rail_send_client_window_move_order(railPlugin* rail, RAIL_WINDOW_MOVE_ORDER* windowMove)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_window_move_order(railPlugin* rail, RAIL_WINDOW_MOVE_ORDER* windowMove)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_WINDOW_MOVE_ORDER_LENGTH);
if (!s)
return error;
}
-WIN32ERROR rail_send_client_get_appid_req_order(railPlugin* rail, RAIL_GET_APPID_REQ_ORDER* getAppIdReq)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_get_appid_req_order(railPlugin* rail, RAIL_GET_APPID_REQ_ORDER* getAppIdReq)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_GET_APPID_REQ_ORDER_LENGTH);
if (!s)
return error;
}
-WIN32ERROR rail_send_client_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_send_client_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
{
wStream* s;
- WIN32ERROR error;
+ UINT error;
s = rail_pdu_init(RAIL_LANGBAR_INFO_ORDER_LENGTH);
if (!s)
#define TAG CHANNELS_TAG("rail.client")
-WIN32ERROR rail_read_server_exec_result_order(wStream* s, RAIL_EXEC_RESULT_ORDER* exec_result);
-WIN32ERROR rail_read_server_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam);
-WIN32ERROR rail_read_server_minmaxinfo_order(wStream* s, RAIL_MINMAXINFO_ORDER* minmaxinfo);
-WIN32ERROR rail_read_server_localmovesize_order(wStream* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize);
-WIN32ERROR rail_read_server_get_appid_resp_order(wStream* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp);
-WIN32ERROR rail_read_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbar_info);
+UINT rail_read_server_exec_result_order(wStream* s, RAIL_EXEC_RESULT_ORDER* exec_result);
+UINT rail_read_server_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam);
+UINT rail_read_server_minmaxinfo_order(wStream* s, RAIL_MINMAXINFO_ORDER* minmaxinfo);
+UINT rail_read_server_localmovesize_order(wStream* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize);
+UINT rail_read_server_get_appid_resp_order(wStream* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp);
+UINT rail_read_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbar_info);
void rail_write_client_status_order(wStream* s, RAIL_CLIENT_STATUS_ORDER* client_status);
-WIN32ERROR rail_write_client_exec_order(wStream* s, RAIL_EXEC_ORDER* exec);
-WIN32ERROR rail_write_client_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam);
+UINT rail_write_client_exec_order(wStream* s, RAIL_EXEC_ORDER* exec);
+UINT rail_write_client_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam);
void rail_write_client_activate_order(wStream* s, RAIL_ACTIVATE_ORDER* activate);
void rail_write_client_sysmenu_order(wStream* s, RAIL_SYSMENU_ORDER* sysmenu);
void rail_write_client_syscommand_order(wStream* s, RAIL_SYSCOMMAND_ORDER* syscommand);
void rail_write_client_get_appid_req_order(wStream* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req);
void rail_write_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbar_info);
-WIN32ERROR rail_order_recv(railPlugin* rail, wStream* s);
-WIN32ERROR rail_send_pdu(railPlugin* rail, wStream* s, UINT16 orderType);
+UINT rail_order_recv(railPlugin* rail, wStream* s);
+UINT rail_send_pdu(railPlugin* rail, wStream* s, UINT16 orderType);
-WIN32ERROR rail_send_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake);
-WIN32ERROR rail_send_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
-WIN32ERROR rail_send_client_status_order(railPlugin* rail, RAIL_CLIENT_STATUS_ORDER* clientStatus);
-WIN32ERROR rail_send_client_exec_order(railPlugin* rail, RAIL_EXEC_ORDER* exec);
-WIN32ERROR rail_send_client_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam);
-WIN32ERROR rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam);
-WIN32ERROR rail_send_client_activate_order(railPlugin* rail, RAIL_ACTIVATE_ORDER* activate);
-WIN32ERROR rail_send_client_sysmenu_order(railPlugin* rail, RAIL_SYSMENU_ORDER* sysmenu);
-WIN32ERROR rail_send_client_syscommand_order(railPlugin* rail, RAIL_SYSCOMMAND_ORDER* syscommand);
-WIN32ERROR rail_send_client_notify_event_order(railPlugin* rail, RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
-WIN32ERROR rail_send_client_window_move_order(railPlugin* rail, RAIL_WINDOW_MOVE_ORDER* windowMove);
-WIN32ERROR rail_send_client_get_appid_req_order(railPlugin* rail, RAIL_GET_APPID_REQ_ORDER* getAppIdReq);
-WIN32ERROR rail_send_client_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* langBarInfo);
+UINT rail_send_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake);
+UINT rail_send_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
+UINT rail_send_client_status_order(railPlugin* rail, RAIL_CLIENT_STATUS_ORDER* clientStatus);
+UINT rail_send_client_exec_order(railPlugin* rail, RAIL_EXEC_ORDER* exec);
+UINT rail_send_client_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam);
+UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysparam);
+UINT rail_send_client_activate_order(railPlugin* rail, RAIL_ACTIVATE_ORDER* activate);
+UINT rail_send_client_sysmenu_order(railPlugin* rail, RAIL_SYSMENU_ORDER* sysmenu);
+UINT rail_send_client_syscommand_order(railPlugin* rail, RAIL_SYSCOMMAND_ORDER* syscommand);
+UINT rail_send_client_notify_event_order(railPlugin* rail, RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
+UINT rail_send_client_window_move_order(railPlugin* rail, RAIL_WINDOW_MOVE_ORDER* windowMove);
+UINT rail_send_client_get_appid_req_order(railPlugin* rail, RAIL_GET_APPID_REQ_ORDER* getAppIdReq);
+UINT rail_send_client_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* langBarInfo);
#endif /* __RAIL_ORDERS_H */
unicode_string->length = (UINT16) length;
}
-WIN32ERROR rail_read_pdu_header(wStream* s, UINT16* orderType, UINT16* orderLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_pdu_header(wStream* s, UINT16* orderType, UINT16* orderLength)
{
if (Stream_GetRemainingLength(s) < 4)
return ERROR_INVALID_DATA;
return s;
}
-WIN32ERROR rail_read_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake)
{
if (Stream_GetRemainingLength(s) < 4)
return ERROR_INVALID_DATA;
Stream_Write_UINT32(s, handshake->buildNumber); /* buildNumber (4 bytes) */
}
-WIN32ERROR rail_read_handshake_ex_order(wStream* s, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rail_read_handshake_ex_order(wStream* s, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
{
if (Stream_GetRemainingLength(s) < 8)
return ERROR_INVALID_DATA;
#define FREERDP_CHANNEL_RAIL_COMMON_H
#include <freerdp/rail.h>
-#include <winpr/win32error.h>
extern const char* const RAIL_ORDER_TYPE_STRINGS[];
#define RAIL_LANGBAR_INFO_ORDER_LENGTH 4 /* fixed */
void rail_string_to_unicode_string(char* string, RAIL_UNICODE_STRING* unicode_string);
-WIN32ERROR rail_read_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake);
+UINT rail_read_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake);
void rail_write_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake);
-WIN32ERROR rail_read_handshake_ex_order(wStream* s, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
+UINT rail_read_handshake_ex_order(wStream* s, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
void rail_write_handshake_ex_order(wStream* s, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
wStream* rail_pdu_init(size_t length);
-WIN32ERROR rail_read_pdu_header(wStream* s, UINT16* orderType, UINT16* orderLength);
+UINT rail_read_pdu_header(wStream* s, UINT16* orderType, UINT16* orderLength);
void rail_write_pdu_header(wStream* s, UINT16 orderType, UINT16 orderLength);
#endif /* FREERDP_CHANNEL_RAIL_COMMON_H */
devman_device_free(device);
}
-static WIN32ERROR devman_register_device(DEVMAN* devman, DEVICE* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT devman_register_device(DEVMAN* devman, DEVICE* device)
{
void* key = NULL;
static char SERIAL_SERVICE_NAME[] = "serial";
static char PARALLEL_SERVICE_NAME[] = "parallel";
-WIN32ERROR devman_load_device_service(DEVMAN* devman, RDPDR_DEVICE* device, rdpContext* rdpcontext)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT devman_load_device_service(DEVMAN* devman, RDPDR_DEVICE* device, rdpContext* rdpcontext)
{
char* ServiceName = NULL;
DEVICE_SERVICE_ENTRY_POINTS ep;
#include "rdpdr_main.h"
void devman_unregister_device(DEVMAN* devman, void* key);
-WIN32ERROR devman_load_device_service(DEVMAN* devman, RDPDR_DEVICE* device, rdpContext* rdpcontext);
+UINT devman_load_device_service(DEVMAN* devman, RDPDR_DEVICE* device, rdpContext* rdpcontext);
DEVICE* devman_get_device_by_id(DEVMAN* devman, UINT32 id);
DEVMAN* devman_new(rdpdrPlugin* rdpdr);
#include "devman.h"
#include "irp.h"
-static WIN32ERROR irp_free(IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT irp_free(IRP* irp)
{
if (!irp)
return CHANNEL_RC_OK;
return CHANNEL_RC_OK;
}
-static WIN32ERROR irp_complete(IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT irp_complete(IRP* irp)
{
int pos;
rdpdrPlugin* rdpdr;
- WIN32ERROR error;
+ UINT error;
rdpdr = (rdpdrPlugin*) irp->devman->plugin;
}
}
-WIN32ERROR rdpdr_send_capability_response(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpdr_send_capability_response(rdpdrPlugin* rdpdr)
{
wStream* s;
#include "rdpdr_main.h"
void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, wStream* s);
-WIN32ERROR rdpdr_send_capability_response(rdpdrPlugin* rdpdr);
+UINT rdpdr_send_capability_response(rdpdrPlugin* rdpdr);
#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_CAPABILITIES_H */
char* path;
};
-static WIN32ERROR rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL userLoggedOn);
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL userLoggedOn);
-static WIN32ERROR rdpdr_send_device_list_remove_request(rdpdrPlugin* rdpdr, UINT32 count, UINT32 ids[])
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_send_device_list_remove_request(rdpdrPlugin* rdpdr, UINT32 count, UINT32 ids[])
{
UINT32 i;
wStream* s;
{
rdpdrPlugin *rdpdr;
PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)lParam;
- WIN32ERROR error;
+ UINT error;
rdpdr = (rdpdrPlugin *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
return NULL;
}
-static WIN32ERROR drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (rdpdr->hotplug_wnd && !PostMessage(rdpdr->hotplug_wnd, WM_QUIT, 0, 0))
{
error = GetLastError();
return word;
}
-static WIN32ERROR handle_hotplug(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT handle_hotplug(rdpdrPlugin* rdpdr)
{
FILE *f;
size_t len;
DEVICE_DRIVE_EXT *device_ext;
ULONG_PTR *keys;
UINT32 ids[1];
- WIN32ERROR error;
+ UINT error;
f = fopen("/proc/mounts", "r");
if (f == NULL)
fd_set rfds;
struct timeval tv;
int rv;
- WIN32ERROR error;
+ UINT error;
DWORD status;
rdpdr = (rdpdrPlugin*) arg;
return NULL;
}
-static WIN32ERROR drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr)
{
- WIN32ERROR error;
+ UINT error;
if (rdpdr->hotplugThread)
{
if (rdpdr->stopEvent)
#endif
-static WIN32ERROR rdpdr_process_connect(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_process_connect(rdpdrPlugin* rdpdr)
{
UINT32 index;
RDPDR_DEVICE* device;
rdpSettings* settings;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
rdpdr->devman = devman_new(rdpdr);
if (!rdpdr->devman)
rdpdr->sequenceId++;
}
-static WIN32ERROR rdpdr_send_client_announce_reply(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_send_client_announce_reply(rdpdrPlugin* rdpdr)
{
wStream* s;
return rdpdr_send(rdpdr, s);
}
-static WIN32ERROR rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
{
wStream* s;
WCHAR* computerNameW = NULL;
}
}
-static WIN32ERROR rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL userLoggedOn)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL userLoggedOn)
{
int i;
BYTE c;
return rdpdr_send(rdpdr, s);
}
-static WIN32ERROR rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* s)
{
IRP* irp;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
irp = irp_new(rdpdr->devman, s);
return error;
}
-static WIN32ERROR rdpdr_process_init(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_process_init(rdpdrPlugin* rdpdr)
{
int index;
int keyCount;
DEVICE* device;
ULONG_PTR* pKeys;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
pKeys = NULL;
keyCount = ListDictionary_GetKeys(rdpdr->devman->devices, &pKeys);
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
{
UINT16 component;
UINT16 packetId;
UINT32 deviceId;
UINT32 status;
- WIN32ERROR error;
+ UINT error;
Stream_Read_UINT16(s, component); /* Component (2 bytes) */
Stream_Read_UINT16(s, packetId); /* PacketId (2 bytes) */
static wListDictionary* g_InitHandles = NULL;
static wListDictionary* g_OpenHandles = NULL;
-WIN32ERROR rdpdr_add_init_handle_data(void* pInitHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpdr_add_init_handle_data(void* pInitHandle, void* pUserData)
{
if (!g_InitHandles)
{
}
}
-WIN32ERROR rdpdr_add_open_handle_data(DWORD openHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpdr_add_open_handle_data(DWORD openHandle, void* pUserData)
{
void* pOpenHandle = (void*) (size_t) openHandle;
}
}
-WIN32ERROR rdpdr_send(rdpdrPlugin* rdpdr, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpdr_send(rdpdrPlugin* rdpdr, wStream* s)
{
- WIN32ERROR status;
+ UINT status;
rdpdrPlugin* plugin = (rdpdrPlugin*) rdpdr;
if (!plugin)
return status;
}
-static WIN32ERROR rdpdr_virtual_channel_event_data_received(rdpdrPlugin* rdpdr,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_virtual_channel_event_data_received(rdpdrPlugin* rdpdr,
void* pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
wStream* data_in;
LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
rdpdrPlugin* rdpdr;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
rdpdr = (rdpdrPlugin*) rdpdr_get_open_handle_data(openHandle);
wStream* data;
wMessage message;
rdpdrPlugin* rdpdr = (rdpdrPlugin*) arg;
- WIN32ERROR error;
+ UINT error;
if ((error = rdpdr_process_connect(rdpdr)))
{
return NULL;
}
-static WIN32ERROR rdpdr_virtual_channel_event_connected(rdpdrPlugin* rdpdr, LPVOID pData, UINT32 dataLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_virtual_channel_event_connected(rdpdrPlugin* rdpdr, LPVOID pData, UINT32 dataLength)
{
UINT32 status;
- WIN32ERROR error;
+ UINT error;
status = rdpdr->channelEntryPoints.pVirtualChannelOpen(rdpdr->InitHandle,
&rdpdr->OpenHandle, rdpdr->channelDef.name, rdpdr_virtual_channel_open_event);
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_virtual_channel_event_disconnected(rdpdrPlugin* rdpdr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_virtual_channel_event_disconnected(rdpdrPlugin* rdpdr)
{
- WIN32ERROR error;
+ UINT error;
if (MessageQueue_PostQuit(rdpdr->queue, 0) && (WaitForSingleObject(rdpdr->thread, INFINITE) == WAIT_FAILED))
{
static VOID VCAPITYPE rdpdr_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
rdpdrPlugin* rdpdr;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
rdpdr = (rdpdrPlugin*) rdpdr_get_init_handle_data(pInitHandle);
rdpContext* rdpcontext;
};
-WIN32ERROR rdpdr_send(rdpdrPlugin* rdpdr, wStream* s);
+UINT rdpdr_send(rdpdrPlugin* rdpdr, wStream* s);
#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H */
return irp;
}
-static WIN32ERROR rdpdr_server_send_announce_request(RdpdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_announce_request(RdpdrServerContext* context)
{
wStream* s;
BOOL status;
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_receive_announce_response(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_receive_announce_response(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
{
UINT32 ClientId;
UINT16 VersionMajor;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_receive_client_name_request(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_receive_client_name_request(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
{
UINT32 UnicodeFlag;
UINT32 ComputerNameLen;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_read_capability_set_header(wStream* s, RDPDR_CAPABILITY_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_read_capability_set_header(wStream* s, RDPDR_CAPABILITY_HEADER* header)
{
if (Stream_GetRemainingLength(s) < 8)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_write_capability_set_header(wStream* s, RDPDR_CAPABILITY_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_write_capability_set_header(wStream* s, RDPDR_CAPABILITY_HEADER* header)
{
if (!Stream_EnsureRemainingCapacity(s, 8))
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_read_general_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_read_general_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
{
UINT32 ioCode1;
UINT32 extraFlags1;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_write_general_capability_set(RdpdrServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_write_general_capability_set(RdpdrServerContext* context, wStream* s)
{
UINT32 ioCode1;
UINT32 extendedPdu;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_read_printer_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_read_printer_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_write_printer_capability_set(RdpdrServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_write_printer_capability_set(RdpdrServerContext* context, wStream* s)
{
RDPDR_CAPABILITY_HEADER header;
return rdpdr_server_write_capability_set_header(s, &header);
}
-static WIN32ERROR rdpdr_server_read_port_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_read_port_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_write_port_capability_set(RdpdrServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_write_port_capability_set(RdpdrServerContext* context, wStream* s)
{
RDPDR_CAPABILITY_HEADER header;
return rdpdr_server_write_capability_set_header(s, &header);
}
-static WIN32ERROR rdpdr_server_read_drive_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_read_drive_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_write_drive_capability_set(RdpdrServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_write_drive_capability_set(RdpdrServerContext* context, wStream* s)
{
RDPDR_CAPABILITY_HEADER header;
return rdpdr_server_write_capability_set_header(s, &header);
}
-static WIN32ERROR rdpdr_server_read_smartcard_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_read_smartcard_capability_set(RdpdrServerContext* context, wStream* s, RDPDR_CAPABILITY_HEADER* header)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_write_smartcard_capability_set(RdpdrServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_write_smartcard_capability_set(RdpdrServerContext* context, wStream* s)
{
RDPDR_CAPABILITY_HEADER header;
return rdpdr_server_write_capability_set_header(s, &header);
}
-static WIN32ERROR rdpdr_server_send_core_capability_request(RdpdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext* context)
{
wStream* s;
BOOL status;
RDPDR_HEADER header;
UINT16 numCapabilities;
ULONG written;
- WIN32ERROR error;
+ UINT error;
WLog_DBG(TAG, "RdpdrServerSendCoreCapabilityRequest");
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_receive_core_capability_response(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_receive_core_capability_response(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
{
int i;
- WIN32ERROR status;
+ UINT status;
UINT16 numCapabilities;
RDPDR_CAPABILITY_HEADER capabilityHeader;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_send_client_id_confirm(RdpdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_client_id_confirm(RdpdrServerContext* context)
{
wStream* s;
BOOL status;
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_receive_device_list_announce_request(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_receive_device_list_announce_request(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
{
int i;
UINT32 DeviceCount;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_receive_device_list_remove_request(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_receive_device_list_remove_request(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
{
int i;
UINT32 DeviceCount;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_receive_device_io_completion(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_receive_device_io_completion(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
{
UINT32 deviceId;
UINT32 completionId;
UINT32 ioStatus;
RDPDR_IRP* irp;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 12)
{
return error;
}
-static WIN32ERROR rdpdr_server_send_user_logged_on(RdpdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_user_logged_on(RdpdrServerContext* context)
{
wStream* s;
BOOL status;
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, RDPDR_HEADER* header)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "RdpdrServerReceivePdu: Component: 0x%04X PacketId: 0x%04X",
header->Component, header->PacketId);
HANDLE ChannelEvent;
DWORD BytesReturned;
RdpdrServerContext* context;
- WIN32ERROR error;
+ UINT error;
context = (RdpdrServerContext*) arg;
buffer = NULL;
return NULL;
}
-static WIN32ERROR rdpdr_server_start(RdpdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_start(RdpdrServerContext* context)
{
context->priv->ChannelHandle = WTSVirtualChannelOpen(context->vcm, WTS_CURRENT_SESSION, "rdpdr");
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_stop(RdpdrServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_stop(RdpdrServerContext* context)
{
- WIN32ERROR error;
+ UINT error;
if (context->priv->StopEvent)
{
SetEvent(context->priv->StopEvent);
Stream_Write_UINT32(s, minorFunction); /* MinorFunction (4 bytes) */
}
-static WIN32ERROR rdpdr_server_read_file_directory_information(wStream* s, FILE_DIRECTORY_INFORMATION* fdi)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_read_file_directory_information(wStream* s, FILE_DIRECTORY_INFORMATION* fdi)
{
UINT32 fileNameLength;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_send_device_create_request(
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_device_create_request(
RdpdrServerContext* context,
UINT32 deviceId,
UINT32 completionId,
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_send_device_close_request(
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_device_close_request(
RdpdrServerContext* context,
UINT32 deviceId,
UINT32 fileId,
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_send_device_read_request(
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_device_read_request(
RdpdrServerContext* context,
UINT32 deviceId,
UINT32 fileId,
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_send_device_write_request(
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_device_write_request(
RdpdrServerContext* context,
UINT32 deviceId,
UINT32 fileId,
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_send_device_query_directory_request(
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_device_query_directory_request(
RdpdrServerContext* context,
UINT32 deviceId,
UINT32 fileId,
return status? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpdr_server_send_device_file_rename_request(
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_send_device_file_rename_request(
RdpdrServerContext* context,
UINT32 deviceId,
UINT32 fileId,
* Drive Create Directory
************************************************/
-static WIN32ERROR rdpdr_server_drive_create_directory_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_create_directory_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
WLog_DBG(TAG, "RdpdrServerDriveCreateDirectoryCallback2: deviceId=%d, completionId=%d, ioStatus=0x%x",
deviceId, completionId, ioStatus);
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_create_directory_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_create_directory_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 fileId;
UINT8 information;
return rdpdr_server_send_device_close_request(context, deviceId, fileId, irp->CompletionId);
}
-static WIN32ERROR rdpdr_server_drive_create_directory(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_create_directory(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path)
{
RDPDR_IRP* irp;
* Drive Delete Directory
************************************************/
-static WIN32ERROR rdpdr_server_drive_delete_directory_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_delete_directory_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
WLog_DBG(TAG, "RdpdrServerDriveDeleteDirectoryCallback2: deviceId=%d, completionId=%d, ioStatus=0x%x",
deviceId, completionId, ioStatus);
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_delete_directory_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_delete_directory_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 fileId;
UINT8 information;
return rdpdr_server_send_device_close_request(context, deviceId, fileId, irp->CompletionId);
}
-static WIN32ERROR rdpdr_server_drive_delete_directory(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_delete_directory(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path)
{
RDPDR_IRP* irp;
* Drive Query Directory
************************************************/
-static WIN32ERROR rdpdr_server_drive_query_directory_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_query_directory_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
- WIN32ERROR error;
+ UINT error;
UINT32 length;
FILE_DIRECTORY_INFORMATION fdi;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_query_directory_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_query_directory_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 fileId;
return rdpdr_server_send_device_query_directory_request(context, deviceId, fileId, irp->CompletionId, irp->PathName);
}
-static WIN32ERROR rdpdr_server_drive_query_directory(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_query_directory(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path)
{
RDPDR_IRP* irp;
* Drive Open File
************************************************/
-static WIN32ERROR rdpdr_server_drive_open_file_callback(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_open_file_callback(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 fileId;
UINT8 information;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_open_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path, UINT32 desiredAccess, UINT32 createDisposition)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_open_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path, UINT32 desiredAccess, UINT32 createDisposition)
{
RDPDR_IRP* irp;
* Drive Read File
************************************************/
-static WIN32ERROR rdpdr_server_drive_read_file_callback(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_read_file_callback(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 length;
char* buffer = NULL;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_read_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId, UINT32 length, UINT32 offset)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_read_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId, UINT32 length, UINT32 offset)
{
RDPDR_IRP* irp;
* Drive Write File
************************************************/
-static WIN32ERROR rdpdr_server_drive_write_file_callback(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_write_file_callback(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 length;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_write_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId, const char* buffer, UINT32 length, UINT32 offset)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_write_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId, const char* buffer, UINT32 length, UINT32 offset)
{
RDPDR_IRP* irp;
* Drive Close File
************************************************/
-static WIN32ERROR rdpdr_server_drive_close_file_callback(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_close_file_callback(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
WLog_DBG(TAG, "RdpdrServerDriveCloseFileCallback: deviceId=%d, completionId=%d, ioStatus=0x%x",
deviceId, completionId, ioStatus);
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_close_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_close_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId)
{
RDPDR_IRP* irp;
* Drive Delete File
************************************************/
-static WIN32ERROR rdpdr_server_drive_delete_file_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_delete_file_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
WLog_DBG(TAG, "RdpdrServerDriveDeleteFileCallback2: deviceId=%d, completionId=%d, ioStatus=0x%x",
deviceId, completionId, ioStatus);
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_delete_file_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_delete_file_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 fileId;
UINT8 information;
return rdpdr_server_send_device_close_request(context, deviceId, fileId, irp->CompletionId);
}
-static WIN32ERROR rdpdr_server_drive_delete_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_delete_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path)
{
RDPDR_IRP* irp;
* Drive Rename File
************************************************/
-static WIN32ERROR rdpdr_server_drive_rename_file_callback3(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_rename_file_callback3(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
WLog_DBG(TAG, "RdpdrServerDriveRenameFileCallback3: deviceId=%d, completionId=%d, ioStatus=0x%x",
deviceId, completionId, ioStatus);
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpdr_server_drive_rename_file_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_rename_file_callback2(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 length;
return rdpdr_server_send_device_close_request(context, deviceId, irp->FileId, irp->CompletionId);
}
-static WIN32ERROR rdpdr_server_drive_rename_file_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_rename_file_callback1(RdpdrServerContext* context, wStream* s, RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
{
UINT32 fileId;
UINT8 information;
return rdpdr_server_send_device_file_rename_request(context, deviceId, fileId, irp->CompletionId, irp->ExtraBuffer);
}
-static WIN32ERROR rdpdr_server_drive_rename_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* oldPath, const char* newPath)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpdr_server_drive_rename_file(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* oldPath, const char* newPath)
{
RDPDR_IRP* irp;
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
-#include <winpr/win32error.h>
#include <freerdp/settings.h>
#include <freerdp/server/rdpdr.h>
char PathName[256];
char ExtraBuffer[256];
void *CallbackData;
- WIN32ERROR (*Callback)(RdpdrServerContext* context, wStream* s, struct _RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus);
+ UINT (*Callback)(RdpdrServerContext* context, wStream* s, struct _RDPDR_IRP* irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus);
};
typedef struct _RDPDR_IRP RDPDR_IRP;
};
typedef struct _RDPEI_PLUGIN RDPEI_PLUGIN;
-WIN32ERROR rdpei_send_frame(RdpeiClientContext* context);
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_send_frame(RdpeiClientContext* context);
const char* RDPEI_EVENTID_STRINGS[] =
{
"EVENTID_DISMISS_HOVERING_CONTACT"
};
-WIN32ERROR rdpei_add_frame(RdpeiClientContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_add_frame(RdpeiClientContext* context)
{
int i;
RDPINPUT_CONTACT_DATA* contact;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*) arg;
RdpeiClientContext* context = (RdpeiClientContext*) rdpei->iface.pInterface;
HANDLE hdl[] = {rdpei->event, rdpei->stopEvent};
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (!rdpei)
{
return NULL;
}
-WIN32ERROR rdpei_send_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s, UINT16 eventId, UINT32 pduLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_send_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s, UINT16 eventId, UINT32 pduLength)
{
- WIN32ERROR status;
+ UINT status;
Stream_SetPosition(s, 0);
Stream_Write_UINT16(s, eventId); /* eventId (2 bytes) */
return status;
}
-WIN32ERROR rdpei_send_cs_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_send_cs_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback)
{
- WIN32ERROR status;
+ UINT status;
wStream* s;
UINT32 flags;
UINT32 pduLength;
WLog_DBG(TAG, " CONTACT_FLAG_CANCELED");
}
-WIN32ERROR rdpei_write_touch_frame(wStream* s, RDPINPUT_TOUCH_FRAME* frame)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_write_touch_frame(wStream* s, RDPINPUT_TOUCH_FRAME* frame)
{
UINT32 index;
int rectSize = 2;
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback, RDPINPUT_TOUCH_FRAME* frame)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback, RDPINPUT_TOUCH_FRAME* frame)
{
- WIN32ERROR status;
+ UINT status;
wStream* s;
UINT32 pduLength;
return status;
}
-WIN32ERROR rdpei_recv_sc_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_recv_sc_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
{
UINT32 protocolVersion;
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpei_recv_suspend_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_recv_suspend_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
{
RdpeiClientContext* rdpei = (RdpeiClientContext*) callback->plugin->pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
IFCALLRET(rdpei->SuspendTouch, error, rdpei);
if (error)
return error;
}
-WIN32ERROR rdpei_recv_resume_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_recv_resume_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
{
RdpeiClientContext* rdpei = (RdpeiClientContext*) callback->plugin->pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
IFCALLRET(rdpei->ResumeTouch, error, rdpei);
if (error)
return error;
}
-WIN32ERROR rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
{
UINT16 eventId;
UINT32 pduLength;
- WIN32ERROR error;
+ UINT error;
Stream_Read_UINT16(s, eventId); /* eventId (2 bytes) */
Stream_Read_UINT32(s, pduLength); /* pduLength (4 bytes) */
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpei_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpei_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
{
RDPEI_CHANNEL_CALLBACK* callback = (RDPEI_CHANNEL_CALLBACK*) pChannelCallback;
return rdpei_recv_pdu(callback, data);
}
-static WIN32ERROR rdpei_on_close(IWTSVirtualChannelCallback* pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpei_on_close(IWTSVirtualChannelCallback* pChannelCallback)
{
RDPEI_CHANNEL_CALLBACK* callback = (RDPEI_CHANNEL_CALLBACK*) pChannelCallback;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpei_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpei_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel* pChannel, BYTE* Data, int* pbAccept,
IWTSVirtualChannelCallback** ppCallback)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpei_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpei_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
{
- WIN32ERROR error;
+ UINT error;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*) pPlugin;
rdpei->listener_callback = (RDPEI_LISTENER_CALLBACK*) calloc(1 ,sizeof(RDPEI_LISTENER_CALLBACK));
return error;
}
-static WIN32ERROR rdpei_plugin_terminated(IWTSPlugin* pPlugin)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpei_plugin_terminated(IWTSPlugin* pPlugin)
{
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*) pPlugin;
- WIN32ERROR error;
+ UINT error;
if (!pPlugin)
return ERROR_INVALID_PARAMETER;
return rdpei->version;
}
-WIN32ERROR rdpei_send_frame(RdpeiClientContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_send_frame(RdpeiClientContext* context)
{
UINT64 currentTime;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*) context->handle;
RDPEI_CHANNEL_CALLBACK* callback = rdpei->listener_callback->channel_callback;
- WIN32ERROR error;
+ UINT error;
currentTime = GetTickCount64();
return error;
}
-WIN32ERROR rdpei_add_contact(RdpeiClientContext* context, RDPINPUT_CONTACT_DATA* contact)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_add_contact(RdpeiClientContext* context, RDPINPUT_CONTACT_DATA* contact)
{
RDPINPUT_CONTACT_POINT* contactPoint;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*) context->handle;
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpei_touch_begin(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_touch_begin(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
{
unsigned int i;
int contactIdlocal = -1;
RDPINPUT_CONTACT_DATA contact;
RDPINPUT_CONTACT_POINT* contactPoint = NULL;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*) context->handle;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
/* Create a new contact point in an empty slot */
return error;
}
-WIN32ERROR rdpei_touch_update(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_touch_update(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
{
unsigned int i;
int contactIdlocal = -1;
RDPINPUT_CONTACT_DATA contact;
RDPINPUT_CONTACT_POINT* contactPoint = NULL;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*) context->handle;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
for (i = 0; i < rdpei->maxTouchContacts; i++)
{
return error;
}
-WIN32ERROR rdpei_touch_end(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_touch_end(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
{
unsigned int i;
int contactIdlocal = -1;
RDPINPUT_CONTACT_DATA contact;
RDPINPUT_CONTACT_POINT* contactPoint = NULL;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*) context->handle;
- WIN32ERROR error;
+ UINT error;
for (i = 0; i < rdpei->maxTouchContacts; i++)
{
#define DVCPluginEntry rdpei_DVCPluginEntry
#endif
-WIN32ERROR DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
- WIN32ERROR error;
+ UINT error;
RDPEI_PLUGIN* rdpei = NULL;
RdpeiClientContext* context = NULL;
return NULL;
}
-WIN32ERROR rdpei_server_init(RdpeiServerContext *context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_server_init(RdpeiServerContext *context)
{
void *buffer = NULL;
DWORD bytesReturned;
}
-static WIN32ERROR read_cs_ready_message(RdpeiServerContext *context, wStream *s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT read_cs_ready_message(RdpeiServerContext *context, wStream *s)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 10)
{
WLog_ERR(TAG, "Not enought data!");
return error;
}
-static WIN32ERROR read_touch_contact_data(RdpeiServerContext *context, wStream *s, RDPINPUT_CONTACT_DATA *contactData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT read_touch_contact_data(RdpeiServerContext *context, wStream *s, RDPINPUT_CONTACT_DATA *contactData)
{
if (Stream_GetRemainingLength(s) < 1)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR read_touch_frame(RdpeiServerContext *context, wStream *s, RDPINPUT_TOUCH_FRAME *frame)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT read_touch_frame(RdpeiServerContext *context, wStream *s, RDPINPUT_TOUCH_FRAME *frame)
{
int i;
RDPINPUT_CONTACT_DATA *contact;
- WIN32ERROR error;
+ UINT error;
if (!rdpei_read_2byte_unsigned(s, &frame->contactCount) || !rdpei_read_8byte_unsigned(s, &frame->frameOffset))
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR read_touch_event(RdpeiServerContext *context, wStream *s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT read_touch_event(RdpeiServerContext *context, wStream *s)
{
UINT32 frameCount;
int i;
RDPINPUT_TOUCH_EVENT *event = &context->priv->touchEvent;
RDPINPUT_TOUCH_FRAME *frame;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (!rdpei_read_4byte_unsigned(s, &event->encodeTime) || !rdpei_read_2byte_unsigned(s, &frameCount))
{
}
-static WIN32ERROR read_dismiss_hovering_contact(RdpeiServerContext *context, wStream *s) {
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT read_dismiss_hovering_contact(RdpeiServerContext *context, wStream *s) {
BYTE contactId;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 1)
{
}
-WIN32ERROR rdpei_server_handle_messages(RdpeiServerContext *context) {
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_server_handle_messages(RdpeiServerContext *context) {
DWORD bytesReturned;
RdpeiServerPrivate *priv = context->priv;
wStream *s = priv->inputStream;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (!WTSVirtualChannelRead(priv->channelHandle, 0, (PCHAR)Stream_Pointer(s), priv->expectedBytes, &bytesReturned))
{
}
-WIN32ERROR rdpei_server_send_sc_ready(RdpeiServerContext *context, UINT32 version)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_server_send_sc_ready(RdpeiServerContext *context, UINT32 version)
{
ULONG written;
RdpeiServerPrivate *priv = context->priv;
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpei_server_suspend(RdpeiServerContext *context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_server_suspend(RdpeiServerContext *context)
{
ULONG written;
RdpeiServerPrivate *priv = context->priv;
}
-WIN32ERROR rdpei_server_resume(RdpeiServerContext *context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpei_server_resume(RdpeiServerContext *context)
{
ULONG written;
RdpeiServerPrivate *priv = context->priv;
#define TAG CHANNELS_TAG("rdpgfx.client")
-WIN32ERROR rdpgfx_decode_uncompressed(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_decode_uncompressed(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_decode_remotefx(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_decode_remotefx(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_decode_clear(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_decode_clear(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_decode_planar(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_decode_planar(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s, RDPGFX_H264_METABLOCK* meta)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s, RDPGFX_H264_METABLOCK* meta)
{
UINT32 index;
RDPGFX_RECT16* regionRect;
RDPGFX_H264_QUANT_QUALITY* quantQualityVal;
- WIN32ERROR error;
+ UINT error;
meta->regionRects = NULL;
meta->quantQualityVals = NULL;
return error;
}
-WIN32ERROR rdpgfx_decode_h264(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_decode_h264(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
- WIN32ERROR error;
+ UINT error;
wStream* s;
RDPGFX_H264_BITMAP_STREAM h264;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
return error;
}
-WIN32ERROR rdpgfx_decode_alpha(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_decode_alpha(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_decode_progressive(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_decode_progressive(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
switch (cmd->codecId)
{
#include "rdpgfx_main.h"
-WIN32ERROR rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd);
+UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd);
#endif /* FREERDP_CHANNEL_RDPGFX_CLIENT_CODEC_H */
return "RDPGFX_CODECID_UNKNOWN";
}
-WIN32ERROR rdpgfx_read_header(wStream* s, RDPGFX_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_read_header(wStream* s, RDPGFX_HEADER* header)
{
if (Stream_GetRemainingLength(s) < 8)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_write_header(wStream* s, RDPGFX_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_write_header(wStream* s, RDPGFX_HEADER* header)
{
Stream_Write_UINT16(s, header->cmdId); /* cmdId (2 bytes) */
Stream_Write_UINT16(s, header->flags); /* flags (2 bytes) */
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16)
{
if (Stream_GetRemainingLength(s) < 4)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16)
{
Stream_Write_UINT16(s, point16->x); /* x (2 bytes) */
Stream_Write_UINT16(s, point16->y); /* y (2 bytes) */
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_read_rect16(wStream* s, RDPGFX_RECT16* rect16)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_read_rect16(wStream* s, RDPGFX_RECT16* rect16)
{
if (Stream_GetRemainingLength(s) < 8)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_write_rect16(wStream* s, RDPGFX_RECT16* rect16)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_write_rect16(wStream* s, RDPGFX_RECT16* rect16)
{
Stream_Write_UINT16(s, rect16->left); /* left (2 bytes) */
Stream_Write_UINT16(s, rect16->top); /* top (2 bytes) */
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32)
{
if (Stream_GetRemainingLength(s) < 4)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32)
{
Stream_Write_UINT8(s, color32->B); /* B (1 byte) */
Stream_Write_UINT8(s, color32->G); /* G (1 byte) */
const char* rdpgfx_get_cmd_id_string(UINT16 cmdId);
const char* rdpgfx_get_codec_id_string(UINT16 codecId);
-WIN32ERROR rdpgfx_read_header(wStream* s, RDPGFX_HEADER* header);
-WIN32ERROR rdpgfx_write_header(wStream* s, RDPGFX_HEADER* header);
+UINT rdpgfx_read_header(wStream* s, RDPGFX_HEADER* header);
+UINT rdpgfx_write_header(wStream* s, RDPGFX_HEADER* header);
-WIN32ERROR rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16);
-WIN32ERROR rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16);
+UINT rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16);
+UINT rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16);
-WIN32ERROR rdpgfx_read_rect16(wStream* s, RDPGFX_RECT16* rect16);
-WIN32ERROR rdpgfx_write_rect16(wStream* s, RDPGFX_RECT16* rect16);
+UINT rdpgfx_read_rect16(wStream* s, RDPGFX_RECT16* rect16);
+UINT rdpgfx_write_rect16(wStream* s, RDPGFX_RECT16* rect16);
-WIN32ERROR rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32);
-WIN32ERROR rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32);
+UINT rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32);
+UINT rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32);
#endif /* FREERDP_CHANNEL_RDPGFX_CLIENT_COMMON_H */
#define TAG CHANNELS_TAG("rdpgfx.client")
-WIN32ERROR rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback)
{
- WIN32ERROR error;
+ UINT error;
wStream* s;
UINT16 index;
RDPGFX_PLUGIN* gfx;
return error;
}
-WIN32ERROR rdpgfx_recv_caps_confirm_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_caps_confirm_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_CAPSET capsSet;
UINT32 capsDataLength;
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_send_frame_acknowledge_pdu(RDPGFX_CHANNEL_CALLBACK* callback, RDPGFX_FRAME_ACKNOWLEDGE_PDU* pdu)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_send_frame_acknowledge_pdu(RDPGFX_CHANNEL_CALLBACK* callback, RDPGFX_FRAME_ACKNOWLEDGE_PDU* pdu)
{
- WIN32ERROR error;
+ UINT error;
wStream* s;
RDPGFX_HEADER header;
return error;
}
-WIN32ERROR rdpgfx_recv_reset_graphics_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_reset_graphics_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
int pad;
UINT32 index;
RDPGFX_RESET_GRAPHICS_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 12)
{
return error;
}
-WIN32ERROR rdpgfx_recv_evict_cache_entry_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_evict_cache_entry_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_EVICT_CACHE_ENTRY_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 2)
{
return error;
}
-WIN32ERROR rdpgfx_recv_cache_import_reply_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_cache_import_reply_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
UINT16 index;
RDPGFX_CACHE_IMPORT_REPLY_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 2)
{
return error;
}
-WIN32ERROR rdpgfx_recv_create_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_create_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_CREATE_SURFACE_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 7)
{
return error;
}
-WIN32ERROR rdpgfx_recv_delete_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_delete_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_DELETE_SURFACE_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 2)
{
return error;
}
-WIN32ERROR rdpgfx_recv_start_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_start_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_START_FRAME_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 8)
{
return error;
}
-WIN32ERROR rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_END_FRAME_PDU pdu;
RDPGFX_FRAME_ACKNOWLEDGE_PDU ack;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 4)
{
return error;
}
-WIN32ERROR rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_SURFACE_COMMAND cmd;
RDPGFX_WIRE_TO_SURFACE_PDU_1 pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error;
+ UINT error;
if (Stream_GetRemainingLength(s) < 17)
{
return error;
}
-WIN32ERROR rdpgfx_recv_wire_to_surface_2_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_wire_to_surface_2_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_SURFACE_COMMAND cmd;
RDPGFX_WIRE_TO_SURFACE_PDU_2 pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 13)
{
return error;
}
-WIN32ERROR rdpgfx_recv_delete_encoding_context_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_delete_encoding_context_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_DELETE_ENCODING_CONTEXT_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 6)
{
return error;
}
-WIN32ERROR rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
UINT16 index;
RDPGFX_RECT16* fillRect;
RDPGFX_SOLID_FILL_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error;
+ UINT error;
if (Stream_GetRemainingLength(s) < 8)
{
return error;
}
-WIN32ERROR rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
UINT16 index;
RDPGFX_POINT16* destPt;
RDPGFX_SURFACE_TO_SURFACE_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error;
+ UINT error;
if (Stream_GetRemainingLength(s) < 14)
{
return error;
}
-WIN32ERROR rdpgfx_recv_surface_to_cache_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_surface_to_cache_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_SURFACE_TO_CACHE_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error;
+ UINT error;
if (Stream_GetRemainingLength(s) < 20)
{
return error;
}
-WIN32ERROR rdpgfx_recv_cache_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_cache_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
UINT16 index;
RDPGFX_POINT16* destPt;
RDPGFX_CACHE_TO_SURFACE_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 6)
{
return error;
}
-WIN32ERROR rdpgfx_recv_map_surface_to_output_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_map_surface_to_output_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 12)
{
return error;
}
-WIN32ERROR rdpgfx_recv_map_surface_to_window_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_map_surface_to_window_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_MAP_SURFACE_TO_WINDOW_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 18)
{
return error;
}
-WIN32ERROR rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
int beg, end;
RDPGFX_HEADER header;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
- WIN32ERROR error;
+ UINT error;
beg = Stream_GetPosition(s);
return error;
}
-static WIN32ERROR rdpgfx_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream* data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpgfx_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream* data)
{
wStream* s;
int status = 0;
BYTE* pDstData = NULL;
RDPGFX_CHANNEL_CALLBACK* callback = (RDPGFX_CHANNEL_CALLBACK*) pChannelCallback;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
status = zgfx_decompress(gfx->zgfx, Stream_Pointer(data), Stream_GetRemainingLength(data), &pDstData, &DstSize, 0);
return error;
}
-static WIN32ERROR rdpgfx_on_open(IWTSVirtualChannelCallback* pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpgfx_on_open(IWTSVirtualChannelCallback* pChannelCallback)
{
RDPGFX_CHANNEL_CALLBACK* callback = (RDPGFX_CHANNEL_CALLBACK*) pChannelCallback;
return rdpgfx_send_caps_advertise_pdu(callback);
}
-static WIN32ERROR rdpgfx_on_close(IWTSVirtualChannelCallback* pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpgfx_on_close(IWTSVirtualChannelCallback* pChannelCallback)
{
int count;
int index;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpgfx_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpgfx_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel* pChannel, BYTE* Data, int* pbAccept,
IWTSVirtualChannelCallback** ppCallback)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpgfx_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpgfx_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
{
- WIN32ERROR error;
+ UINT error;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) pPlugin;
gfx->listener_callback = (RDPGFX_LISTENER_CALLBACK*) calloc(1, sizeof(RDPGFX_LISTENER_CALLBACK));
return error;
}
-static WIN32ERROR rdpgfx_plugin_terminated(IWTSPlugin* pPlugin)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpgfx_plugin_terminated(IWTSPlugin* pPlugin)
{
int count;
int index;
ULONG_PTR* pKeys = NULL;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) pPlugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "Terminated");
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_set_surface_data(RdpgfxClientContext* context, UINT16 surfaceId, void* pData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_set_surface_data(RdpgfxClientContext* context, UINT16 surfaceId, void* pData)
{
ULONG_PTR key;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) context->handle;
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpgfx_get_surface_ids(RdpgfxClientContext* context, UINT16** ppSurfaceIds, UINT16* count_out)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_get_surface_ids(RdpgfxClientContext* context, UINT16** ppSurfaceIds, UINT16* count_out)
{
int count;
int index;
return pData;
}
-WIN32ERROR rdpgfx_set_cache_slot_data(RdpgfxClientContext* context, UINT16 cacheSlot, void* pData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpgfx_set_cache_slot_data(RdpgfxClientContext* context, UINT16 cacheSlot, void* pData)
{
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) context->handle;
#define DVCPluginEntry rdpgfx_DVCPluginEntry
#endif
-WIN32ERROR DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
RDPGFX_PLUGIN* gfx;
RdpgfxClientContext* context;
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR rdpsnd_alsa_parse_addin_args(rdpsndDevicePlugin* device, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_alsa_parse_addin_args(rdpsndDevicePlugin* device, ADDIN_ARGV* args)
{
int status;
DWORD flags;
#define freerdp_rdpsnd_client_subsystem_entry alsa_freerdp_rdpsnd_client_subsystem_entry
#endif
-WIN32ERROR freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
rdpsndAlsaPlugin* alsa;
- WIN32ERROR error;
+ UINT error;
alsa = (rdpsndAlsaPlugin*) calloc(1, sizeof(rdpsndAlsaPlugin));
if (!alsa)
#include <freerdp/types.h>
#include <freerdp/codec/dsp.h>
-#include <winpr/win32error.h>
#import <AudioToolbox/AudioToolbox.h>
#define freerdp_rdpsnd_client_subsystem_entry ios_freerdp_rdpsnd_client_subsystem_entry
#endif
-WIN32ERROR freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
{
rdpsndIOSPlugin* p = (rdpsndIOSPlugin*) calloc(1, sizeof(rdpsndIOSPlugin));
#include <freerdp/types.h>
#include <freerdp/codec/dsp.h>
-#include <winpr/win32error.h>
#include <AudioToolbox/AudioToolbox.h>
#include <AudioToolbox/AudioQueue.h>
#define freerdp_rdpsnd_client_subsystem_entry mac_freerdp_rdpsnd_client_subsystem_entry
#endif
-WIN32ERROR freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
{
rdpsndMacPlugin* mac;
#include <winpr/cmdline.h>
#include <winpr/sysinfo.h>
#include <winpr/collections.h>
-#include <winpr/win32error.h>
#include <freerdp/types.h>
#include <freerdp/codec/dsp.h>
opensles_freerdp_rdpsnd_client_subsystem_entry
#endif
-WIN32ERROR freerdp_rdpsnd_client_subsystem_entry(
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
rdpsndopenslesPlugin* opensles;
- WIN32ERROR error;
+ UINT error;
DEBUG_SND("pEntryPoints=%p", pEntryPoints);
#define freerdp_rdpsnd_client_subsystem_entry oss_freerdp_rdpsnd_client_subsystem_entry
#endif
-WIN32ERROR freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
rdpsndOssPlugin* oss;
#include <freerdp/types.h>
#include <freerdp/codec/dsp.h>
-#include <winpr/win32error.h>
#include "rdpsnd_main.h"
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR rdpsnd_pulse_parse_addin_args(rdpsndDevicePlugin* device, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_pulse_parse_addin_args(rdpsndDevicePlugin* device, ADDIN_ARGV* args)
{
int status;
DWORD flags;
#define freerdp_rdpsnd_client_subsystem_entry pulse_freerdp_rdpsnd_client_subsystem_entry
#endif
-WIN32ERROR freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
rdpsndPulsePlugin* pulse;
- WIN32ERROR ret;
+ UINT ret;
pulse = (rdpsndPulsePlugin*) calloc(1, sizeof(rdpsndPulsePlugin));
if (!pulse)
rdpContext* rdpcontext;
};
-static WIN32ERROR rdpsnd_confirm_wave(rdpsndPlugin* rdpsnd, RDPSND_WAVE* wave);
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_confirm_wave(rdpsndPlugin* rdpsnd, RDPSND_WAVE* wave);
static void* rdpsnd_schedule_thread(void* arg)
{
RDPSND_WAVE* wave;
rdpsndPlugin* rdpsnd = (rdpsndPlugin*) arg;
HANDLE events[2];
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DWORD status;
events[0] = MessageQueue_Event(rdpsnd->MsgPipe->Out);
return NULL;
}
-WIN32ERROR rdpsnd_send_quality_mode_pdu(rdpsndPlugin* rdpsnd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_send_quality_mode_pdu(rdpsndPlugin* rdpsnd)
{
wStream* pdu;
#endif
}
-WIN32ERROR rdpsnd_send_client_audio_formats(rdpsndPlugin* rdpsnd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_send_client_audio_formats(rdpsndPlugin* rdpsnd)
{
int index;
wStream* pdu;
return rdpsnd_virtual_channel_write(rdpsnd, pdu);
}
-WIN32ERROR rdpsnd_recv_server_audio_formats_pdu(rdpsndPlugin* rdpsnd, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_recv_server_audio_formats_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
int index;
UINT16 wVersion;
AUDIO_FORMAT* format;
UINT16 wNumberOfFormats;
- WIN32ERROR ret = ERROR_BAD_LENGTH;
+ UINT ret = ERROR_BAD_LENGTH;
rdpsnd_free_audio_formats(rdpsnd->ServerFormats, rdpsnd->NumberOfServerFormats);
rdpsnd->NumberOfServerFormats = 0;
return ret;
}
-WIN32ERROR rdpsnd_send_training_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, UINT16 wPackSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_send_training_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, UINT16 wPackSize)
{
wStream* pdu;
return rdpsnd_virtual_channel_write(rdpsnd, pdu);
}
-static WIN32ERROR rdpsnd_recv_training_pdu(rdpsndPlugin* rdpsnd, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_recv_training_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
UINT16 wTimeStamp;
UINT16 wPackSize;
return rdpsnd_send_training_confirm_pdu(rdpsnd, wTimeStamp, wPackSize);
}
-static WIN32ERROR rdpsnd_recv_wave_info_pdu(rdpsndPlugin* rdpsnd, wStream* s, UINT16 BodySize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_recv_wave_info_pdu(rdpsndPlugin* rdpsnd, wStream* s, UINT16 BodySize)
{
UINT16 wFormatNo;
AUDIO_FORMAT* format;
return CHANNEL_RC_OK;
}
-WIN32ERROR rdpsnd_send_wave_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, BYTE cConfirmedBlockNo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_send_wave_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, BYTE cConfirmedBlockNo)
{
wStream* pdu;
return rdpsnd_virtual_channel_write(rdpsnd, pdu);
}
-WIN32ERROR rdpsnd_confirm_wave(rdpsndPlugin* rdpsnd, RDPSND_WAVE* wave)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_confirm_wave(rdpsndPlugin* rdpsnd, RDPSND_WAVE* wave)
{
WLog_Print(rdpsnd->log, WLOG_DEBUG, "WaveConfirm: cBlockNo: %d wTimeStamp: %d wTimeDiff: %d",
wave->cBlockNo, wave->wTimeStampB, wave->wTimeStampB - wave->wTimeStampA);
return rdpsnd_send_wave_confirm_pdu(rdpsnd, wave->wTimeStampB, wave->cBlockNo);
}
-static WIN32ERROR rdpsnd_device_send_wave_confirm_pdu(rdpsndDevicePlugin* device, RDPSND_WAVE* wave)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_device_send_wave_confirm_pdu(rdpsndDevicePlugin* device, RDPSND_WAVE* wave)
{
if (device->DisableConfirmThread)
return rdpsnd_confirm_wave(device->rdpsnd, wave);
}
-static WIN32ERROR rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
int size;
BYTE* data;
RDPSND_WAVE* wave;
AUDIO_FORMAT* format;
- WIN32ERROR status;
+ UINT status;
rdpsnd->expectingWave = FALSE;
rdpsnd->isOpen = FALSE;
}
-static WIN32ERROR rdpsnd_recv_volume_pdu(rdpsndPlugin* rdpsnd, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_recv_volume_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
UINT32 dwVolume;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpsnd_recv_pdu(rdpsndPlugin* rdpsnd, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_recv_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
BYTE msgType;
UINT16 BodySize;
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
if (rdpsnd->expectingWave)
{
device->WaveConfirm = rdpsnd_device_send_wave_confirm_pdu;
}
-static WIN32ERROR rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name, ADDIN_ARGV* args)
{
PFREERDP_RDPSND_DEVICE_ENTRY entry;
FREERDP_RDPSND_DEVICE_ENTRY_POINTS entryPoints;\
- WIN32ERROR error;
+ UINT error;
entry = (PFREERDP_RDPSND_DEVICE_ENTRY) freerdp_load_channel_addin_entry("rdpsnd", (LPSTR) name, NULL, 0);
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR rdpsnd_process_addin_args(rdpsndPlugin* rdpsnd, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_process_addin_args(rdpsndPlugin* rdpsnd, ADDIN_ARGV* args)
{
int status;
DWORD flags;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
{
ADDIN_ARGV* args;
- WIN32ERROR status = ERROR_INTERNAL_ERROR;
+ UINT status = ERROR_INTERNAL_ERROR;
char *subsystem_name = NULL, *device_name = NULL;
rdpsnd->latency = -1;
}
}
-WIN32ERROR rdpsnd_virtual_channel_write(rdpsndPlugin* rdpsnd, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_virtual_channel_write(rdpsndPlugin* rdpsnd, wStream* s)
{
- WIN32ERROR status;
+ UINT status;
if (!rdpsnd)
{
return status;
}
-static WIN32ERROR rdpsnd_virtual_channel_event_data_received(rdpsndPlugin* plugin,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_virtual_channel_event_data_received(rdpsndPlugin* plugin,
void* pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
wStream* s;
LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
rdpsndPlugin* rdpsnd;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
rdpsnd = (rdpsndPlugin*) rdpsnd_get_open_handle_data(openHandle);
wStream* data;
wMessage message;
rdpsndPlugin* rdpsnd = (rdpsndPlugin*) arg;
- WIN32ERROR error;
+ UINT error;
if ((error = rdpsnd_process_connect(rdpsnd)))
{
return NULL;
}
-static WIN32ERROR rdpsnd_virtual_channel_event_connected(rdpsndPlugin* plugin, LPVOID pData, UINT32 dataLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_virtual_channel_event_connected(rdpsndPlugin* plugin, LPVOID pData, UINT32 dataLength)
{
UINT32 status;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpsnd_virtual_channel_event_disconnected(rdpsndPlugin* rdpsnd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_virtual_channel_event_disconnected(rdpsndPlugin* rdpsnd)
{
- WIN32ERROR error;
+ UINT error;
MessagePipe_PostQuit(rdpsnd->MsgPipe, 0);
if (WaitForSingleObject(rdpsnd->thread, INFINITE) == WAIT_FAILED)
static VOID VCAPITYPE rdpsnd_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
rdpsndPlugin* plugin;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
plugin = (rdpsndPlugin*) rdpsnd_get_init_handle_data(pInitHandle);
#ifndef __RDPSND_MAIN_H
#define __RDPSND_MAIN_H
-#include <winpr/win32error.h>
-
#include <freerdp/api.h>
#include <freerdp/svc.h>
#include <freerdp/addin.h>
#define DEBUG_SND(fmt, ...) do { } while (0)
#endif
-WIN32ERROR rdpsnd_virtual_channel_write(rdpsndPlugin* rdpsnd, wStream* s);
+UINT rdpsnd_virtual_channel_write(rdpsndPlugin* rdpsnd, wStream* s);
#endif /* __RDPSND_MAIN_H */
#include <winpr/crt.h>
#include <winpr/cmdline.h>
-#include <winpr/win32error.h>
#include <freerdp/types.h>
#include <freerdp/codec/dsp.h>
#include <freerdp/channels/log.h>
-#include <winpr/win32error.h>
#include "rdpsnd_main.h"
#define freerdp_rdpsnd_client_subsystem_entry winmm_freerdp_rdpsnd_client_subsystem_entry
#endif
-WIN32ERROR freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
{
ADDIN_ARGV* args;
rdpsndWinmmPlugin* winmm;
#include "rdpsnd_main.h"
-WIN32ERROR rdpsnd_server_send_formats(RdpsndServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_server_send_formats(RdpsndServerContext* context, wStream* s)
{
int pos;
UINT16 i;
return status ? CHANNEL_RC_OK: ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpsnd_server_recv_waveconfirm(RdpsndServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_recv_waveconfirm(RdpsndServerContext* context, wStream* s)
{
UINT16 timestamp;
BYTE confirmBlockNum;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 4)
{
return error;
}
-static WIN32ERROR rdpsnd_server_recv_quality_mode(RdpsndServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_recv_quality_mode(RdpsndServerContext* context, wStream* s)
{
UINT16 quality;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpsnd_server_recv_formats(RdpsndServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_recv_formats(RdpsndServerContext* context, wStream* s)
{
int i, num_known_format = 0;
UINT32 flags, vol, pitch;
UINT16 udpPort;
BYTE lastblock;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 20)
{
DWORD nCount, status;
HANDLE events[8];
RdpsndServerContext* context;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
context = (RdpsndServerContext *)arg;
nCount = 0;
return NULL;
}
-static WIN32ERROR rdpsnd_server_initialize(RdpsndServerContext* context, BOOL ownThread)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_initialize(RdpsndServerContext* context, BOOL ownThread)
{
context->priv->ownThread = ownThread;
return context->Start(context);
}
-static WIN32ERROR rdpsnd_server_select_format(RdpsndServerContext* context, int client_format_index)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_select_format(RdpsndServerContext* context, int client_format_index)
{
int bs;
int out_buffer_size;
return CHANNEL_RC_OK;
}
-static WIN32ERROR rdpsnd_server_send_audio_pdu(RdpsndServerContext* context, UINT16 wTimestamp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_send_audio_pdu(RdpsndServerContext* context, UINT16 wTimestamp)
{
int size;
BYTE* src;
int tbytes_per_frame;
ULONG written;
wStream* s = context->priv->rdpsnd_pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
format = &context->client_formats[context->selected_client_format];
tbytes_per_frame = format->nChannels * context->priv->src_bytes_per_sample;
return error;
}
-static WIN32ERROR rdpsnd_server_send_samples(RdpsndServerContext* context, const void* buf, int nframes, UINT16 wTimestamp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_send_samples(RdpsndServerContext* context, const void* buf, int nframes, UINT16 wTimestamp)
{
int cframes;
int cframesize;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (context->selected_client_format < 0)
return ERROR_INVALID_DATA;
return error;
}
-static WIN32ERROR rdpsnd_server_set_volume(RdpsndServerContext* context, int left, int right)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_set_volume(RdpsndServerContext* context, int left, int right)
{
int pos;
BOOL status;
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpsnd_server_close(RdpsndServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_close(RdpsndServerContext* context)
{
int pos;
BOOL status;
ULONG written;
wStream* s = context->priv->rdpsnd_pdu;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (context->selected_client_format < 0)
return ERROR_INVALID_DATA;
return status ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR rdpsnd_server_start(RdpsndServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_start(RdpsndServerContext* context)
{
void *buffer = NULL;
DWORD bytesReturned;
RdpsndServerPrivate *priv = context->priv;
- WIN32ERROR error = ERROR_INTERNAL_ERROR;
+ UINT error = ERROR_INTERNAL_ERROR;
priv->ChannelHandle = WTSVirtualChannelOpen(context->vcm, WTS_CURRENT_SESSION, "rdpsnd");
if (!priv->ChannelHandle)
return error;
}
-static WIN32ERROR rdpsnd_server_stop(RdpsndServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT rdpsnd_server_stop(RdpsndServerContext* context)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
if (context->priv->ownThread)
{
if (context->priv->StopEvent)
* ERROR_NO_DATA if no data could be read this time
* otherwise error
*/
-WIN32ERROR rdpsnd_server_handle_messages(RdpsndServerContext *context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT rdpsnd_server_handle_messages(RdpsndServerContext *context)
{
DWORD bytesReturned;
- WIN32ERROR ret = CHANNEL_RC_OK;
+ UINT ret = CHANNEL_RC_OK;
RdpsndServerPrivate *priv = context->priv;
wStream *s = priv->input_stream;
return pInterface;
}
-static WIN32ERROR remdesk_virtual_channel_write(remdeskPlugin* remdesk, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_virtual_channel_write(remdeskPlugin* remdesk, wStream* s)
{
UINT32 status;
return status;
}
-WIN32ERROR remdesk_generate_expert_blob(remdeskPlugin* remdesk)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT remdesk_generate_expert_blob(remdeskPlugin* remdesk)
{
char* name;
char* pass;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_read_channel_header(wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_read_channel_header(wStream* s, REMDESK_CHANNEL_HEADER* header)
{
int status;
UINT32 ChannelNameLen;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_write_channel_header(wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_write_channel_header(wStream* s, REMDESK_CHANNEL_HEADER* header)
{
int index;
UINT32 ChannelNameLen;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_write_ctl_header(wStream* s, REMDESK_CTL_HEADER* ctlHeader)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_write_ctl_header(wStream* s, REMDESK_CTL_HEADER* ctlHeader)
{
remdesk_write_channel_header(s, (REMDESK_CHANNEL_HEADER*) ctlHeader);
Stream_Write_UINT32(s, ctlHeader->msgType); /* msgType (4 bytes) */
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_prepare_ctl_header(REMDESK_CTL_HEADER* ctlHeader, UINT32 msgType, UINT32 msgSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_prepare_ctl_header(REMDESK_CTL_HEADER* ctlHeader, UINT32 msgType, UINT32 msgSize)
{
ctlHeader->msgType = msgType;
strcpy(ctlHeader->ChannelName, REMDESK_CHANNEL_CTL_NAME);
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_recv_ctl_server_announce_pdu(remdeskPlugin* remdesk, wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_server_announce_pdu(remdeskPlugin* remdesk, wStream* s, REMDESK_CHANNEL_HEADER* header)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_recv_ctl_version_info_pdu(remdeskPlugin* remdesk, wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_version_info_pdu(remdeskPlugin* remdesk, wStream* s, REMDESK_CHANNEL_HEADER* header)
{
UINT32 versionMajor;
UINT32 versionMinor;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_send_ctl_version_info_pdu(remdeskPlugin* remdesk)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_send_ctl_version_info_pdu(remdeskPlugin* remdesk)
{
wStream* s;
REMDESK_CTL_VERSION_INFO_PDU pdu;
- WIN32ERROR error;
+ UINT error;
remdesk_prepare_ctl_header(&(pdu.ctlHeader), REMDESK_CTL_VERSIONINFO, 8);
return error;
}
-static WIN32ERROR remdesk_recv_ctl_result_pdu(remdeskPlugin* remdesk, wStream* s, REMDESK_CHANNEL_HEADER* header, UINT32 *pResult)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_result_pdu(remdeskPlugin* remdesk, wStream* s, REMDESK_CHANNEL_HEADER* header, UINT32 *pResult)
{
UINT32 result;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_send_ctl_authenticate_pdu(remdeskPlugin* remdesk)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_send_ctl_authenticate_pdu(remdeskPlugin* remdesk)
{
int status;
- WIN32ERROR error;
+ UINT error;
wStream* s = NULL;
int cbExpertBlobW = 0;
WCHAR* expertBlobW = NULL;
return error;
}
-static WIN32ERROR remdesk_send_ctl_remote_control_desktop_pdu(remdeskPlugin* remdesk)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_send_ctl_remote_control_desktop_pdu(remdeskPlugin* remdesk)
{
int status;
- WIN32ERROR error;
+ UINT error;
wStream* s = NULL;
int cbRaConnectionStringW = 0;
WCHAR* raConnectionStringW = NULL;
return error;
}
-static WIN32ERROR remdesk_send_ctl_verify_password_pdu(remdeskPlugin* remdesk)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_send_ctl_verify_password_pdu(remdeskPlugin* remdesk)
{
int status;
- WIN32ERROR error;
+ UINT error;
wStream* s;
int cbExpertBlobW = 0;
WCHAR* expertBlobW = NULL;
return error;
}
-static WIN32ERROR remdesk_send_ctl_expert_on_vista_pdu(remdeskPlugin* remdesk)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_send_ctl_expert_on_vista_pdu(remdeskPlugin* remdesk)
{
- WIN32ERROR error;
+ UINT error;
wStream* s;
REMDESK_CTL_EXPERT_ON_VISTA_PDU pdu;
return remdesk_virtual_channel_write(remdesk, s);
}
-static WIN32ERROR remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s, REMDESK_CHANNEL_HEADER* header)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
UINT32 msgType = 0;
UINT32 result = 0;
return error;
}
-static WIN32ERROR remdesk_process_receive(remdeskPlugin* remdesk, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_process_receive(remdeskPlugin* remdesk, wStream* s)
{
- WIN32ERROR status;
+ UINT status;
REMDESK_CHANNEL_HEADER header;
#if 0
static wListDictionary* g_InitHandles = NULL;
static wListDictionary* g_OpenHandles = NULL;
-WIN32ERROR remdesk_add_init_handle_data(void* pInitHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT remdesk_add_init_handle_data(void* pInitHandle, void* pUserData)
{
if (!g_InitHandles)
{
}
}
-WIN32ERROR remdesk_add_open_handle_data(DWORD openHandle, void* pUserData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT remdesk_add_open_handle_data(DWORD openHandle, void* pUserData)
{
void* pOpenHandle = (void*) (size_t) openHandle;
}
}
-WIN32ERROR remdesk_send(remdeskPlugin* remdesk, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT remdesk_send(remdeskPlugin* remdesk, wStream* s)
{
- WIN32ERROR status = 0;
+ UINT status = 0;
remdeskPlugin* plugin = (remdeskPlugin*) remdesk;
if (!plugin)
return status;
}
-static WIN32ERROR remdesk_virtual_channel_event_data_received(remdeskPlugin* remdesk,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_virtual_channel_event_data_received(remdeskPlugin* remdesk,
void* pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
wStream* data_in;
LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
remdeskPlugin* remdesk;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
remdesk = (remdeskPlugin*) remdesk_get_open_handle_data(openHandle);
wStream* data;
wMessage message;
remdeskPlugin* remdesk = (remdeskPlugin*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
remdesk_process_connect(remdesk);
return NULL;
}
-static WIN32ERROR remdesk_virtual_channel_event_connected(remdeskPlugin* remdesk, LPVOID pData, UINT32 dataLength)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_virtual_channel_event_connected(remdeskPlugin* remdesk, LPVOID pData, UINT32 dataLength)
{
UINT32 status;
- WIN32ERROR error;
+ UINT error;
status = remdesk->channelEntryPoints.pVirtualChannelOpen(remdesk->InitHandle,
&remdesk->OpenHandle, remdesk->channelDef.name, remdesk_virtual_channel_open_event);
return error;
}
-static WIN32ERROR remdesk_virtual_channel_event_disconnected(remdeskPlugin* remdesk)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_virtual_channel_event_disconnected(remdeskPlugin* remdesk)
{
UINT rc;
static VOID VCAPITYPE remdesk_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
remdeskPlugin* remdesk;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
remdesk = (remdeskPlugin*) remdesk_get_init_handle_data(pInitHandle);
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
UINT rc;
- WIN32ERROR error;
+ UINT error;
remdeskPlugin* remdesk;
RemdeskClientContext* context = NULL;
#include "remdesk_main.h"
-static WIN32ERROR remdesk_virtual_channel_write(RemdeskServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_virtual_channel_write(RemdeskServerContext* context, wStream* s)
{
BOOL status;
ULONG BytesWritten = 0;
return (status) ? CHANNEL_RC_OK : ERROR_INTERNAL_ERROR;
}
-static WIN32ERROR remdesk_read_channel_header(wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_read_channel_header(wStream* s, REMDESK_CHANNEL_HEADER* header)
{
int status;
UINT32 ChannelNameLen;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_write_channel_header(wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_write_channel_header(wStream* s, REMDESK_CHANNEL_HEADER* header)
{
int index;
UINT32 ChannelNameLen;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_write_ctl_header(wStream* s, REMDESK_CTL_HEADER* ctlHeader)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_write_ctl_header(wStream* s, REMDESK_CTL_HEADER* ctlHeader)
{
- WIN32ERROR error;
+ UINT error;
if ((error = remdesk_write_channel_header(s, (REMDESK_CHANNEL_HEADER*) ctlHeader)))
{
WLog_ERR(TAG, "remdesk_write_channel_header failed with error %lu!", error);
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_prepare_ctl_header(REMDESK_CTL_HEADER* ctlHeader, UINT32 msgType, UINT32 msgSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_prepare_ctl_header(REMDESK_CTL_HEADER* ctlHeader, UINT32 msgType, UINT32 msgSize)
{
ctlHeader->msgType = msgType;
strcpy(ctlHeader->ChannelName, REMDESK_CHANNEL_CTL_NAME);
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_send_ctl_result_pdu(RemdeskServerContext* context, UINT32 result)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_send_ctl_result_pdu(RemdeskServerContext* context, UINT32 result)
{
wStream* s;
REMDESK_CTL_RESULT_PDU pdu;
- WIN32ERROR error;
+ UINT error;
pdu.result = result;
return error;
}
-static WIN32ERROR remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context)
{
wStream* s;
REMDESK_CTL_VERSION_INFO_PDU pdu;
- WIN32ERROR error;
+ UINT error;
if ((error = remdesk_prepare_ctl_header(&(pdu.ctlHeader), REMDESK_CTL_VERSIONINFO, 8)))
{
return error;
}
-static WIN32ERROR remdesk_recv_ctl_version_info_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_version_info_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
{
UINT32 versionMajor;
UINT32 versionMinor;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_recv_ctl_remote_control_desktop_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_remote_control_desktop_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
{
int status;
int cchStringW;
int cbRaConnectionStringW = 0;
WCHAR* raConnectionStringW = NULL;
REMDESK_CTL_REMOTE_CONTROL_DESKTOP_PDU pdu;
- WIN32ERROR error;
+ UINT error;
msgLength = header->DataLength - 4;
return error;
}
-static WIN32ERROR remdesk_recv_ctl_authenticate_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_authenticate_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
{
int status;
int cchStringW;
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_recv_ctl_verify_password_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_verify_password_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
{
int status;
int cbExpertBlobW = 0;
WCHAR* expertBlobW = NULL;
REMDESK_CTL_VERIFY_PASSWORD_PDU pdu;
- WIN32ERROR error;
+ UINT error;
if (Stream_GetRemainingLength(s) < 8)
{
return error;
}
-static WIN32ERROR remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s, REMDESK_CHANNEL_HEADER* header)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
UINT32 msgType = 0;
if (Stream_GetRemainingLength(s) < 4)
return error;
}
-static WIN32ERROR remdesk_server_receive_pdu(RemdeskServerContext* context, wStream* s)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_server_receive_pdu(RemdeskServerContext* context, wStream* s)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
REMDESK_CHANNEL_HEADER header;
#if 0
HANDLE ChannelEvent;
DWORD BytesReturned;
RemdeskServerContext* context;
- WIN32ERROR error;
+ UINT error;
context = (RemdeskServerContext*) arg;
return NULL;
}
-static WIN32ERROR remdesk_server_start(RemdeskServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_server_start(RemdeskServerContext* context)
{
context->priv->ChannelHandle = WTSVirtualChannelOpen(context->vcm, WTS_CURRENT_SESSION, "remdesk");
return CHANNEL_RC_OK;
}
-static WIN32ERROR remdesk_server_stop(RemdeskServerContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT remdesk_server_stop(RemdeskServerContext* context)
{
- WIN32ERROR error;
+ UINT error;
SetEvent(context->priv->StopEvent);
Stream_Zero(irp->output, 5); /* Padding (5 bytes) */
}
-static WIN32ERROR serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp)
{
UINT32 Length;
UINT64 Offset;
}
-static WIN32ERROR serial_process_irp_device_control(SERIAL_DEVICE* serial, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT serial_process_irp_device_control(SERIAL_DEVICE* serial, IRP* irp)
{
UINT32 IoControlCode;
UINT32 InputBufferLength;
return CHANNEL_RC_OK;
}
-static WIN32ERROR serial_process_irp(SERIAL_DEVICE* serial, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT serial_process_irp(SERIAL_DEVICE* serial, IRP* irp)
{
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
WLog_Print(serial->log, WLOG_DEBUG, "IRP MajorFunction: 0x%04X MinorFunction: 0x%04X\n",
irp->MajorFunction, irp->MinorFunction);
static void* irp_thread_func(void* arg)
{
IRP_THREAD_DATA *data = (IRP_THREAD_DATA*)arg;
- WIN32ERROR error;
+ UINT error;
/* blocks until the end of the request */
if ((error = serial_process_irp(data->serial, data->irp)))
IRP* irp;
wMessage message;
SERIAL_DEVICE* serial = (SERIAL_DEVICE*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
while (1)
{
}
-static WIN32ERROR serial_irp_request(DEVICE* device, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT serial_irp_request(DEVICE* device, IRP* irp)
{
SERIAL_DEVICE* serial = (SERIAL_DEVICE*) device;
}
-static WIN32ERROR serial_free(DEVICE* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT serial_free(DEVICE* device)
{
- WIN32ERROR error;
+ UINT error;
SERIAL_DEVICE* serial = (SERIAL_DEVICE*) device;
WLog_Print(serial->log, WLOG_DEBUG, "freeing");
#define DeviceServiceEntry serial_DeviceServiceEntry
#endif
-WIN32ERROR DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
{
char* name;
char* path;
int i, len;
SERIAL_DEVICE* serial;
#endif /* __linux__ */
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
device = (RDPDR_SERIAL*) pEntryPoints->device;
name = device->Name;
wMessage message;
SMARTCARD_DEVICE* smartcard;
SMARTCARD_OPERATION* operation;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
smartcard = pContext->smartcard;
}
-static WIN32ERROR smartcard_free(DEVICE* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT smartcard_free(DEVICE* device)
{
- WIN32ERROR error;
+ UINT error;
SMARTCARD_DEVICE* smartcard = (SMARTCARD_DEVICE*) device;
/**
* At that time, we need to cancel all outstanding IRPs.
*/
-static WIN32ERROR smartcard_init(DEVICE* device)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT smartcard_init(DEVICE* device)
{
SMARTCARD_DEVICE* smartcard = (SMARTCARD_DEVICE*) device;
return CHANNEL_RC_OK;
}
-WIN32ERROR smartcard_complete_irp(SMARTCARD_DEVICE* smartcard, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT smartcard_complete_irp(SMARTCARD_DEVICE* smartcard, IRP* irp)
{
void* key;
* http://musclecard.996296.n3.nabble.com/Multiple-threads-and-SCardGetStatusChange-td4430.html
*/
-WIN32ERROR smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp)
{
void* key;
LONG status;
HANDLE hEvents[2];
wMessage message;
SMARTCARD_DEVICE* smartcard = (SMARTCARD_DEVICE*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
nCount = 0;
hEvents[nCount++] = MessageQueue_Event(smartcard->IrpQueue);
return NULL;
}
-static WIN32ERROR smartcard_irp_request(DEVICE* device, IRP* irp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT smartcard_irp_request(DEVICE* device, IRP* irp)
{
SMARTCARD_DEVICE* smartcard = (SMARTCARD_DEVICE*) device;
if (!MessageQueue_Post(smartcard->IrpQueue, NULL, 0, (void*) irp, NULL))
/* smartcard is always built-in */
#define DeviceServiceEntry smartcard_DeviceServiceEntry
-WIN32ERROR DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
{
char* name;
char* path;
int ck;
RDPDR_SMARTCARD* device;
SMARTCARD_DEVICE* smartcard;
- WIN32ERROR error = CHANNEL_RC_NO_MEMORY;
+ UINT error = CHANNEL_RC_NO_MEMORY;
device = (RDPDR_SMARTCARD*) pEntryPoints->device;
SMARTCARD_CONTEXT* smartcard_context_new(SMARTCARD_DEVICE* smartcard, SCARDCONTEXT hContext);
void smartcard_context_free(SMARTCARD_CONTEXT* pContext);
-WIN32ERROR smartcard_complete_irp(SMARTCARD_DEVICE* smartcard, IRP* irp);
-WIN32ERROR smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp);
+UINT smartcard_complete_irp(SMARTCARD_DEVICE* smartcard, IRP* irp);
+UINT smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp);
LONG smartcard_irp_device_control_decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERATION* operation);
LONG smartcard_irp_device_control_call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERATION* operation);
#include "tsmf_ifman.h"
-WIN32ERROR tsmf_ifman_rim_exchange_capability_request(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_rim_exchange_capability_request(TSMF_IFMAN* ifman)
{
UINT32 CapabilityValue;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman)
{
UINT32 i;
UINT32 v;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_check_format_support_request(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_check_format_support_request(TSMF_IFMAN* ifman)
{
UINT32 numMediaType;
UINT32 PlatformCookie;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman)
{
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
TSMF_PRESENTATION* presentation;
DEBUG_TSMF("");
return status;
}
-WIN32ERROR tsmf_ifman_add_stream(TSMF_IFMAN* ifman, rdpContext* rdpcontext)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_add_stream(TSMF_IFMAN* ifman, rdpContext* rdpcontext)
{
UINT32 StreamId;
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
TSMF_STREAM* stream;
TSMF_PRESENTATION* presentation;
return status;
}
-WIN32ERROR tsmf_ifman_set_topology_request(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_set_topology_request(TSMF_IFMAN* ifman)
{
DEBUG_TSMF("");
if (!Stream_EnsureRemainingCapacity(ifman->output, 8))
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_remove_stream(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_remove_stream(TSMF_IFMAN* ifman)
{
int status = CHANNEL_RC_OK;
UINT32 StreamId;
return fValue;
}
-WIN32ERROR tsmf_ifman_set_source_video_rect(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_set_source_video_rect(TSMF_IFMAN* ifman)
{
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
float Left, Top;
float Right, Bottom;
TSMF_PRESENTATION* presentation;
return status;
}
-WIN32ERROR tsmf_ifman_shutdown_presentation(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_shutdown_presentation(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_stream_volume(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_stream_volume(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
UINT32 newVolume;
return 0;
}
-WIN32ERROR tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_set_video_window(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_set_video_window(TSMF_IFMAN* ifman)
{
DEBUG_TSMF("");
ifman->output_pending = TRUE;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
UINT32 numGeometryInfo;
UINT32 cbVisibleRect;
RDP_RECT *rects = NULL;
int num_rects = 0;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
int i;
int pos;
return error;
}
-WIN32ERROR tsmf_ifman_set_allocator(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_set_allocator(TSMF_IFMAN* ifman)
{
DEBUG_TSMF("");
ifman->output_pending = TRUE;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_notify_preroll(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_notify_preroll(TSMF_IFMAN* ifman)
{
DEBUG_TSMF("");
ifman->output_pending = TRUE;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_sample(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_sample(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
TSMF_STREAM* stream;
UINT64 ThrottleDuration;
UINT32 SampleExtensions;
UINT32 cbData;
- WIN32ERROR error;
+ UINT error;
if (Stream_GetRemainingLength(ifman->input) < 60)
return ERROR_INVALID_DATA;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_flush(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_flush(TSMF_IFMAN* ifman)
{
UINT32 StreamId;
TSMF_PRESENTATION* presentation;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_end_of_stream(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_end_of_stream(TSMF_IFMAN* ifman)
{
UINT32 StreamId;
TSMF_STREAM* stream;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_playback_started(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_playback_started(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_playback_paused(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_playback_paused(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_playback_restarted(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_playback_restarted(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_playback_stopped(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_playback_stopped(TSMF_IFMAN* ifman)
{
TSMF_PRESENTATION* presentation;
return CHANNEL_RC_OK;
}
-WIN32ERROR tsmf_ifman_on_playback_rate_changed(TSMF_IFMAN* ifman)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_ifman_on_playback_rate_changed(TSMF_IFMAN* ifman)
{
DEBUG_TSMF("");
UINT32 output_interface_id;
};
-WIN32ERROR tsmf_ifman_rim_exchange_capability_request(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_check_format_support_request(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_add_stream(TSMF_IFMAN* ifman, rdpContext* rdpcontext);
-WIN32ERROR tsmf_ifman_set_topology_request(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_remove_stream(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_set_source_video_rect(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_shutdown_presentation(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_stream_volume(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_set_video_window(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_set_allocator(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_notify_preroll(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_sample(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_flush(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_end_of_stream(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_playback_started(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_playback_paused(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_playback_restarted(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_playback_stopped(TSMF_IFMAN* ifman);
-WIN32ERROR tsmf_ifman_on_playback_rate_changed(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_rim_exchange_capability_request(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_check_format_support_request(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_add_stream(TSMF_IFMAN* ifman, rdpContext* rdpcontext);
+UINT tsmf_ifman_set_topology_request(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_remove_stream(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_set_source_video_rect(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_shutdown_presentation(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_stream_volume(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_set_video_window(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_set_allocator(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_notify_preroll(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_sample(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_flush(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_end_of_stream(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_playback_started(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_playback_paused(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_playback_restarted(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_playback_stopped(TSMF_IFMAN* ifman);
+UINT tsmf_ifman_on_playback_rate_changed(TSMF_IFMAN* ifman);
#endif
return (status == 0);
}
-static WIN32ERROR tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream *data)
{
int length;
wStream *input;
wStream *output;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
BOOL processed = FALSE;
TSMF_IFMAN ifman;
UINT32 MessageId;
return error;
}
-static WIN32ERROR tsmf_on_close(IWTSVirtualChannelCallback *pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT tsmf_on_close(IWTSVirtualChannelCallback *pChannelCallback)
{
TSMF_STREAM* stream;
TSMF_PRESENTATION* presentation;
return CHANNEL_RC_OK;
}
-static WIN32ERROR tsmf_on_new_channel_connection(IWTSListenerCallback *pListenerCallback,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT tsmf_on_new_channel_connection(IWTSListenerCallback *pListenerCallback,
IWTSVirtualChannel *pChannel,
BYTE *Data,
int *pbAccept,
return CHANNEL_RC_OK;
}
-static WIN32ERROR tsmf_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT tsmf_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
{
- WIN32ERROR status;
+ UINT status;
TSMF_PLUGIN* tsmf = (TSMF_PLUGIN*) pPlugin;
DEBUG_TSMF("");
return status;
}
-static WIN32ERROR tsmf_plugin_terminated(IWTSPlugin* pPlugin)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT tsmf_plugin_terminated(IWTSPlugin* pPlugin)
{
TSMF_PLUGIN* tsmf = (TSMF_PLUGIN*) pPlugin;
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR tsmf_process_addin_args(IWTSPlugin *pPlugin, ADDIN_ARGV *args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT tsmf_process_addin_args(IWTSPlugin *pPlugin, ADDIN_ARGV *args)
{
int status;
DWORD flags;
#define DVCPluginEntry tsmf_DVCPluginEntry
#endif
-WIN32ERROR DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
- WIN32ERROR status = 0;
+ UINT status = 0;
TSMF_PLUGIN* tsmf;
TsmfClientContext* context;
- WIN32ERROR error = CHANNEL_RC_NO_MEMORY;
+ UINT error = CHANNEL_RC_NO_MEMORY;
tsmf = (TSMF_PLUGIN*) pEntryPoints->GetPlugin(pEntryPoints, "tsmf");
{
HANDLE hdl[2];
TSMF_STREAM* stream = (TSMF_STREAM*) arg;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DEBUG_TSMF("in %d", stream->stream_id);
hdl[0] = stream->stopEvent;
TSMF_SAMPLE* sample;
TSMF_STREAM* stream = (TSMF_STREAM *) arg;
TSMF_PRESENTATION* presentation = stream->presentation;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
DWORD status;
DEBUG_TSMF("in %d", stream->stream_id);
return ret;
}
-WIN32ERROR tsmf_presentation_sync(TSMF_PRESENTATION* presentation)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT tsmf_presentation_sync(TSMF_PRESENTATION* presentation)
{
UINT32 index;
UINT32 count;
- WIN32ERROR error;
+ UINT error;
ArrayList_Lock(presentation->stream_list);
count = ArrayList_Count(presentation->stream_list);
TSMF_PRESENTATION *tsmf_presentation_find_by_id(const BYTE *guid);
BOOL tsmf_presentation_start(TSMF_PRESENTATION *presentation);
BOOL tsmf_presentation_stop(TSMF_PRESENTATION *presentation);
-WIN32ERROR tsmf_presentation_sync(TSMF_PRESENTATION *presentation);
+UINT tsmf_presentation_sync(TSMF_PRESENTATION *presentation);
BOOL tsmf_presentation_paused(TSMF_PRESENTATION *presentation);
BOOL tsmf_presentation_restarted(TSMF_PRESENTATION *presentation);
BOOL tsmf_presentation_volume_changed(TSMF_PRESENTATION *presentation, UINT32 newVolume, UINT32 muted);
#endif
-static WIN32ERROR urbdrc_process_capability_request(URBDRC_CHANNEL_CALLBACK* callback, char* data, UINT32 data_sizem, UINT32 MessageId)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_process_capability_request(URBDRC_CHANNEL_CALLBACK* callback, char* data, UINT32 data_sizem, UINT32 MessageId)
{
UINT32 InterfaceId;
UINT32 Version;
UINT32 out_size;
char * out_data;
- WIN32ERROR ret;
+ UINT ret;
WLog_VRB(TAG, "");
data_read_UINT32(data + 0, Version);
return ret;
}
-static WIN32ERROR urbdrc_process_channel_create(URBDRC_CHANNEL_CALLBACK* callback, char* data, UINT32 data_sizem, UINT32 MessageId)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_process_channel_create(URBDRC_CHANNEL_CALLBACK* callback, char* data, UINT32 data_sizem, UINT32 MessageId)
{
UINT32 InterfaceId;
UINT32 out_size;
UINT32 MinorVersion;
UINT32 Capabilities;
char* out_data;
- WIN32ERROR ret;
+ UINT ret;
WLog_VRB(TAG, "");
data_read_UINT32(data + 0, MajorVersion);
return 0;
}
-static WIN32ERROR urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVICE* pdev)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVICE* pdev)
{
char* out_data;
UINT32 InterfaceId;
char* composite_str = "USB\\COMPOSITE";
int size, out_offset, cchCompatIds, bcdUSB;
ISOCH_CALLBACK_QUEUE *cb_queue;
- WIN32ERROR ret;
+ UINT ret;
WLog_VRB(TAG, "");
InterfaceId = ((STREAM_ID_PROXY<<30) | CLIENT_DEVICE_SINK);
return ret;
}
-static WIN32ERROR urbdrc_exchange_capabilities(URBDRC_CHANNEL_CALLBACK* callback, char* pBuffer, UINT32 cbSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_exchange_capabilities(URBDRC_CHANNEL_CALLBACK* callback, char* pBuffer, UINT32 cbSize)
{
UINT32 MessageId;
UINT32 FunctionId;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
data_read_UINT32(pBuffer + 0, MessageId);
data_read_UINT32(pBuffer + 4, FunctionId);
return 0;
}
-static WIN32ERROR urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback, char* pBuffer, UINT32 cbSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback, char* pBuffer, UINT32 cbSize)
{
int i;
UINT32 MessageId;
UINT32 FunctionId;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
URBDRC_PLUGIN* urbdrc = (URBDRC_PLUGIN*) callback->plugin;
WLog_DBG(TAG, "...");
return error;
}
-static WIN32ERROR urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream* data)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream* data)
{
URBDRC_CHANNEL_CALLBACK* callback = (URBDRC_CHANNEL_CALLBACK*) pChannelCallback;
URBDRC_PLUGIN* urbdrc;
UINT32 InterfaceTemp;
UINT32 InterfaceId;
UINT32 Mask;
- WIN32ERROR error = CHANNEL_RC_OK;
+ UINT error = CHANNEL_RC_OK;
char* pBuffer = (char*)Stream_Pointer(data);
UINT32 cbSize = Stream_GetRemainingLength(data);
return 0;
}
-static WIN32ERROR urbdrc_on_close(IWTSVirtualChannelCallback * pChannelCallback)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_on_close(IWTSVirtualChannelCallback * pChannelCallback)
{
URBDRC_CHANNEL_CALLBACK* callback = (URBDRC_CHANNEL_CALLBACK*) pChannelCallback;
URBDRC_PLUGIN* urbdrc = (URBDRC_PLUGIN*) callback->plugin;
return CHANNEL_RC_OK;
}
-static WIN32ERROR urbdrc_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel * pChannel, BYTE* pData, int* pbAccept, IWTSVirtualChannelCallback** ppCallback)
{
URBDRC_LISTENER_CALLBACK* listener_callback = (URBDRC_LISTENER_CALLBACK*) pListenerCallback;
return CHANNEL_RC_OK;
}
-static WIN32ERROR urbdrc_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr)
{
URBDRC_PLUGIN* urbdrc = (URBDRC_PLUGIN*) pPlugin;
IUDEVMAN* udevman = NULL;
(IWTSListenerCallback*) urbdrc->listener_callback, NULL);
}
-static WIN32ERROR urbdrc_plugin_terminated(IWTSPlugin* pPlugin)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_plugin_terminated(IWTSPlugin* pPlugin)
{
URBDRC_PLUGIN* urbdrc = (URBDRC_PLUGIN*) pPlugin;
IUDEVMAN* udevman = urbdrc->udevman;
urbdrc->udevman = udevman;
}
-static WIN32ERROR urbdrc_load_udevman_addin(IWTSPlugin* pPlugin, const char* name, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_load_udevman_addin(IWTSPlugin* pPlugin, const char* name, ADDIN_ARGV* args)
{
PFREERDP_URBDRC_DEVICE_ENTRY entry;
FREERDP_URBDRC_SERVICE_ENTRY_POINTS entryPoints;
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
};
-static WIN32ERROR urbdrc_process_addin_args(URBDRC_PLUGIN* urbdrc, ADDIN_ARGV* args)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT urbdrc_process_addin_args(URBDRC_PLUGIN* urbdrc, ADDIN_ARGV* args)
{
int status;
DWORD flags;
#define DVCPluginEntry urbdrc_DVCPluginEntry
#endif
-WIN32ERROR DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
- WIN32ERROR status = 0;
+ UINT status = 0;
ADDIN_ARGV* args;
URBDRC_PLUGIN* urbdrc;
#include <winpr/crt.h>
#include <winpr/stream.h>
-#include <winpr/win32error.h>
#include <freerdp/client/channels.h>
#include <freerdp/client/cliprdr.h>
return 1;
}
-WIN32ERROR android_cliprdr_monitor_ready(CliprdrClientContext* cliprdr, CLIPRDR_MONITOR_READY* monitorReady)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_monitor_ready(CliprdrClientContext* cliprdr, CLIPRDR_MONITOR_READY* monitorReady)
{
androidContext* afc = (androidContext*) cliprdr->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_capabilities(CliprdrClientContext* cliprdr, CLIPRDR_CAPABILITIES* capabilities)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_capabilities(CliprdrClientContext* cliprdr, CLIPRDR_CAPABILITIES* capabilities)
{
UINT32 index;
CLIPRDR_CAPABILITY_SET* capabilitySet;
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_format_list(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_LIST* formatList)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_format_list(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_LIST* formatList)
{
UINT32 index;
CLIPRDR_FORMAT* format;
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_format_list_response(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_format_list_response(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_lock_clipboard_data(CliprdrClientContext* cliprdr, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_lock_clipboard_data(CliprdrClientContext* cliprdr, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_unlock_clipboard_data(CliprdrClientContext* cliprdr, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_unlock_clipboard_data(CliprdrClientContext* cliprdr, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_format_data_request(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_format_data_request(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
{
BYTE* data;
UINT32 size;
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_format_data_response(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_format_data_response(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
{
BYTE* data;
UINT32 size;
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_file_contents_request(CliprdrClientContext* cliprdr, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_file_contents_request(CliprdrClientContext* cliprdr, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR android_cliprdr_server_file_contents_response(CliprdrClientContext* cliprdr, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT android_cliprdr_server_file_contents_response(CliprdrClientContext* cliprdr, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
{
return CHANNEL_RC_OK;
}
#import "freerdp/channels/channels.h"
#import "freerdp/client/cliprdr.h"
-#import "winpr/win32error.h"
-
int mac_cliprdr_send_client_format_list(CliprdrClientContext* cliprdr);
void mac_cliprdr_init(mfContext* mfc, CliprdrClientContext* cliprdr);
return 1;
}
-WIN32ERROR mac_cliprdr_monitor_ready(CliprdrClientContext* cliprdr, CLIPRDR_MONITOR_READY* monitorReady)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_monitor_ready(CliprdrClientContext* cliprdr, CLIPRDR_MONITOR_READY* monitorReady)
{
mfContext* mfc = (mfContext*) cliprdr->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_capabilities(CliprdrClientContext* cliprdr, CLIPRDR_CAPABILITIES* capabilities)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_capabilities(CliprdrClientContext* cliprdr, CLIPRDR_CAPABILITIES* capabilities)
{
UINT32 index;
CLIPRDR_CAPABILITY_SET* capabilitySet;
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_format_list(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_LIST* formatList)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_format_list(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_LIST* formatList)
{
UINT32 index;
CLIPRDR_FORMAT* format;
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_format_list_response(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_format_list_response(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_lock_clipboard_data(CliprdrClientContext* cliprdr, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_lock_clipboard_data(CliprdrClientContext* cliprdr, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_unlock_clipboard_data(CliprdrClientContext* cliprdr, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_unlock_clipboard_data(CliprdrClientContext* cliprdr, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_format_data_request(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_format_data_request(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
{
BYTE* data;
UINT32 size;
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_format_data_response(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_format_data_response(CliprdrClientContext* cliprdr, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
{
BYTE* data;
UINT32 size;
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_file_contents_request(CliprdrClientContext* cliprdr, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_file_contents_request(CliprdrClientContext* cliprdr, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR mac_cliprdr_server_file_contents_response(CliprdrClientContext* cliprdr, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT mac_cliprdr_server_file_contents_response(CliprdrClientContext* cliprdr, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
{
return CHANNEL_RC_OK;
}
#include <winpr/crt.h>
#include <winpr/tchar.h>
#include <winpr/stream.h>
-#include <winpr/win32error.h>
#include <freerdp/log.h>
#include <freerdp/client/cliprdr.h>
return 1;
}
-static WIN32ERROR wf_cliprdr_monitor_ready(CliprdrClientContext* context, CLIPRDR_MONITOR_READY* monitorReady)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_cliprdr_monitor_ready(CliprdrClientContext* context, CLIPRDR_MONITOR_READY* monitorReady)
{
wfClipboard* clipboard = (wfClipboard*) context->custom;
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_cliprdr_server_capabilities(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_cliprdr_server_capabilities(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities)
{
UINT32 index;
CLIPRDR_CAPABILITY_SET* capabilitySet;
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_cliprdr_server_format_list(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_cliprdr_server_format_list(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList)
{
UINT32 i, j;
formatMapping* mapping;
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_cliprdr_server_format_list_response(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_cliprdr_server_format_list_response(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
{
wfClipboard* clipboard = (wfClipboard*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR wf_cliprdr_server_lock_clipboard_data(CliprdrClientContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT wf_cliprdr_server_lock_clipboard_data(CliprdrClientContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData)
{
wfClipboard* clipboard = (wfClipboard*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR wf_cliprdr_server_unlock_clipboard_data(CliprdrClientContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT wf_cliprdr_server_unlock_clipboard_data(CliprdrClientContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
{
wfClipboard* clipboard = (wfClipboard*) context->custom;
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_cliprdr_server_format_data_request(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_cliprdr_server_format_data_request(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
{
int size = 0;
char* buff = NULL;
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_cliprdr_server_format_data_response(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_cliprdr_server_format_data_response(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
{
BYTE* data;
HANDLE hMem;
return CHANNEL_RC_OK;
}
-WIN32ERROR wf_cliprdr_server_file_contents_request(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT wf_cliprdr_server_file_contents_request(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
{
UINT32 uSize = 0;
BYTE* pData = NULL;
return ERROR_INTERNAL_ERROR;
}
-WIN32ERROR wf_cliprdr_server_file_contents_response(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT wf_cliprdr_server_file_contents_response(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse)
{
wfClipboard* clipboard = (wfClipboard*) context->custom;
/* RemoteApp Virtual Channel Extension */
-static WIN32ERROR wf_rail_server_execute_result(RailClientContext* context, RAIL_EXEC_RESULT_ORDER* execResult)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_rail_server_execute_result(RailClientContext* context, RAIL_EXEC_RESULT_ORDER* execResult)
{
WLog_DBG(TAG, "RailServerExecuteResult: 0x%04X", execResult->rawResult);
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_rail_server_system_param(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_rail_server_system_param(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_rail_server_handshake(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_rail_server_handshake(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake)
{
RAIL_EXEC_ORDER exec;
RAIL_SYSPARAM_ORDER sysparam;
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_rail_server_handshake_ex(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_rail_server_handshake_ex(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_rail_server_local_move_size(RailClientContext* context, RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_rail_server_local_move_size(RailClientContext* context, RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_rail_server_min_max_info(RailClientContext* context, RAIL_MINMAXINFO_ORDER* minMaxInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_rail_server_min_max_info(RailClientContext* context, RAIL_MINMAXINFO_ORDER* minMaxInfo)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_rail_server_language_bar_info(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_rail_server_language_bar_info(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR wf_rail_server_get_appid_response(RailClientContext* context, RAIL_GET_APPID_RESP_ORDER* getAppIdResp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT wf_rail_server_get_appid_response(RailClientContext* context, RAIL_GET_APPID_RESP_ORDER* getAppIdResp)
{
return CHANNEL_RC_OK;
}
xfc->controlToggle = !xfc->controlToggle;
}
-WIN32ERROR xf_encomsp_participant_created(EncomspClientContext* context, ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_encomsp_participant_created(EncomspClientContext* context, ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated)
{
return CHANNEL_RC_OK;
}
#include <winpr/image.h>
#include <winpr/stream.h>
#include <winpr/clipboard.h>
-#include <winpr/win32error.h>
#include <freerdp/log.h>
#include <freerdp/client/cliprdr.h>
return 1;
}
-static WIN32ERROR xf_cliprdr_monitor_ready(CliprdrClientContext* context, CLIPRDR_MONITOR_READY* monitorReady)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_cliprdr_monitor_ready(CliprdrClientContext* context, CLIPRDR_MONITOR_READY* monitorReady)
{
xfClipboard* clipboard = (xfClipboard*) context->custom;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_cliprdr_server_capabilities(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_cliprdr_server_capabilities(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities)
{
//xfClipboard* clipboard = (xfClipboard*) context->custom;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_cliprdr_server_format_list(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_cliprdr_server_format_list(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList)
{
int i, j;
CLIPRDR_FORMAT* format;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_cliprdr_server_format_list_response(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_cliprdr_server_format_list_response(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse)
{
//xfClipboard* clipboard = (xfClipboard*) context->custom;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_cliprdr_server_format_data_request(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_cliprdr_server_format_data_request(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest)
{
xfCliprdrFormat* format = NULL;
UINT32 formatId = formatDataRequest->requestedFormatId;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_cliprdr_server_format_data_response(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_cliprdr_server_format_data_response(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse)
{
BOOL bSuccess;
BYTE* pSrcData;
#define TAG CLIENT_TAG("x11")
-WIN32ERROR xf_ResetGraphics(RdpgfxClientContext* context, RDPGFX_RESET_GRAPHICS_PDU* resetGraphics)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_ResetGraphics(RdpgfxClientContext* context, RDPGFX_RESET_GRAPHICS_PDU* resetGraphics)
{
UINT16 count;
int index;
return status;
}
-WIN32ERROR xf_StartFrame(RdpgfxClientContext* context, RDPGFX_START_FRAME_PDU* startFrame)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_StartFrame(RdpgfxClientContext* context, RDPGFX_START_FRAME_PDU* startFrame)
{
xfContext* xfc = (xfContext*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_EndFrame(RdpgfxClientContext* context, RDPGFX_END_FRAME_PDU* endFrame)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_EndFrame(RdpgfxClientContext* context, RDPGFX_END_FRAME_PDU* endFrame)
{
xfContext* xfc = (xfContext*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceCommand_Uncompressed(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceCommand_Uncompressed(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
xfGfxSurface* surface;
RECTANGLE_16 invalidRect;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceCommand_RemoteFX(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceCommand_RemoteFX(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int j;
UINT16 i;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceCommand_ClearCodec(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceCommand_ClearCodec(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status;
BYTE* DstData = NULL;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceCommand_Planar(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceCommand_Planar(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status;
BYTE* DstData = NULL;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceCommand_H264(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceCommand_H264(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status;
UINT32 i;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceCommand_Alpha(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceCommand_Alpha(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status = 0;
xfGfxSurface* surface;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceCommand_Progressive(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceCommand_Progressive(xfContext* xfc, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int i, j;
int status;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceCommand(RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceCommand(RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
xfContext* xfc = (xfContext*) context->custom;
switch (cmd->codecId)
return status;
}
-WIN32ERROR xf_DeleteEncodingContext(RdpgfxClientContext* context, RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_DeleteEncodingContext(RdpgfxClientContext* context, RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_CreateSurface(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU* createSurface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_CreateSurface(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU* createSurface)
{
size_t size;
UINT32 bytesPerPixel;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_DeleteSurface(RdpgfxClientContext* context, RDPGFX_DELETE_SURFACE_PDU* deleteSurface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_DeleteSurface(RdpgfxClientContext* context, RDPGFX_DELETE_SURFACE_PDU* deleteSurface)
{
xfGfxSurface* surface = NULL;
xfContext* xfc = (xfContext*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SolidFill(RdpgfxClientContext* context, RDPGFX_SOLID_FILL_PDU* solidFill)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SolidFill(RdpgfxClientContext* context, RDPGFX_SOLID_FILL_PDU* solidFill)
{
UINT16 index;
UINT32 color;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface)
{
UINT16 index;
BOOL sameSurface;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_SurfaceToCache(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_SurfaceToCache(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache)
{
size_t size;
RDPGFX_RECT16* rect;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_CacheToSurface(RdpgfxClientContext* context, RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_CacheToSurface(RdpgfxClientContext* context, RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface)
{
UINT16 index;
RDPGFX_POINT16* destPt;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_CacheImportReply(RdpgfxClientContext* context, RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_CacheImportReply(RdpgfxClientContext* context, RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_EvictCacheEntry(RdpgfxClientContext* context, RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_EvictCacheEntry(RdpgfxClientContext* context, RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry)
{
xfGfxCacheEntry* cacheEntry;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_MapSurfaceToOutput(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_MapSurfaceToOutput(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput)
{
xfGfxSurface* surface;
return CHANNEL_RC_OK;
}
-WIN32ERROR xf_MapSurfaceToWindow(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT xf_MapSurfaceToWindow(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow)
{
return CHANNEL_RC_OK;
}
/* RemoteApp Virtual Channel Extension */
-static WIN32ERROR xf_rail_server_execute_result(RailClientContext* context, RAIL_EXEC_RESULT_ORDER* execResult)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_rail_server_execute_result(RailClientContext* context, RAIL_EXEC_RESULT_ORDER* execResult)
{
xfContext* xfc = (xfContext*) context->custom;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_rail_server_system_param(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_rail_server_system_param(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_rail_server_handshake(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_rail_server_handshake(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake)
{
RAIL_EXEC_ORDER exec;
RAIL_SYSPARAM_ORDER sysparam;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_rail_server_handshake_ex(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_rail_server_handshake_ex(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_rail_server_local_move_size(RailClientContext* context, RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_rail_server_local_move_size(RailClientContext* context, RAIL_LOCALMOVESIZE_ORDER* localMoveSize)
{
int x = 0, y = 0;
int direction = 0;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_rail_server_min_max_info(RailClientContext* context, RAIL_MINMAXINFO_ORDER* minMaxInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_rail_server_min_max_info(RailClientContext* context, RAIL_MINMAXINFO_ORDER* minMaxInfo)
{
xfAppWindow* appWindow = NULL;
xfContext* xfc = (xfContext*) context->custom;
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_rail_server_language_bar_info(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_rail_server_language_bar_info(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR xf_rail_server_get_appid_response(RailClientContext* context, RAIL_GET_APPID_RESP_ORDER* getAppIdResp)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT xf_rail_server_get_appid_response(RailClientContext* context, RAIL_GET_APPID_RESP_ORDER* getAppIdResp)
{
return CHANNEL_RC_OK;
}
#include <winpr/stream.h>
#include <winpr/interlocked.h>
#include <winpr/collections.h>
-#include <winpr/win32error.h>
#include <freerdp/freerdp.h>
typedef struct _IRP IRP;
typedef struct _DEVMAN DEVMAN;
-typedef WIN32ERROR (*pcIRPRequest)(DEVICE* device, IRP* irp);
-typedef WIN32ERROR (*pcInitDevice)(DEVICE* device);
-typedef WIN32ERROR (*pcFreeDevice)(DEVICE* device);
+typedef UINT (*pcIRPRequest)(DEVICE* device, IRP* irp);
+typedef UINT (*pcInitDevice)(DEVICE* device);
+typedef UINT (*pcFreeDevice)(DEVICE* device);
struct _DEVICE
{
pcFreeDevice Free;
};
-typedef WIN32ERROR (*pcIRPResponse)(IRP* irp);
+typedef UINT (*pcIRPResponse)(IRP* irp);
struct _IRP
{
wListDictionary* devices;
};
-typedef WIN32ERROR (*pcRegisterDevice)(DEVMAN* devman, DEVICE* device);
+typedef UINT (*pcRegisterDevice)(DEVMAN* devman, DEVICE* device);
struct _DEVICE_SERVICE_ENTRY_POINTS
{
typedef struct _DEVICE_SERVICE_ENTRY_POINTS DEVICE_SERVICE_ENTRY_POINTS;
typedef DEVICE_SERVICE_ENTRY_POINTS* PDEVICE_SERVICE_ENTRY_POINTS;
-typedef WIN32ERROR (*PDEVICE_SERVICE_ENTRY)(PDEVICE_SERVICE_ENTRY_POINTS);
+typedef UINT (*PDEVICE_SERVICE_ENTRY)(PDEVICE_SERVICE_ENTRY_POINTS);
#endif /* FREERDP_CHANNEL_RDPDR_H */
* Subsystem Interface
*/
-typedef WIN32ERROR (*AudinReceive) (BYTE* data, int size, void* userData);
+typedef UINT (*AudinReceive) (BYTE* data, int size, void* userData);
typedef struct audin_format audinFormat;
struct audin_format
typedef struct _IAudinDevice IAudinDevice;
struct _IAudinDevice
{
- WIN32ERROR (*Open) (IAudinDevice* devplugin, AudinReceive receive, void* userData);
+ UINT (*Open) (IAudinDevice* devplugin, AudinReceive receive, void* userData);
BOOL (*FormatSupported) (IAudinDevice* devplugin, audinFormat* format);
- WIN32ERROR (*SetFormat) (IAudinDevice* devplugin, audinFormat* format, UINT32 FramesPerPacket);
- WIN32ERROR (*Close) (IAudinDevice* devplugin);
- WIN32ERROR (*Free) (IAudinDevice* devplugin);
+ UINT (*SetFormat) (IAudinDevice* devplugin, audinFormat* format, UINT32 FramesPerPacket);
+ UINT (*Close) (IAudinDevice* devplugin);
+ UINT (*Free) (IAudinDevice* devplugin);
};
#define AUDIN_DEVICE_EXPORT_FUNC_NAME "freerdp_audin_client_subsystem_entry"
-typedef WIN32ERROR (*PREGISTERAUDINDEVICE)(IWTSPlugin* plugin, IAudinDevice* device);
+typedef UINT (*PREGISTERAUDINDEVICE)(IWTSPlugin* plugin, IAudinDevice* device);
struct _FREERDP_AUDIN_DEVICE_ENTRY_POINTS
{
typedef struct _FREERDP_AUDIN_DEVICE_ENTRY_POINTS FREERDP_AUDIN_DEVICE_ENTRY_POINTS;
typedef FREERDP_AUDIN_DEVICE_ENTRY_POINTS* PFREERDP_AUDIN_DEVICE_ENTRY_POINTS;
-typedef WIN32ERROR (*PFREERDP_AUDIN_DEVICE_ENTRY)(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints);
+typedef UINT (*PFREERDP_AUDIN_DEVICE_ENTRY)(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints);
#endif /* FREERDP_CHANNEL_CLIENT_AUDIN_H */
#define FREERDP_CHANNEL_CLIENT_CLIPRDR_H
#include <freerdp/types.h>
-#include <winpr/win32error.h>
#include <freerdp/message.h>
#include <freerdp/channels/cliprdr.h>
typedef struct _cliprdr_client_context CliprdrClientContext;
-typedef WIN32ERROR (*pcCliprdrServerCapabilities)(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities);
-typedef WIN32ERROR (*pcCliprdrClientCapabilities)(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities);
-typedef WIN32ERROR (*pcCliprdrMonitorReady)(CliprdrClientContext* context, CLIPRDR_MONITOR_READY* monitorReady);
-typedef WIN32ERROR (*pcCliprdrTempDirectory)(CliprdrClientContext* context, CLIPRDR_TEMP_DIRECTORY* tempDirectory);
-typedef WIN32ERROR (*pcCliprdrClientFormatList)(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList);
-typedef WIN32ERROR (*pcCliprdrServerFormatList)(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList);
-typedef WIN32ERROR (*pcCliprdrClientFormatListResponse)(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
-typedef WIN32ERROR (*pcCliprdrServerFormatListResponse)(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
-typedef WIN32ERROR (*pcCliprdrClientLockClipboardData)(CliprdrClientContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
-typedef WIN32ERROR (*pcCliprdrServerLockClipboardData)(CliprdrClientContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
-typedef WIN32ERROR (*pcCliprdrClientUnlockClipboardData)(CliprdrClientContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
-typedef WIN32ERROR (*pcCliprdrServerUnlockClipboardData)(CliprdrClientContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
-typedef WIN32ERROR (*pcCliprdrClientFormatDataRequest)(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
-typedef WIN32ERROR (*pcCliprdrServerFormatDataRequest)(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
-typedef WIN32ERROR (*pcCliprdrClientFormatDataResponse)(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
-typedef WIN32ERROR (*pcCliprdrServerFormatDataResponse)(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
-typedef WIN32ERROR (*pcCliprdrClientFileContentsRequest)(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
-typedef WIN32ERROR (*pcCliprdrServerFileContentsRequest)(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
-typedef WIN32ERROR (*pcCliprdrClientFileContentsResponse)(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
-typedef WIN32ERROR (*pcCliprdrServerFileContentsResponse)(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
+typedef UINT (*pcCliprdrServerCapabilities)(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities);
+typedef UINT (*pcCliprdrClientCapabilities)(CliprdrClientContext* context, CLIPRDR_CAPABILITIES* capabilities);
+typedef UINT (*pcCliprdrMonitorReady)(CliprdrClientContext* context, CLIPRDR_MONITOR_READY* monitorReady);
+typedef UINT (*pcCliprdrTempDirectory)(CliprdrClientContext* context, CLIPRDR_TEMP_DIRECTORY* tempDirectory);
+typedef UINT (*pcCliprdrClientFormatList)(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList);
+typedef UINT (*pcCliprdrServerFormatList)(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST* formatList);
+typedef UINT (*pcCliprdrClientFormatListResponse)(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
+typedef UINT (*pcCliprdrServerFormatListResponse)(CliprdrClientContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
+typedef UINT (*pcCliprdrClientLockClipboardData)(CliprdrClientContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
+typedef UINT (*pcCliprdrServerLockClipboardData)(CliprdrClientContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
+typedef UINT (*pcCliprdrClientUnlockClipboardData)(CliprdrClientContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
+typedef UINT (*pcCliprdrServerUnlockClipboardData)(CliprdrClientContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
+typedef UINT (*pcCliprdrClientFormatDataRequest)(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
+typedef UINT (*pcCliprdrServerFormatDataRequest)(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
+typedef UINT (*pcCliprdrClientFormatDataResponse)(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
+typedef UINT (*pcCliprdrServerFormatDataResponse)(CliprdrClientContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
+typedef UINT (*pcCliprdrClientFileContentsRequest)(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
+typedef UINT (*pcCliprdrServerFileContentsRequest)(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
+typedef UINT (*pcCliprdrClientFileContentsResponse)(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
+typedef UINT (*pcCliprdrServerFileContentsResponse)(CliprdrClientContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
struct _cliprdr_client_context
{
typedef struct _disp_client_context DispClientContext;
-typedef WIN32ERROR (*pcDispSendMonitorLayout)(DispClientContext* context, UINT32 NumMonitors, DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors);
+typedef UINT (*pcDispSendMonitorLayout)(DispClientContext* context, UINT32 NumMonitors, DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors);
struct _disp_client_context
{
#ifndef FREERDP_CHANNEL_CLIENT_DRDYNVC_H
#define FREERDP_CHANNEL_CLIENT_DRDYNVC_H
-#include <winpr/win32error.h>
-
/**
* Client Interface
*/
typedef struct _drdynvc_client_context DrdynvcClientContext;
typedef int (*pcDrdynvcGetVersion)(DrdynvcClientContext* context);
-typedef WIN32ERROR (*pcDrdynvcOnChannelConnected)(DrdynvcClientContext* context, const char* name, void* pInterface);
-typedef WIN32ERROR (*pcDrdynvcOnChannelDisconnected)(DrdynvcClientContext* context, const char* name, void* pInterface);
+typedef UINT (*pcDrdynvcOnChannelConnected)(DrdynvcClientContext* context, const char* name, void* pInterface);
+typedef UINT (*pcDrdynvcOnChannelDisconnected)(DrdynvcClientContext* context, const char* name, void* pInterface);
struct _drdynvc_client_context
{
#define FREERDP_CHANNEL_CLIENT_ENCOMSP_H
#include <freerdp/channels/encomsp.h>
-#include <winpr/win32error.h>
/**
* Client Interface
typedef struct _encomsp_client_context EncomspClientContext;
-typedef WIN32ERROR (*pcEncomspFilterUpdated)(EncomspClientContext* context, ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
-typedef WIN32ERROR (*pcEncomspApplicationCreated)(EncomspClientContext* context, ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
-typedef WIN32ERROR (*pcEncomspApplicationRemoved)(EncomspClientContext* context, ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
-typedef WIN32ERROR (*pcEncomspWindowCreated)(EncomspClientContext* context, ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
-typedef WIN32ERROR (*pcEncomspWindowRemoved)(EncomspClientContext* context, ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
-typedef WIN32ERROR (*pcEncomspShowWindow)(EncomspClientContext* context, ENCOMSP_SHOW_WINDOW_PDU* showWindow);
-typedef WIN32ERROR (*pcEncomspParticipantCreated)(EncomspClientContext* context, ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
-typedef WIN32ERROR (*pcEncomspParticipantRemoved)(EncomspClientContext* context, ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
-typedef WIN32ERROR (*pcEncomspChangeParticipantControlLevel)(EncomspClientContext* context, ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
-typedef WIN32ERROR (*pcEncomspGraphicsStreamPaused)(EncomspClientContext* context, ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
-typedef WIN32ERROR (*pcEncomspGraphicsStreamResumed)(EncomspClientContext* context, ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
+typedef UINT (*pcEncomspFilterUpdated)(EncomspClientContext* context, ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
+typedef UINT (*pcEncomspApplicationCreated)(EncomspClientContext* context, ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
+typedef UINT (*pcEncomspApplicationRemoved)(EncomspClientContext* context, ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
+typedef UINT (*pcEncomspWindowCreated)(EncomspClientContext* context, ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
+typedef UINT (*pcEncomspWindowRemoved)(EncomspClientContext* context, ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
+typedef UINT (*pcEncomspShowWindow)(EncomspClientContext* context, ENCOMSP_SHOW_WINDOW_PDU* showWindow);
+typedef UINT (*pcEncomspParticipantCreated)(EncomspClientContext* context, ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
+typedef UINT (*pcEncomspParticipantRemoved)(EncomspClientContext* context, ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
+typedef UINT (*pcEncomspChangeParticipantControlLevel)(EncomspClientContext* context, ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
+typedef UINT (*pcEncomspGraphicsStreamPaused)(EncomspClientContext* context, ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
+typedef UINT (*pcEncomspGraphicsStreamResumed)(EncomspClientContext* context, ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
struct _encomsp_client_context
{
#include <freerdp/rail.h>
#include <freerdp/message.h>
#include <freerdp/channels/rail.h>
-#include <winpr/win32error.h>
/**
* Client Interface
typedef struct _rail_client_context RailClientContext;
-typedef WIN32ERROR (*pcRailClientExecute)(RailClientContext* context, RAIL_EXEC_ORDER* exec);
-typedef WIN32ERROR (*pcRailClientActivate)(RailClientContext* context, RAIL_ACTIVATE_ORDER* activate);
-typedef WIN32ERROR (*pcRailClientSystemParam)(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam);
-typedef WIN32ERROR (*pcRailServerSystemParam)(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam);
-typedef WIN32ERROR (*pcRailClientSystemCommand)(RailClientContext* context, RAIL_SYSCOMMAND_ORDER* syscommand);
-typedef WIN32ERROR (*pcRailClientHandshake)(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake);
-typedef WIN32ERROR (*pcRailServerHandshake)(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake);
-typedef WIN32ERROR (*pcRailClientHandshakeEx)(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
-typedef WIN32ERROR (*pcRailServerHandshakeEx)(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
-typedef WIN32ERROR (*pcRailClientNotifyEvent)(RailClientContext* context, RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
-typedef WIN32ERROR (*pcRailClientWindowMove)(RailClientContext* context, RAIL_WINDOW_MOVE_ORDER* windowMove);
-typedef WIN32ERROR (*pcRailServerLocalMoveSize)(RailClientContext* context, RAIL_LOCALMOVESIZE_ORDER* localMoveSize);
-typedef WIN32ERROR (*pcRailServerMinMaxInfo)(RailClientContext* context, RAIL_MINMAXINFO_ORDER* minMaxInfo);
-typedef WIN32ERROR (*pcRailClientInformation)(RailClientContext* context, RAIL_CLIENT_STATUS_ORDER* clientStatus);
-typedef WIN32ERROR (*pcRailClientSystemMenu)(RailClientContext* context, RAIL_SYSMENU_ORDER* sysmenu);
-typedef WIN32ERROR (*pcRailClientLanguageBarInfo)(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo);
-typedef WIN32ERROR (*pcRailServerLanguageBarInfo)(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo);
-typedef WIN32ERROR (*pcRailServerExecuteResult)(RailClientContext* context, RAIL_EXEC_RESULT_ORDER* execResult);
-typedef WIN32ERROR (*pcRailClientGetAppIdRequest)(RailClientContext* context, RAIL_GET_APPID_REQ_ORDER* getAppIdReq);
-typedef WIN32ERROR (*pcRailServerGetAppIdResponse)(RailClientContext* context, RAIL_GET_APPID_RESP_ORDER* getAppIdResp);
+typedef UINT (*pcRailClientExecute)(RailClientContext* context, RAIL_EXEC_ORDER* exec);
+typedef UINT (*pcRailClientActivate)(RailClientContext* context, RAIL_ACTIVATE_ORDER* activate);
+typedef UINT (*pcRailClientSystemParam)(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam);
+typedef UINT (*pcRailServerSystemParam)(RailClientContext* context, RAIL_SYSPARAM_ORDER* sysparam);
+typedef UINT (*pcRailClientSystemCommand)(RailClientContext* context, RAIL_SYSCOMMAND_ORDER* syscommand);
+typedef UINT (*pcRailClientHandshake)(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake);
+typedef UINT (*pcRailServerHandshake)(RailClientContext* context, RAIL_HANDSHAKE_ORDER* handshake);
+typedef UINT (*pcRailClientHandshakeEx)(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
+typedef UINT (*pcRailServerHandshakeEx)(RailClientContext* context, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
+typedef UINT (*pcRailClientNotifyEvent)(RailClientContext* context, RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
+typedef UINT (*pcRailClientWindowMove)(RailClientContext* context, RAIL_WINDOW_MOVE_ORDER* windowMove);
+typedef UINT (*pcRailServerLocalMoveSize)(RailClientContext* context, RAIL_LOCALMOVESIZE_ORDER* localMoveSize);
+typedef UINT (*pcRailServerMinMaxInfo)(RailClientContext* context, RAIL_MINMAXINFO_ORDER* minMaxInfo);
+typedef UINT (*pcRailClientInformation)(RailClientContext* context, RAIL_CLIENT_STATUS_ORDER* clientStatus);
+typedef UINT (*pcRailClientSystemMenu)(RailClientContext* context, RAIL_SYSMENU_ORDER* sysmenu);
+typedef UINT (*pcRailClientLanguageBarInfo)(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo);
+typedef UINT (*pcRailServerLanguageBarInfo)(RailClientContext* context, RAIL_LANGBAR_INFO_ORDER* langBarInfo);
+typedef UINT (*pcRailServerExecuteResult)(RailClientContext* context, RAIL_EXEC_RESULT_ORDER* execResult);
+typedef UINT (*pcRailClientGetAppIdRequest)(RailClientContext* context, RAIL_GET_APPID_REQ_ORDER* getAppIdReq);
+typedef UINT (*pcRailServerGetAppIdResponse)(RailClientContext* context, RAIL_GET_APPID_RESP_ORDER* getAppIdResp);
struct _rail_client_context
{
#define FREERDP_CHANNEL_CLIENT_RDPEI_H
#include <freerdp/channels/rdpei.h>
-#include <winpr/win32error.h>
/**
* Client Interface
typedef struct _rdpei_client_context RdpeiClientContext;
typedef int (*pcRdpeiGetVersion)(RdpeiClientContext* context);
-typedef WIN32ERROR (*pcRdpeiAddContact)(RdpeiClientContext* context, RDPINPUT_CONTACT_DATA* contact);
+typedef UINT (*pcRdpeiAddContact)(RdpeiClientContext* context, RDPINPUT_CONTACT_DATA* contact);
-typedef WIN32ERROR (*pcRdpeiTouchBegin)(RdpeiClientContext* context, int externalId, int x, int y, int* contactId);
-typedef WIN32ERROR (*pcRdpeiTouchUpdate)(RdpeiClientContext* context, int externalId, int x, int y, int* contactId);
-typedef WIN32ERROR (*pcRdpeiTouchEnd)(RdpeiClientContext* context, int externalId, int x, int y, int* contactId);
+typedef UINT (*pcRdpeiTouchBegin)(RdpeiClientContext* context, int externalId, int x, int y, int* contactId);
+typedef UINT (*pcRdpeiTouchUpdate)(RdpeiClientContext* context, int externalId, int x, int y, int* contactId);
+typedef UINT (*pcRdpeiTouchEnd)(RdpeiClientContext* context, int externalId, int x, int y, int* contactId);
-typedef WIN32ERROR (*pcRdpeiSuspendTouch)(RdpeiClientContext* context);
-typedef WIN32ERROR (*pcRdpeiResumeTouch)(RdpeiClientContext* context);
+typedef UINT (*pcRdpeiSuspendTouch)(RdpeiClientContext* context);
+typedef UINT (*pcRdpeiResumeTouch)(RdpeiClientContext* context);
struct _rdpei_client_context
{
typedef struct _rdpgfx_client_context RdpgfxClientContext;
-typedef WIN32ERROR (*pcRdpgfxResetGraphics)(RdpgfxClientContext* context, RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
-typedef WIN32ERROR (*pcRdpgfxStartFrame)(RdpgfxClientContext* context, RDPGFX_START_FRAME_PDU* startFrame);
-typedef WIN32ERROR (*pcRdpgfxEndFrame)(RdpgfxClientContext* context, RDPGFX_END_FRAME_PDU* endFrame);
-typedef WIN32ERROR (*pcRdpgfxSurfaceCommand)(RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd);
-typedef WIN32ERROR (*pcRdpgfxDeleteEncodingContext)(RdpgfxClientContext* context, RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
-typedef WIN32ERROR (*pcRdpgfxCreateSurface)(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU* createSurface);
-typedef WIN32ERROR (*pcRdpgfxDeleteSurface)(RdpgfxClientContext* context, RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
-typedef WIN32ERROR (*pcRdpgfxSolidFill)(RdpgfxClientContext* context, RDPGFX_SOLID_FILL_PDU* solidFill);
-typedef WIN32ERROR (*pcRdpgfxSurfaceToSurface)(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
-typedef WIN32ERROR (*pcRdpgfxSurfaceToCache)(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
-typedef WIN32ERROR (*pcRdpgfxCacheToSurface)(RdpgfxClientContext* context, RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
-typedef WIN32ERROR (*pcRdpgfxCacheImportOffer)(RdpgfxClientContext* context, RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
-typedef WIN32ERROR (*pcRdpgfxCacheImportReply)(RdpgfxClientContext* context, RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
-typedef WIN32ERROR (*pcRdpgfxEvictCacheEntry)(RdpgfxClientContext* context, RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
-typedef WIN32ERROR (*pcRdpgfxMapSurfaceToOutput)(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
-typedef WIN32ERROR (*pcRdpgfxMapSurfaceToWindow)(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
+typedef UINT (*pcRdpgfxResetGraphics)(RdpgfxClientContext* context, RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
+typedef UINT (*pcRdpgfxStartFrame)(RdpgfxClientContext* context, RDPGFX_START_FRAME_PDU* startFrame);
+typedef UINT (*pcRdpgfxEndFrame)(RdpgfxClientContext* context, RDPGFX_END_FRAME_PDU* endFrame);
+typedef UINT (*pcRdpgfxSurfaceCommand)(RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd);
+typedef UINT (*pcRdpgfxDeleteEncodingContext)(RdpgfxClientContext* context, RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
+typedef UINT (*pcRdpgfxCreateSurface)(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU* createSurface);
+typedef UINT (*pcRdpgfxDeleteSurface)(RdpgfxClientContext* context, RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
+typedef UINT (*pcRdpgfxSolidFill)(RdpgfxClientContext* context, RDPGFX_SOLID_FILL_PDU* solidFill);
+typedef UINT (*pcRdpgfxSurfaceToSurface)(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
+typedef UINT (*pcRdpgfxSurfaceToCache)(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
+typedef UINT (*pcRdpgfxCacheToSurface)(RdpgfxClientContext* context, RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
+typedef UINT (*pcRdpgfxCacheImportOffer)(RdpgfxClientContext* context, RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
+typedef UINT (*pcRdpgfxCacheImportReply)(RdpgfxClientContext* context, RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
+typedef UINT (*pcRdpgfxEvictCacheEntry)(RdpgfxClientContext* context, RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
+typedef UINT (*pcRdpgfxMapSurfaceToOutput)(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
+typedef UINT (*pcRdpgfxMapSurfaceToWindow)(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
-typedef WIN32ERROR (*pcRdpgfxSetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId, void* pData);
+typedef UINT (*pcRdpgfxSetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId, void* pData);
typedef void* (*pcRdpgfxGetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId);
-typedef WIN32ERROR (*pcRdpgfxGetSurfaceIds)(RdpgfxClientContext* context, UINT16** ppSurfaceIds, UINT16* count);
-typedef WIN32ERROR (*pcRdpgfxSetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot, void* pData);
+typedef UINT (*pcRdpgfxGetSurfaceIds)(RdpgfxClientContext* context, UINT16** ppSurfaceIds, UINT16* count);
+typedef UINT (*pcRdpgfxSetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot, void* pData);
typedef void* (*pcRdpgfxGetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot);
struct _rdpgfx_client_context
#define FREERDP_CHANNEL_CLIENT_RDPSND_H
#include <freerdp/channels/rdpsnd.h>
-#include <winpr/win32error.h>
/**
* Subsystem Interface
typedef BOOL (*pcWaveDecode) (rdpsndDevicePlugin* device, RDPSND_WAVE* wave);
typedef void (*pcWavePlay) (rdpsndDevicePlugin* device, RDPSND_WAVE* wave);
-typedef WIN32ERROR (*pcWaveConfirm) (rdpsndDevicePlugin* device, RDPSND_WAVE* wave);
+typedef UINT (*pcWaveConfirm) (rdpsndDevicePlugin* device, RDPSND_WAVE* wave);
struct rdpsnd_device_plugin
{
typedef struct _FREERDP_RDPSND_DEVICE_ENTRY_POINTS FREERDP_RDPSND_DEVICE_ENTRY_POINTS;
typedef FREERDP_RDPSND_DEVICE_ENTRY_POINTS* PFREERDP_RDPSND_DEVICE_ENTRY_POINTS;
-typedef WIN32ERROR (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints);
+typedef UINT (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints);
#endif /* FREERDP_CHANNEL_CLIENT_RDPSND_H */
#include <freerdp/types.h>
#include <freerdp/addin.h>
-#include <winpr/win32error.h>
typedef struct _IWTSVirtualChannelManager IWTSVirtualChannelManager;
typedef struct _IWTSListener IWTSListener;
struct _IWTSListener
{
/* Retrieves the listener-specific configuration. */
- WIN32ERROR (*GetConfiguration)(IWTSListener *pListener,
+ UINT (*GetConfiguration)(IWTSListener *pListener,
void **ppPropertyBag);
void *pInterface;
struct _IWTSVirtualChannel
{
/* Starts a write request on the channel. */
- WIN32ERROR (*Write)(IWTSVirtualChannel *pChannel,
+ UINT (*Write)(IWTSVirtualChannel *pChannel,
ULONG cbSize,
BYTE *pBuffer,
void *pReserved);
/* Closes the channel. */
- WIN32ERROR (*Close)(IWTSVirtualChannel *pChannel);
+ UINT (*Close)(IWTSVirtualChannel *pChannel);
};
struct _IWTSVirtualChannelManager
{
/* Returns an instance of a listener object that listens on a specific
endpoint, or creates a static channel. */
- WIN32ERROR (*CreateListener)(IWTSVirtualChannelManager *pChannelMgr,
+ UINT (*CreateListener)(IWTSVirtualChannelManager *pChannelMgr,
const char *pszChannelName,
ULONG ulFlags,
IWTSListenerCallback *pListenerCallback,
struct _IWTSPlugin
{
/* Used for the first call that is made from the client to the plug-in. */
- WIN32ERROR (*Initialize)(IWTSPlugin *pPlugin,
+ UINT (*Initialize)(IWTSPlugin *pPlugin,
IWTSVirtualChannelManager *pChannelMgr);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has successfully connected to the Remote Desktop Session Host (RD
Session Host) server. */
- WIN32ERROR (*Connected)(IWTSPlugin *pPlugin);
+ UINT (*Connected)(IWTSPlugin *pPlugin);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has disconnected from the RD Session Host server. */
- WIN32ERROR (*Disconnected)(IWTSPlugin *pPlugin,
+ UINT (*Disconnected)(IWTSPlugin *pPlugin,
DWORD dwDisconnectCode);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has terminated. */
- WIN32ERROR (*Terminated)(IWTSPlugin *pPlugin);
+ UINT (*Terminated)(IWTSPlugin *pPlugin);
/* Extended */
{
/* Accepts or denies a connection request for an incoming connection to
the associated listener. */
- WIN32ERROR (*OnNewChannelConnection)(IWTSListenerCallback *pListenerCallback,
+ UINT (*OnNewChannelConnection)(IWTSListenerCallback *pListenerCallback,
IWTSVirtualChannel *pChannel,
BYTE *Data,
BOOL *pbAccept,
struct _IWTSVirtualChannelCallback
{
/* Notifies the user about data that is being received. */
- WIN32ERROR (*OnDataReceived) (IWTSVirtualChannelCallback* pChannelCallback, wStream* data);
+ UINT (*OnDataReceived) (IWTSVirtualChannelCallback* pChannelCallback, wStream* data);
/* Notifies the user that the channel has been opened. */
- WIN32ERROR (*OnOpen) (IWTSVirtualChannelCallback* pChannelCallback);
+ UINT (*OnOpen) (IWTSVirtualChannelCallback* pChannelCallback);
/* Notifies the user that the channel has been closed. */
- WIN32ERROR (*OnClose) (IWTSVirtualChannelCallback* pChannelCallback);
+ UINT (*OnClose) (IWTSVirtualChannelCallback* pChannelCallback);
};
/* The DVC Plugin entry points */
typedef struct _IDRDYNVC_ENTRY_POINTS IDRDYNVC_ENTRY_POINTS;
struct _IDRDYNVC_ENTRY_POINTS
{
- WIN32ERROR (*RegisterPlugin)(IDRDYNVC_ENTRY_POINTS *pEntryPoints,
+ UINT (*RegisterPlugin)(IDRDYNVC_ENTRY_POINTS *pEntryPoints,
const char *name, IWTSPlugin *pPlugin);
IWTSPlugin *(*GetPlugin)(IDRDYNVC_ENTRY_POINTS *pEntryPoints,
const char *name);
void* (*GetRdpSettings)(IDRDYNVC_ENTRY_POINTS* pEntryPoints);
};
-typedef WIN32ERROR (*PDVC_PLUGIN_ENTRY)(IDRDYNVC_ENTRY_POINTS *);
+typedef UINT (*PDVC_PLUGIN_ENTRY)(IDRDYNVC_ENTRY_POINTS *);
void *get_callback_by_name(const char *name, void **context);
void add_callback_by_name(const char *name, void *fkt, void *context);
#include <freerdp/extension.h>
#include <winpr/stream.h>
-#include <winpr/win32error.h>
#include <freerdp/input.h>
#include <freerdp/update.h>
ALIGN64 wPubSub* pubSub; /* (offset 18) */
ALIGN64 HANDLE channelErrorEvent; /* (offset 19)*/
- ALIGN64 WIN32ERROR channelErrorNum; /*(offset 20)*/
+ ALIGN64 UINT channelErrorNum; /*(offset 20)*/
ALIGN64 char* errorDescription; /*(offset 21)*/
UINT64 paddingB[32 - 22]; /* 22 */
FREERDP_API ULONG freerdp_get_transport_sent(rdpContext* context, BOOL resetCount);
FREERDP_API HANDLE getChannelErrorEventHandle(rdpContext* context);
-FREERDP_API WIN32ERROR getChannelError(rdpContext* context);
+FREERDP_API UINT getChannelError(rdpContext* context);
FREERDP_API const char* getChannelErrorDescription(rdpContext* context);
-FREERDP_API void setChannelError(rdpContext* context, WIN32ERROR errorNum, char* description);
+FREERDP_API void setChannelError(rdpContext* context, UINT errorNum, char* description);
FREERDP_API BOOL checkChannelErrorEvent(rdpContext* context);
#ifdef __cplusplus
#include <freerdp/codec/audio.h>
#include <freerdp/channels/wtsvc.h>
#include <freerdp/channels/rdpsnd.h>
-#include <winpr/win32error.h>
typedef struct _audin_server_context audin_server_context;
-typedef WIN32ERROR (*psAudinServerSelectFormat)(audin_server_context* context, int client_format_index);
+typedef UINT (*psAudinServerSelectFormat)(audin_server_context* context, int client_format_index);
typedef BOOL (*psAudinServerOpen)(audin_server_context* context);
typedef BOOL (*psAudinServerClose)(audin_server_context* context);
-typedef WIN32ERROR (*psAudinServerOpening)(audin_server_context* context);
-typedef WIN32ERROR (*psAudinServerOpenResult)(audin_server_context* context, UINT32 result);
-typedef WIN32ERROR (*psAudinServerReceiveSamples)(audin_server_context* context, const void* buf, int nframes);
+typedef UINT (*psAudinServerOpening)(audin_server_context* context);
+typedef UINT (*psAudinServerOpenResult)(audin_server_context* context, UINT32 result);
+typedef UINT (*psAudinServerReceiveSamples)(audin_server_context* context, const void* buf, int nframes);
struct _audin_server_context
{
typedef struct _cliprdr_server_context CliprdrServerContext;
-typedef WIN32ERROR (*psCliprdrOpen)(CliprdrServerContext* context);
-typedef WIN32ERROR (*psCliprdrClose)(CliprdrServerContext* context);
-typedef WIN32ERROR (*psCliprdrStart)(CliprdrServerContext* context);
-typedef WIN32ERROR (*psCliprdrStop)(CliprdrServerContext* context);
+typedef UINT (*psCliprdrOpen)(CliprdrServerContext* context);
+typedef UINT (*psCliprdrClose)(CliprdrServerContext* context);
+typedef UINT (*psCliprdrStart)(CliprdrServerContext* context);
+typedef UINT (*psCliprdrStop)(CliprdrServerContext* context);
typedef HANDLE (*psCliprdrGetEventHandle)(CliprdrServerContext* context);
-typedef WIN32ERROR (*psCliprdrCheckEventHandle)(CliprdrServerContext* context);
+typedef UINT (*psCliprdrCheckEventHandle)(CliprdrServerContext* context);
-typedef WIN32ERROR (*psCliprdrServerCapabilities)(CliprdrServerContext* context, CLIPRDR_CAPABILITIES* capabilities);
-typedef WIN32ERROR (*psCliprdrClientCapabilities)(CliprdrServerContext* context, CLIPRDR_CAPABILITIES* capabilities);
-typedef WIN32ERROR (*psCliprdrMonitorReady)(CliprdrServerContext* context, CLIPRDR_MONITOR_READY* monitorReady);
-typedef WIN32ERROR (*psCliprdrTempDirectory)(CliprdrServerContext* context, CLIPRDR_TEMP_DIRECTORY* tempDirectory);
-typedef WIN32ERROR (*psCliprdrClientFormatList)(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST* formatList);
-typedef WIN32ERROR (*psCliprdrServerFormatList)(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST* formatList);
-typedef WIN32ERROR (*psCliprdrClientFormatListResponse)(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
-typedef WIN32ERROR (*psCliprdrServerFormatListResponse)(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
-typedef WIN32ERROR (*psCliprdrClientLockClipboardData)(CliprdrServerContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
-typedef WIN32ERROR (*psCliprdrServerLockClipboardData)(CliprdrServerContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
-typedef WIN32ERROR (*psCliprdrClientUnlockClipboardData)(CliprdrServerContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
-typedef WIN32ERROR (*psCliprdrServerUnlockClipboardData)(CliprdrServerContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
-typedef WIN32ERROR (*psCliprdrClientFormatDataRequest)(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
-typedef WIN32ERROR (*psCliprdrServerFormatDataRequest)(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
-typedef WIN32ERROR (*psCliprdrClientFormatDataResponse)(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
-typedef WIN32ERROR (*psCliprdrServerFormatDataResponse)(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
-typedef WIN32ERROR (*psCliprdrClientFileContentsRequest)(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
-typedef WIN32ERROR (*psCliprdrServerFileContentsRequest)(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
-typedef WIN32ERROR (*psCliprdrClientFileContentsResponse)(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
-typedef WIN32ERROR (*psCliprdrServerFileContentsResponse)(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
+typedef UINT (*psCliprdrServerCapabilities)(CliprdrServerContext* context, CLIPRDR_CAPABILITIES* capabilities);
+typedef UINT (*psCliprdrClientCapabilities)(CliprdrServerContext* context, CLIPRDR_CAPABILITIES* capabilities);
+typedef UINT (*psCliprdrMonitorReady)(CliprdrServerContext* context, CLIPRDR_MONITOR_READY* monitorReady);
+typedef UINT (*psCliprdrTempDirectory)(CliprdrServerContext* context, CLIPRDR_TEMP_DIRECTORY* tempDirectory);
+typedef UINT (*psCliprdrClientFormatList)(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST* formatList);
+typedef UINT (*psCliprdrServerFormatList)(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST* formatList);
+typedef UINT (*psCliprdrClientFormatListResponse)(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
+typedef UINT (*psCliprdrServerFormatListResponse)(CliprdrServerContext* context, CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
+typedef UINT (*psCliprdrClientLockClipboardData)(CliprdrServerContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
+typedef UINT (*psCliprdrServerLockClipboardData)(CliprdrServerContext* context, CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
+typedef UINT (*psCliprdrClientUnlockClipboardData)(CliprdrServerContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
+typedef UINT (*psCliprdrServerUnlockClipboardData)(CliprdrServerContext* context, CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
+typedef UINT (*psCliprdrClientFormatDataRequest)(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
+typedef UINT (*psCliprdrServerFormatDataRequest)(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
+typedef UINT (*psCliprdrClientFormatDataResponse)(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
+typedef UINT (*psCliprdrServerFormatDataResponse)(CliprdrServerContext* context, CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
+typedef UINT (*psCliprdrClientFileContentsRequest)(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
+typedef UINT (*psCliprdrServerFileContentsRequest)(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
+typedef UINT (*psCliprdrClientFileContentsResponse)(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
+typedef UINT (*psCliprdrServerFileContentsResponse)(CliprdrServerContext* context, CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
struct _cliprdr_server_context
{
typedef struct _drdynvc_client_context DrdynvcServerContext;
typedef struct _drdynvc_server_private DrdynvcServerPrivate;
-typedef WIN32ERROR (*psDrdynvcStart)(DrdynvcServerContext* context);
-typedef WIN32ERROR (*psDrdynvcStop)(DrdynvcServerContext* context);
+typedef UINT (*psDrdynvcStart)(DrdynvcServerContext* context);
+typedef UINT (*psDrdynvcStop)(DrdynvcServerContext* context);
struct _drdynvc_client_context
{
#define FREERDP_CHANNEL_ECHO_SERVER_H
#include <freerdp/channels/wtsvc.h>
-#include <winpr/win32error.h>
typedef enum ECHO_SERVER_OPEN_RESULT
{
typedef struct _echo_server_context echo_server_context;
-typedef WIN32ERROR (*psEchoServerOpen)(echo_server_context* context);
-typedef WIN32ERROR (*psEchoServerClose)(echo_server_context* context);
+typedef UINT (*psEchoServerOpen)(echo_server_context* context);
+typedef UINT (*psEchoServerClose)(echo_server_context* context);
typedef BOOL (*psEchoServerRequest)(echo_server_context* context, const BYTE* buffer, UINT32 length);
-typedef WIN32ERROR (*psEchoServerOpenResult)(echo_server_context* context, ECHO_SERVER_OPEN_RESULT result);
-typedef WIN32ERROR (*psEchoServerResponse)(echo_server_context* context, const BYTE* buffer, UINT32 length);
+typedef UINT (*psEchoServerOpenResult)(echo_server_context* context, ECHO_SERVER_OPEN_RESULT result);
+typedef UINT (*psEchoServerResponse)(echo_server_context* context, const BYTE* buffer, UINT32 length);
struct _echo_server_context
{
typedef struct _encomsp_server_context EncomspServerContext;
typedef struct _encomsp_server_private EncomspServerPrivate;
-typedef WIN32ERROR (*psEncomspStart)(EncomspServerContext* context);
-typedef WIN32ERROR (*psEncomspStop)(EncomspServerContext* context);
-
-typedef WIN32ERROR (*psEncomspFilterUpdated)(EncomspServerContext* context, ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
-typedef WIN32ERROR (*psEncomspApplicationCreated)(EncomspServerContext* context, ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
-typedef WIN32ERROR (*psEncomspApplicationRemoved)(EncomspServerContext* context, ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
-typedef WIN32ERROR (*psEncomspWindowCreated)(EncomspServerContext* context, ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
-typedef WIN32ERROR (*psEncomspWindowRemoved)(EncomspServerContext* context, ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
-typedef WIN32ERROR (*psEncomspShowWindow)(EncomspServerContext* context, ENCOMSP_SHOW_WINDOW_PDU* showWindow);
-typedef WIN32ERROR (*psEncomspParticipantCreated)(EncomspServerContext* context, ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
-typedef WIN32ERROR (*psEncomspParticipantRemoved)(EncomspServerContext* context, ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
-typedef WIN32ERROR (*psEncomspChangeParticipantControlLevel)(EncomspServerContext* context, ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
-typedef WIN32ERROR (*psEncomspGraphicsStreamPaused)(EncomspServerContext* context, ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
-typedef WIN32ERROR (*psEncomspGraphicsStreamResumed)(EncomspServerContext* context, ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
+typedef UINT (*psEncomspStart)(EncomspServerContext* context);
+typedef UINT (*psEncomspStop)(EncomspServerContext* context);
+
+typedef UINT (*psEncomspFilterUpdated)(EncomspServerContext* context, ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
+typedef UINT (*psEncomspApplicationCreated)(EncomspServerContext* context, ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
+typedef UINT (*psEncomspApplicationRemoved)(EncomspServerContext* context, ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
+typedef UINT (*psEncomspWindowCreated)(EncomspServerContext* context, ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
+typedef UINT (*psEncomspWindowRemoved)(EncomspServerContext* context, ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
+typedef UINT (*psEncomspShowWindow)(EncomspServerContext* context, ENCOMSP_SHOW_WINDOW_PDU* showWindow);
+typedef UINT (*psEncomspParticipantCreated)(EncomspServerContext* context, ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
+typedef UINT (*psEncomspParticipantRemoved)(EncomspServerContext* context, ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
+typedef UINT (*psEncomspChangeParticipantControlLevel)(EncomspServerContext* context, ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
+typedef UINT (*psEncomspGraphicsStreamPaused)(EncomspServerContext* context, ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
+typedef UINT (*psEncomspGraphicsStreamResumed)(EncomspServerContext* context, ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
struct _encomsp_server_context
{
};
typedef struct _FILE_DIRECTORY_INFORMATION FILE_DIRECTORY_INFORMATION;
-typedef WIN32ERROR (*psRdpdrStart)(RdpdrServerContext* context);
-typedef WIN32ERROR (*psRdpdrStop)(RdpdrServerContext* context);
-
-typedef WIN32ERROR (*psRdpdrDriveCreateDirectory)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path);
-typedef WIN32ERROR (*psRdpdrDriveDeleteDirectory)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path);
-typedef WIN32ERROR (*psRdpdrDriveQueryDirectory)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path);
-typedef WIN32ERROR (*psRdpdrDriveOpenFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path, UINT32 desiredAccess, UINT32 createDisposition);
-typedef WIN32ERROR (*psRdpdrDriveReadFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId, UINT32 length, UINT32 offset);
-typedef WIN32ERROR (*psRdpdrDriveWriteFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId, const char* buffer, UINT32 length, UINT32 offset);
-typedef WIN32ERROR (*psRdpdrDriveCloseFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId);
-typedef WIN32ERROR (*psRdpdrDriveDeleteFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path);
-typedef WIN32ERROR (*psRdpdrDriveRenameFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* oldPath, const char* newPath);
+typedef UINT (*psRdpdrStart)(RdpdrServerContext* context);
+typedef UINT (*psRdpdrStop)(RdpdrServerContext* context);
+
+typedef UINT (*psRdpdrDriveCreateDirectory)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path);
+typedef UINT (*psRdpdrDriveDeleteDirectory)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path);
+typedef UINT (*psRdpdrDriveQueryDirectory)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path);
+typedef UINT (*psRdpdrDriveOpenFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path, UINT32 desiredAccess, UINT32 createDisposition);
+typedef UINT (*psRdpdrDriveReadFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId, UINT32 length, UINT32 offset);
+typedef UINT (*psRdpdrDriveWriteFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId, const char* buffer, UINT32 length, UINT32 offset);
+typedef UINT (*psRdpdrDriveCloseFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, UINT32 fileId);
+typedef UINT (*psRdpdrDriveDeleteFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* path);
+typedef UINT (*psRdpdrDriveRenameFile)(RdpdrServerContext* context, void* callbackData, UINT32 deviceId, const char* oldPath, const char* newPath);
typedef void (*psRdpdrOnDriveCreate)(RdpdrServerContext* context, UINT32 deviceId, const char* name);
typedef void (*psRdpdrOnDriveDelete)(RdpdrServerContext* context, UINT32 deviceId);
UINT32 protocolFlags;
/** callbacks that can be set by the user */
- WIN32ERROR (*onClientReady)(RdpeiServerContext *context);
- WIN32ERROR (*onTouchEvent)(RdpeiServerContext *context, RDPINPUT_TOUCH_EVENT *touchEvent);
- WIN32ERROR (*onTouchReleased)(RdpeiServerContext *context, BYTE contactId);
+ UINT (*onClientReady)(RdpeiServerContext *context);
+ UINT (*onTouchEvent)(RdpeiServerContext *context, RDPINPUT_TOUCH_EVENT *touchEvent);
+ UINT (*onTouchReleased)(RdpeiServerContext *context, BYTE contactId);
void *user_data; /* user data, useful for callbacks */
};
FREERDP_API void rdpei_server_context_reset(RdpeiServerContext *context);
FREERDP_API void rdpei_server_context_free(RdpeiServerContext* context);
FREERDP_API HANDLE rdpei_server_get_event_handle(RdpeiServerContext *context);
-FREERDP_API WIN32ERROR rdpei_server_init(RdpeiServerContext *context);
-FREERDP_API WIN32ERROR rdpei_server_handle_messages(RdpeiServerContext *context);
+FREERDP_API UINT rdpei_server_init(RdpeiServerContext *context);
+FREERDP_API UINT rdpei_server_handle_messages(RdpeiServerContext *context);
-FREERDP_API WIN32ERROR rdpei_server_send_sc_ready(RdpeiServerContext *context, UINT32 version);
-FREERDP_API WIN32ERROR rdpei_server_suspend(RdpeiServerContext *context);
-FREERDP_API WIN32ERROR rdpei_server_resume(RdpeiServerContext *context);
+FREERDP_API UINT rdpei_server_send_sc_ready(RdpeiServerContext *context, UINT32 version);
+FREERDP_API UINT rdpei_server_suspend(RdpeiServerContext *context);
+FREERDP_API UINT rdpei_server_resume(RdpeiServerContext *context);
#ifdef __cplusplus
}
typedef struct _rdpsnd_server_context rdpsnd_server_context;
typedef struct _rdpsnd_server_private RdpsndServerPrivate;
-typedef WIN32ERROR (*psRdpsndStart)(RdpsndServerContext* context);
-typedef WIN32ERROR (*psRdpsndStop)(RdpsndServerContext* context);
+typedef UINT (*psRdpsndStart)(RdpsndServerContext* context);
+typedef UINT (*psRdpsndStop)(RdpsndServerContext* context);
-typedef WIN32ERROR (*psRdpsndServerInitialize)(RdpsndServerContext* context, BOOL ownThread);
-typedef WIN32ERROR (*psRdpsndServerSelectFormat)(RdpsndServerContext* context, int client_format_index);
-typedef WIN32ERROR (*psRdpsndServerSendSamples)(RdpsndServerContext* context, const void* buf, int nframes, UINT16 wTimestamp);
-typedef WIN32ERROR (*psRdpsndServerConfirmBlock)(RdpsndServerContext* context, BYTE confirmBlockNum, UINT16 wtimestamp);
-typedef WIN32ERROR (*psRdpsndServerSetVolume)(RdpsndServerContext* context, int left, int right);
-typedef WIN32ERROR (*psRdpsndServerClose)(RdpsndServerContext* context);
+typedef UINT (*psRdpsndServerInitialize)(RdpsndServerContext* context, BOOL ownThread);
+typedef UINT (*psRdpsndServerSelectFormat)(RdpsndServerContext* context, int client_format_index);
+typedef UINT (*psRdpsndServerSendSamples)(RdpsndServerContext* context, const void* buf, int nframes, UINT16 wTimestamp);
+typedef UINT (*psRdpsndServerConfirmBlock)(RdpsndServerContext* context, BYTE confirmBlockNum, UINT16 wtimestamp);
+typedef UINT (*psRdpsndServerSetVolume)(RdpsndServerContext* context, int left, int right);
+typedef UINT (*psRdpsndServerClose)(RdpsndServerContext* context);
typedef void (*psRdpsndServerActivated)(RdpsndServerContext* context);
FREERDP_API void rdpsnd_server_context_reset(RdpsndServerContext *);
FREERDP_API void rdpsnd_server_context_free(RdpsndServerContext* context);
FREERDP_API HANDLE rdpsnd_server_get_event_handle(RdpsndServerContext *context);
-FREERDP_API WIN32ERROR rdpsnd_server_handle_messages(RdpsndServerContext *context);
-FREERDP_API WIN32ERROR rdpsnd_server_send_formats(RdpsndServerContext* context, wStream* s);
+FREERDP_API UINT rdpsnd_server_handle_messages(RdpsndServerContext *context);
+FREERDP_API UINT rdpsnd_server_send_formats(RdpsndServerContext* context, wStream* s);
#ifdef __cplusplus
typedef struct _remdesk_server_context RemdeskServerContext;
typedef struct _remdesk_server_private RemdeskServerPrivate;
-typedef WIN32ERROR (*psRemdeskStart)(RemdeskServerContext* context);
-typedef WIN32ERROR (*psRemdeskStop)(RemdeskServerContext* context);
+typedef UINT (*psRemdeskStart)(RemdeskServerContext* context);
+typedef UINT (*psRemdeskStop)(RemdeskServerContext* context);
struct _remdesk_server_context
{
#include "rdp.h"
#include "client.h"
-#include <winpr/win32error.h>
#define TAG FREERDP_TAG("core.client")
free(channels);
}
-WIN32ERROR freerdp_drdynvc_on_channel_connected(DrdynvcClientContext* context, const char* name, void* pInterface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_drdynvc_on_channel_connected(DrdynvcClientContext* context, const char* name, void* pInterface)
{
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
ChannelConnectedEventArgs e;
rdpChannels* channels = (rdpChannels*) context->custom;
freerdp* instance = channels->instance;
return status;
}
-WIN32ERROR freerdp_drdynvc_on_channel_disconnected(DrdynvcClientContext* context, const char* name, void* pInterface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT freerdp_drdynvc_on_channel_disconnected(DrdynvcClientContext* context, const char* name, void* pInterface)
{
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
ChannelDisconnectedEventArgs e;
rdpChannels* channels = (rdpChannels*) context->custom;
freerdp* instance = channels->instance;
return TRUE;
}
-FREERDP_API WIN32ERROR getChannelError(rdpContext* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+FREERDP_API UINT getChannelError(rdpContext* context)
{
return context->channelErrorNum;
}
{
return context->errorDescription;
}
-FREERDP_API void setChannelError(rdpContext* context, WIN32ERROR errorNum, char* description)
+FREERDP_API void setChannelError(rdpContext* context, UINT errorNum, char* description)
{
context->channelErrorNum = errorNum;
strncpy(context->errorDescription, description, 499);
#include <freerdp/log.h>
#include <freerdp/gdi/gfx.h>
#include <freerdp/gdi/region.h>
-#include <winpr/win32error.h>
#define TAG FREERDP_TAG("gdi")
-WIN32ERROR gdi_ResetGraphics(RdpgfxClientContext* context, RDPGFX_RESET_GRAPHICS_PDU* resetGraphics)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_ResetGraphics(RdpgfxClientContext* context, RDPGFX_RESET_GRAPHICS_PDU* resetGraphics)
{
UINT32 DesktopWidth;
UINT32 DesktopHeight;
return 1;
}
-WIN32ERROR gdi_StartFrame(RdpgfxClientContext* context, RDPGFX_START_FRAME_PDU* startFrame)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_StartFrame(RdpgfxClientContext* context, RDPGFX_START_FRAME_PDU* startFrame)
{
rdpGdi* gdi = (rdpGdi*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_EndFrame(RdpgfxClientContext* context, RDPGFX_END_FRAME_PDU* endFrame)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_EndFrame(RdpgfxClientContext* context, RDPGFX_END_FRAME_PDU* endFrame)
{
rdpGdi* gdi = (rdpGdi*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceCommand_Uncompressed(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceCommand_Uncompressed(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
gdiGfxSurface* surface;
RECTANGLE_16 invalidRect;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceCommand_RemoteFX(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceCommand_RemoteFX(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int j;
UINT16 i;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceCommand_ClearCodec(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceCommand_ClearCodec(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status;
BYTE* DstData = NULL;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceCommand_Planar(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceCommand_Planar(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status;
BYTE* DstData = NULL;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceCommand_H264(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceCommand_H264(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status;
UINT32 i;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceCommand_Alpha(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceCommand_Alpha(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int status = 0;
gdiGfxSurface* surface;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceCommand_Progressive(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceCommand_Progressive(rdpGdi* gdi, RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
int i, j;
int status;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceCommand(RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceCommand(RdpgfxClientContext* context, RDPGFX_SURFACE_COMMAND* cmd)
{
- WIN32ERROR status = CHANNEL_RC_OK;
+ UINT status = CHANNEL_RC_OK;
rdpGdi* gdi = (rdpGdi*) context->custom;
switch (cmd->codecId)
return status;
}
-WIN32ERROR gdi_DeleteEncodingContext(RdpgfxClientContext* context, RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_DeleteEncodingContext(RdpgfxClientContext* context, RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_CreateSurface(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU* createSurface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_CreateSurface(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU* createSurface)
{
gdiGfxSurface* surface;
rdpGdi* gdi = (rdpGdi*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_DeleteSurface(RdpgfxClientContext* context, RDPGFX_DELETE_SURFACE_PDU* deleteSurface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_DeleteSurface(RdpgfxClientContext* context, RDPGFX_DELETE_SURFACE_PDU* deleteSurface)
{
gdiGfxSurface* surface;
rdpGdi* gdi = (rdpGdi*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SolidFill(RdpgfxClientContext* context, RDPGFX_SOLID_FILL_PDU* solidFill)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SolidFill(RdpgfxClientContext* context, RDPGFX_SOLID_FILL_PDU* solidFill)
{
UINT16 index;
UINT32 color;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface)
{
UINT16 index;
BOOL sameSurface;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_SurfaceToCache(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_SurfaceToCache(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache)
{
RDPGFX_RECT16* rect;
gdiGfxSurface* surface;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_CacheToSurface(RdpgfxClientContext* context, RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_CacheToSurface(RdpgfxClientContext* context, RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface)
{
UINT16 index;
RDPGFX_POINT16* destPt;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_CacheImportReply(RdpgfxClientContext* context, RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_CacheImportReply(RdpgfxClientContext* context, RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply)
{
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_EvictCacheEntry(RdpgfxClientContext* context, RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_EvictCacheEntry(RdpgfxClientContext* context, RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry)
{
gdiGfxCacheEntry* cacheEntry;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_MapSurfaceToOutput(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_MapSurfaceToOutput(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput)
{
rdpGdi* gdi = (rdpGdi*) context->custom;
return CHANNEL_RC_OK;
}
-WIN32ERROR gdi_MapSurfaceToWindow(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+UINT gdi_MapSurfaceToWindow(RdpgfxClientContext* context, RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow)
{
return CHANNEL_RC_OK;
}
{ WAVE_FORMAT_ALAW, 2, 22050, 44100, 2, 8, NULL }
};
-static WIN32ERROR mf_peer_audin_opening(audin_server_context* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT mf_peer_audin_opening(audin_server_context* context)
{
context->SelectFormat(context, 0);
return CHANNEL_RC_OK;
}
-static WIN32ERROR mf_peer_audin_open_result(audin_server_context* context, UINT32 result)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT mf_peer_audin_open_result(audin_server_context* context, UINT32 result)
{
return CHANNEL_RC_OK;
}
-static WIN32ERROR mf_peer_audin_receive_samples(audin_server_context* context, const void* buf, int nframes)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT mf_peer_audin_receive_samples(audin_server_context* context, const void* buf, int nframes)
{
return CHANNEL_RC_OK;
}
#include "sf_audin.h"
#include <freerdp/log.h>
-#include <winpr/win32error.h>
#define TAG SERVER_TAG("sample")
static const AUDIO_FORMAT test_audio_formats[] =
{ WAVE_FORMAT_ALAW, 2, 22050, 44100, 2, 8, 0, NULL }
};
-static WIN32ERROR sf_peer_audin_opening(audin_server_context* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT sf_peer_audin_opening(audin_server_context* context)
{
WLog_DBG(TAG, "AUDIN opening.");
/* Simply choose the first format supported by the client. */
return CHANNEL_RC_OK;
}
-static WIN32ERROR sf_peer_audin_open_result(audin_server_context* context, UINT32 result)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT sf_peer_audin_open_result(audin_server_context* context, UINT32 result)
{
WLog_DBG(TAG, "AUDIN open result %d.", result);
return CHANNEL_RC_OK;
}
-static WIN32ERROR sf_peer_audin_receive_samples(audin_server_context* context, const void* buf, int nframes)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT sf_peer_audin_receive_samples(audin_server_context* context, const void* buf, int nframes)
{
WLog_DBG(TAG, "AUDIN receive %d frames.", nframes);
return CHANNEL_RC_OK;
{ WAVE_FORMAT_ALAW, 2, 22050, 44100, 2, 8, 0, NULL }
};
-static WIN32ERROR AudinServerOpening(audin_server_context* context)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT AudinServerOpening(audin_server_context* context)
{
AUDIO_FORMAT* agreed_format = NULL;
int i = 0, j = 0;
context->SelectFormat(context, i);
return CHANNEL_RC_OK;
}
-static WIN32ERROR AudinServerOpenResult(audin_server_context* context, UINT32 result)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT AudinServerOpenResult(audin_server_context* context, UINT32 result)
{
WLog_INFO(TAG, "AUDIN open result %u.\n", result);
return CHANNEL_RC_OK;
}
-static WIN32ERROR AudinServerReceiveSamples(audin_server_context* context, const void* buf, int nframes)
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT AudinServerReceiveSamples(audin_server_context* context, const void* buf, int nframes)
{
rdpShadowClient* client = (rdpShadowClient* )context->data;
rdpShadowSubsystem* subsystem = client->server->subsystem;
#define TAG SERVER_TAG("shadow")
-static WIN32ERROR encomsp_change_participant_control_level(EncomspServerContext* context,
+/**
+ * Function description
+ *
+ * @return 0 on success, otherwise a Win32 error code
+ */
+static UINT encomsp_change_participant_control_level(EncomspServerContext* context,
ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* pdu)
{
BOOL inLobby;
+++ /dev/null
-/**
- * WinPR: Windows Portable Runtime
- * C Run-Time Library Routines
- *
- * Copyright 2015 Thincast Technologies GmbH
- * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.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 WIN32ERROR_H
-#define WIN32ERROR_H
-
-#include <winpr/error.h>
-
-typedef UINT WIN32ERROR;
-
-#endif /* WIN32ERROR_H */