freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16

This commit is contained in:
Marc-André Moreau 2012-10-09 03:01:37 -04:00
parent 1ed644786c
commit 1bf8a45519
287 changed files with 4735 additions and 4782 deletions

View File

@ -51,7 +51,7 @@ typedef struct _AudinALSADevice
freerdp_thread* thread;
uint8* buffer;
BYTE* buffer;
int buffer_frames;
AudinReceive receive;
@ -93,13 +93,13 @@ static BOOL audin_alsa_set_params(AudinALSADevice* alsa, snd_pcm_t* capture_hand
return TRUE;
}
static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int size)
static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src, int size)
{
int frames;
int cframes;
int ret = 0;
int encoded_size;
uint8* encoded_data;
BYTE* encoded_data;
int rbytes_per_frame;
int tbytes_per_frame;
@ -173,7 +173,7 @@ static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int siz
static void* audin_alsa_thread_func(void* arg)
{
int error;
uint8* buffer;
BYTE* buffer;
int rbytes_per_frame;
int tbytes_per_frame;
snd_pcm_t* capture_handle = NULL;
@ -183,9 +183,9 @@ static void* audin_alsa_thread_func(void* arg)
rbytes_per_frame = alsa->actual_channels * alsa->bytes_per_channel;
tbytes_per_frame = alsa->target_channels * alsa->bytes_per_channel;
alsa->buffer = (uint8*) xzalloc(tbytes_per_frame * alsa->frames_per_packet);
alsa->buffer = (BYTE*) xzalloc(tbytes_per_frame * alsa->frames_per_packet);
alsa->buffer_frames = 0;
buffer = (uint8*) xzalloc(rbytes_per_frame * alsa->frames_per_packet);
buffer = (BYTE*) xzalloc(rbytes_per_frame * alsa->frames_per_packet);
freerdp_dsp_context_reset_adpcm(alsa->dsp_context);
do
{

View File

@ -74,8 +74,8 @@ struct _AUDIN_PLUGIN
AUDIN_LISTENER_CALLBACK* listener_callback;
/* Parsed plugin data */
uint16 fixed_format;
uint16 fixed_channel;
UINT16 fixed_format;
UINT16 fixed_channel;
uint32 fixed_rate;
/* Device interface */
@ -94,7 +94,7 @@ static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, S
DEBUG_DVC("Version=%d", Version);
out = stream_new(5);
stream_write_uint8(out, MSG_SNDIN_VERSION);
stream_write_BYTE(out, MSG_SNDIN_VERSION);
stream_write_uint32(out, Version);
error = callback->channel->Write(callback->channel, stream_get_length(s), stream_get_head(s), NULL);
stream_free(out);
@ -104,7 +104,7 @@ static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, S
static int audin_send_incoming_data_pdu(IWTSVirtualChannelCallback* pChannelCallback)
{
uint8 out_data[1];
BYTE out_data[1];
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
out_data[0] = MSG_SNDIN_DATA_INCOMING;
@ -116,7 +116,7 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin;
uint32 i;
uint8* fm;
BYTE* fm;
int error;
STREAM* out;
uint32 NumFormats;
@ -141,13 +141,13 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S
for (i = 0; i < NumFormats; i++)
{
stream_get_mark(s, fm);
stream_read_uint16(s, format.wFormatTag);
stream_read_uint16(s, format.nChannels);
stream_read_UINT16(s, format.wFormatTag);
stream_read_UINT16(s, format.nChannels);
stream_read_uint32(s, format.nSamplesPerSec);
stream_seek_uint32(s); /* nAvgBytesPerSec */
stream_read_uint16(s, format.nBlockAlign);
stream_read_uint16(s, format.wBitsPerSample);
stream_read_uint16(s, format.cbSize);
stream_read_UINT16(s, format.nBlockAlign);
stream_read_UINT16(s, format.wBitsPerSample);
stream_read_UINT16(s, format.cbSize);
format.data = stream_get_tail(s);
stream_seek(s, format.cbSize);
@ -179,7 +179,7 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S
cbSizeFormatsPacket = stream_get_pos(out);
stream_set_pos(out, 0);
stream_write_uint8(out, MSG_SNDIN_FORMATS); /* Header (1 byte) */
stream_write_BYTE(out, MSG_SNDIN_FORMATS); /* Header (1 byte) */
stream_write_uint32(out, callback->formats_count); /* NumFormats (4 bytes) */
stream_write_uint32(out, cbSizeFormatsPacket); /* cbSizeFormatsPacket (4 bytes) */
@ -196,7 +196,7 @@ static int audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCall
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
out = stream_new(5);
stream_write_uint8(out, MSG_SNDIN_FORMATCHANGE);
stream_write_BYTE(out, MSG_SNDIN_FORMATCHANGE);
stream_write_uint32(out, NewFormat);
error = callback->channel->Write(callback->channel, 5, stream_get_head(out), NULL);
stream_free(out);
@ -211,7 +211,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
out = stream_new(5);
stream_write_uint8(out, MSG_SNDIN_OPEN_REPLY);
stream_write_BYTE(out, MSG_SNDIN_OPEN_REPLY);
stream_write_uint32(out, Result);
error = callback->channel->Write(callback->channel, 5, stream_get_head(out), NULL);
stream_free(out);
@ -219,7 +219,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac
return error;
}
static BOOL audin_receive_wave_data(uint8* data, int size, void* user_data)
static BOOL audin_receive_wave_data(BYTE* data, int size, void* user_data)
{
int error;
STREAM* out;
@ -231,7 +231,7 @@ static BOOL audin_receive_wave_data(uint8* data, int size, void* user_data)
return FALSE;
out = stream_new(size + 1);
stream_write_uint8(out, MSG_SNDIN_DATA);
stream_write_BYTE(out, MSG_SNDIN_DATA);
stream_write(out, data, size);
error = callback->channel->Write(callback->channel, stream_get_length(out), stream_get_head(out), NULL);
stream_free(out);
@ -305,16 +305,16 @@ static int audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallb
return 0;
}
static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, uint8* pBuffer)
static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, BYTE* pBuffer)
{
int error;
STREAM* s;
uint8 MessageId;
BYTE MessageId;
s = stream_new(0);
stream_attach(s, pBuffer, cbSize);
stream_read_uint8(s, MessageId);
stream_read_BYTE(s, MessageId);
DEBUG_DVC("MessageId=0x%x", MessageId);
@ -365,7 +365,7 @@ static int audin_on_close(IWTSVirtualChannelCallback* pChannelCallback)
}
static int audin_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel* pChannel, uint8* Data, int* pbAccept,
IWTSVirtualChannel* pChannel, BYTE* Data, int* pbAccept,
IWTSVirtualChannelCallback** ppCallback)
{
AUDIN_CHANNEL_CALLBACK* callback;

View File

@ -34,18 +34,18 @@
#define DEBUG_DVC(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
#endif
typedef BOOL (*AudinReceive) (uint8* data, int size, void* user_data);
typedef BOOL (*AudinReceive) (BYTE* data, int size, void* user_data);
typedef struct audin_format audinFormat;
struct audin_format
{
uint16 wFormatTag;
uint16 nChannels;
UINT16 wFormatTag;
UINT16 nChannels;
uint32 nSamplesPerSec;
uint16 nBlockAlign;
uint16 wBitsPerSample;
uint16 cbSize;
uint8* data;
UINT16 nBlockAlign;
UINT16 wBitsPerSample;
UINT16 cbSize;
BYTE* data;
};
typedef struct _IAudinDevice IAudinDevice;

View File

@ -48,7 +48,7 @@ typedef struct _AudinPulseDevice
FREERDP_DSP_CONTEXT* dsp_context;
int bytes_per_frame;
uint8* buffer;
BYTE* buffer;
int buffer_frames;
AudinReceive receive;
@ -281,9 +281,9 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length
int cframes;
BOOL ret;
const void* data;
const uint8* src;
const BYTE* src;
int encoded_size;
uint8* encoded_data;
BYTE* encoded_data;
AudinPulseDevice* pulse = (AudinPulseDevice*) userdata;
pa_stream_peek(stream, &data, &length);
@ -291,7 +291,7 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length
DEBUG_DVC("length %d frames %d", (int) length, frames);
src = (const uint8*) data;
src = (const BYTE*) data;
while (frames > 0)
{
cframes = pulse->frames_per_packet - pulse->buffer_frames;

View File

@ -68,7 +68,7 @@ static void audin_server_select_format(audin_server_context* context, int client
static void audin_server_send_version(audin_server* audin, STREAM* s)
{
stream_write_uint8(s, MSG_SNDIN_VERSION);
stream_write_BYTE(s, MSG_SNDIN_VERSION);
stream_write_uint32(s, 1); /* Version (4 bytes) */
WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL);
}
@ -92,7 +92,7 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s)
uint32 nAvgBytesPerSec;
stream_set_pos(s, 0);
stream_write_uint8(s, MSG_SNDIN_FORMATS);
stream_write_BYTE(s, MSG_SNDIN_FORMATS);
stream_write_uint32(s, audin->context.num_server_formats); /* NumFormats (4 bytes) */
stream_write_uint32(s, 0); /* cbSizeFormatsPacket (4 bytes), client-to-server only */
@ -102,13 +102,13 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s)
audin->context.server_formats[i].nChannels *
audin->context.server_formats[i].wBitsPerSample / 8;
stream_check_size(s, 18);
stream_write_uint16(s, audin->context.server_formats[i].wFormatTag);
stream_write_uint16(s, audin->context.server_formats[i].nChannels);
stream_write_UINT16(s, audin->context.server_formats[i].wFormatTag);
stream_write_UINT16(s, audin->context.server_formats[i].nChannels);
stream_write_uint32(s, audin->context.server_formats[i].nSamplesPerSec);
stream_write_uint32(s, nAvgBytesPerSec);
stream_write_uint16(s, audin->context.server_formats[i].nBlockAlign);
stream_write_uint16(s, audin->context.server_formats[i].wBitsPerSample);
stream_write_uint16(s, audin->context.server_formats[i].cbSize);
stream_write_UINT16(s, audin->context.server_formats[i].nBlockAlign);
stream_write_UINT16(s, audin->context.server_formats[i].wBitsPerSample);
stream_write_UINT16(s, audin->context.server_formats[i].cbSize);
if (audin->context.server_formats[i].cbSize)
{
stream_check_size(s, audin->context.server_formats[i].cbSize);
@ -144,13 +144,13 @@ static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 len
return FALSE;
}
stream_read_uint16(s, audin->context.client_formats[i].wFormatTag);
stream_read_uint16(s, audin->context.client_formats[i].nChannels);
stream_read_UINT16(s, audin->context.client_formats[i].wFormatTag);
stream_read_UINT16(s, audin->context.client_formats[i].nChannels);
stream_read_uint32(s, audin->context.client_formats[i].nSamplesPerSec);
stream_seek_uint32(s); /* nAvgBytesPerSec */
stream_read_uint16(s, audin->context.client_formats[i].nBlockAlign);
stream_read_uint16(s, audin->context.client_formats[i].wBitsPerSample);
stream_read_uint16(s, audin->context.client_formats[i].cbSize);
stream_read_UINT16(s, audin->context.client_formats[i].nBlockAlign);
stream_read_UINT16(s, audin->context.client_formats[i].wBitsPerSample);
stream_read_UINT16(s, audin->context.client_formats[i].cbSize);
if (audin->context.client_formats[i].cbSize > 0)
{
stream_seek(s, audin->context.client_formats[i].cbSize);
@ -170,7 +170,7 @@ static void audin_server_send_open(audin_server* audin, STREAM* s)
audin->opened = TRUE;
stream_set_pos(s, 0);
stream_write_uint8(s, MSG_SNDIN_OPEN);
stream_write_BYTE(s, MSG_SNDIN_OPEN);
stream_write_uint32(s, audin->context.frames_per_packet); /* FramesPerPacket (4 bytes) */
stream_write_uint32(s, audin->context.selected_client_format); /* initialFormat (4 bytes) */
/*
@ -178,13 +178,13 @@ static void audin_server_send_open(audin_server* audin, STREAM* s)
* The second format specify the format that SHOULD be used to capture data from
* the actual audio input device.
*/
stream_write_uint16(s, 1); /* wFormatTag = PCM */
stream_write_uint16(s, 2); /* nChannels */
stream_write_UINT16(s, 1); /* wFormatTag = PCM */
stream_write_UINT16(s, 2); /* nChannels */
stream_write_uint32(s, 44100); /* nSamplesPerSec */
stream_write_uint32(s, 44100 * 2 * 2); /* nAvgBytesPerSec */
stream_write_uint16(s, 4); /* nBlockAlign */
stream_write_uint16(s, 16); /* wBitsPerSample */
stream_write_uint16(s, 0); /* cbSize */
stream_write_UINT16(s, 4); /* nBlockAlign */
stream_write_UINT16(s, 16); /* wBitsPerSample */
stream_write_UINT16(s, 0); /* cbSize */
WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL);
}
@ -207,7 +207,7 @@ static BOOL audin_server_recv_data(audin_server* audin, STREAM* s, uint32 length
rdpsndFormat* format;
int sbytes_per_sample;
int sbytes_per_frame;
uint8* src;
BYTE* src;
int size;
int frames;
@ -265,7 +265,7 @@ static void* audin_server_thread_func(void* arg)
void* fd;
STREAM* s;
void* buffer;
uint8 MessageId;
BYTE MessageId;
BOOL ready = FALSE;
uint32 bytes_returned = 0;
audin_server* audin = (audin_server*) arg;
@ -324,7 +324,7 @@ static void* audin_server_thread_func(void* arg)
if (bytes_returned < 1)
continue;
stream_read_uint8(s, MessageId);
stream_read_BYTE(s, MessageId);
bytes_returned--;
switch (MessageId)
{

View File

@ -109,7 +109,7 @@ static void cliprdr_send_format_list_response(cliprdrPlugin* cliprdr)
cliprdr_packet_send(cliprdr, s);
}
void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, uint16 flags)
void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, UINT16 flags)
{
int i;
BOOL ascii;
@ -153,10 +153,10 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint3
}
}
void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, uint16 flags)
void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, UINT16 flags)
{
int allocated_formats = 8;
uint8* end_mark;
BYTE* end_mark;
CLIPRDR_FORMAT_NAME* format_name;
stream_get_mark(s, end_mark);
@ -167,7 +167,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32
while (stream_get_left(s) >= 6)
{
uint8* p;
BYTE* p;
int name_len;
if (cliprdr->num_format_names >= allocated_formats)
@ -194,7 +194,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32
}
}
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags)
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags)
{
int i;
uint32 format;
@ -207,7 +207,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL
if (dataLen > 0)
{
cb_event->raw_format_data = (uint8*) malloc(dataLen);
cb_event->raw_format_data = (BYTE*) malloc(dataLen);
memcpy(cb_event->raw_format_data, stream_get_tail(s), dataLen);
cb_event->raw_format_data_size = dataLen;
}
@ -286,7 +286,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL
cliprdr_send_format_list_response(cliprdr);
}
void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags)
void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags)
{
/* where is this documented? */
#if 0
@ -300,7 +300,7 @@ void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uin
#endif
}
void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags)
void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags)
{
RDP_CB_DATA_REQUEST_EVENT* cb_event;
@ -341,7 +341,7 @@ void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DA
cliprdr_packet_send(cliprdr, s);
}
void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags)
void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags)
{
RDP_CB_DATA_RESPONSE_EVENT* cb_event;
@ -351,7 +351,7 @@ void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uin
if (dataLen > 0)
{
cb_event->size = dataLen;
cb_event->data = (uint8*) malloc(dataLen);
cb_event->data = (BYTE*) malloc(dataLen);
memcpy(cb_event->data, stream_get_tail(s), dataLen);
}

View File

@ -22,13 +22,13 @@
#define __CLIPRDR_FORMAT_H
void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIST_EVENT* cb_event);
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags);
void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags);
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags);
void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event);
void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_REQUEST_EVENT* cb_event);
void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags);
void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags);
#endif /* __CLIPRDR_FORMAT_H */

View File

@ -55,13 +55,13 @@ static const char* const CB_MSG_TYPE_STRINGS[] =
"CB_UNLOCK_CLIPDATA"
};
STREAM* cliprdr_packet_new(uint16 msgType, uint16 msgFlags, uint32 dataLen)
STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen)
{
STREAM* s;
s = stream_new(dataLen + 8);
stream_write_uint16(s, msgType);
stream_write_uint16(s, msgFlags);
stream_write_UINT16(s, msgType);
stream_write_UINT16(s, msgFlags);
/* Write actual length after the entire packet has been constructed. */
stream_seek(s, 4);
@ -132,22 +132,22 @@ static void cliprdr_process_general_capability(cliprdrPlugin* cliprdr, STREAM* s
cliprdr->received_caps = TRUE;
}
static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, uint16 length, uint16 flags)
static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, UINT16 length, UINT16 flags)
{
int i;
uint16 lengthCapability;
uint16 cCapabilitiesSets;
uint16 capabilitySetType;
UINT16 lengthCapability;
UINT16 cCapabilitiesSets;
UINT16 capabilitySetType;
stream_read_uint16(s, cCapabilitiesSets); /* cCapabilitiesSets (2 bytes) */
stream_seek_uint16(s); /* pad1 (2 bytes) */
stream_read_UINT16(s, cCapabilitiesSets); /* cCapabilitiesSets (2 bytes) */
stream_seek_UINT16(s); /* pad1 (2 bytes) */
DEBUG_CLIPRDR("cCapabilitiesSets %d", cCapabilitiesSets);
for (i = 0; i < cCapabilitiesSets; i++)
{
stream_read_uint16(s, capabilitySetType); /* capabilitySetType (2 bytes) */
stream_read_uint16(s, lengthCapability); /* lengthCapability (2 bytes) */
stream_read_UINT16(s, capabilitySetType); /* capabilitySetType (2 bytes) */
stream_read_UINT16(s, lengthCapability); /* lengthCapability (2 bytes) */
switch (capabilitySetType)
{
@ -173,17 +173,17 @@ static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr)
flags = CB_USE_LONG_FORMAT_NAMES;
stream_write_uint16(s, 1); /* cCapabilitiesSets */
stream_write_uint16(s, 0); /* pad1 */
stream_write_uint16(s, CB_CAPSTYPE_GENERAL); /* capabilitySetType */
stream_write_uint16(s, CB_CAPSTYPE_GENERAL_LEN); /* lengthCapability */
stream_write_UINT16(s, 1); /* cCapabilitiesSets */
stream_write_UINT16(s, 0); /* pad1 */
stream_write_UINT16(s, CB_CAPSTYPE_GENERAL); /* capabilitySetType */
stream_write_UINT16(s, CB_CAPSTYPE_GENERAL_LEN); /* lengthCapability */
stream_write_uint32(s, CB_CAPS_VERSION_2); /* version */
stream_write_uint32(s, flags); /* generalFlags */
cliprdr_packet_send(cliprdr, s);
}
static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, uint16 length, uint16 flags)
static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, UINT16 length, UINT16 flags)
{
RDP_EVENT* event;
@ -196,13 +196,13 @@ static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, uin
static void cliprdr_process_receive(rdpSvcPlugin* plugin, STREAM* s)
{
uint16 msgType;
uint16 msgFlags;
UINT16 msgType;
UINT16 msgFlags;
uint32 dataLen;
cliprdrPlugin* cliprdr = (cliprdrPlugin*) plugin;
stream_read_uint16(s, msgType);
stream_read_uint16(s, msgFlags);
stream_read_UINT16(s, msgType);
stream_read_UINT16(s, msgFlags);
stream_read_uint32(s, dataLen);
DEBUG_CLIPRDR("msgType: %s (%d), msgFlags: %d dataLen: %d",

View File

@ -45,7 +45,7 @@ struct cliprdr_plugin
};
typedef struct cliprdr_plugin cliprdrPlugin;
STREAM* cliprdr_packet_new(uint16 msgType, uint16 msgFlags, uint32 dataLen);
STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen);
void cliprdr_packet_send(cliprdrPlugin* cliprdr, STREAM* data_out);
#ifdef WITH_DEBUG_CLIPRDR

View File

@ -357,7 +357,7 @@ BOOL disk_file_seek(DISK_FILE* file, uint64 Offset)
return TRUE;
}
BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length)
BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length)
{
ssize_t r;
@ -372,7 +372,7 @@ BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length)
return TRUE;
}
BOOL disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length)
BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length)
{
ssize_t r;
@ -421,8 +421,8 @@ BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STR
stream_write_uint64(output, st.st_size); /* AllocationSize */
stream_write_uint64(output, st.st_size); /* EndOfFile */
stream_write_uint32(output, st.st_nlink); /* NumberOfLinks */
stream_write_uint8(output, file->delete_pending ? 1 : 0); /* DeletePending */
stream_write_uint8(output, file->is_dir ? 1 : 0); /* Directory */
stream_write_BYTE(output, file->delete_pending ? 1 : 0); /* DeletePending */
stream_write_BYTE(output, file->is_dir ? 1 : 0); /* Directory */
/* Reserved(2), MUST NOT be added! */
break;
@ -502,15 +502,15 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3
/* http://msdn.microsoft.com/en-us/library/cc232098.aspx */
/* http://msdn.microsoft.com/en-us/library/cc241371.aspx */
if (Length)
stream_read_uint8(input, file->delete_pending);
stream_read_BYTE(input, file->delete_pending);
else
file->delete_pending = 1;
break;
case FileRenameInformation:
/* http://msdn.microsoft.com/en-us/library/cc232085.aspx */
stream_seek_uint8(input); /* ReplaceIfExists */
stream_seek_uint8(input); /* RootDirectory */
stream_seek_BYTE(input); /* ReplaceIfExists */
stream_seek_BYTE(input); /* RootDirectory */
stream_read_uint32(input, FileNameLength);
freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(input), &s, FileNameLength / 2);
@ -541,7 +541,7 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3
return TRUE;
}
BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery,
BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE InitialQuery,
const char* path, STREAM* output)
{
int length;
@ -555,7 +555,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8
if (!file->dir)
{
stream_write_uint32(output, 0); /* Length */
stream_write_uint8(output, 0); /* Padding */
stream_write_BYTE(output, 0); /* Padding */
return FALSE;
}
@ -592,7 +592,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8
{
DEBUG_SVC(" pattern %s not found.", file->pattern);
stream_write_uint32(output, 0); /* Length */
stream_write_uint8(output, 0); /* Padding */
stream_write_BYTE(output, 0); /* Padding */
return FALSE;
}
@ -664,7 +664,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8
stream_write_uint32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */
stream_write_uint32(output, length); /* FileNameLength */
stream_write_uint32(output, 0); /* EaSize */
stream_write_uint8(output, 0); /* ShortNameLength */
stream_write_BYTE(output, 0); /* ShortNameLength */
/* Reserved(1), MUST NOT be added! */
stream_write_zero(output, 24); /* ShortName */
stream_write(output, ent_path, length);
@ -682,7 +682,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8
default:
stream_write_uint32(output, 0); /* Length */
stream_write_uint8(output, 0); /* Padding */
stream_write_BYTE(output, 0); /* Padding */
DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass);
ret = FALSE;
break;

View File

@ -100,11 +100,11 @@ DISK_FILE* disk_file_new(const char* base_path, const char* path, uint32 id,
void disk_file_free(DISK_FILE* file);
BOOL disk_file_seek(DISK_FILE* file, uint64 Offset);
BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length);
BOOL disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length);
BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length);
BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length);
BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output);
BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input);
BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery,
BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE InitialQuery,
const char* path, STREAM* output);
#endif /* __DISK_FILE_H */

View File

@ -122,7 +122,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp)
char* path;
uint32 FileId;
DISK_FILE* file;
uint8 Information;
BYTE Information;
uint32 DesiredAccess;
uint32 CreateDisposition;
uint32 CreateOptions;
@ -184,7 +184,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp)
}
stream_write_uint32(irp->output, FileId);
stream_write_uint8(irp->output, Information);
stream_write_BYTE(irp->output, Information);
free(path);
@ -221,7 +221,7 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp)
DISK_FILE* file;
uint32 Length;
uint64 Offset;
uint8* buffer = NULL;
BYTE* buffer = NULL;
stream_read_uint32(irp->input, Length);
stream_read_uint64(irp->input, Offset);
@ -244,7 +244,7 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp)
}
else
{
buffer = (uint8*) malloc(Length);
buffer = (BYTE*) malloc(Length);
if (!disk_file_read(file, buffer, &Length))
{
irp->IoStatus = STATUS_UNSUCCESSFUL;
@ -312,7 +312,7 @@ static void disk_process_irp_write(DISK_DEVICE* disk, IRP* irp)
}
stream_write_uint32(irp->output, Length);
stream_write_uint8(irp->output, 0); /* Padding */
stream_write_BYTE(irp->output, 0); /* Padding */
irp->Complete(irp);
}
@ -406,7 +406,7 @@ static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* ir
stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* VolumeCreationTime */
stream_write_uint32(output, svfst.f_fsid); /* VolumeSerialNumber */
stream_write_uint32(output, length); /* VolumeLabelLength */
stream_write_uint8(output, 0); /* SupportsObjects */
stream_write_BYTE(output, 0); /* SupportsObjects */
/* Reserved(1), MUST NOT be added! */
stream_write(output, outStr, length); /* VolumeLabel (Unicode) */
free(outStr);
@ -470,12 +470,12 @@ static void disk_process_irp_query_directory(DISK_DEVICE* disk, IRP* irp)
{
char* path;
DISK_FILE* file;
uint8 InitialQuery;
BYTE InitialQuery;
uint32 PathLength;
uint32 FsInformationClass;
stream_read_uint32(irp->input, FsInformationClass);
stream_read_uint8(irp->input, InitialQuery);
stream_read_BYTE(irp->input, InitialQuery);
stream_read_uint32(irp->input, PathLength);
stream_seek(irp->input, 23); /* Padding */
@ -675,7 +675,7 @@ void disk_register_disk_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* na
disk->device.data = stream_new(length + 1);
for (i = 0; i <= length; i++)
stream_write_uint8(disk->device.data, name[i] < 0 ? '_' : name[i]);
stream_write_BYTE(disk->device.data, name[i] < 0 ? '_' : name[i]);
disk->path = path;
disk->files = list_new();

View File

@ -64,12 +64,12 @@ static int drdynvc_write_variable_uint(STREAM* stream, uint32 val)
if (val <= 0xFF)
{
cb = 0;
stream_write_uint8(stream, val);
stream_write_BYTE(stream, val);
}
else if (val <= 0xFFFF)
{
cb = 1;
stream_write_uint16(stream, val);
stream_write_UINT16(stream, val);
}
else
{
@ -79,7 +79,7 @@ static int drdynvc_write_variable_uint(STREAM* stream, uint32 val)
return cb;
}
int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, uint32 data_size)
int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, BYTE* data, uint32 data_size)
{
STREAM* data_out;
uint32 pos = 0;
@ -101,7 +101,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui
{
pos = stream_get_pos(data_out);
stream_set_pos(data_out, 0);
stream_write_uint8(data_out, 0x40 | cbChId);
stream_write_BYTE(data_out, 0x40 | cbChId);
stream_set_pos(data_out, pos);
error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out);
}
@ -109,7 +109,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui
{
pos = stream_get_pos(data_out);
stream_set_pos(data_out, 0);
stream_write_uint8(data_out, 0x30 | cbChId);
stream_write_BYTE(data_out, 0x30 | cbChId);
stream_set_pos(data_out, pos);
stream_write(data_out, data, data_size);
error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out);
@ -120,7 +120,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui
cbLen = drdynvc_write_variable_uint(data_out, data_size);
pos = stream_get_pos(data_out);
stream_set_pos(data_out, 0);
stream_write_uint8(data_out, 0x20 | cbChId | (cbLen << 2));
stream_write_BYTE(data_out, 0x20 | cbChId | (cbLen << 2));
stream_set_pos(data_out, pos);
chunk_len = CHANNEL_CHUNK_LENGTH - pos;
stream_write(data_out, data, chunk_len);
@ -136,7 +136,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui
pos = stream_get_pos(data_out);
stream_set_pos(data_out, 0);
stream_write_uint8(data_out, 0x30 | cbChId);
stream_write_BYTE(data_out, 0x30 | cbChId);
stream_set_pos(data_out, pos);
chunk_len = data_size;
@ -177,17 +177,17 @@ static int drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, in
DEBUG_DVC("Sp=%d cbChId=%d", Sp, cbChId);
stream_seek(s, 1); /* pad */
stream_read_uint16(s, drdynvc->version);
stream_read_UINT16(s, drdynvc->version);
if (drdynvc->version == 2)
{
stream_read_uint16(s, drdynvc->PriorityCharge0);
stream_read_uint16(s, drdynvc->PriorityCharge1);
stream_read_uint16(s, drdynvc->PriorityCharge2);
stream_read_uint16(s, drdynvc->PriorityCharge3);
stream_read_UINT16(s, drdynvc->PriorityCharge0);
stream_read_UINT16(s, drdynvc->PriorityCharge1);
stream_read_UINT16(s, drdynvc->PriorityCharge2);
stream_read_UINT16(s, drdynvc->PriorityCharge3);
}
data_out = stream_new(4);
stream_write_uint16(data_out, 0x0050); /* Cmd+Sp+cbChId+Pad. Note: MSTSC sends 0x005c */
stream_write_uint16(data_out, drdynvc->version);
stream_write_UINT16(data_out, 0x0050); /* Cmd+Sp+cbChId+Pad. Note: MSTSC sends 0x005c */
stream_write_UINT16(data_out, drdynvc->version);
error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out);
if (error != CHANNEL_RC_OK)
{
@ -206,10 +206,10 @@ static uint32 drdynvc_read_variable_uint(STREAM* stream, int cbLen)
switch (cbLen)
{
case 0:
stream_read_uint8(stream, val);
stream_read_BYTE(stream, val);
break;
case 1:
stream_read_uint16(stream, val);
stream_read_UINT16(stream, val);
break;
default:
stream_read_uint32(stream, val);
@ -232,7 +232,7 @@ static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cb
error = dvcman_create_channel(drdynvc->channel_mgr, ChannelId, (char*)stream_get_tail(s));
data_out = stream_new(pos + 4);
stream_write_uint8(data_out, 0x10 | cbChId);
stream_write_BYTE(data_out, 0x10 | cbChId);
stream_set_pos(s, 1);
stream_copy(data_out, s, pos - 1);
@ -304,7 +304,7 @@ static void drdynvc_process_receive(rdpSvcPlugin* plugin, STREAM* s)
int Sp;
int cbChId;
stream_read_uint8(s, value);
stream_read_BYTE(s, value);
Cmd = (value & 0xf0) >> 4;
Sp = (value & 0x0c) >> 2;
cbChId = (value & 0x03) >> 0;

View File

@ -24,7 +24,7 @@
typedef struct drdynvc_plugin drdynvcPlugin;
int drdynvc_write_data(drdynvcPlugin* plugin, uint32 ChannelId, uint8* data, uint32 data_size);
int drdynvc_write_data(drdynvcPlugin* plugin, uint32 ChannelId, BYTE* data, uint32 data_size);
int drdynvc_push_event(drdynvcPlugin* plugin, RDP_EVENT* event);
#endif

View File

@ -241,7 +241,7 @@ int dvcman_load_plugin(IWTSVirtualChannelManager* pChannelMgr, RDP_PLUGIN_DATA*
pDVCPluginEntry((IDRDYNVC_ENTRY_POINTS*) &entryPoints);
}
data = (RDP_PLUGIN_DATA*)(((uint8*) data) + data->size);
data = (RDP_PLUGIN_DATA*)(((BYTE*) data) + data->size);
}
return 0;
@ -303,7 +303,7 @@ int dvcman_init(IWTSVirtualChannelManager* pChannelMgr)
return 0;
}
static int dvcman_write_channel(IWTSVirtualChannel* pChannel, uint32 cbSize, uint8* pBuffer, void* pReserved)
static int dvcman_write_channel(IWTSVirtualChannel* pChannel, uint32 cbSize, BYTE* pBuffer, void* pReserved)
{
int status;
DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) pChannel;
@ -424,7 +424,7 @@ int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, ui
return 0;
}
int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size)
int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, BYTE* data, uint32 data_size)
{
int error = 0;
DVCMAN_CHANNEL* channel;

View File

@ -30,7 +30,7 @@ int dvcman_init(IWTSVirtualChannelManager* pChannelMgr);
int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, const char* ChannelName);
int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId);
int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint32 length);
int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size);
int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, BYTE* data, uint32 data_size);
#endif

View File

@ -104,7 +104,7 @@ static void parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp)
}
stream_write_uint32(irp->output, parallel->id);
stream_write_uint8(irp->output, 0);
stream_write_BYTE(irp->output, 0);
free(path);
@ -128,12 +128,12 @@ static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
uint32 Length;
uint64 Offset;
ssize_t status;
uint8* buffer = NULL;
BYTE* buffer = NULL;
stream_read_uint32(irp->input, Length);
stream_read_uint64(irp->input, Offset);
buffer = (uint8*) malloc(Length);
buffer = (BYTE*) malloc(Length);
status = read(parallel->file, irp->output->p, Length);
@ -195,7 +195,7 @@ static void parallel_process_irp_write(PARALLEL_DEVICE* parallel, IRP* irp)
}
stream_write_uint32(irp->output, Length);
stream_write_uint8(irp->output, 0); /* Padding */
stream_write_BYTE(irp->output, 0); /* Padding */
irp->Complete(irp);
}
@ -330,7 +330,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
parallel->device.data = stream_new(length + 1);
for (i = 0; i <= length; i++)
stream_write_uint8(parallel->device.data, name[i] < 0 ? '_' : name[i]);
stream_write_BYTE(parallel->device.data, name[i] < 0 ? '_' : name[i]);
parallel->path = path;

View File

@ -77,7 +77,7 @@ static void printer_cups_get_printjob_name(char* buf, int size)
t->tm_hour, t->tm_min, t->tm_sec);
}
static void printer_cups_write_printjob(rdpPrintJob* printjob, uint8* data, int size)
static void printer_cups_write_printjob(rdpPrintJob* printjob, BYTE* data, int size)
{
rdpCupsPrintJob* cups_printjob = (rdpCupsPrintJob*)printjob;

View File

@ -135,7 +135,7 @@ static void printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp)
}
stream_write_uint32(irp->output, Length);
stream_write_uint8(irp->output, 0); /* Padding */
stream_write_BYTE(irp->output, 0); /* Padding */
irp->Complete(irp);
}
@ -241,7 +241,7 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri
int PrintNameLen;
WCHAR* PrintName;
uint32 CachedFieldsLen;
uint8* CachedPrinterConfigData;
BYTE* CachedPrinterConfigData;
PRINTER_DEVICE* printer_dev;
port = malloc(10);
@ -278,9 +278,9 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri
stream_write_uint32(printer_dev->device.data, PrintNameLen + 2);
stream_write_uint32(printer_dev->device.data, CachedFieldsLen);
stream_write(printer_dev->device.data, DriverName, DriverNameLen);
stream_write_uint16(printer_dev->device.data, 0);
stream_write_UINT16(printer_dev->device.data, 0);
stream_write(printer_dev->device.data, PrintName, PrintNameLen);
stream_write_uint16(printer_dev->device.data, 0);
stream_write_UINT16(printer_dev->device.data, 0);
if (CachedFieldsLen > 0)
{

View File

@ -64,7 +64,7 @@ struct rdp_printer
pcFreePrinter Free;
};
typedef void (*pcWritePrintJob) (rdpPrintJob* printjob, uint8* data, int size);
typedef void (*pcWritePrintJob) (rdpPrintJob* printjob, BYTE* data, int size);
typedef void (*pcClosePrintJob) (rdpPrintJob* printjob);
struct rdp_print_job

View File

@ -82,7 +82,7 @@ static void printer_win_get_printjob_name(char* buf, int size)
}
static void printer_win_write_printjob(rdpPrintJob* printjob, uint8* data, int size)
static void printer_win_write_printjob(rdpPrintJob* printjob, BYTE* data, int size)
{
rdpWinPrintJob* win_printjob = (rdpWinPrintJob*)printjob;

View File

@ -58,7 +58,7 @@ static void on_free_rail_channel_event(RDP_EVENT* event)
}
}
void rail_send_channel_event(void* rail_object, uint16 event_type, void* param)
void rail_send_channel_event(void* rail_object, UINT16 event_type, void* param)
{
void * payload = NULL;
RDP_EVENT* out_event = NULL;

View File

@ -56,7 +56,7 @@ struct rail_plugin
};
typedef struct rail_plugin railPlugin;
void rail_send_channel_event(void* rail_object, uint16 event_type, void* param);
void rail_send_channel_event(void* rail_object, UINT16 event_type, void* param);
void rail_send_channel_data(void* rail_object, void* data, size_t length);
#ifdef WITH_DEBUG_RAIL

View File

@ -85,20 +85,20 @@ void rail_string_to_unicode_string(rdpRailOrder* rail_order, char* string, RAIL_
length = freerdp_AsciiToUnicodeAlloc(string, &buffer, 0) * 2;
unicode_string->string = (uint8*) buffer;
unicode_string->length = (uint16) length;
unicode_string->string = (BYTE*) buffer;
unicode_string->length = (UINT16) length;
}
void rail_read_pdu_header(STREAM* s, uint16* orderType, uint16* orderLength)
void rail_read_pdu_header(STREAM* s, UINT16* orderType, UINT16* orderLength)
{
stream_read_uint16(s, *orderType); /* orderType (2 bytes) */
stream_read_uint16(s, *orderLength); /* orderLength (2 bytes) */
stream_read_UINT16(s, *orderType); /* orderType (2 bytes) */
stream_read_UINT16(s, *orderLength); /* orderLength (2 bytes) */
}
void rail_write_pdu_header(STREAM* s, uint16 orderType, uint16 orderLength)
void rail_write_pdu_header(STREAM* s, UINT16 orderType, UINT16 orderLength)
{
stream_write_uint16(s, orderType); /* orderType (2 bytes) */
stream_write_uint16(s, orderLength); /* orderLength (2 bytes) */
stream_write_UINT16(s, orderType); /* orderType (2 bytes) */
stream_write_UINT16(s, orderLength); /* orderLength (2 bytes) */
}
STREAM* rail_pdu_init(int length)
@ -109,9 +109,9 @@ STREAM* rail_pdu_init(int length)
return s;
}
void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, uint16 orderType)
void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, UINT16 orderType)
{
uint16 orderLength;
UINT16 orderLength;
orderLength = stream_get_length(s);
stream_set_pos(s, 0);
@ -141,18 +141,18 @@ void rail_read_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake)
void rail_read_server_exec_result_order(STREAM* s, RAIL_EXEC_RESULT_ORDER* exec_result)
{
stream_read_uint16(s, exec_result->flags); /* flags (2 bytes) */
stream_read_uint16(s, exec_result->execResult); /* execResult (2 bytes) */
stream_read_UINT16(s, exec_result->flags); /* flags (2 bytes) */
stream_read_UINT16(s, exec_result->execResult); /* execResult (2 bytes) */
stream_read_uint32(s, exec_result->rawResult); /* rawResult (4 bytes) */
stream_seek_uint16(s); /* padding (2 bytes) */
stream_seek_UINT16(s); /* padding (2 bytes) */
rail_read_unicode_string(s, &exec_result->exeOrFile); /* exeOrFile */
}
void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
{
uint8 body;
BYTE body;
stream_read_uint32(s, sysparam->param); /* systemParam (4 bytes) */
stream_read_uint8(s, body); /* body (1 byte) */
stream_read_BYTE(s, body); /* body (1 byte) */
switch (sysparam->param)
{
@ -172,27 +172,27 @@ void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
void rail_read_server_minmaxinfo_order(STREAM* s, RAIL_MINMAXINFO_ORDER* minmaxinfo)
{
stream_read_uint32(s, minmaxinfo->windowId); /* windowId (4 bytes) */
stream_read_uint16(s, minmaxinfo->maxWidth); /* maxWidth (2 bytes) */
stream_read_uint16(s, minmaxinfo->maxHeight); /* maxHeight (2 bytes) */
stream_read_uint16(s, minmaxinfo->maxPosX); /* maxPosX (2 bytes) */
stream_read_uint16(s, minmaxinfo->maxPosY); /* maxPosY (2 bytes) */
stream_read_uint16(s, minmaxinfo->minTrackWidth); /* minTrackWidth (2 bytes) */
stream_read_uint16(s, minmaxinfo->minTrackHeight); /* minTrackHeight (2 bytes) */
stream_read_uint16(s, minmaxinfo->maxTrackWidth); /* maxTrackWidth (2 bytes) */
stream_read_uint16(s, minmaxinfo->maxTrackHeight); /* maxTrackHeight (2 bytes) */
stream_read_UINT16(s, minmaxinfo->maxWidth); /* maxWidth (2 bytes) */
stream_read_UINT16(s, minmaxinfo->maxHeight); /* maxHeight (2 bytes) */
stream_read_UINT16(s, minmaxinfo->maxPosX); /* maxPosX (2 bytes) */
stream_read_UINT16(s, minmaxinfo->maxPosY); /* maxPosY (2 bytes) */
stream_read_UINT16(s, minmaxinfo->minTrackWidth); /* minTrackWidth (2 bytes) */
stream_read_UINT16(s, minmaxinfo->minTrackHeight); /* minTrackHeight (2 bytes) */
stream_read_UINT16(s, minmaxinfo->maxTrackWidth); /* maxTrackWidth (2 bytes) */
stream_read_UINT16(s, minmaxinfo->maxTrackHeight); /* maxTrackHeight (2 bytes) */
}
void rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize)
{
uint16 isMoveSizeStart;
UINT16 isMoveSizeStart;
stream_read_uint32(s, localmovesize->windowId); /* windowId (4 bytes) */
stream_read_uint16(s, isMoveSizeStart); /* isMoveSizeStart (2 bytes) */
stream_read_UINT16(s, isMoveSizeStart); /* isMoveSizeStart (2 bytes) */
localmovesize->isMoveSizeStart = (isMoveSizeStart != 0) ? TRUE : FALSE;
stream_read_uint16(s, localmovesize->moveSizeType); /* moveSizeType (2 bytes) */
stream_read_uint16(s, localmovesize->posX); /* posX (2 bytes) */
stream_read_uint16(s, localmovesize->posY); /* posY (2 bytes) */
stream_read_UINT16(s, localmovesize->moveSizeType); /* moveSizeType (2 bytes) */
stream_read_UINT16(s, localmovesize->posX); /* posX (2 bytes) */
stream_read_UINT16(s, localmovesize->posY); /* posY (2 bytes) */
}
void rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp)
@ -221,10 +221,10 @@ void rail_write_client_status_order(STREAM* s, RAIL_CLIENT_STATUS_ORDER* client_
void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec)
{
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) */
stream_write_uint16(s, exec->arguments.length); /* argumentsLength (2 bytes) */
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) */
stream_write_UINT16(s, exec->arguments.length); /* argumentsLength (2 bytes) */
rail_write_unicode_string_value(s, &exec->exeOrFile); /* exeOrFile */
rail_write_unicode_string_value(s, &exec->workingDir); /* workingDir */
rail_write_unicode_string_value(s, &exec->arguments); /* arguments */
@ -232,50 +232,50 @@ void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec)
void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
{
uint8 body;
BYTE body;
stream_write_uint32(s, sysparam->param); /* systemParam (4 bytes) */
switch (sysparam->param)
{
case SPI_SET_DRAG_FULL_WINDOWS:
body = sysparam->dragFullWindows;
stream_write_uint8(s, body);
stream_write_BYTE(s, body);
break;
case SPI_SET_KEYBOARD_CUES:
body = sysparam->keyboardCues;
stream_write_uint8(s, body);
stream_write_BYTE(s, body);
break;
case SPI_SET_KEYBOARD_PREF:
body = sysparam->keyboardPref;
stream_write_uint8(s, body);
stream_write_BYTE(s, body);
break;
case SPI_SET_MOUSE_BUTTON_SWAP:
body = sysparam->mouseButtonSwap;
stream_write_uint8(s, body);
stream_write_BYTE(s, body);
break;
case SPI_SET_WORK_AREA:
stream_write_uint16(s, sysparam->workArea.left); /* left (2 bytes) */
stream_write_uint16(s, sysparam->workArea.top); /* top (2 bytes) */
stream_write_uint16(s, sysparam->workArea.right); /* right (2 bytes) */
stream_write_uint16(s, sysparam->workArea.bottom); /* bottom (2 bytes) */
stream_write_UINT16(s, sysparam->workArea.left); /* left (2 bytes) */
stream_write_UINT16(s, sysparam->workArea.top); /* top (2 bytes) */
stream_write_UINT16(s, sysparam->workArea.right); /* right (2 bytes) */
stream_write_UINT16(s, sysparam->workArea.bottom); /* bottom (2 bytes) */
break;
case SPI_DISPLAY_CHANGE:
stream_write_uint16(s, sysparam->displayChange.left); /* left (2 bytes) */
stream_write_uint16(s, sysparam->displayChange.top); /* top (2 bytes) */
stream_write_uint16(s, sysparam->displayChange.right); /* right (2 bytes) */
stream_write_uint16(s, sysparam->displayChange.bottom); /* bottom (2 bytes) */
stream_write_UINT16(s, sysparam->displayChange.left); /* left (2 bytes) */
stream_write_UINT16(s, sysparam->displayChange.top); /* top (2 bytes) */
stream_write_UINT16(s, sysparam->displayChange.right); /* right (2 bytes) */
stream_write_UINT16(s, sysparam->displayChange.bottom); /* bottom (2 bytes) */
break;
case SPI_TASKBAR_POS:
stream_write_uint16(s, sysparam->taskbarPos.left); /* left (2 bytes) */
stream_write_uint16(s, sysparam->taskbarPos.top); /* top (2 bytes) */
stream_write_uint16(s, sysparam->taskbarPos.right); /* right (2 bytes) */
stream_write_uint16(s, sysparam->taskbarPos.bottom); /* bottom (2 bytes) */
stream_write_UINT16(s, sysparam->taskbarPos.left); /* left (2 bytes) */
stream_write_UINT16(s, sysparam->taskbarPos.top); /* top (2 bytes) */
stream_write_UINT16(s, sysparam->taskbarPos.right); /* right (2 bytes) */
stream_write_UINT16(s, sysparam->taskbarPos.bottom); /* bottom (2 bytes) */
break;
case SPI_SET_HIGH_CONTRAST:
@ -286,25 +286,25 @@ void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
void rail_write_client_activate_order(STREAM* s, RAIL_ACTIVATE_ORDER* activate)
{
uint8 enabled;
BYTE enabled;
stream_write_uint32(s, activate->windowId); /* windowId (4 bytes) */
enabled = activate->enabled;
stream_write_uint8(s, enabled); /* enabled (1 byte) */
stream_write_BYTE(s, enabled); /* enabled (1 byte) */
}
void rail_write_client_sysmenu_order(STREAM* s, RAIL_SYSMENU_ORDER* sysmenu)
{
stream_write_uint32(s, sysmenu->windowId); /* windowId (4 bytes) */
stream_write_uint16(s, sysmenu->left); /* left (2 bytes) */
stream_write_uint16(s, sysmenu->top); /* top (2 bytes) */
stream_write_UINT16(s, sysmenu->left); /* left (2 bytes) */
stream_write_UINT16(s, sysmenu->top); /* top (2 bytes) */
}
void rail_write_client_syscommand_order(STREAM* s, RAIL_SYSCOMMAND_ORDER* syscommand)
{
stream_write_uint32(s, syscommand->windowId); /* windowId (4 bytes) */
stream_write_uint16(s, syscommand->command); /* command (2 bytes) */
stream_write_UINT16(s, syscommand->command); /* command (2 bytes) */
}
void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* notify_event)
@ -317,10 +317,10 @@ void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* no
void rail_write_client_window_move_order(STREAM* s, RAIL_WINDOW_MOVE_ORDER* window_move)
{
stream_write_uint32(s, window_move->windowId); /* windowId (4 bytes) */
stream_write_uint16(s, window_move->left); /* left (2 bytes) */
stream_write_uint16(s, window_move->top); /* top (2 bytes) */
stream_write_uint16(s, window_move->right); /* right (2 bytes) */
stream_write_uint16(s, window_move->bottom); /* bottom (2 bytes) */
stream_write_UINT16(s, window_move->left); /* left (2 bytes) */
stream_write_UINT16(s, window_move->top); /* top (2 bytes) */
stream_write_UINT16(s, window_move->right); /* right (2 bytes) */
stream_write_UINT16(s, window_move->bottom); /* bottom (2 bytes) */
}
void rail_write_client_get_appid_req_order(STREAM* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req)
@ -418,8 +418,8 @@ void rail_recv_langbar_info_order(rdpRailOrder* rail_order, STREAM* s)
void rail_order_recv(rdpRailOrder* rail_order, STREAM* s)
{
uint16 orderType;
uint16 orderLength;
UINT16 orderType;
UINT16 orderLength;
rail_read_pdu_header(s, &orderType, &orderLength);

View File

@ -90,8 +90,8 @@ IRP* irp_new(DEVMAN* devman, STREAM* data_in)
irp->input = data_in;
irp->output = stream_new(256);
stream_write_uint16(irp->output, RDPDR_CTYP_CORE);
stream_write_uint16(irp->output, PAKID_CORE_DEVICE_IOCOMPLETION);
stream_write_UINT16(irp->output, RDPDR_CTYP_CORE);
stream_write_UINT16(irp->output, PAKID_CORE_DEVICE_IOCOMPLETION);
stream_write_uint32(irp->output, DeviceId);
stream_write_uint32(irp->output, irp->CompletionId);
stream_seek_uint32(irp->output); /* IoStatus */

View File

@ -33,10 +33,10 @@
#include "rdpdr_capabilities.h"
/* Output device redirection capability set header */
static void rdpdr_write_capset_header(STREAM* data_out, uint16 capabilityType, uint16 capabilityLength, uint32 version)
static void rdpdr_write_capset_header(STREAM* data_out, UINT16 capabilityType, UINT16 capabilityLength, uint32 version)
{
stream_write_uint16(data_out, capabilityType);
stream_write_uint16(data_out, capabilityLength);
stream_write_UINT16(data_out, capabilityType);
stream_write_UINT16(data_out, capabilityLength);
stream_write_uint32(data_out, version);
}
@ -47,8 +47,8 @@ static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
stream_write_uint32(data_out, 0); /* osType, ignored on receipt */
stream_write_uint32(data_out, 0); /* osVersion, unused and must be set to zero */
stream_write_uint16(data_out, 1); /* protocolMajorVersion, must be set to 1 */
stream_write_uint16(data_out, RDPDR_MINOR_RDP_VERSION_5_2); /* protocolMinorVersion */
stream_write_UINT16(data_out, 1); /* protocolMajorVersion, must be set to 1 */
stream_write_UINT16(data_out, RDPDR_MINOR_RDP_VERSION_5_2); /* protocolMinorVersion */
stream_write_uint32(data_out, 0x0000FFFF); /* ioCode1 */
stream_write_uint32(data_out, 0); /* ioCode2, must be set to zero, reserved for future use */
stream_write_uint32(data_out, RDPDR_DEVICE_REMOVE_PDUS | RDPDR_CLIENT_DISPLAY_NAME_PDU | RDPDR_USER_LOGGEDON_PDU); /* extendedPDU */
@ -60,9 +60,9 @@ static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
/* Process device direction general capability set */
static void rdpdr_process_general_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
{
uint16 capabilityLength;
UINT16 capabilityLength;
stream_read_uint16(data_in, capabilityLength);
stream_read_UINT16(data_in, capabilityLength);
stream_seek(data_in, capabilityLength - 4);
}
@ -75,9 +75,9 @@ static void rdpdr_write_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
/* Process printer direction capability set */
static void rdpdr_process_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
{
uint16 capabilityLength;
UINT16 capabilityLength;
stream_read_uint16(data_in, capabilityLength);
stream_read_UINT16(data_in, capabilityLength);
stream_seek(data_in, capabilityLength - 4);
}
@ -90,9 +90,9 @@ static void rdpdr_write_port_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
/* Process port redirection capability set */
static void rdpdr_process_port_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
{
uint16 capabilityLength;
UINT16 capabilityLength;
stream_read_uint16(data_in, capabilityLength);
stream_read_UINT16(data_in, capabilityLength);
stream_seek(data_in, capabilityLength - 4);
}
@ -105,9 +105,9 @@ static void rdpdr_write_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
/* Process drive redirection capability set */
static void rdpdr_process_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
{
uint16 capabilityLength;
UINT16 capabilityLength;
stream_read_uint16(data_in, capabilityLength);
stream_read_UINT16(data_in, capabilityLength);
stream_seek(data_in, capabilityLength - 4);
}
@ -120,24 +120,24 @@ static void rdpdr_write_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
/* Process smartcard redirection capability set */
static void rdpdr_process_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
{
uint16 capabilityLength;
UINT16 capabilityLength;
stream_read_uint16(data_in, capabilityLength);
stream_read_UINT16(data_in, capabilityLength);
stream_seek(data_in, capabilityLength - 4);
}
void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in)
{
uint16 i;
uint16 numCapabilities;
uint16 capabilityType;
UINT16 i;
UINT16 numCapabilities;
UINT16 capabilityType;
stream_read_uint16(data_in, numCapabilities);
stream_read_UINT16(data_in, numCapabilities);
stream_seek(data_in, 2); /* pad (2 bytes) */
for(i = 0; i < numCapabilities; i++)
{
stream_read_uint16(data_in, capabilityType);
stream_read_UINT16(data_in, capabilityType);
switch (capabilityType)
{
@ -174,11 +174,11 @@ void rdpdr_send_capability_response(rdpdrPlugin* rdpdr)
data_out = stream_new(256);
stream_write_uint16(data_out, RDPDR_CTYP_CORE);
stream_write_uint16(data_out, PAKID_CORE_CLIENT_CAPABILITY);
stream_write_UINT16(data_out, RDPDR_CTYP_CORE);
stream_write_UINT16(data_out, PAKID_CORE_CLIENT_CAPABILITY);
stream_write_uint16(data_out, 5); /* numCapabilities */
stream_write_uint16(data_out, 0); /* pad */
stream_write_UINT16(data_out, 5); /* numCapabilities */
stream_write_UINT16(data_out, 0); /* pad */
rdpdr_write_general_capset(rdpdr, data_out);
rdpdr_write_printer_capset(rdpdr, data_out);

View File

@ -67,14 +67,14 @@ static void rdpdr_process_connect(rdpSvcPlugin* plugin)
devman_load_device_service(rdpdr->devman, data);
}
data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size);
data = (RDP_PLUGIN_DATA*) (((BYTE*) data) + data->size);
}
}
static void rdpdr_process_server_announce_request(rdpdrPlugin* rdpdr, STREAM* data_in)
{
stream_read_uint16(data_in, rdpdr->versionMajor);
stream_read_uint16(data_in, rdpdr->versionMinor);
stream_read_UINT16(data_in, rdpdr->versionMajor);
stream_read_UINT16(data_in, rdpdr->versionMinor);
stream_read_uint32(data_in, rdpdr->clientID);
DEBUG_SVC("version %d.%d clientID %d", rdpdr->versionMajor, rdpdr->versionMinor, rdpdr->clientID);
@ -86,11 +86,11 @@ static void rdpdr_send_client_announce_reply(rdpdrPlugin* rdpdr)
data_out = stream_new(12);
stream_write_uint16(data_out, RDPDR_CTYP_CORE);
stream_write_uint16(data_out, PAKID_CORE_CLIENTID_CONFIRM);
stream_write_UINT16(data_out, RDPDR_CTYP_CORE);
stream_write_UINT16(data_out, PAKID_CORE_CLIENTID_CONFIRM);
stream_write_uint16(data_out, rdpdr->versionMajor);
stream_write_uint16(data_out, rdpdr->versionMinor);
stream_write_UINT16(data_out, rdpdr->versionMajor);
stream_write_UINT16(data_out, rdpdr->versionMinor);
stream_write_uint32(data_out, (uint32) rdpdr->clientID);
svc_plugin_send((rdpSvcPlugin*) rdpdr, data_out);
@ -109,14 +109,14 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
data_out = stream_new(16 + computerNameLenW + 2);
stream_write_uint16(data_out, RDPDR_CTYP_CORE);
stream_write_uint16(data_out, PAKID_CORE_CLIENT_NAME);
stream_write_UINT16(data_out, RDPDR_CTYP_CORE);
stream_write_UINT16(data_out, PAKID_CORE_CLIENT_NAME);
stream_write_uint32(data_out, 1); /* unicodeFlag, 0 for ASCII and 1 for Unicode */
stream_write_uint32(data_out, 0); /* codePage, must be set to zero */
stream_write_uint32(data_out, computerNameLenW + 2); /* computerNameLen, including null terminator */
stream_write(data_out, computerNameW, computerNameLenW);
stream_write_uint16(data_out, 0); /* null terminator */
stream_write_UINT16(data_out, 0); /* null terminator */
free(computerNameW);
@ -125,12 +125,12 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
static void rdpdr_process_server_clientid_confirm(rdpdrPlugin* rdpdr, STREAM* data_in)
{
uint16 versionMajor;
uint16 versionMinor;
UINT16 versionMajor;
UINT16 versionMinor;
uint32 clientID;
stream_read_uint16(data_in, versionMajor);
stream_read_uint16(data_in, versionMinor);
stream_read_UINT16(data_in, versionMajor);
stream_read_UINT16(data_in, versionMinor);
stream_read_uint32(data_in, clientID);
if (versionMajor != rdpdr->versionMajor || versionMinor != rdpdr->versionMinor)
@ -151,7 +151,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
{
int i;
int pos;
uint8 c;
BYTE c;
uint32 count;
int data_len;
int count_pos;
@ -161,8 +161,8 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
data_out = stream_new(256);
stream_write_uint16(data_out, RDPDR_CTYP_CORE);
stream_write_uint16(data_out, PAKID_CORE_DEVICELIST_ANNOUNCE);
stream_write_UINT16(data_out, RDPDR_CTYP_CORE);
stream_write_UINT16(data_out, PAKID_CORE_DEVICELIST_ANNOUNCE);
count_pos = stream_get_pos(data_out);
count = 0;
@ -190,12 +190,12 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
for (i = 0; i < 8; i++)
{
stream_peek_uint8(data_out, c);
stream_peek_BYTE(data_out, c);
if (c > 0x7F)
stream_write_uint8(data_out, '_');
stream_write_BYTE(data_out, '_');
else
stream_seek_uint8(data_out);
stream_seek_BYTE(data_out);
}
stream_write_uint32(data_out, data_len);
@ -235,14 +235,14 @@ static BOOL rdpdr_process_irp(rdpdrPlugin* rdpdr, STREAM* data_in)
static void rdpdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
{
uint16 component;
uint16 packetID;
UINT16 component;
UINT16 packetID;
uint32 deviceID;
uint32 status;
rdpdrPlugin* rdpdr = (rdpdrPlugin*) plugin;
stream_read_uint16(data_in, component);
stream_read_uint16(data_in, packetID);
stream_read_UINT16(data_in, component);
stream_read_UINT16(data_in, packetID);
if (component == RDPDR_CTYP_CORE)
{

View File

@ -32,9 +32,9 @@ struct rdpdr_plugin
DEVMAN* devman;
uint16 versionMajor;
uint16 versionMinor;
uint16 clientID;
UINT16 versionMajor;
UINT16 versionMinor;
UINT16 clientID;
char computerName[256];
};

View File

@ -150,7 +150,7 @@ static void rdpsnd_audio_set_volume(rdpsndDevicePlugin* device, uint32 value)
{
}
static void rdpsnd_audio_play(rdpsndDevicePlugin* device, uint8* data, int size)
static void rdpsnd_audio_play(rdpsndDevicePlugin* device, BYTE* data, int size)
{
rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin *) device;
AudioQueueBufferRef aq_buf_ref;

View File

@ -321,16 +321,16 @@ static void rdpsnd_alsa_set_volume(rdpsndDevicePlugin* device, uint32 value)
}
}
static void rdpsnd_alsa_play(rdpsndDevicePlugin* device, uint8* data, int size)
static void rdpsnd_alsa_play(rdpsndDevicePlugin* device, BYTE* data, int size)
{
uint8* src;
BYTE* src;
int len;
int status;
int frames;
int rbytes_per_frame;
int sbytes_per_frame;
uint8* pindex;
uint8* end;
BYTE* pindex;
BYTE* end;
rdpsndAlsaPlugin* alsa = (rdpsndAlsaPlugin*) device;
if (alsa->out_handle == 0)

View File

@ -453,11 +453,11 @@ static void rdpsnd_pulse_set_volume(rdpsndDevicePlugin* device, uint32 value)
pa_threaded_mainloop_unlock(pulse->mainloop);
}
static void rdpsnd_pulse_play(rdpsndDevicePlugin* device, uint8* data, int size)
static void rdpsnd_pulse_play(rdpsndDevicePlugin* device, BYTE* data, int size)
{
int len;
int ret;
uint8* src;
BYTE* src;
rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*) device;
if (!pulse->stream)

View File

@ -48,22 +48,22 @@ struct rdpsnd_plugin
LIST* data_out_list;
uint8 cBlockNo;
BYTE cBlockNo;
rdpsndFormat* supported_formats;
int n_supported_formats;
int current_format;
BOOL expectingWave;
uint8 waveData[4];
uint16 waveDataSize;
BYTE waveData[4];
UINT16 waveDataSize;
uint32 wTimeStamp; /* server timestamp */
uint32 wave_timestamp; /* client timestamp */
BOOL is_open;
uint32 close_timestamp;
uint16 fixed_format;
uint16 fixed_channel;
UINT16 fixed_format;
UINT16 fixed_channel;
uint32 fixed_rate;
int latency;
@ -132,7 +132,7 @@ static void rdpsnd_process_interval(rdpSvcPlugin* plugin)
static void rdpsnd_free_supported_formats(rdpsndPlugin* rdpsnd)
{
uint16 i;
UINT16 i;
for (i = 0; i < rdpsnd->n_supported_formats; i++)
free(rdpsnd->supported_formats[i].data);
@ -146,15 +146,15 @@ static void rdpsnd_free_supported_formats(rdpsndPlugin* rdpsnd)
of client supported formats */
static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in)
{
uint16 wNumberOfFormats;
uint16 nFormat;
uint16 wVersion;
UINT16 wNumberOfFormats;
UINT16 nFormat;
UINT16 wVersion;
STREAM* data_out;
rdpsndFormat* out_formats;
uint16 n_out_formats;
UINT16 n_out_formats;
rdpsndFormat* format;
uint8* format_mark;
uint8* data_mark;
BYTE* format_mark;
BYTE* data_mark;
int pos;
rdpsnd_free_supported_formats(rdpsnd);
@ -162,11 +162,11 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
stream_seek_uint32(data_in); /* dwFlags */
stream_seek_uint32(data_in); /* dwVolume */
stream_seek_uint32(data_in); /* dwPitch */
stream_seek_uint16(data_in); /* wDGramPort */
stream_read_uint16(data_in, wNumberOfFormats);
stream_read_uint8(data_in, rdpsnd->cBlockNo); /* cLastBlockConfirmed */
stream_read_uint16(data_in, wVersion);
stream_seek_uint8(data_in); /* bPad */
stream_seek_UINT16(data_in); /* wDGramPort */
stream_read_UINT16(data_in, wNumberOfFormats);
stream_read_BYTE(data_in, rdpsnd->cBlockNo); /* cLastBlockConfirmed */
stream_read_UINT16(data_in, wVersion);
stream_seek_BYTE(data_in); /* bPad */
DEBUG_SVC("wNumberOfFormats %d wVersion %d", wNumberOfFormats, wVersion);
if (wNumberOfFormats < 1)
@ -179,29 +179,29 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
n_out_formats = 0;
data_out = stream_new(24);
stream_write_uint8(data_out, SNDC_FORMATS); /* msgType */
stream_write_uint8(data_out, 0); /* bPad */
stream_seek_uint16(data_out); /* BodySize */
stream_write_BYTE(data_out, SNDC_FORMATS); /* msgType */
stream_write_BYTE(data_out, 0); /* bPad */
stream_seek_UINT16(data_out); /* BodySize */
stream_write_uint32(data_out, TSSNDCAPS_ALIVE | TSSNDCAPS_VOLUME); /* dwFlags */
stream_write_uint32(data_out, 0xFFFFFFFF); /* dwVolume */
stream_write_uint32(data_out, 0); /* dwPitch */
stream_write_uint16_be(data_out, 0); /* wDGramPort */
stream_seek_uint16(data_out); /* wNumberOfFormats */
stream_write_uint8(data_out, 0); /* cLastBlockConfirmed */
stream_write_uint16(data_out, 6); /* wVersion */
stream_write_uint8(data_out, 0); /* bPad */
stream_write_UINT16_be(data_out, 0); /* wDGramPort */
stream_seek_UINT16(data_out); /* wNumberOfFormats */
stream_write_BYTE(data_out, 0); /* cLastBlockConfirmed */
stream_write_UINT16(data_out, 6); /* wVersion */
stream_write_BYTE(data_out, 0); /* bPad */
for (nFormat = 0; nFormat < wNumberOfFormats; nFormat++)
{
stream_get_mark(data_in, format_mark);
format = &out_formats[n_out_formats];
stream_read_uint16(data_in, format->wFormatTag);
stream_read_uint16(data_in, format->nChannels);
stream_read_UINT16(data_in, format->wFormatTag);
stream_read_UINT16(data_in, format->nChannels);
stream_read_uint32(data_in, format->nSamplesPerSec);
stream_seek_uint32(data_in); /* nAvgBytesPerSec */
stream_read_uint16(data_in, format->nBlockAlign);
stream_read_uint16(data_in, format->wBitsPerSample);
stream_read_uint16(data_in, format->cbSize);
stream_read_UINT16(data_in, format->nBlockAlign);
stream_read_UINT16(data_in, format->wBitsPerSample);
stream_read_UINT16(data_in, format->cbSize);
stream_get_mark(data_in, data_mark);
stream_seek(data_in, format->cbSize);
format->data = NULL;
@ -244,9 +244,9 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
pos = stream_get_pos(data_out);
stream_set_pos(data_out, 2);
stream_write_uint16(data_out, pos - 4);
stream_write_UINT16(data_out, pos - 4);
stream_set_pos(data_out, 18);
stream_write_uint16(data_out, n_out_formats);
stream_write_UINT16(data_out, n_out_formats);
stream_set_pos(data_out, pos);
svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out);
@ -254,11 +254,11 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
if (wVersion >= 6)
{
data_out = stream_new(8);
stream_write_uint8(data_out, SNDC_QUALITYMODE); /* msgType */
stream_write_uint8(data_out, 0); /* bPad */
stream_write_uint16(data_out, 4); /* BodySize */
stream_write_uint16(data_out, HIGH_QUALITY); /* wQualityMode */
stream_write_uint16(data_out, 0); /* Reserved */
stream_write_BYTE(data_out, SNDC_QUALITYMODE); /* msgType */
stream_write_BYTE(data_out, 0); /* bPad */
stream_write_UINT16(data_out, 4); /* BodySize */
stream_write_UINT16(data_out, HIGH_QUALITY); /* wQualityMode */
stream_write_UINT16(data_out, 0); /* Reserved */
svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out);
}
@ -267,30 +267,30 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
/* server is getting a feel of the round trip time */
static void rdpsnd_process_message_training(rdpsndPlugin* rdpsnd, STREAM* data_in)
{
uint16 wTimeStamp;
uint16 wPackSize;
UINT16 wTimeStamp;
UINT16 wPackSize;
STREAM* data_out;
stream_read_uint16(data_in, wTimeStamp);
stream_read_uint16(data_in, wPackSize);
stream_read_UINT16(data_in, wTimeStamp);
stream_read_UINT16(data_in, wPackSize);
data_out = stream_new(8);
stream_write_uint8(data_out, SNDC_TRAINING); /* msgType */
stream_write_uint8(data_out, 0); /* bPad */
stream_write_uint16(data_out, 4); /* BodySize */
stream_write_uint16(data_out, wTimeStamp);
stream_write_uint16(data_out, wPackSize);
stream_write_BYTE(data_out, SNDC_TRAINING); /* msgType */
stream_write_BYTE(data_out, 0); /* bPad */
stream_write_UINT16(data_out, 4); /* BodySize */
stream_write_UINT16(data_out, wTimeStamp);
stream_write_UINT16(data_out, wPackSize);
svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out);
}
static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_in, uint16 BodySize)
static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_in, UINT16 BodySize)
{
uint16 wFormatNo;
UINT16 wFormatNo;
stream_read_uint16(data_in, rdpsnd->wTimeStamp);
stream_read_uint16(data_in, wFormatNo);
stream_read_uint8(data_in, rdpsnd->cBlockNo);
stream_read_UINT16(data_in, rdpsnd->wTimeStamp);
stream_read_UINT16(data_in, wFormatNo);
stream_read_BYTE(data_in, rdpsnd->cBlockNo);
stream_seek(data_in, 3); /* bPad */
stream_read(data_in, rdpsnd->waveData, 4);
rdpsnd->waveDataSize = BodySize - 8;
@ -320,7 +320,7 @@ static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_
/* header is not removed from data in this function */
static void rdpsnd_process_message_wave(rdpsndPlugin* rdpsnd, STREAM* data_in)
{
uint16 wTimeStamp;
UINT16 wTimeStamp;
uint32 delay_ms;
uint32 process_ms;
struct data_out_item* item;
@ -344,12 +344,12 @@ static void rdpsnd_process_message_wave(rdpsndPlugin* rdpsnd, STREAM* data_in)
item = xnew(struct data_out_item);
item->data_out = stream_new(8);
stream_write_uint8(item->data_out, SNDC_WAVECONFIRM);
stream_write_uint8(item->data_out, 0);
stream_write_uint16(item->data_out, 4);
stream_write_uint16(item->data_out, wTimeStamp);
stream_write_uint8(item->data_out, rdpsnd->cBlockNo); /* cConfirmedBlockNo */
stream_write_uint8(item->data_out, 0); /* bPad */
stream_write_BYTE(item->data_out, SNDC_WAVECONFIRM);
stream_write_BYTE(item->data_out, 0);
stream_write_UINT16(item->data_out, 4);
stream_write_UINT16(item->data_out, wTimeStamp);
stream_write_BYTE(item->data_out, rdpsnd->cBlockNo); /* cConfirmedBlockNo */
stream_write_BYTE(item->data_out, 0); /* bPad */
item->out_timestamp = rdpsnd->wave_timestamp + delay_ms;
list_enqueue(rdpsnd->data_out_list, item);
@ -378,8 +378,8 @@ static void rdpsnd_process_message_setvolume(rdpsndPlugin* rdpsnd, STREAM* data_
static void rdpsnd_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
{
rdpsndPlugin* rdpsnd = (rdpsndPlugin*)plugin;
uint8 msgType;
uint16 BodySize;
BYTE msgType;
UINT16 BodySize;
if (rdpsnd->expectingWave)
{
@ -388,9 +388,9 @@ static void rdpsnd_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
return;
}
stream_read_uint8(data_in, msgType); /* msgType */
stream_seek_uint8(data_in); /* bPad */
stream_read_uint16(data_in, BodySize);
stream_read_BYTE(data_in, msgType); /* msgType */
stream_seek_BYTE(data_in); /* bPad */
stream_read_UINT16(data_in, BodySize);
DEBUG_SVC("msgType %d BodySize %d", msgType, BodySize);
@ -503,7 +503,7 @@ static void rdpsnd_process_connect(rdpSvcPlugin* plugin)
while (data && data->size > 0)
{
rdpsnd_process_plugin_data(rdpsnd, data);
data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size);
data = (RDP_PLUGIN_DATA*) (((BYTE*) data) + data->size);
}
if (rdpsnd->device == NULL)

View File

@ -30,7 +30,7 @@ typedef BOOL (*pcFormatSupported) (rdpsndDevicePlugin* device, rdpsndFormat* for
typedef void (*pcOpen) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency);
typedef void (*pcSetFormat) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency);
typedef void (*pcSetVolume) (rdpsndDevicePlugin* device, uint32 value);
typedef void (*pcPlay) (rdpsndDevicePlugin* device, uint8* data, int size);
typedef void (*pcPlay) (rdpsndDevicePlugin* device, BYTE* data, int size);
typedef void (*pcStart) (rdpsndDevicePlugin* device);
typedef void (*pcClose) (rdpsndDevicePlugin* device);
typedef void (*pcFree) (rdpsndDevicePlugin* device);

View File

@ -42,7 +42,7 @@ typedef struct _rdpsnd_server
STREAM* rdpsnd_pdu;
FREERDP_DSP_CONTEXT* dsp_context;
uint8* out_buffer;
BYTE* out_buffer;
int out_buffer_size;
int out_frames;
int out_pending_frames;
@ -53,9 +53,9 @@ typedef struct _rdpsnd_server
#define RDPSND_PDU_INIT(_s, _msgType) \
{ \
stream_write_uint8(_s, _msgType); \
stream_write_uint8(_s, 0); \
stream_seek_uint16(_s); \
stream_write_BYTE(_s, _msgType); \
stream_write_BYTE(_s, 0); \
stream_seek_UINT16(_s); \
}
#define RDPSND_PDU_FINISH(_s) \
@ -64,7 +64,7 @@ typedef struct _rdpsnd_server
int _pos; \
_pos = stream_get_pos(_s); \
stream_set_pos(_s, 2); \
stream_write_uint16(_s, _pos - 4); \
stream_write_UINT16(_s, _pos - 4); \
stream_set_pos(_s, _pos); \
_r = WTSVirtualChannelWrite(rdpsnd->rdpsnd_channel, stream_get_head(_s), stream_get_length(_s), NULL); \
stream_set_pos(_s, 0); \
@ -73,32 +73,32 @@ typedef struct _rdpsnd_server
static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s)
{
uint16 i;
UINT16 i;
RDPSND_PDU_INIT(s, SNDC_FORMATS);
stream_write_uint32(s, 0); /* dwFlags */
stream_write_uint32(s, 0); /* dwVolume */
stream_write_uint32(s, 0); /* dwPitch */
stream_write_uint16(s, 0); /* wDGramPort */
stream_write_uint16(s, rdpsnd->context.num_server_formats); /* wNumberOfFormats */
stream_write_uint8(s, rdpsnd->context.block_no); /* cLastBlockConfirmed */
stream_write_uint16(s, 0x06); /* wVersion */
stream_write_uint8(s, 0); /* bPad */
stream_write_UINT16(s, 0); /* wDGramPort */
stream_write_UINT16(s, rdpsnd->context.num_server_formats); /* wNumberOfFormats */
stream_write_BYTE(s, rdpsnd->context.block_no); /* cLastBlockConfirmed */
stream_write_UINT16(s, 0x06); /* wVersion */
stream_write_BYTE(s, 0); /* bPad */
for (i = 0; i < rdpsnd->context.num_server_formats; i++)
{
stream_write_uint16(s, rdpsnd->context.server_formats[i].wFormatTag); /* wFormatTag (WAVE_FORMAT_PCM) */
stream_write_uint16(s, rdpsnd->context.server_formats[i].nChannels); /* nChannels */
stream_write_UINT16(s, rdpsnd->context.server_formats[i].wFormatTag); /* wFormatTag (WAVE_FORMAT_PCM) */
stream_write_UINT16(s, rdpsnd->context.server_formats[i].nChannels); /* nChannels */
stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec); /* nSamplesPerSec */
stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec *
rdpsnd->context.server_formats[i].nChannels *
rdpsnd->context.server_formats[i].wBitsPerSample / 8); /* nAvgBytesPerSec */
stream_write_uint16(s, rdpsnd->context.server_formats[i].nBlockAlign); /* nBlockAlign */
stream_write_uint16(s, rdpsnd->context.server_formats[i].wBitsPerSample); /* wBitsPerSample */
stream_write_uint16(s, rdpsnd->context.server_formats[i].cbSize); /* cbSize */
stream_write_UINT16(s, rdpsnd->context.server_formats[i].nBlockAlign); /* nBlockAlign */
stream_write_UINT16(s, rdpsnd->context.server_formats[i].wBitsPerSample); /* wBitsPerSample */
stream_write_UINT16(s, rdpsnd->context.server_formats[i].cbSize); /* cbSize */
if (rdpsnd->context.server_formats[i].cbSize > 0)
{
@ -119,11 +119,11 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s)
stream_seek_uint32(s); /* dwFlags */
stream_seek_uint32(s); /* dwVolume */
stream_seek_uint32(s); /* dwPitch */
stream_seek_uint16(s); /* wDGramPort */
stream_read_uint16(s, rdpsnd->context.num_client_formats); /* wNumberOfFormats */
stream_seek_uint8(s); /* cLastBlockConfirmed */
stream_seek_uint16(s); /* wVersion */
stream_seek_uint8(s); /* bPad */
stream_seek_UINT16(s); /* wDGramPort */
stream_read_UINT16(s, rdpsnd->context.num_client_formats); /* wNumberOfFormats */
stream_seek_BYTE(s); /* cLastBlockConfirmed */
stream_seek_UINT16(s); /* wVersion */
stream_seek_BYTE(s); /* bPad */
if (rdpsnd->context.num_client_formats > 0)
{
@ -138,13 +138,13 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s)
return FALSE;
}
stream_read_uint16(s, rdpsnd->context.client_formats[i].wFormatTag);
stream_read_uint16(s, rdpsnd->context.client_formats[i].nChannels);
stream_read_UINT16(s, rdpsnd->context.client_formats[i].wFormatTag);
stream_read_UINT16(s, rdpsnd->context.client_formats[i].nChannels);
stream_read_uint32(s, rdpsnd->context.client_formats[i].nSamplesPerSec);
stream_seek_uint32(s); /* nAvgBytesPerSec */
stream_read_uint16(s, rdpsnd->context.client_formats[i].nBlockAlign);
stream_read_uint16(s, rdpsnd->context.client_formats[i].wBitsPerSample);
stream_read_uint16(s, rdpsnd->context.client_formats[i].cbSize);
stream_read_UINT16(s, rdpsnd->context.client_formats[i].nBlockAlign);
stream_read_UINT16(s, rdpsnd->context.client_formats[i].wBitsPerSample);
stream_read_UINT16(s, rdpsnd->context.client_formats[i].cbSize);
if (rdpsnd->context.client_formats[i].cbSize > 0)
{
@ -161,8 +161,8 @@ static void* rdpsnd_server_thread_func(void* arg)
void* fd;
STREAM* s;
void* buffer;
uint8 msgType;
uint16 BodySize;
BYTE msgType;
UINT16 BodySize;
uint32 bytes_returned = 0;
rdpsnd_server* rdpsnd = (rdpsnd_server*) arg;
freerdp_thread* thread = rdpsnd->rdpsnd_channel_thread;
@ -200,9 +200,9 @@ static void* rdpsnd_server_thread_func(void* arg)
break;
}
stream_read_uint8(s, msgType);
stream_seek_uint8(s); /* bPad */
stream_read_uint16(s, BodySize);
stream_read_BYTE(s, msgType);
stream_seek_BYTE(s); /* bPad */
stream_read_UINT16(s, BodySize);
if (BodySize + 4 > (int) bytes_returned)
continue;
@ -301,7 +301,7 @@ static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd)
{
int size;
BOOL r;
uint8* src;
BYTE* src;
int frames;
int fill_size;
rdpsndFormat* format;
@ -353,13 +353,13 @@ static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd)
/* WaveInfo PDU */
stream_set_pos(s, 0);
stream_write_uint8(s, SNDC_WAVE); /* msgType */
stream_write_uint8(s, 0); /* bPad */
stream_write_uint16(s, size + fill_size + 8); /* BodySize */
stream_write_BYTE(s, SNDC_WAVE); /* msgType */
stream_write_BYTE(s, 0); /* bPad */
stream_write_UINT16(s, size + fill_size + 8); /* BodySize */
stream_write_uint16(s, 0); /* wTimeStamp */
stream_write_uint16(s, rdpsnd->context.selected_client_format); /* wFormatNo */
stream_write_uint8(s, rdpsnd->context.block_no); /* cBlockNo */
stream_write_UINT16(s, 0); /* wTimeStamp */
stream_write_UINT16(s, rdpsnd->context.selected_client_format); /* wFormatNo */
stream_write_BYTE(s, rdpsnd->context.block_no); /* cBlockNo */
stream_seek(s, 3); /* bPad */
stream_write(s, src, 4);
@ -397,7 +397,7 @@ static BOOL rdpsnd_server_send_samples(rdpsnd_server_context* context, const voi
cframesize = cframes * rdpsnd->src_bytes_per_frame;
memcpy(rdpsnd->out_buffer + (rdpsnd->out_pending_frames * rdpsnd->src_bytes_per_frame), buf, cframesize);
buf = (uint8*) buf + cframesize;
buf = (BYTE*) buf + cframesize;
nframes -= cframes;
rdpsnd->out_pending_frames += cframes;
@ -418,8 +418,8 @@ static BOOL rdpsnd_server_set_volume(rdpsnd_server_context* context, int left, i
RDPSND_PDU_INIT(s, SNDC_SETVOLUME);
stream_write_uint16(s, left);
stream_write_uint16(s, right);
stream_write_UINT16(s, left);
stream_write_UINT16(s, right);
RDPSND_PDU_FINISH(s);
}

View File

@ -108,7 +108,7 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp)
}
stream_write_uint32(irp->output, FileId);
stream_write_uint8(irp->output, 0);
stream_write_BYTE(irp->output, 0);
free(path);
@ -144,7 +144,7 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp)
SERIAL_TTY* tty;
uint32 Length;
uint64 Offset;
uint8* buffer = NULL;
BYTE* buffer = NULL;
stream_read_uint32(irp->input, Length);
stream_read_uint64(irp->input, Offset);
@ -162,7 +162,7 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp)
}
else
{
buffer = (uint8*) malloc(Length);
buffer = (BYTE*) malloc(Length);
if (!serial_tty_read(tty, buffer, &Length))
{
@ -226,7 +226,7 @@ static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp)
}
stream_write_uint32(irp->output, Length);
stream_write_uint8(irp->output, 0); /* Padding */
stream_write_BYTE(irp->output, 0); /* Padding */
irp->Complete(irp);
}
@ -420,7 +420,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
serial->device.data = stream_new(len + 1);
for (i = 0; i <= len; i++)
stream_write_uint8(serial->device.data, name[i] < 0 ? '_' : name[i]);
stream_write_BYTE(serial->device.data, name[i] < 0 ? '_' : name[i]);
serial->path = path;
serial->irp_list = list_new();

View File

@ -73,7 +73,7 @@
#define TIOCOUTQ FIONWRITE
#endif
static uint32 tty_write_data(SERIAL_TTY* tty, uint8* data, int len);
static uint32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len);
static void tty_set_termios(SERIAL_TTY* tty);
static BOOL tty_get_termios(SERIAL_TTY* tty);
static int tty_get_error_status();
@ -83,7 +83,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
int purge_mask;
uint32 result;
uint32 modemstate;
uint8 immediate;
BYTE immediate;
uint32 ret = STATUS_SUCCESS;
uint32 length = 0;
uint32 pos;
@ -113,9 +113,9 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
break;
case IOCTL_SERIAL_SET_LINE_CONTROL:
stream_read_uint8(input, tty->stop_bits);
stream_read_uint8(input, tty->parity);
stream_read_uint8(input, tty->word_length);
stream_read_BYTE(input, tty->stop_bits);
stream_read_BYTE(input, tty->parity);
stream_read_BYTE(input, tty->word_length);
tty_set_termios(tty);
DEBUG_SVC("SERIAL_SET_LINE_CONTROL stop %d parity %d word %d",
tty->stop_bits, tty->parity, tty->word_length);
@ -124,14 +124,14 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
case IOCTL_SERIAL_GET_LINE_CONTROL:
DEBUG_SVC("SERIAL_GET_LINE_CONTROL");
length = 3;
stream_write_uint8(output, tty->stop_bits);
stream_write_uint8(output, tty->parity);
stream_write_uint8(output, tty->word_length);
stream_write_BYTE(output, tty->stop_bits);
stream_write_BYTE(output, tty->parity);
stream_write_BYTE(output, tty->word_length);
break;
case IOCTL_SERIAL_IMMEDIATE_CHAR:
DEBUG_SVC("SERIAL_IMMEDIATE_CHAR");
stream_read_uint8(input, immediate);
stream_read_BYTE(input, immediate);
tty_write_data(tty, &immediate, 1);
break;
@ -293,8 +293,8 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
stream_write_uint32(output, result); /* Amount in out queue */
DEBUG_SVC("SERIAL_GET_COMMSTATUS out queue %d", result);
stream_write_uint8(output, 0); /* EofReceived */
stream_write_uint8(output, 0); /* WaitForImmediate */
stream_write_BYTE(output, 0); /* EofReceived */
stream_write_BYTE(output, 0); /* WaitForImmediate */
break;
case IOCTL_SERIAL_PURGE:
@ -369,7 +369,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
return ret;
}
BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length)
BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length)
{
long timeout = 90;
struct termios *ptermios;
@ -418,7 +418,7 @@ BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length)
return TRUE;
}
BOOL serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length)
BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, uint32 Length)
{
ssize_t r;
uint32 event_txempty = Length;
@ -969,7 +969,7 @@ static void tty_set_termios(SERIAL_TTY* tty)
tcsetattr(tty->fd, TCSANOW, ptermios);
}
static uint32 tty_write_data(SERIAL_TTY* tty, uint8* data, int len)
static uint32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len)
{
ssize_t r;

View File

@ -53,10 +53,10 @@ struct _SERIAL_TTY
uint32 read_total_timeout_constant;
uint32 write_total_timeout_multiplier;
uint32 write_total_timeout_constant;
uint8 stop_bits;
uint8 parity;
uint8 word_length;
uint8 chars[6];
BYTE stop_bits;
BYTE parity;
BYTE word_length;
BYTE chars[6];
struct termios* ptermios;
struct termios* pold_termios;
int event_txempty;
@ -69,8 +69,8 @@ struct _SERIAL_TTY
SERIAL_TTY* serial_tty_new(const char* path, uint32 id);
void serial_tty_free(SERIAL_TTY* tty);
BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length);
BOOL serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length);
BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length);
BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, uint32 Length);
uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, STREAM* output, uint32* abort_io);
BOOL serial_tty_get_event(SERIAL_TTY* tty, uint32* result);

View File

@ -307,7 +307,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
scard->device.data = stream_new(length + 1);
for (i = 0; i <= length; i++)
stream_write_uint8(scard->device.data, name[i] < 0 ? '_' : name[i]);
stream_write_BYTE(scard->device.data, name[i] < 0 ? '_' : name[i]);
scard->path = path;

View File

@ -86,7 +86,7 @@
static uint32 sc_output_string(IRP* irp, char *src, BOOL wide)
{
uint8* p;
BYTE* p;
uint32 len;
p = stream_get_tail(irp->output);
@ -1060,7 +1060,7 @@ static uint32 handle_GetAttrib(IRP* irp)
SCARDHANDLE hCard;
DWORD dwAttrId = 0, dwAttrLen = 0;
DWORD attrLen = 0;
uint8* pbAttr = NULL;
BYTE* pbAttr = NULL;
stream_seek(irp->input, 0x20);
stream_read_uint32(irp->input, dwAttrId);
@ -1083,7 +1083,7 @@ static uint32 handle_GetAttrib(IRP* irp)
}
#endif
rv = SCardGetAttrib(hCard, dwAttrId, attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen);
rv = SCardGetAttrib(hCard, dwAttrId, attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen);
if( rv != SCARD_S_SUCCESS ) {
#ifdef SCARD_AUTOALLOCATE
if(dwAttrLen == 0)
@ -1100,7 +1100,7 @@ static uint32 handle_GetAttrib(IRP* irp)
if(dwAttrId == SCARD_ATTR_DEVICE_FRIENDLY_NAME_A && rv == SCARD_E_UNSUPPORTED_FEATURE)
{
rv = SCardGetAttrib(hCard, SCARD_ATTR_DEVICE_FRIENDLY_NAME_W,
attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen);
attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen);
if( rv != SCARD_S_SUCCESS ) {
#ifdef SCARD_AUTOALLOCATE
if(dwAttrLen == 0)
@ -1117,7 +1117,7 @@ static uint32 handle_GetAttrib(IRP* irp)
if(dwAttrId == SCARD_ATTR_DEVICE_FRIENDLY_NAME_W && rv == SCARD_E_UNSUPPORTED_FEATURE)
{
rv = SCardGetAttrib(hCard, SCARD_ATTR_DEVICE_FRIENDLY_NAME_A,
attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen);
attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen);
if( rv != SCARD_S_SUCCESS ) {
#ifdef SCARD_AUTOALLOCATE
if(dwAttrLen == 0)
@ -1190,8 +1190,8 @@ void scard_error(SCARD_DEVICE* scard, IRP* irp, uint32 ntstatus)
typedef struct _SERVER_SCARD_ATRMASK
{
uint32 cbAtr;
uint8 rgbAtr[36];
uint8 rgbMask[36];
BYTE rgbAtr[36];
BYTE rgbMask[36];
}
SERVER_SCARD_ATRMASK;

View File

@ -147,14 +147,14 @@ static BOOL tsmf_alsa_set_format(ITSMFAudioDevice* audio,
return TRUE;
}
static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size)
static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size)
{
int len;
int error;
int frames;
uint8* end;
uint8* src;
uint8* pindex;
BYTE* end;
BYTE* src;
BYTE* pindex;
int rbytes_per_frame;
int sbytes_per_frame;
TSMFALSAAudioDevice* alsa = (TSMFALSAAudioDevice*) audio;

View File

@ -50,7 +50,7 @@ typedef struct _TSMFFFmpegDecoder
AVFrame* frame;
int prepared;
uint8* decoded_data;
BYTE* decoded_data;
uint32 decoded_size;
uint32 decoded_size_max;
} TSMFFFmpegDecoder;
@ -110,8 +110,8 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP
{
TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
uint32 size;
const uint8* s;
uint8* p;
const BYTE* s;
BYTE* p;
mdecoder->codec = avcodec_find_decoder(mdecoder->codec_id);
if (!mdecoder->codec)
@ -260,7 +260,7 @@ static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* medi
return TRUE;
}
static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions)
static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions)
{
TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
int decoded;
@ -274,7 +274,7 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, u
{
AVPacket pkt;
av_init_packet(&pkt);
pkt.data = (uint8*) data;
pkt.data = (BYTE*) data;
pkt.size = data_size;
if (extensions & TSMM_SAMPLE_EXT_CLEANPOINT)
pkt.flags |= AV_PKT_FLAG_KEY;
@ -319,14 +319,14 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, u
return ret;
}
static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions)
static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions)
{
TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
int len;
int frame_size;
uint32 src_size;
const uint8* src;
uint8* dst;
const BYTE* src;
BYTE* dst;
int dst_offset;
#if 0
@ -345,7 +345,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u
mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16;
mdecoder->decoded_data = xzalloc(mdecoder->decoded_size_max);
/* align the memory for SSE2 needs */
dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
dst = (BYTE*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
dst_offset = dst - mdecoder->decoded_data;
src = data;
src_size = data_size;
@ -357,7 +357,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u
{
mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16;
mdecoder->decoded_data = realloc(mdecoder->decoded_data, mdecoder->decoded_size_max);
dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
dst = (BYTE*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
if (dst - mdecoder->decoded_data != dst_offset)
{
/* re-align the memory if the alignment has changed after realloc */
@ -377,7 +377,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u
int got_frame = 0;
AVPacket pkt;
av_init_packet(&pkt);
pkt.data = (uint8*) src;
pkt.data = (BYTE*) src;
pkt.size = src_size;
len = avcodec_decode_audio4(mdecoder->codec_context, decoded_frame, &got_frame, &pkt);
@ -419,7 +419,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u
return TRUE;
}
static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions)
static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions)
{
TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
@ -442,10 +442,10 @@ static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32
}
}
static uint8* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, uint32* size)
static BYTE* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, uint32* size)
{
TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
uint8* buf;
BYTE* buf;
*size = mdecoder->decoded_size;
buf = mdecoder->decoded_data;

View File

@ -1094,7 +1094,7 @@ static BOOL tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder)
return TRUE;
}
static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions,
static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const BYTE * data, uint32 data_size, uint32 extensions,
uint64 start_time, uint64 end_time, uint64 duration)
{
TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder;

View File

@ -298,10 +298,10 @@ static BOOL tsmf_pulse_set_format(ITSMFAudioDevice* audio,
return tsmf_pulse_open_stream(pulse);
}
static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size)
static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size)
{
TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio;
uint8* src;
BYTE* src;
int len;
int ret;

View File

@ -31,7 +31,7 @@ struct _ITSMFAudioDevice
/* Set the audio data format. */
BOOL (*SetFormat) (ITSMFAudioDevice* audio, uint32 sample_rate, uint32 channels, uint32 bits_per_sample);
/* Play audio data. */
BOOL (*Play) (ITSMFAudioDevice* audio, uint8* data, uint32 data_size);
BOOL (*Play) (ITSMFAudioDevice* audio, BYTE* data, uint32 data_size);
/* Get the latency of the last written sample, in 100ns */
uint64 (*GetLatency) (ITSMFAudioDevice* audio);
/* Change the playback volume level */

View File

@ -36,7 +36,7 @@
typedef struct _TSMFMediaTypeMap
{
uint8 guid[16];
BYTE guid[16];
const char* name;
int type;
} TSMFMediaTypeMap;
@ -259,7 +259,7 @@ static const TSMFMediaTypeMap tsmf_format_type_map[] =
}
};
static void tsmf_print_guid(const uint8* guid)
static void tsmf_print_guid(const BYTE* guid)
{
#ifdef WITH_DEBUG_DVC
int i;
@ -454,15 +454,15 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
case TSMF_FORMAT_TYPE_WAVEFORMATEX:
/* http://msdn.microsoft.com/en-us/library/dd757720.aspx */
stream_seek_uint16(s);
stream_read_uint16(s, mediatype->Channels);
stream_seek_UINT16(s);
stream_read_UINT16(s, mediatype->Channels);
stream_read_uint32(s, mediatype->SamplesPerSecond.Numerator);
mediatype->SamplesPerSecond.Denominator = 1;
stream_read_uint32(s, mediatype->BitRate);
mediatype->BitRate *= 8;
stream_read_uint16(s, mediatype->BlockAlign);
stream_read_uint16(s, mediatype->BitsPerSample);
stream_read_uint16(s, mediatype->ExtraDataSize);
stream_read_UINT16(s, mediatype->BlockAlign);
stream_read_UINT16(s, mediatype->BitsPerSample);
stream_read_UINT16(s, mediatype->ExtraDataSize);
if (mediatype->ExtraDataSize > 0)
mediatype->ExtraData = stream_get_tail(s);
@ -516,7 +516,7 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
BOOL tsmf_codec_check_media_type(STREAM* s)
{
uint8* m;
BYTE* m;
BOOL ret;
TS_AM_MEDIA_TYPE mediatype;

View File

@ -38,9 +38,9 @@ struct _ITSMFDecoder
/* Set the decoder format. Return true if supported. */
BOOL (*SetFormat) (ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type);
/* Decode a sample. */
BOOL (*Decode) (ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions);
BOOL (*Decode) (ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions);
/* Get the decoded data */
uint8* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size);
BYTE* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size);
/* Get the pixel format of decoded video frame */
uint32 (*GetDecodedFormat) (ITSMFDecoder* decoder);
/* Get the width and height of decoded video frame */
@ -50,7 +50,7 @@ struct _ITSMFDecoder
/* Optional Contol function */
void (*Control) (ITSMFDecoder * decoder, ITSMFControlMsg control_msg, uint32 *arg);
/* Decode a sample with extended interface. */
int (*DecodeEx) (ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions,
int (*DecodeEx) (ITSMFDecoder * decoder, const BYTE * data, uint32 data_size, uint32 extensions,
uint64 start_time, uint64 end_time, uint64 duration);
/* Get current play time */
uint64 (*GetRunningTime) (ITSMFDecoder * decoder);

View File

@ -338,14 +338,14 @@ int tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman)
rects = (RDP_RECT*) xzalloc(sizeof(RDP_RECT) * num_rects);
for (i = 0; i < num_rects; i++)
{
stream_read_uint16(ifman->input, rects[i].y); /* Top */
stream_seek_uint16(ifman->input);
stream_read_uint16(ifman->input, rects[i].x); /* Left */
stream_seek_uint16(ifman->input);
stream_read_uint16(ifman->input, rects[i].height); /* Bottom */
stream_seek_uint16(ifman->input);
stream_read_uint16(ifman->input, rects[i].width); /* Right */
stream_seek_uint16(ifman->input);
stream_read_UINT16(ifman->input, rects[i].y); /* Top */
stream_seek_UINT16(ifman->input);
stream_read_UINT16(ifman->input, rects[i].x); /* Left */
stream_seek_UINT16(ifman->input);
stream_read_UINT16(ifman->input, rects[i].height); /* Bottom */
stream_seek_UINT16(ifman->input);
stream_read_UINT16(ifman->input, rects[i].width); /* Right */
stream_seek_UINT16(ifman->input);
rects[i].width -= rects[i].x;
rects[i].height -= rects[i].y;

View File

@ -27,7 +27,7 @@ struct _TSMF_IFMAN
const char* decoder_name;
const char* audio_name;
const char* audio_device;
uint8 presentation_id[16];
BYTE presentation_id[16];
uint32 stream_id;
uint32 message_id;

View File

@ -57,7 +57,7 @@ struct _TSMF_CHANNEL_CALLBACK
IWTSVirtualChannelManager* channel_mgr;
IWTSVirtualChannel* channel;
uint8 presentation_id[16];
BYTE presentation_id[16];
uint32 stream_id;
};
@ -113,7 +113,7 @@ BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback,
static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
uint32 cbSize,
uint8* pBuffer)
BYTE* pBuffer)
{
int length;
STREAM* input;
@ -132,7 +132,7 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
return 1;
}
input = stream_new(0);
stream_attach(input, (uint8*) pBuffer, cbSize);
stream_attach(input, (BYTE*) pBuffer, cbSize);
output = stream_new(256);
stream_seek(output, 8);
@ -355,7 +355,7 @@ static int tsmf_on_close(IWTSVirtualChannelCallback* pChannelCallback)
static int tsmf_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel* pChannel,
uint8* Data,
BYTE* Data,
int* pbAccept,
IWTSVirtualChannelCallback** ppCallback)
{
@ -421,7 +421,7 @@ static void tsmf_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data)
}
}
data = (RDP_PLUGIN_DATA*)(((uint8*)data) + data->size);
data = (RDP_PLUGIN_DATA*)(((BYTE*)data) + data->size);
}
}

View File

@ -57,7 +57,7 @@
struct _TSMF_PRESENTATION
{
uint8 presentation_id[GUID_SIZE];
BYTE presentation_id[GUID_SIZE];
const char* audio_name;
const char* audio_device;
@ -67,14 +67,14 @@ struct _TSMF_PRESENTATION
uint32 last_y;
uint32 last_width;
uint32 last_height;
uint16 last_num_rects;
UINT16 last_num_rects;
RDP_RECT* last_rects;
uint32 output_x;
uint32 output_y;
uint32 output_width;
uint32 output_height;
uint16 output_num_rects;
UINT16 output_num_rects;
RDP_RECT* output_rects;
IWTSVirtualChannelCallback* channel_callback;
@ -127,7 +127,7 @@ struct _TSMF_SAMPLE
uint64 duration;
uint32 extensions;
uint32 data_size;
uint8* data;
BYTE* data;
uint32 decoded_size;
uint32 pixfmt;
@ -250,7 +250,7 @@ static void tsmf_stream_process_ack(TSMF_STREAM* stream)
}
}
TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCallback* pChannelCallback)
TSMF_PRESENTATION* tsmf_presentation_new(const BYTE* guid, IWTSVirtualChannelCallback* pChannelCallback)
{
TSMF_PRESENTATION* presentation;
pthread_t thid = pthread_self();
@ -284,7 +284,7 @@ TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCa
return presentation;
}
TSMF_PRESENTATION* tsmf_presentation_find_by_id(const uint8* guid)
TSMF_PRESENTATION* tsmf_presentation_find_by_id(const BYTE* guid)
{
LIST_ITEM* item;
TSMF_PRESENTATION* presentation;
@ -1021,7 +1021,7 @@ void tsmf_stream_free(TSMF_STREAM* stream)
void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback,
uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions,
uint32 data_size, uint8* data)
uint32 data_size, BYTE* data)
{
TSMF_SAMPLE* sample;

View File

@ -32,8 +32,8 @@ typedef struct _TSMF_STREAM TSMF_STREAM;
typedef struct _TSMF_SAMPLE TSMF_SAMPLE;
TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCallback* pChannelCallback);
TSMF_PRESENTATION* tsmf_presentation_find_by_id(const uint8* guid);
TSMF_PRESENTATION* tsmf_presentation_new(const BYTE* guid, IWTSVirtualChannelCallback* pChannelCallback);
TSMF_PRESENTATION* tsmf_presentation_find_by_id(const BYTE* guid);
void tsmf_presentation_start(TSMF_PRESENTATION* presentation);
void tsmf_presentation_stop(TSMF_PRESENTATION* presentation);
void tsmf_presentation_paused(TSMF_PRESENTATION* presentation);
@ -55,7 +55,7 @@ void tsmf_stream_free(TSMF_STREAM* stream);
void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback,
uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions,
uint32 data_size, uint8* data);
uint32 data_size, BYTE* data);
void tsmf_media_init(void);

View File

@ -51,7 +51,7 @@ typedef struct _TS_AM_MEDIA_TYPE
uint32 Channels;
uint32 BitsPerSample;
uint32 BlockAlign;
const uint8* ExtraData;
const BYTE* ExtraData;
uint32 ExtraDataSize;
} TS_AM_MEDIA_TYPE;

View File

@ -30,7 +30,7 @@
#include "urbdrc_types.h"
#include "data_transfer.h"
static void usb_process_get_port_status(IUDEVICE* pdev, uint8* OutputBuffer)
static void usb_process_get_port_status(IUDEVICE* pdev, BYTE* OutputBuffer)
{
int bcdUSB = pdev->query_device_descriptor(pdev, BCD_USB);
@ -59,7 +59,7 @@ static void usb_process_get_port_status(IUDEVICE* pdev, uint8* OutputBuffer)
static int func_check_isochronous_fds(IUDEVICE* pdev)
{
int ret = 0;
uint8* data_temp;
BYTE* data_temp;
uint32 size_temp, process_times = 2;
ISOCH_CALLBACK_QUEUE* isoch_queue = NULL;
ISOCH_CALLBACK_DATA* isoch = NULL;
@ -118,7 +118,7 @@ static int func_check_isochronous_fds(IUDEVICE* pdev)
#endif
static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* callback,
uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
{
IUDEVICE* pdev;
uint32 NumRequestCompletion = 0;
@ -157,7 +157,7 @@ static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* cal
return 0;
}
static int urbdrc_process_cancel_request(uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
static int urbdrc_process_cancel_request(BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
{
IUDEVICE* pdev;
uint32 CancelId;
@ -177,7 +177,7 @@ static int urbdrc_process_cancel_request(uint8* data, uint32 data_sizem, IUDEVMA
return error;
}
static int urbdrc_process_retract_device_request(uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
static int urbdrc_process_retract_device_request(BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
{
uint32 Reason;
LLOGLN(urbdrc_debug, ("urbdrc_process_retract_device_request"));
@ -200,7 +200,7 @@ static int urbdrc_process_retract_device_request(uint8* data, uint32 data_sizem,
return 0;
}
static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, uint32 UsbDevice)
{
IUDEVICE* pdev;
@ -211,8 +211,8 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
uint32 OutputBufferSize;
uint32 RequestId;
uint32 usbd_status = USBD_STATUS_SUCCESS;
uint8* OutputBuffer;
uint8* out_data;
BYTE* OutputBuffer;
BYTE* out_data;
int i, offset, success = 0;
LLOGLN(urbdrc_debug, ("urbdrc_process__io_control"));
@ -230,7 +230,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
/** process */
OutputBuffer = (uint8 *)malloc(OutputBufferSize);
OutputBuffer = (BYTE *)malloc(OutputBufferSize);
memset(OutputBuffer, 0, OutputBufferSize);
switch (IoControlCode)
@ -285,7 +285,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
offset = 28;
out_size = offset + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
data_write_uint32(out_data + 0, InterfaceId); /** interface */
data_write_uint32(out_data + 4, MessageId); /** message id */
@ -297,7 +297,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
for (i=0;i<OutputBufferSize;i++)
{
data_write_uint8(out_data + offset, OutputBuffer[i]); /** OutputBuffer */
data_write_BYTE(out_data + offset, OutputBuffer[i]); /** OutputBuffer */
offset += 1;
}
@ -310,11 +310,11 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
return 0;
}
static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice)
{
IUDEVICE* pdev;
uint8* out_data;
BYTE* out_data;
uint32 out_size, IoControlCode, InterfaceId, InputBufferSize;
uint32 OutputBufferSize, RequestId, frames;
@ -337,7 +337,7 @@ static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback,
urbdrc_get_mstime(frames);
out_size = 32;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
data_write_uint32(out_data + 0, InterfaceId); /** interface */
data_write_uint32(out_data + 4, MessageId); /** message id */
@ -356,7 +356,7 @@ static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback,
return 0;
}
static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice)
{
IUDEVICE* pdev;
@ -365,8 +365,8 @@ static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, u
uint32 TextType;
uint32 LocaleId;
uint32 bufferSize = 1024;
uint8* out_data;
uint8 DeviceDescription[bufferSize];
BYTE* out_data;
BYTE DeviceDescription[bufferSize];
int out_offset;
LLOGLN(urbdrc_debug, ("urbdrc_process_query_device_text"));
@ -389,7 +389,7 @@ static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, u
if (bufferSize != 0)
out_size += 2;
out_data = (uint8*) malloc(out_size);
out_data = (BYTE*) malloc(out_size);
memset(out_data, 0, out_size);
data_write_uint32(out_data + 0, InterfaceId); /** interface */
@ -401,7 +401,7 @@ static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, u
out_offset = 12;
memcpy(out_data + out_offset, DeviceDescription, bufferSize);
out_offset += bufferSize;
data_write_uint16(out_data + out_offset, 0x0000);
data_write_UINT16(out_data + out_offset, 0x0000);
out_offset += 2;
}
else
@ -424,7 +424,7 @@ static void func_select_all_interface_for_msconfig(IUDEVICE* pdev, MSUSB_CONFIG_
{
int inum;
MSUSB_INTERFACE_DESCRIPTOR** MsInterfaces = MsConfig->MsInterfaces;
uint8 InterfaceNumber, AlternateSetting;
BYTE InterfaceNumber, AlternateSetting;
uint32 NumInterfaces = MsConfig->NumInterfaces;
for (inum = 0; inum < NumInterfaces; inum++)
@ -435,14 +435,14 @@ static void func_select_all_interface_for_msconfig(IUDEVICE* pdev, MSUSB_CONFIG_
}
}
static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir)
{
MSUSB_CONFIG_DESCRIPTOR * MsConfig = NULL;
IUDEVICE* pdev = NULL;
uint32 out_size, InterfaceId, RequestId, NumInterfaces, usbd_status = 0;
uint8 ConfigurationDescriptorIsValid;
uint8* out_data;
BYTE ConfigurationDescriptorIsValid;
BYTE* out_data;
int MsOutSize = 0, offset = 0;
if (transferDir == 0)
@ -458,7 +458,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da
InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
data_read_uint32(data + 0, RequestId);
data_read_uint8(data + 4, ConfigurationDescriptorIsValid);
data_read_BYTE(data + 4, ConfigurationDescriptorIsValid);
data_read_uint32(data + 8, NumInterfaces);
offset = 12;
@ -482,7 +482,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da
out_size = 36 + MsOutSize;
else
out_size = 44;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
data_write_uint32(out_data + 0, InterfaceId); /** interface */
data_write_uint32(out_data + 4, MessageId); /** message id */
@ -493,16 +493,16 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da
/** CbTsUrbResult */
data_write_uint32(out_data + 16, 8 + MsOutSize);
/** TS_URB_RESULT_HEADER Size*/
data_write_uint16(out_data + 20, 8 + MsOutSize);
data_write_UINT16(out_data + 20, 8 + MsOutSize);
}
else
{
data_write_uint32(out_data + 16, 16);
data_write_uint16(out_data + 20, 16);
data_write_UINT16(out_data + 20, 16);
}
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_SELECT_CONFIGURATION);
data_write_UINT16(out_data + 22, URB_FUNCTION_SELECT_CONFIGURATION);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
offset = 28;
/** TS_URB_SELECT_CONFIGURATION_RESULT */
@ -525,7 +525,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da
return 0;
}
static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, uint32 data_sizem,
static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, uint32 data_sizem,
uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir)
{
MSUSB_CONFIG_DESCRIPTOR* MsConfig;
@ -533,8 +533,8 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
IUDEVICE* pdev;
uint32 out_size, InterfaceId, RequestId, ConfigurationHandle;
uint32 OutputBufferSize;
uint8 InterfaceNumber;
uint8* out_data;
BYTE InterfaceNumber;
BYTE* out_data;
int out_offset, interface_size;
if (transferDir == 0)
@ -571,7 +571,7 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
interface_size = 16 + (MsInterface->NumberOfPipes * 20);
out_size = 36 + interface_size ;
out_data = (uint8*) malloc(out_size);
out_data = (BYTE*) malloc(out_size);
memset(out_data, 0, out_size);
data_write_uint32(out_data + 0, InterfaceId); /** interface */
@ -580,9 +580,9 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 8 + interface_size); /** CbTsUrbResult */
/** TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 8 + interface_size); /** Size */
data_write_UINT16(out_data + 20, 8 + interface_size); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_SELECT_INTERFACE);
data_write_UINT16(out_data + 22, URB_FUNCTION_SELECT_INTERFACE);
data_write_uint32(out_data + 24, USBD_STATUS_SUCCESS); /** UsbdStatus */
out_offset = 28;
@ -600,16 +600,16 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
return 0;
}
static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir, int External)
{
IUDEVICE* pdev;
uint32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle;
uint32 TransferFlags, OutputBufferSize, usbd_status, Timeout;
uint8 bmRequestType, Request;
uint16 Value, Index, length;
uint8* buffer;
uint8* out_data;
BYTE bmRequestType, Request;
UINT16 Value, Index, length;
BYTE* buffer;
BYTE* out_data;
int offset, ret;
pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@ -637,11 +637,11 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
}
/** SetupPacket 8 bytes */
data_read_uint8(data + offset, bmRequestType);
data_read_uint8(data + offset + 1, Request);
data_read_uint16(data + offset + 2, Value);
data_read_uint16(data + offset + 4, Index);
data_read_uint16(data + offset + 6, length);
data_read_BYTE(data + offset, bmRequestType);
data_read_BYTE(data + offset + 1, Request);
data_read_UINT16(data + offset + 2, Value);
data_read_UINT16(data + offset + 4, Index);
data_read_UINT16(data + offset + 6, length);
data_read_uint32(data + offset + 8, OutputBufferSize);
offset += 12;
@ -652,7 +652,7 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
}
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
buffer = out_data + 36;
@ -695,10 +695,10 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 0x0008); /** Size */
data_write_UINT16(out_data + 20, 0x0008); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_CONTROL_TRANSFER);
data_write_UINT16(out_data + 22, URB_FUNCTION_CONTROL_TRANSFER);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -712,14 +712,14 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
return 0;
}
static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir)
{
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle;
uint32 TransferFlags, OutputBufferSize, usbd_status = 0;
uint8 * Buffer;
uint8 * out_data;
BYTE * Buffer;
BYTE * out_data;
int offset;
pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@ -740,7 +740,7 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin
else
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
switch (transferDir)
@ -776,10 +776,10 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 0x0008); /** Size */
data_write_UINT16(out_data + 20, 0x0008); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER);
data_write_UINT16(out_data + 22, URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -795,7 +795,7 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin
static int
urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
@ -808,9 +808,9 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
uint32 ErrorCount, OutputBufferSize, usbd_status = 0;
uint32 RequestField, noAck = 0;
uint32 out_size = 0;
uint8 * iso_buffer = NULL;
uint8 * iso_packets = NULL;
uint8 * out_data = NULL;
BYTE * iso_buffer = NULL;
BYTE * iso_packets = NULL;
BYTE * out_data = NULL;
int offset, nullBuffer = 0, iso_status;
pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@ -837,13 +837,13 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
if (transferDir == USBD_TRANSFER_DIRECTION_OUT) {
if (!noAck) {
out_size = 48 + (NumberOfPackets * 12);
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
iso_packets = out_data + 40;
}
}
else {
out_size = 48 + OutputBufferSize + (NumberOfPackets * 12);
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
iso_packets = out_data + 40;
}
@ -917,9 +917,9 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 20 + (NumberOfPackets * 12)); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 20 + (NumberOfPackets * 12)); /** Size */
data_write_UINT16(out_data + 20, 20 + (NumberOfPackets * 12)); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_ISOCH_TRANSFER);
data_write_UINT16(out_data + 22, URB_FUNCTION_ISOCH_TRANSFER);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, StartFrame); /** StartFrame */
@ -961,20 +961,20 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
static int
urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
uint8 * data,
BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
uint32 UsbDevice,
uint8 func_recipient,
BYTE func_recipient,
int transferDir)
{
IUDEVICE * pdev;
uint32 out_size, InterfaceId, RequestId, OutputBufferSize, usbd_status;
uint8 bmRequestType, desc_index, desc_type;
uint16 langId;
uint8 * buffer;
uint8 * out_data;
BYTE bmRequestType, desc_index, desc_type;
UINT16 langId;
BYTE * buffer;
BYTE * out_data;
int ret, offset;
pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@ -982,13 +982,13 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
return 0;
InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
data_read_uint32(data + 0, RequestId);
data_read_uint8(data + 4, desc_index);
data_read_uint8(data + 5, desc_type);
data_read_uint16(data + 6, langId);
data_read_BYTE(data + 4, desc_index);
data_read_BYTE(data + 5, desc_type);
data_read_UINT16(data + 6, langId);
data_read_uint32(data + 8, OutputBufferSize);
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
buffer = out_data + 36;
@ -1037,9 +1037,9 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 0x0008); /** Size */
data_write_UINT16(out_data + 20, 0x0008); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE);
data_write_UINT16(out_data + 22, URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */
@ -1055,20 +1055,20 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
static int
urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
uint32 UsbDevice,
uint8 func_recipient,
BYTE func_recipient,
int transferDir)
{
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
uint16 Index;
uint8 bmRequestType;
uint8 * buffer;
uint8 * out_data;
UINT16 Index;
BYTE bmRequestType;
BYTE * buffer;
BYTE * out_data;
int offset, ret;
if (transferDir == 0){
@ -1082,11 +1082,11 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
data_read_uint32(data + 0, RequestId);
data_read_uint16(data + 4, Index); /** Index */
data_read_UINT16(data + 4, Index); /** Index */
data_read_uint32(data + 8, OutputBufferSize);
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
buffer = out_data + 36;
@ -1130,9 +1130,9 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
data_write_uint32(out_data + 12, RequestId); /** RequestId, include NoAck*/
data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 0x0008); /** Size */
data_write_UINT16(out_data + 20, 0x0008); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE);
data_write_UINT16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -1148,22 +1148,22 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
static int
urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback,
uint8 * data,
BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
uint32 UsbDevice,
uint8 func_type,
uint8 func_recipient,
BYTE func_type,
BYTE func_recipient,
int transferDir)
{
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, TransferFlags, usbd_status;
uint32 OutputBufferSize;
uint8 ReqTypeReservedBits, Request, bmRequestType;
uint16 Value, Index, Padding;
uint8 * buffer;
uint8 * out_data;
BYTE ReqTypeReservedBits, Request, bmRequestType;
UINT16 Value, Index, Padding;
BYTE * buffer;
BYTE * out_data;
int offset, ret;
/** control by vendor command */
@ -1174,16 +1174,16 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback,
data_read_uint32(data + 0, RequestId);
data_read_uint32(data + 4, TransferFlags); /** TransferFlags */
data_read_uint8(data + 8, ReqTypeReservedBits); /** ReqTypeReservedBids */
data_read_uint8(data + 9, Request); /** Request */
data_read_uint16(data + 10, Value); /** value */
data_read_uint16(data + 12, Index); /** index */
data_read_uint16(data + 14, Padding); /** Padding */
data_read_BYTE(data + 8, ReqTypeReservedBits); /** ReqTypeReservedBids */
data_read_BYTE(data + 9, Request); /** Request */
data_read_UINT16(data + 10, Value); /** value */
data_read_UINT16(data + 12, Index); /** index */
data_read_UINT16(data + 14, Padding); /** Padding */
data_read_uint32(data + 16, OutputBufferSize);
offset = 20;
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
buffer = out_data + 36;
@ -1240,8 +1240,8 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback,
data_write_uint32(out_data + 12, RequestId); /** RequestId, include NoAck*/
data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 0x0008); /** Size */
data_write_uint16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE); /** Padding, MUST be ignored upon receipt */
data_write_UINT16(out_data + 20, 0x0008); /** Size */
data_write_UINT16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE); /** Padding, MUST be ignored upon receipt */
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -1258,7 +1258,7 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback,
static int
urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
uint8 * data,
BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
@ -1267,10 +1267,10 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
{
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
uint8 Recipient, InterfaceNumber, Ms_PageIndex;
uint16 Ms_featureDescIndex;
uint8 * out_data;
uint8 * buffer;
BYTE Recipient, InterfaceNumber, Ms_PageIndex;
UINT16 Ms_featureDescIndex;
BYTE * out_data;
BYTE * buffer;
int offset, ret;
pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@ -1279,16 +1279,16 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
data_read_uint32(data + 0, RequestId);
data_read_uint8(data + 4, Recipient); /** Recipient */
data_read_BYTE(data + 4, Recipient); /** Recipient */
Recipient = Recipient && 0x1f;
data_read_uint8(data + 5, InterfaceNumber); /** InterfaceNumber */
data_read_uint8(data + 6, Ms_PageIndex); /** Ms_PageIndex */
data_read_uint16(data + 7, Ms_featureDescIndex); /** Ms_featureDescIndex */
data_read_BYTE(data + 5, InterfaceNumber); /** InterfaceNumber */
data_read_BYTE(data + 6, Ms_PageIndex); /** Ms_PageIndex */
data_read_UINT16(data + 7, Ms_featureDescIndex); /** Ms_featureDescIndex */
data_read_uint32(data + 12, OutputBufferSize);
offset = 16;
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
buffer = out_data + 36;
@ -1334,10 +1334,10 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 0x0008); /** Size */
data_write_UINT16(out_data + 20, 0x0008); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR);
data_write_UINT16(out_data + 22, URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -1354,7 +1354,7 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
static int
urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
@ -1365,7 +1365,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, PipeHandle, EndpointAddress;
uint32 OutputBufferSize, usbd_status = 0;
uint8 * out_data;
BYTE * out_data;
int out_offset, ret;
if (transferDir == 0){
@ -1420,7 +1420,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
/** send data */
out_offset = 36;
out_size = out_offset + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
data_write_uint32(out_data + 0, InterfaceId); /** interface */
data_write_uint32(out_data + 4, MessageId); /** message id */
@ -1429,10 +1429,10 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 0x0008); /** Size */
data_write_UINT16(out_data + 20, 0x0008); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL);
data_write_UINT16(out_data + 22, URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -1449,7 +1449,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
static int
urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
uint8 * data,
BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
@ -1459,7 +1459,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, OutputBufferSize;
uint32 dummy_frames;
uint8 * out_data;
BYTE * out_data;
if (transferDir == 0){
LLOGLN(urbdrc_debug, ("urb_get_current_frame_number: not support transfer out\n"));
@ -1479,7 +1479,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
urbdrc_get_mstime(dummy_frames);
out_size = 40;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
data_write_uint32(out_data + 0, InterfaceId); /** interface */
data_write_uint32(out_data + 4, MessageId); /** message id */
@ -1488,10 +1488,10 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 12); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 12); /** Size */
data_write_UINT16(out_data + 20, 12); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_GET_CURRENT_FRAME_NUMBER);
data_write_UINT16(out_data + 22, URB_FUNCTION_GET_CURRENT_FRAME_NUMBER);
data_write_uint32(out_data + 24, USBD_STATUS_SUCCESS); /** UsbdStatus */
data_write_uint32(out_data + 28, dummy_frames); /** FrameNumber */
@ -1508,7 +1508,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
/* Unused function for current server */
static int
urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
uint8 * data,
BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
@ -1517,8 +1517,8 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
{
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
uint8 * buffer;
uint8 * out_data;
BYTE * buffer;
BYTE * out_data;
int ret, offset;
if (transferDir == 0){
@ -1536,7 +1536,7 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
data_read_uint32(data + 4, OutputBufferSize);
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
buffer = out_data + 36;
@ -1569,10 +1569,10 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 8); /** Size */
data_write_UINT16(out_data + 20, 8); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_GET_CONFIGURATION);
data_write_UINT16(out_data + 22, URB_FUNCTION_GET_CONFIGURATION);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -1587,7 +1587,7 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
/* Unused function for current server */
static int
urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
uint8 * data,
BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
@ -1596,9 +1596,9 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
{
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
uint16 interface;
uint8 * buffer;
uint8 * out_data;
UINT16 interface;
BYTE * buffer;
BYTE * out_data;
int ret, offset;
if (transferDir == 0){
@ -1612,11 +1612,11 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
data_read_uint32(data + 0, RequestId);
data_read_uint16(data + 4, interface);
data_read_UINT16(data + 4, interface);
data_read_uint32(data + 8, OutputBufferSize);
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
buffer = out_data + 36;
@ -1647,10 +1647,10 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 8); /** Size */
data_write_UINT16(out_data + 20, 8); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_GET_INTERFACE);
data_write_UINT16(out_data + 22, URB_FUNCTION_GET_INTERFACE);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -1663,21 +1663,21 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
}
static int
urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
uint32 UsbDevice,
uint8 func_recipient,
uint8 command,
BYTE func_recipient,
BYTE command,
int transferDir)
{
IUDEVICE * pdev;
uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
uint16 FeatureSelector, Index;
uint8 bmRequestType, bmRequest;
uint8 * buffer;
uint8 * out_data;
UINT16 FeatureSelector, Index;
BYTE bmRequestType, bmRequest;
BYTE * buffer;
BYTE * out_data;
int ret, offset;
pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@ -1686,13 +1686,13 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
data_read_uint32(data + 0, RequestId);
data_read_uint16(data + 4, FeatureSelector);
data_read_uint16(data + 6, Index);
data_read_UINT16(data + 4, FeatureSelector);
data_read_UINT16(data + 6, Index);
data_read_uint32(data + 8, OutputBufferSize);
offset = 12;
out_size = 36 + OutputBufferSize;
out_data = (uint8 *) malloc(out_size);
out_data = (BYTE *) malloc(out_size);
memset(out_data, 0, out_size);
buffer = out_data + 36;
@ -1749,10 +1749,10 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
data_write_uint32(out_data + 12, RequestId); /** RequestId */
data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */
/** TsUrbResult TS_URB_RESULT_HEADER */
data_write_uint16(out_data + 20, 8); /** Size */
data_write_UINT16(out_data + 20, 8); /** Size */
/** Padding, MUST be ignored upon receipt */
data_write_uint16(out_data + 22, URB_FUNCTION_GET_INTERFACE);
data_write_UINT16(out_data + 22, URB_FUNCTION_GET_INTERFACE);
data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */
data_write_uint32(out_data + 28, 0); /** HResult */
@ -1766,7 +1766,7 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
}
static int
urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
uint32 data_sizem,
uint32 MessageId,
IUDEVMAN * udevman,
@ -1775,8 +1775,8 @@ urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data
{
IUDEVICE * pdev;
uint32 CbTsUrb;
uint16 Size;
uint16 URB_Function;
UINT16 Size;
UINT16 URB_Function;
uint32 OutputBufferSize;
int error = 0;
@ -1784,8 +1784,8 @@ urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data
if (pdev == NULL)
return 0;
data_read_uint32(data + 0, CbTsUrb); /** CbTsUrb */
data_read_uint16(data + 4, Size); /** size */
data_read_uint16(data + 6, URB_Function);
data_read_UINT16(data + 4, Size); /** size */
data_read_UINT16(data + 6, URB_Function);
data_read_uint32(data + 4 + CbTsUrb, OutputBufferSize);
switch (URB_Function)
@ -2302,7 +2302,7 @@ urbdrc_process_udev_data_transfer(void* arg)
{
TRANSFER_DATA* transfer_data = (TRANSFER_DATA*) arg;
URBDRC_CHANNEL_CALLBACK * callback = transfer_data->callback;
uint8 * pBuffer = transfer_data->pBuffer;
BYTE * pBuffer = transfer_data->pBuffer;
uint32 cbSize = transfer_data->cbSize;
uint32 UsbDevice = transfer_data->UsbDevice;
IUDEVMAN * udevman = transfer_data->udevman;

View File

@ -34,7 +34,7 @@ struct _ISOCH_CALLBACK_DATA
void * prev;
void * next;
void * device;
uint8 * out_data;
BYTE * out_data;
uint32 out_size;
void * callback;
};

View File

@ -48,7 +48,7 @@ static USB_SEARCHDEV* searchman_get_next(USB_SEARCHMAN* searchman)
return search;
}
static int searchman_list_add(USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct)
static int searchman_list_add(USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct)
{
USB_SEARCHDEV* search;
@ -77,7 +77,7 @@ static int searchman_list_add(USB_SEARCHMAN* searchman, uint16 idVendor, uint16
return 1;
}
static int searchman_list_remove(USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct)
static int searchman_list_remove(USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct)
{
USB_SEARCHDEV* search;
USB_SEARCHDEV* point;

View File

@ -30,8 +30,8 @@ struct _USB_SEARCHDEV
void * inode;
void * prev;
void * next;
uint16 idVendor;
uint16 idProduct;
UINT16 idVendor;
UINT16 idProduct;
};
typedef struct _USB_SEARCHMAN USB_SEARCHMAN;
@ -60,9 +60,9 @@ struct _USB_SEARCHMAN
/* close searchman */
void (*close) (USB_SEARCHMAN* self);
/* add a new usb device for search */
int (*add) (USB_SEARCHMAN* seachman, uint16 idVendor, uint16 idProduct);
int (*add) (USB_SEARCHMAN* seachman, UINT16 idVendor, UINT16 idProduct);
/* remove a usb device from list */
int (*remove) (USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct);
int (*remove) (USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct);
/* check list has next device*/
int (*has_next) (USB_SEARCHMAN* seachman);
/* get the device from list*/

View File

@ -94,7 +94,7 @@ static void func_close_udevice(USB_SEARCHMAN* searchman, IUDEVICE* pdev)
pdev->SigToEnd(pdev);
idVendor = pdev->query_device_descriptor(pdev, ID_VENDOR);
idProduct = pdev->query_device_descriptor(pdev, ID_PRODUCT);
searchman->add(searchman, (uint16) idVendor, (uint16) idProduct);
searchman->add(searchman, (UINT16) idVendor, (UINT16) idProduct);
pdev->cancel_all_transfer_request(pdev);
pdev->wait_action_completion(pdev);
@ -121,12 +121,12 @@ static int fun_device_string_send_set(char* out_data, int out_offset, char* str)
while (str[i])
{
data_write_uint16(out_data + out_offset + offset, str[i]); /* str */
data_write_UINT16(out_data + out_offset + offset, str[i]); /* str */
i++;
offset += 2;
}
data_write_uint16(out_data + out_offset + offset, 0x0000); /* add "\0" */
data_write_UINT16(out_data + out_offset + offset, 0x0000); /* add "\0" */
offset += 2;
return offset + out_offset;
@ -187,7 +187,7 @@ static void func_lock_isoch_mutex(TRANSFER_DATA* transfer_data)
IUDEVICE* pdev;
uint32 FunctionId;
uint32 RequestField;
uint16 URB_Function;
UINT16 URB_Function;
IUDEVMAN* udevman = transfer_data->udevman;
if (transfer_data->cbSize >= 8)
@ -198,7 +198,7 @@ static void func_lock_isoch_mutex(TRANSFER_DATA* transfer_data)
FunctionId == TRANSFER_OUT_REQUEST) &&
transfer_data->cbSize >= 16)
{
data_read_uint16(transfer_data->pBuffer + 14, URB_Function);
data_read_UINT16(transfer_data->pBuffer + 14, URB_Function);
if (URB_Function == URB_FUNCTION_ISOCH_TRANSFER &&
transfer_data->cbSize >= 20)
@ -237,7 +237,7 @@ static int urbdrc_process_capability_request(URBDRC_CHANNEL_CALLBACK* callback,
data_write_uint32(out_data + 4, MessageId); /* message id */
data_write_uint32(out_data + 8, Version); /* usb protocol version */
data_write_uint32(out_data + 12, 0x00000000); /* HRESULT */
callback->channel->Write(callback->channel, out_size, (uint8*) out_data, NULL);
callback->channel->Write(callback->channel, out_size, (BYTE*) out_data, NULL);
zfree(out_data);
return 0;
@ -268,7 +268,7 @@ static int urbdrc_process_channel_create(URBDRC_CHANNEL_CALLBACK* callback, char
data_write_uint32(out_data + 12, MajorVersion);
data_write_uint32(out_data + 16, MinorVersion);
data_write_uint32(out_data + 20, Capabilities); /* capabilities version */
callback->channel->Write(callback->channel, out_size, (uint8 *)out_data, NULL);
callback->channel->Write(callback->channel, out_size, (BYTE *)out_data, NULL);
zfree(out_data);
return 0;
@ -291,7 +291,7 @@ static int urdbrc_send_virtual_channel_add(IWTSVirtualChannel* channel, uint32 M
data_write_uint32(out_data + 4, MessageId); /* message id */
data_write_uint32(out_data + 8, ADD_VIRTUAL_CHANNEL); /* function id */
channel->Write(channel, out_size, (uint8*) out_data, NULL);
channel->Write(channel, out_size, (BYTE*) out_data, NULL);
zfree(out_data);
return 0;
@ -358,7 +358,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC
out_offset = fun_device_string_send_set(out_data, out_offset, HardwareIds[0]);
/* HardwareIds 2 */
out_offset = fun_device_string_send_set(out_data, out_offset, HardwareIds[1]);
data_write_uint16(out_data + out_offset, 0x0000); /* add "\0" */
data_write_UINT16(out_data + out_offset, 0x0000); /* add "\0" */
out_offset += 2;
data_write_uint32(out_data + out_offset, cchCompatIds); /* cchCompatIds */
@ -373,7 +373,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC
if (pdev->isCompositeDevice(pdev))
out_offset = fun_device_string_send_set(out_data, out_offset, composite_str);
data_write_uint16(out_data + out_offset, 0x0000); /* add "\0" */
data_write_UINT16(out_data + out_offset, 0x0000); /* add "\0" */
out_offset += 2;
data_write_uint32(out_data + out_offset, 0x00000027); /* cchContainerId */
@ -399,7 +399,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC
data_write_uint32(out_data + out_offset + 24, 0x50); /* NoAckIsochWriteJitterBufferSizeInMs, >=10 or <=512 */
out_offset += 28;
callback->channel->Write(callback->channel, out_offset, (uint8 *)out_data, NULL);
callback->channel->Write(callback->channel, out_offset, (BYTE *)out_data, NULL);
zfree(out_data);
return 0;
@ -658,7 +658,7 @@ void* urbdrc_new_device_create(void * arg)
IWTSVirtualChannelManager* channel_mgr;
URBDRC_PLUGIN* urbdrc = transfer_data->urbdrc;
USB_SEARCHMAN* searchman = urbdrc->searchman;
uint8* pBuffer = transfer_data->pBuffer;
BYTE* pBuffer = transfer_data->pBuffer;
IUDEVMAN* udevman = transfer_data->udevman;
IUDEVICE* pdev = NULL;
uint32 ChannelId = 0;
@ -756,7 +756,7 @@ static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback
transfer_data->udevman = urbdrc->udevman;
transfer_data->urbdrc = urbdrc;
transfer_data->cbSize = cbSize;
transfer_data->pBuffer = (uint8 *)malloc((cbSize));
transfer_data->pBuffer = (BYTE *)malloc((cbSize));
for (i = 0; i < (cbSize); i++)
{
@ -775,7 +775,7 @@ static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback
return error;
}
static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, uint8* Buffer)
static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, BYTE* Buffer)
{
URBDRC_CHANNEL_CALLBACK* callback = (URBDRC_CHANNEL_CALLBACK*) pChannelCallback;
URBDRC_PLUGIN* urbdrc;
@ -829,7 +829,7 @@ static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
transfer_data->udevman = udevman;
transfer_data->cbSize = cbSize - 4;
transfer_data->UsbDevice = InterfaceId;
transfer_data->pBuffer = (uint8 *)malloc((cbSize - 4));
transfer_data->pBuffer = (BYTE *)malloc((cbSize - 4));
memcpy(transfer_data->pBuffer, pBuffer + 4, (cbSize - 4));
@ -898,7 +898,7 @@ static int urbdrc_on_close(IWTSVirtualChannelCallback * pChannelCallback)
}
static int urbdrc_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
IWTSVirtualChannel * pChannel, uint8* pData, int* pbAccept, IWTSVirtualChannelCallback** ppCallback)
IWTSVirtualChannel * pChannel, BYTE* pData, int* pbAccept, IWTSVirtualChannelCallback** ppCallback)
{
URBDRC_LISTENER_CALLBACK* listener_callback = (URBDRC_LISTENER_CALLBACK*) pListenerCallback;
URBDRC_CHANNEL_CALLBACK* callback;

View File

@ -98,7 +98,7 @@ struct _TRANSFER_DATA
URBDRC_CHANNEL_CALLBACK* callback;
URBDRC_PLUGIN* urbdrc;
IUDEVMAN* udevman;
uint8* pBuffer;
BYTE* pBuffer;
uint32 cbSize;
uint32 UsbDevice;
};
@ -114,21 +114,21 @@ struct _IUDEVICE
uint32 *UrbdStatus,
uint32 *StartFrame,
uint32 NumberOfPackets,
uint8 *IsoPacket,
BYTE *IsoPacket,
uint32 *BufferSize,
uint8 *Buffer,
BYTE *Buffer,
int Timeout);
int (*control_transfer) (IUDEVICE * idev, uint32 RequestId,
uint32 EndpointAddress,
uint32 TransferFlags,
uint8 bmRequestType,
uint8 Request,
uint16 Value,
uint16 Index,
BYTE bmRequestType,
BYTE Request,
UINT16 Value,
UINT16 Index,
uint32 *UrbdStatus,
uint32 *BufferSize,
uint8 *Buffer,
BYTE *Buffer,
uint32 Timeout);
int (*bulk_or_interrupt_transfer) (IUDEVICE * idev, uint32 RequestId,
@ -136,14 +136,14 @@ struct _IUDEVICE
uint32 TransferFlags,
uint32 *UsbdStatus,
uint32 *BufferSize,
uint8 *Buffer,
BYTE *Buffer,
uint32 Timeout);
int (*select_configuration) (IUDEVICE * idev, uint32 bConfigurationValue);
int (*select_interface) (IUDEVICE * idev, uint8 InterfaceNumber,
uint8 AlternateSetting);
int (*select_interface) (IUDEVICE * idev, BYTE InterfaceNumber,
BYTE AlternateSetting);
int (*control_pipe_request) (IUDEVICE * idev, uint32 RequestId,
uint32 EndpointAddress,
@ -153,16 +153,16 @@ struct _IUDEVICE
int (*control_query_device_text) (IUDEVICE * idev, uint32 TextType,
uint32 LocaleId,
uint32 *BufferSize,
uint8 * Buffer);
BYTE * Buffer);
int (*os_feature_descriptor_request) (IUDEVICE * idev, uint32 RequestId,
uint8 Recipient,
uint8 InterfaceNumber,
uint8 Ms_PageIndex,
uint16 Ms_featureDescIndex,
BYTE Recipient,
BYTE InterfaceNumber,
BYTE Ms_PageIndex,
UINT16 Ms_featureDescIndex,
uint32 * UsbdStatus,
uint32 * BufferSize,
uint8* Buffer,
BYTE* Buffer,
int Timeout);
void (*cancel_all_transfer_request) (IUDEVICE * idev);
@ -191,7 +191,7 @@ struct _IUDEVICE
int (*query_device_port_status) (IUDEVICE * idev, uint32 *UsbdStatus,
uint32 * BufferSize,
uint8 * Buffer);
BYTE * Buffer);
int (*request_queue_is_none) (IUDEVICE * idev);
@ -211,8 +211,8 @@ struct _IUDEVICE
BASIC_DEV_STATE_DEFINED(channel_id, uint32);
BASIC_DEV_STATE_DEFINED(UsbDevice, uint32);
BASIC_DEV_STATE_DEFINED(ReqCompletion, uint32);
BASIC_DEV_STATE_DEFINED(bus_number, uint16);
BASIC_DEV_STATE_DEFINED(dev_number, uint16);
BASIC_DEV_STATE_DEFINED(bus_number, UINT16);
BASIC_DEV_STATE_DEFINED(dev_number, UINT16);
BASIC_DEV_STATE_DEFINED(port_number, int);
BASIC_DEV_STATE_DEFINED(isoch_queue, void *);
BASIC_DEV_STATE_DEFINED(MsConfig, MSUSB_CONFIG_DESCRIPTOR *);
@ -237,8 +237,8 @@ struct _IUDEVMAN
int (*register_udevice) (IUDEVMAN* idevman, int bus_number,
int dev_number,
int UsbDevice,
uint16 idVendor,
uint16 idProduct,
UINT16 idVendor,
UINT16 idProduct,
int flag);
IUDEVICE *(*get_next) (IUDEVMAN *idevman);
IUDEVICE *(*get_udevice_by_UsbDevice) (IUDEVMAN * idevman,
@ -246,8 +246,8 @@ struct _IUDEVMAN
IUDEVICE *(*get_udevice_by_UsbDevice_try_again) (IUDEVMAN * idevman,
uint32 UsbDevice);
/* Extension */
int (*check_device_exist_by_id) (IUDEVMAN * idevman, uint16 idVendor,
uint16 idProduct);
int (*check_device_exist_by_id) (IUDEVMAN * idevman, UINT16 idVendor,
UINT16 idProduct);
int (*isAutoAdd) (IUDEVMAN * idevman);
/* Basic state */
BASIC_DEVMAN_STATE_DEFINED(defUsbDevice, uint32);

View File

@ -58,8 +58,8 @@ static void udev_set_p_##_arg (IUDEVICE * idev, _type _t) \
typedef struct _ISO_USER_DATA ISO_USER_DATA;
struct _ISO_USER_DATA
{
uint8 * IsoPacket;
uint8 * output_data;
BYTE * IsoPacket;
BYTE * output_data;
int iso_status;
int completed;
uint32 error_count;
@ -153,12 +153,12 @@ static void
func_iso_callback(struct libusb_transfer *transfer)
{
ISO_USER_DATA * iso_user_data = (ISO_USER_DATA *) transfer->user_data;
uint8 * data = iso_user_data->IsoPacket;
BYTE * data = iso_user_data->IsoPacket;
int * completed = &iso_user_data->completed;
uint32 offset = 0;
uint32 index = 0;
uint32 i, act_len;
uint8 *b;
BYTE *b;
*completed = 1;
/* Fixme: currently fill the dummy frame number, tt needs to be
@ -220,7 +220,7 @@ func_get_ep_desc(LIBUSB_CONFIG_DESCRIPTOR * LibusbConfig,
MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces;
const LIBUSB_INTERFACE * interface;
const LIBUSB_ENDPOINT_DESCEIPTOR * endpoint;
uint8 alt;
BYTE alt;
int inum, pnum;
MsInterfaces = MsConfig->MsInterfaces;
@ -320,7 +320,7 @@ func_set_usbd_status(UDEVICE* pdev, uint32* status, int err_result)
static void
func_iso_data_init(ISO_USER_DATA * iso_user_data, uint32 numPacket, uint32 buffsize,
uint32 noAck, uint8 * isoPacket, uint8 * buffer)
uint32 noAck, BYTE * isoPacket, BYTE * buffer)
{
/* init struct iso_user_data */
iso_user_data->IsoPacket = isoPacket;
@ -478,7 +478,7 @@ udev_new_descript(LIBUSB_DEVICE* libusb_dev)
/* Get HUB handle */
static int
udev_get_hub_handle(UDEVICE * pdev, uint16 bus_number, uint16 dev_number)
udev_get_hub_handle(UDEVICE * pdev, UINT16 bus_number, UINT16 dev_number)
{
struct udev *udev;
struct udev_enumerate *enumerate;
@ -590,7 +590,7 @@ udev_get_hub_handle(UDEVICE * pdev, uint16 bus_number, uint16 dev_number)
static int
libusb_udev_select_interface(IUDEVICE * idev, uint8 InterfaceNumber, uint8 AlternateSetting)
libusb_udev_select_interface(IUDEVICE * idev, BYTE InterfaceNumber, BYTE AlternateSetting)
{
MSUSB_CONFIG_DESCRIPTOR * MsConfig;
MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces;
@ -638,7 +638,7 @@ libusb_udev_complete_msconfig_setup(IUDEVICE * idev, MSUSB_CONFIG_DESCRIPTOR * M
const LIBUSB_INTERFACE * LibusbInterface;
const LIBUSB_INTERFACE_DESCRIPTOR * LibusbAltsetting;
const LIBUSB_ENDPOINT_DESCEIPTOR * LibusbEndpoint;
uint8 LibusbNumEndpoint;
BYTE LibusbNumEndpoint;
int inum = 0, pnum = 0, MsOutSize = 0;
LibusbConfig = pdev->LibusbConfig;
@ -746,7 +746,7 @@ libusb_udev_complete_msconfig_setup(IUDEVICE * idev, MSUSB_CONFIG_DESCRIPTOR * M
| (pdev->bus_number << 24);
/* count endpoint max packet size */
int max = LibusbEndpoint->wMaxPacketSize & 0x07ff;
uint8 attr = LibusbEndpoint->bmAttributes;
BYTE attr = LibusbEndpoint->bmAttributes;
if ((attr & 0x3) == 1 || (attr & 0x3) == 3)
{
max *= (1 + ((LibusbEndpoint->wMaxPacketSize >> 11) & 3));
@ -866,14 +866,14 @@ static int
libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType,
uint32 LocaleId,
uint32 * BufferSize,
uint8 * Buffer)
BYTE * Buffer)
{
UDEVICE * pdev = (UDEVICE *) idev;
LIBUSB_DEVICE_DESCRIPTOR * devDescriptor = pdev->devDescriptor;
char * strDesc = "Generic Usb String";
char deviceLocation[25];
uint8 bus_number;
uint8 device_address;
BYTE bus_number;
BYTE device_address;
int ret = 0, i = 0;
switch (TextType){
@ -914,7 +914,7 @@ libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType,
sprintf(deviceLocation, "Port_#%04d.Hub_#%04d", device_address, bus_number);
for(i=0;i<strlen(deviceLocation);i++){
Buffer[i*2] = (uint8)deviceLocation[i];
Buffer[i*2] = (BYTE)deviceLocation[i];
Buffer[(i*2)+1] = 0;
}
*BufferSize = (i*2);
@ -930,17 +930,17 @@ libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType,
static int
libusb_udev_os_feature_descriptor_request(IUDEVICE * idev, uint32 RequestId,
uint8 Recipient,
uint8 InterfaceNumber,
uint8 Ms_PageIndex,
uint16 Ms_featureDescIndex,
BYTE Recipient,
BYTE InterfaceNumber,
BYTE Ms_PageIndex,
UINT16 Ms_featureDescIndex,
uint32 * UsbdStatus,
uint32 * BufferSize,
uint8* Buffer,
BYTE* Buffer,
int Timeout)
{
UDEVICE * pdev = (UDEVICE *) idev;
uint8 ms_string_desc[0x13];
BYTE ms_string_desc[0x13];
int error = 0;
/*
pdev->request_queue->register_request(pdev->request_queue, RequestId, NULL, 0);
@ -957,8 +957,8 @@ libusb_udev_os_feature_descriptor_request(IUDEVICE * idev, uint32 RequestId,
//printf("Get ms string: result number %d", error);
if (error > 0)
{
uint8 bMS_Vendorcode;
data_read_uint8(ms_string_desc + 16, bMS_Vendorcode);
BYTE bMS_Vendorcode;
data_read_BYTE(ms_string_desc + 16, bMS_Vendorcode);
//printf("bMS_Vendorcode:0x%x", bMS_Vendorcode);
/** get os descriptor */
error = libusb_control_transfer(pdev->libusb_handle,
@ -1205,7 +1205,7 @@ libusb_udev_unlock_fifo_isoch(IUDEVICE * idev)
static int
libusb_udev_query_device_port_status(IUDEVICE * idev, uint32 *UsbdStatus,
uint32 * BufferSize,
uint8 * Buffer)
BYTE * Buffer)
{
UDEVICE * pdev = (UDEVICE *) idev;
int success = 0, ret;
@ -1256,9 +1256,9 @@ libusb_udev_isoch_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAdd
uint32 *UrbdStatus,
uint32 *StartFrame,
uint32 NumberOfPackets,
uint8 *IsoPacket,
BYTE *IsoPacket,
uint32 *BufferSize,
uint8 *Buffer,
BYTE *Buffer,
int Timeout)
{
UDEVICE * pdev = (UDEVICE *) idev;
@ -1346,13 +1346,13 @@ libusb_udev_isoch_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAdd
static int
libusb_udev_control_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAddress,
uint32 TransferFlags,
uint8 bmRequestType,
uint8 Request,
uint16 Value,
uint16 Index,
BYTE bmRequestType,
BYTE Request,
UINT16 Value,
UINT16 Index,
uint32 *UrbdStatus,
uint32 *BufferSize,
uint8 *Buffer,
BYTE *Buffer,
uint32 Timeout)
{
UDEVICE * pdev = (UDEVICE *) idev;
@ -1386,7 +1386,7 @@ libusb_udev_bulk_or_interrupt_transfer(IUDEVICE * idev, uint32 RequestId,
uint32 TransferFlags,
uint32 *UsbdStatus,
uint32 *BufferSize,
uint8 *Buffer,
BYTE *Buffer,
uint32 Timeout)
{
UDEVICE * pdev = (UDEVICE *) idev;
@ -1647,8 +1647,8 @@ cancel_retry:
BASIC_STATE_FUNC_DEFINED(channel_id, uint32)
BASIC_STATE_FUNC_DEFINED(UsbDevice, uint32)
BASIC_STATE_FUNC_DEFINED(ReqCompletion, uint32)
BASIC_STATE_FUNC_DEFINED(bus_number, uint16)
BASIC_STATE_FUNC_DEFINED(dev_number, uint16)
BASIC_STATE_FUNC_DEFINED(bus_number, UINT16)
BASIC_STATE_FUNC_DEFINED(dev_number, UINT16)
BASIC_STATE_FUNC_DEFINED(port_number, int)
BASIC_STATE_FUNC_DEFINED(isoch_queue, void *)
BASIC_STATE_FUNC_DEFINED(MsConfig, MSUSB_CONFIG_DESCRIPTOR *)
@ -1718,7 +1718,7 @@ udev_load_interface(UDEVICE * pdev)
static IUDEVICE*
udev_init(UDEVICE* pdev, uint16 bus_number, uint16 dev_number)
udev_init(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_number)
{
LIBUSB_DEVICE_DESCRIPTOR* devDescriptor;
LIBUSB_CONFIG_DESCRIPTOR* config_temp;
@ -1829,13 +1829,13 @@ udev_init(UDEVICE* pdev, uint16 bus_number, uint16 dev_number)
int
udev_new_by_id(uint16 idVendor, uint16 idProduct, IUDEVICE *** devArray)
udev_new_by_id(UINT16 idVendor, UINT16 idProduct, IUDEVICE *** devArray)
{
LIBUSB_DEVICE_DESCRIPTOR * descriptor;
LIBUSB_DEVICE ** libusb_list;
UDEVICE ** array;
uint16 bus_number;
uint16 dev_number;
UINT16 bus_number;
UINT16 dev_number;
ssize_t total_device;
int i, ret, num = 0;

View File

@ -52,9 +52,9 @@ struct _UDEVICE
uint32 UsbDevice; /* An unique interface ID */
uint32 ReqCompletion; /* An unique interface ID */
uint32 channel_id;
uint16 status;
uint16 bus_number;
uint16 dev_number;
UINT16 status;
UINT16 bus_number;
UINT16 dev_number;
char path[17];
int port_number;
int isCompositeDevice;
@ -77,7 +77,7 @@ typedef UDEVICE * PUDEVICE;
int
udev_new_by_id(uint16_t idVendor, uint16_t idProduct, IUDEVICE ***devArray);
udev_new_by_id(UINT16_t idVendor, UINT16_t idProduct, IUDEVICE ***devArray);
IUDEVICE*
udev_new_by_addr(int bus_number, int dev_number);

View File

@ -56,7 +56,7 @@ struct _UDEVMAN
IUDEVICE* tail; /* tail device in linked list */
uint32 defUsbDevice;
uint16 flags;
UINT16 flags;
int device_num;
int sem_timeout;
@ -125,8 +125,8 @@ udevman_get_udevice_by_addr(IUDEVMAN * idevman, int bus_number, int dev_number)
static int
udevman_register_udevice(IUDEVMAN* idevman, int bus_number, int dev_number,
int UsbDevice,
uint16 idVendor,
uint16 idProduct,
UINT16 idVendor,
UINT16 idProduct,
int flag)
{
UDEVMAN * udevman = (UDEVMAN *) idevman;
@ -324,7 +324,7 @@ udevman_parse_device_pid_vid (char *str, int *id1, int *id2, char sign)
static int
udevman_check_device_exist_by_id(IUDEVMAN * idevman, uint16 idVendor, uint16 idProduct)
udevman_check_device_exist_by_id(IUDEVMAN * idevman, UINT16 idVendor, UINT16 idProduct)
{
if (libusb_open_device_with_vid_pid (NULL, idVendor, idProduct))
return 1;
@ -537,8 +537,8 @@ int FreeRDPUDEVMANEntry(PFREERDP_URBDRC_SERVICE_ENTRY_POINTS pEntryPoints)
0,
0,
UsbDevice,
(uint16) idVendor,
(uint16) idProduct,
(UINT16) idVendor,
(UINT16) idProduct,
UDEVMAN_FLAG_ADD_BY_VID_PID);
}
else if (udevman->flags & UDEVMAN_FLAG_ADD_BY_ADDR)

View File

@ -50,7 +50,7 @@ request_queue_has_next(REQUEST_QUEUE* queue)
TRANSFER_REQUEST*
request_queue_register_request(REQUEST_QUEUE* queue, uint32 RequestId,
struct libusb_transfer * transfer,
uint8 endpoint)
BYTE endpoint)
{
TRANSFER_REQUEST* request;
@ -90,7 +90,7 @@ request_queue_rewind(REQUEST_QUEUE *queue)
/* Get first*/
TRANSFER_REQUEST*
request_queue_get_request_by_endpoint(REQUEST_QUEUE *queue, uint8 ep)
request_queue_get_request_by_endpoint(REQUEST_QUEUE *queue, BYTE ep)
{
TRANSFER_REQUEST * request;
pthread_mutex_lock(&queue->request_loading);

View File

@ -33,7 +33,7 @@ struct _TRANSFER_REQUEST
void* next;
uint32 RequestId;
uint8 endpoint;
BYTE endpoint;
struct libusb_transfer *transfer;
int submit;
};
@ -53,9 +53,9 @@ struct _REQUEST_QUEUE
int (*has_next) (REQUEST_QUEUE* queue);
int (*unregister_request) (REQUEST_QUEUE *queue, uint32 RequestId);
TRANSFER_REQUEST *(*get_next) (REQUEST_QUEUE* queue);
TRANSFER_REQUEST *(*get_request_by_ep) (REQUEST_QUEUE *queue, uint8 ep);
TRANSFER_REQUEST *(*get_request_by_ep) (REQUEST_QUEUE *queue, BYTE ep);
TRANSFER_REQUEST *(*register_request) (REQUEST_QUEUE* queue,
uint32 RequestId, struct libusb_transfer * transfer, uint8 endpoint);
uint32 RequestId, struct libusb_transfer * transfer, BYTE endpoint);
};

View File

@ -21,8 +21,8 @@
#include "df_event.h"
static uint8 keymap[256];
static uint8 functionmap[128];
static BYTE keymap[256];
static BYTE functionmap[128];
void df_keyboard_init()
{
@ -154,9 +154,9 @@ void df_keyboard_init()
}
void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, uint16 x, uint16 y)
void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, UINT16 x, UINT16 y)
{
uint16 flags;
UINT16 flags;
flags = (down) ? PTR_FLAGS_DOWN : 0;
@ -171,14 +171,14 @@ void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, uint1
input->MouseEvent(input, flags, x, y);
}
void df_send_mouse_motion_event(rdpInput* input, uint16 x, uint16 y)
void df_send_mouse_motion_event(rdpInput* input, UINT16 x, UINT16 y)
{
input->MouseEvent(input, PTR_FLAGS_MOVE, x, y);
}
void df_send_mouse_wheel_event(rdpInput* input, sint16 axisrel, uint16 x, uint16 y)
void df_send_mouse_wheel_event(rdpInput* input, INT16 axisrel, UINT16 x, UINT16 y)
{
uint16 flags = PTR_FLAGS_WHEEL;
UINT16 flags = PTR_FLAGS_WHEEL;
if (axisrel < 0)
flags |= 0x0078;
@ -188,9 +188,9 @@ void df_send_mouse_wheel_event(rdpInput* input, sint16 axisrel, uint16 x, uint16
input->MouseEvent(input, flags, x, y);
}
void df_send_keyboard_event(rdpInput* input, BOOL down, uint8 keycode, uint8 function)
void df_send_keyboard_event(rdpInput* input, BOOL down, BYTE keycode, BYTE function)
{
uint8 vkcode;
BYTE vkcode;
RDP_SCANCODE rdp_scancode;
if (keycode)

View File

@ -44,7 +44,7 @@ void df_Pointer_New(rdpContext* context, rdpPointer* pointer)
if (result == DFB_OK)
{
int pitch;
uint8* point = NULL;
BYTE* point = NULL;
df_pointer->xhot = pointer->xPos;
df_pointer->yhot = pointer->yPos;

View File

@ -261,7 +261,7 @@ BOOL df_verify_certificate(freerdp* instance, char* subject, char* issuer, char*
}
static int
df_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
df_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size)
{
return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
}

View File

@ -14,7 +14,7 @@
{
@public
rdpPointer *pointer;
uint8 *cursor_data; // bitmapped pixel data
BYTE *cursor_data; // bitmapped pixel data
NSBitmapImageRep *bmiRep;
NSCursor *nsCursor;
NSImage *nsImage;

View File

@ -50,7 +50,7 @@
void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window);
void apple_to_windowMove(NSRect * r, RAIL_WINDOW_MOVE_ORDER * windowMove);
void mac_send_rail_client_event(rdpChannels *channels, uint16 event_type, void *param);
void mac_send_rail_client_event(rdpChannels *channels, UINT16 event_type, void *param);
void windows_to_apple_cords(NSRect * r);
void rail_MoveWindow(rdpRail * rail, rdpWindow * window);
void mac_rail_send_activate(int window_id);

View File

@ -113,13 +113,13 @@ void channel_activity_cb(CFSocketRef s, CFSocketCallBackType callbackType, CFDat
int register_fds(int *fds, int count, void *inst);
int invoke_draw_rect(rdpContext *context);
int process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data);
int receive_channel_data(freerdp *inst, int chan_id, uint8 *data, int size, int flags, int total_size);
int receive_channel_data(freerdp *inst, int chan_id, BYTE *data, int size, int flags, int total_size);
void process_cliprdr_event(freerdp *inst, RDP_EVENT *event);
void cliprdr_process_cb_format_list_event(freerdp *inst, RDP_CB_FORMAT_LIST_EVENT* event);
void cliprdr_send_data_request(freerdp *inst, uint32 format);
void cliprdr_process_cb_monitor_ready_event(freerdp* inst);
void cliprdr_process_cb_data_response_event(freerdp *inst, RDP_CB_DATA_RESPONSE_EVENT *event);
void cliprdr_process_text(freerdp *inst, uint8 *data, int len);
void cliprdr_process_text(freerdp *inst, BYTE *data, int len);
void cliprdr_send_supported_format_list(freerdp *inst);
int register_channel_fds(int *fds, int count, void *inst);
@ -127,14 +127,14 @@ void mac_process_rail_event(freerdp *inst, RDP_EVENT *event);
void mac_rail_register_callbacks(freerdp *inst, rdpRail *rail);
void mac_rail_CreateWindow(rdpRail *rail, rdpWindow *window);
void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window);
void mac_rail_ShowWindow(rdpRail *rail, rdpWindow *window, uint8 state);
void mac_rail_ShowWindow(rdpRail *rail, rdpWindow *window, BYTE state);
void mac_rail_SetWindowText(rdpRail *rail, rdpWindow *window);
void mac_rail_SetWindowIcon(rdpRail *rail, rdpWindow *window, rdpIcon *icon);
void mac_rail_SetWindowRects(rdpRail *rail, rdpWindow *window);
void mac_rail_SetWindowVisibilityRects(rdpRail *rail, rdpWindow *window);
void mac_rail_DestroyWindow(rdpRail *rail, rdpWindow *window);
void mac_process_rail_get_sysparams_event(rdpChannels *channels, RDP_EVENT *event);
void mac_send_rail_client_event(rdpChannels *channels, uint16 event_type, void *param);
void mac_send_rail_client_event(rdpChannels *channels, UINT16 event_type, void *param);
void mac_on_free_rail_client_event(RDP_EVENT* event);
void mac_process_rail_server_sysparam_event(rdpChannels* channels, RDP_EVENT* event);
void mac_process_rail_exec_result_event(rdpChannels* channels, RDP_EVENT* event);
@ -153,7 +153,7 @@ struct mac_context
struct cursor
{
rdpPointer *pointer;
uint8 *cursor_data; // bitmapped pixel data
BYTE *cursor_data; // bitmapped pixel data
void *bmiRep; // NSBitmapImageRep
void *nsCursor; // NSCursor
void *nsImage; // NSImage

View File

@ -94,7 +94,7 @@ void tf_end_paint(rdpContext* context)
return;
}
int tf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
int tf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size)
{
return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
}

View File

@ -59,10 +59,10 @@ LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam)
if (!wfi || !p)
return 1;
input = wfi->instance->input;
rdp_scancode = MAKE_RDP_SCANCODE((uint8) p->scanCode, p->flags & LLKHF_EXTENDED);
rdp_scancode = MAKE_RDP_SCANCODE((BYTE) p->scanCode, p->flags & LLKHF_EXTENDED);
DEBUG_KBD("keydown %d scanCode %04X flags %02X vkCode %02X",
(wParam == WM_KEYDOWN), (uint8) p->scanCode, p->flags, p->vkCode);
(wParam == WM_KEYDOWN), (BYTE) p->scanCode, p->flags, p->vkCode);
if (wfi->fs_toggle &&
((p->vkCode == VK_RETURN) || (p->vkCode == VK_CANCEL)) &&

View File

@ -39,7 +39,7 @@
#include "wfreerdp.h"
#include "wf_graphics.h"
const uint8 wf_rop2_table[] =
const BYTE wf_rop2_table[] =
{
R2_BLACK, /* 0 */
R2_NOTMERGEPEN, /* DPon */
@ -84,19 +84,19 @@ void wf_glyph_free(wfBitmap* glyph)
wf_image_free(glyph);
}
uint8* wf_glyph_convert(wfInfo* wfi, int width, int height, uint8* data)
BYTE* wf_glyph_convert(wfInfo* wfi, int width, int height, BYTE* data)
{
int indexx;
int indexy;
uint8* src;
uint8* dst;
uint8* cdata;
BYTE* src;
BYTE* dst;
BYTE* cdata;
int src_bytes_per_row;
int dst_bytes_per_row;
src_bytes_per_row = (width + 7) / 8;
dst_bytes_per_row = src_bytes_per_row + (src_bytes_per_row % 2);
cdata = (uint8 *) malloc(dst_bytes_per_row * height);
cdata = (BYTE *) malloc(dst_bytes_per_row * height);
src = data;
for (indexy = 0; indexy < height; indexy++)
@ -120,8 +120,8 @@ HBRUSH wf_create_brush(wfInfo * wfi, rdpBrush* brush, uint32 color, int bpp)
int i;
HBRUSH br;
LOGBRUSH lbr;
uint8* cdata;
uint8 ipattern[8];
BYTE* cdata;
BYTE ipattern[8];
HBITMAP pattern = NULL;
lbr.lbStyle = brush->style;
@ -466,7 +466,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
wfi->image->_bitmap.width = surface_bits_command->width;
wfi->image->_bitmap.height = surface_bits_command->height;
wfi->image->_bitmap.bpp = surface_bits_command->bpp;
wfi->image->_bitmap.data = (uint8*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
wfi->image->_bitmap.data = (BYTE*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
freerdp_image_flip(nsc_context->bmpdata, wfi->image->_bitmap.data, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32);
BitBlt(wfi->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop, surface_bits_command->width, surface_bits_command->height, wfi->image->hdc, 0, 0, GDI_SRCCOPY);
}
@ -476,12 +476,12 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
wfi->image->_bitmap.height = surface_bits_command->height;
wfi->image->_bitmap.bpp = surface_bits_command->bpp;
wfi->image->_bitmap.data = (uint8*) realloc(wfi->image->_bitmap.data,
wfi->image->_bitmap.data = (BYTE*) realloc(wfi->image->_bitmap.data,
wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
if ((surface_bits_command->bpp != 32) || (wfi->clrconv->alpha == TRUE))
{
uint8* temp_image;
BYTE* temp_image;
freerdp_image_convert(surface_bits_command->bitmapData, wfi->image->_bitmap.data,
wfi->image->_bitmap.width, wfi->image->_bitmap.height,
@ -490,7 +490,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
surface_bits_command->bpp = 32;
surface_bits_command->bitmapData = wfi->image->_bitmap.data;
temp_image = (uint8*) malloc(wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
temp_image = (BYTE*) malloc(wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
freerdp_image_flip(wfi->image->_bitmap.data, temp_image, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32);
free(wfi->image->_bitmap.data);
wfi->image->_bitmap.data = temp_image;

View File

@ -25,7 +25,7 @@
#include "wfreerdp.h"
void wf_invalidate_region(wfInfo* wfi, int x, int y, int width, int height);
wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data);
wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data);
void wf_image_free(wfBitmap* image);
void wf_toggle_fullscreen(wfInfo* wfi);

View File

@ -27,13 +27,13 @@
#include "wf_gdi.h"
#include "wf_graphics.h"
HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data, uint8** pdata)
HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, BYTE* data, BYTE** pdata)
{
HDC hdc;
int negHeight;
HBITMAP bitmap;
BITMAPINFO bmi;
uint8* cdata = NULL;
BYTE* cdata = NULL;
/**
* See: http://msdn.microsoft.com/en-us/library/dd183376
@ -65,7 +65,7 @@ HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data,
return bitmap;
}
wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data)
wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data)
{
HDC hdc;
wfBitmap* image;
@ -143,16 +143,16 @@ void wf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
}
void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
uint8* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id)
BYTE* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id)
{
uint16 size;
UINT16 size;
size = width * height * (bpp / 8);
if (bitmap->data == NULL)
bitmap->data = (uint8*) malloc(size);
bitmap->data = (BYTE*) malloc(size);
else
bitmap->data = (uint8*) realloc(bitmap->data, size);
bitmap->data = (BYTE*) realloc(bitmap->data, size);
if (compressed)
{

View File

@ -22,8 +22,8 @@
#include "wfreerdp.h"
HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data, uint8** pdata);
wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data);
HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, BYTE* data, BYTE** pdata);
wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data);
void wf_image_free(wfBitmap* image);
void wf_register_graphics(rdpGraphics* graphics);

View File

@ -37,7 +37,7 @@ void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail)
{
}
void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 command)
void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, UINT16 command)
{
}

View File

@ -23,7 +23,7 @@
void wf_rail_paint(wfInfo* wfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom);
void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail);
void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 command);
void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, UINT16 command);
void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled);
void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, RDP_EVENT* event);
void wf_rail_adjust_position(wfInfo* wfi, rdpWindow *window);

View File

@ -426,7 +426,7 @@ BOOL wf_verify_certificate(freerdp* instance, char* subject, char* issuer, char*
return TRUE;
}
int wf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
int wf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size)
{
return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
}

View File

@ -43,7 +43,7 @@ struct wf_bitmap
HDC hdc;
HBITMAP bitmap;
HBITMAP org_bitmap;
uint8* pdata;
BYTE* pdata;
};
typedef struct wf_bitmap wfBitmap;
@ -72,8 +72,8 @@ struct wf_info
HWND hwnd;
HGDI_DC hdc;
uint16 srcBpp;
uint16 dstBpp;
UINT16 srcBpp;
UINT16 dstBpp;
freerdp* instance;
wfBitmap* primary;
wfBitmap* drawing;

View File

@ -56,7 +56,7 @@ struct clipboard_context
int num_formats;
Atom targets[20];
int num_targets;
uint8* data;
BYTE* data;
uint32 data_format;
uint32 data_alt_format;
int data_length;
@ -70,7 +70,7 @@ struct clipboard_context
/* INCR mechanism */
Atom incr_atom;
BOOL incr_starts;
uint8* incr_data;
BYTE* incr_data;
int incr_data_length;
};
@ -99,7 +99,7 @@ void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman)
cb->identity_atom = XInternAtom(xfi->display, "_FREERDP_CLIPRDR_ID", FALSE);
XChangeProperty(xfi->display, xfi->drawable, cb->identity_atom,
XA_INTEGER, 32, PropModeReplace, (uint8*) &id, 1);
XA_INTEGER, 32, PropModeReplace, (BYTE*) &id, 1);
XSelectInput(xfi->display, cb->root_window, PropertyChangeMask);
@ -158,17 +158,17 @@ void xf_cliprdr_uninit(xfInfo* xfi)
}
}
static uint8* lf2crlf(uint8* data, int* size)
static BYTE* lf2crlf(BYTE* data, int* size)
{
uint8 c;
uint8* outbuf;
uint8* out;
uint8* in_end;
uint8* in;
BYTE c;
BYTE* outbuf;
BYTE* out;
BYTE* in_end;
BYTE* in;
int out_size;
out_size = (*size) * 2 + 1;
outbuf = (uint8*) xzalloc(out_size);
outbuf = (BYTE*) xzalloc(out_size);
out = outbuf;
in = data;
in_end = data + (*size);
@ -193,12 +193,12 @@ static uint8* lf2crlf(uint8* data, int* size)
return outbuf;
}
static void crlf2lf(uint8* data, int* size)
static void crlf2lf(BYTE* data, int* size)
{
uint8 c;
uint8* out;
uint8* in;
uint8* in_end;
BYTE c;
BYTE* out;
BYTE* in;
BYTE* in_end;
out = data;
in = data;
@ -215,9 +215,9 @@ static void crlf2lf(uint8* data, int* size)
*size = out - data;
}
static void be2le(uint8* data, int size)
static void be2le(BYTE* data, int size)
{
uint8 c;
BYTE c;
while (size >= 2)
{
@ -245,7 +245,7 @@ static BOOL xf_cliprdr_is_self_owned(xfInfo* xfi)
{
result = XGetWindowProperty(xfi->display, cb->owner,
cb->identity_atom, 0, 4, 0, XA_INTEGER,
&type, &format, &length, &bytes_left, (uint8**) &pid);
&type, &format, &length, &bytes_left, (BYTE**) &pid);
}
if (pid)
@ -305,7 +305,7 @@ static int xf_cliprdr_select_format_by_atom(clipboardContext* cb, Atom target)
static void xf_cliprdr_send_raw_format_list(xfInfo* xfi)
{
Atom type;
uint8* format_data;
BYTE* format_data;
int format, result;
unsigned long length, bytes_left;
RDP_CB_FORMAT_LIST_EVENT* event;
@ -313,7 +313,7 @@ static void xf_cliprdr_send_raw_format_list(xfInfo* xfi)
result = XGetWindowProperty(xfi->display, cb->root_window,
cb->property_atom, 0, 3600, 0, XA_STRING,
&type, &format, &length, &bytes_left, (uint8**) &format_data);
&type, &format, &length, &bytes_left, (BYTE**) &format_data);
if (result != Success)
{
@ -325,7 +325,7 @@ static void xf_cliprdr_send_raw_format_list(xfInfo* xfi)
event = (RDP_CB_FORMAT_LIST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR,
RDP_EVENT_TYPE_CB_FORMAT_LIST, NULL, NULL);
event->raw_format_data = (uint8*) malloc(length);
event->raw_format_data = (BYTE*) malloc(length);
memcpy(event->raw_format_data, format_data, length);
event->raw_format_data_size = length;
XFree(format_data);
@ -397,7 +397,7 @@ static void xf_cliprdr_send_data_request(xfInfo* xfi, uint32 format)
freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event);
}
static void xf_cliprdr_send_data_response(xfInfo* xfi, uint8* data, int size)
static void xf_cliprdr_send_data_response(xfInfo* xfi, BYTE* data, int size)
{
RDP_CB_DATA_RESPONSE_EVENT* event;
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
@ -436,7 +436,7 @@ static void xf_cliprdr_process_cb_data_request_event(xfInfo* xfi, RDP_CB_DATA_RE
/* CB_FORMAT_RAW */
i = 0;
XChangeProperty(xfi->display, xfi->drawable, cb->property_atom,
XA_INTEGER, 32, PropModeReplace, (uint8*) &event->format, 1);
XA_INTEGER, 32, PropModeReplace, (BYTE*) &event->format, 1);
}
else
{
@ -468,7 +468,7 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi)
int i, j;
Atom atom;
int format;
uint8* data = NULL;
BYTE* data = NULL;
unsigned long length, bytes_left;
RDP_CB_FORMAT_LIST_EVENT* event;
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
@ -516,16 +516,16 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi)
}
}
static uint8* xf_cliprdr_process_requested_raw(uint8* data, int* size)
static BYTE* xf_cliprdr_process_requested_raw(BYTE* data, int* size)
{
uint8* outbuf;
BYTE* outbuf;
outbuf = (uint8*) malloc(*size);
outbuf = (BYTE*) malloc(*size);
memcpy(outbuf, data, *size);
return outbuf;
}
static uint8* xf_cliprdr_process_requested_unicodetext(uint8* data, int* size)
static BYTE* xf_cliprdr_process_requested_unicodetext(BYTE* data, int* size)
{
char* inbuf;
WCHAR* outbuf;
@ -537,21 +537,21 @@ static uint8* xf_cliprdr_process_requested_unicodetext(uint8* data, int* size)
*size = (int) ((out_size + 1) * 2);
return (uint8*) outbuf;
return (BYTE*) outbuf;
}
static uint8* xf_cliprdr_process_requested_text(uint8* data, int* size)
static BYTE* xf_cliprdr_process_requested_text(BYTE* data, int* size)
{
uint8* outbuf;
BYTE* outbuf;
outbuf = lf2crlf(data, size);
return outbuf;
}
static uint8* xf_cliprdr_process_requested_dib(uint8* data, int* size)
static BYTE* xf_cliprdr_process_requested_dib(BYTE* data, int* size)
{
uint8* outbuf;
BYTE* outbuf;
/* length should be at least BMP header (14) + sizeof(BITMAPINFOHEADER) */
if (*size < 54)
@ -561,29 +561,29 @@ static uint8* xf_cliprdr_process_requested_dib(uint8* data, int* size)
}
*size -= 14;
outbuf = (uint8*) xzalloc(*size);
outbuf = (BYTE*) xzalloc(*size);
memcpy(outbuf, data + 14, *size);
return outbuf;
}
static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size)
static BYTE* xf_cliprdr_process_requested_html(BYTE* data, int* size)
{
char* inbuf;
uint8* in;
uint8* outbuf;
BYTE* in;
BYTE* outbuf;
char num[11];
inbuf = NULL;
if (*size > 2)
{
if ((uint8) data[0] == 0xFE && (uint8) data[1] == 0xFF)
if ((BYTE) data[0] == 0xFE && (BYTE) data[1] == 0xFF)
{
be2le(data, *size);
}
if ((uint8) data[0] == 0xFF && (uint8) data[1] == 0xFE)
if ((BYTE) data[0] == 0xFF && (BYTE) data[1] == 0xFE)
{
freerdp_UnicodeToAsciiAlloc((WCHAR*) (data + 2), &inbuf, (*size - 2) / 2);
}
@ -595,7 +595,7 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size)
memcpy(inbuf, data, *size);
}
outbuf = (uint8*) xzalloc(*size + 200);
outbuf = (BYTE*) xzalloc(*size + 200);
strcpy((char*) outbuf,
"Version:0.9\r\n"
"StartHTML:0000000000\r\n"
@ -603,10 +603,10 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size)
"StartFragment:0000000000\r\n"
"EndFragment:0000000000\r\n");
in = (uint8*) strstr((char*) inbuf, "<body");
in = (BYTE*) strstr((char*) inbuf, "<body");
if (in == NULL)
{
in = (uint8*) strstr((char*) inbuf, "<BODY");
in = (BYTE*) strstr((char*) inbuf, "<BODY");
}
/* StartHTML */
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
@ -638,9 +638,9 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size)
return outbuf;
}
static void xf_cliprdr_process_requested_data(xfInfo* xfi, BOOL has_data, uint8* data, int size)
static void xf_cliprdr_process_requested_data(xfInfo* xfi, BOOL has_data, BYTE* data, int size)
{
uint8* outbuf;
BYTE* outbuf;
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
if (cb->incr_starts && has_data)
@ -695,7 +695,7 @@ static BOOL xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
{
Atom type;
int format;
uint8* data = NULL;
BYTE* data = NULL;
BOOL has_data = FALSE;
unsigned long length, bytes_left, dummy;
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
@ -758,7 +758,7 @@ static BOOL xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
{
bytes_left = length * format / 8;
DEBUG_X11("%d bytes", (int)bytes_left);
cb->incr_data = (uint8*) realloc(cb->incr_data, cb->incr_data_length + bytes_left);
cb->incr_data = (BYTE*) realloc(cb->incr_data, cb->incr_data_length + bytes_left);
memcpy(cb->incr_data + cb->incr_data_length, data, bytes_left);
cb->incr_data_length += bytes_left;
XFree(data);
@ -807,7 +807,7 @@ static void xf_cliprdr_provide_targets(xfInfo* xfi, XEvent* respond)
respond->xselection.requestor,
respond->xselection.property,
XA_ATOM, 32, PropModeReplace,
(uint8*) cb->targets, cb->num_targets);
(BYTE*) cb->targets, cb->num_targets);
}
}
@ -821,7 +821,7 @@ static void xf_cliprdr_provide_data(xfInfo* xfi, XEvent* respond)
respond->xselection.requestor,
respond->xselection.property,
respond->xselection.target, 8, PropModeReplace,
(uint8*) cb->data, cb->data_length);
(BYTE*) cb->data, cb->data_length);
}
}
@ -868,24 +868,24 @@ static void xf_cliprdr_process_cb_format_list_event(xfInfo* xfi, RDP_CB_FORMAT_L
XFlush(xfi->display);
}
static void xf_cliprdr_process_text(clipboardContext* cb, uint8* data, int size)
static void xf_cliprdr_process_text(clipboardContext* cb, BYTE* data, int size)
{
cb->data = (uint8*) malloc(size);
cb->data = (BYTE*) malloc(size);
memcpy(cb->data, data, size);
cb->data_length = size;
crlf2lf(cb->data, &cb->data_length);
}
static void xf_cliprdr_process_unicodetext(clipboardContext* cb, uint8* data, int size)
static void xf_cliprdr_process_unicodetext(clipboardContext* cb, BYTE* data, int size)
{
cb->data_length = freerdp_UnicodeToAsciiAlloc((WCHAR*) data, (CHAR**) &(cb->data), size / 2);
crlf2lf(cb->data, &cb->data_length);
}
static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size)
static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size)
{
STREAM* s;
uint16 bpp;
UINT16 bpp;
uint32 offset;
uint32 ncolors;
@ -899,7 +899,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size)
s = stream_new(0);
stream_attach(s, data, size);
stream_seek(s, 14);
stream_read_uint16(s, bpp);
stream_read_UINT16(s, bpp);
stream_read_uint32(s, ncolors);
offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0);
stream_detach(s);
@ -908,8 +908,8 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size)
DEBUG_X11_CLIPRDR("offset=%d bpp=%d ncolors=%d", offset, bpp, ncolors);
s = stream_new(14 + size);
stream_write_uint8(s, 'B');
stream_write_uint8(s, 'M');
stream_write_BYTE(s, 'B');
stream_write_BYTE(s, 'M');
stream_write_uint32(s, 14 + size);
stream_write_uint32(s, 0);
stream_write_uint32(s, offset);
@ -921,7 +921,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size)
stream_free(s);
}
static void xf_cliprdr_process_html(clipboardContext* cb, uint8* data, int size)
static void xf_cliprdr_process_html(clipboardContext* cb, BYTE* data, int size)
{
char* start_str;
char* end_str;
@ -943,7 +943,7 @@ static void xf_cliprdr_process_html(clipboardContext* cb, uint8* data, int size)
return;
}
cb->data = (uint8*) malloc(size - start + 1);
cb->data = (BYTE*) malloc(size - start + 1);
memcpy(cb->data, data + start, end - start);
cb->data_length = end - start;
crlf2lf(cb->data, &cb->data_length);
@ -1071,7 +1071,7 @@ BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent)
uint32 format;
XEvent* respond;
uint32 alt_format;
uint8* data = NULL;
BYTE* data = NULL;
BOOL delay_respond;
unsigned long length, bytes_left;
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;

View File

@ -701,12 +701,12 @@ static BOOL xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, BOOL app)
for (i=0;i<nitems;i++)
{
if ((Atom) ((uint16 **) prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_VERT", False))
if ((Atom) ((UINT16 **) prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_VERT", False))
{
maxVert = TRUE;
}
if ((Atom) ((uint16 **)prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False))
if ((Atom) ((UINT16 **)prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False))
{
maxHorz = TRUE;
}

View File

@ -34,7 +34,7 @@
#include "xf_gdi.h"
static const uint8 xf_rop2_table[] =
static const BYTE xf_rop2_table[] =
{
0,
GXclear, /* 0 */
@ -205,10 +205,10 @@ BOOL xf_set_rop3(xfInfo* xfi, int rop3)
return TRUE;
}
Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, uint8* data)
Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, BYTE* data)
{
Pixmap bitmap;
uint8* cdata;
BYTE* cdata;
XImage* image;
bitmap = XCreatePixmap(xfi->display, xfi->drawable, width, height, xfi->depth);
@ -235,7 +235,7 @@ Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, uint8* data)
return bitmap;
}
Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, uint8* data)
Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, BYTE* data)
{
int scanline;
XImage* image;
@ -254,7 +254,7 @@ Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, uint8* data)
return bitmap;
}
Pixmap xf_glyph_new(xfInfo* xfi, int width, int height, uint8* data)
Pixmap xf_glyph_new(xfInfo* xfi, int width, int height, BYTE* data)
{
int scanline;
Pixmap bitmap;
@ -911,7 +911,7 @@ void xf_gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surf
}
}
static void xf_gdi_surface_update_frame(xfInfo* xfi, uint16 tx, uint16 ty, uint16 width, uint16 height)
static void xf_gdi_surface_update_frame(xfInfo* xfi, UINT16 tx, UINT16 ty, UINT16 width, UINT16 height)
{
if (xfi->remote_app != TRUE)
{
@ -998,7 +998,7 @@ void xf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
XSetFunction(xfi->display, xfi->gc, GXcopy);
XSetFillStyle(xfi->display, xfi->gc, FillSolid);
xfi->bmp_codec_nsc = (uint8*) realloc(xfi->bmp_codec_nsc,
xfi->bmp_codec_nsc = (BYTE*) realloc(xfi->bmp_codec_nsc,
surface_bits_command->width * surface_bits_command->height * 4);
freerdp_image_flip(nsc_context->bmpdata, xfi->bmp_codec_nsc,
@ -1026,7 +1026,7 @@ void xf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
/* Validate that the data received is large enough */
if( surface_bits_command->width * surface_bits_command->height * surface_bits_command->bpp / 8 <= surface_bits_command->bitmapDataLength )
{
xfi->bmp_codec_none = (uint8*) realloc(xfi->bmp_codec_none,
xfi->bmp_codec_none = (BYTE*) realloc(xfi->bmp_codec_none,
surface_bits_command->width * surface_bits_command->height * 4);
freerdp_image_flip(surface_bits_command->bitmapData, xfi->bmp_codec_none,

View File

@ -38,7 +38,7 @@
void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap)
{
uint8* data;
BYTE* data;
Pixmap pixmap;
XImage* image;
xfContext* context_ = (xfContext*) context;
@ -112,13 +112,13 @@ void xf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
}
void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
uint8* data, int width, int height, int bpp, int length,
BYTE* data, int width, int height, int bpp, int length,
BOOL compressed, int codec_id)
{
uint16 size;
UINT16 size;
RFX_MESSAGE* msg;
uint8* src;
uint8* dst;
BYTE* src;
BYTE* dst;
int yindex;
int xindex;
xfInfo* xfi;
@ -127,9 +127,9 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
size = width * height * (bpp + 7) / 8;
if (bitmap->data == NULL)
bitmap->data = (uint8*) malloc(size);
bitmap->data = (BYTE*) malloc(size);
else
bitmap->data = (uint8*) realloc(bitmap->data, size);
bitmap->data = (BYTE*) realloc(bitmap->data, size);
switch (codec_id)
{
@ -217,7 +217,7 @@ void xf_Pointer_New(rdpContext* context, rdpPointer* pointer)
if ((pointer->andMaskData != 0) && (pointer->xorMaskData != 0))
{
freerdp_alpha_cursor_convert((uint8*) (ci.pixels), pointer->xorMaskData, pointer->andMaskData,
freerdp_alpha_cursor_convert((BYTE*) (ci.pixels), pointer->xorMaskData, pointer->andMaskData,
pointer->width, pointer->height, pointer->xorBpp, xfi->clrconv);
}

View File

@ -43,7 +43,7 @@ void xf_kbd_clear(xfInfo* xfi)
memset(xfi->pressed_keys, 0, 256 * sizeof(BOOL));
}
void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym)
void xf_kbd_set_keypress(xfInfo* xfi, BYTE keycode, KeySym keysym)
{
if (keycode >= 8)
xfi->pressed_keys[keycode] = keysym;
@ -51,7 +51,7 @@ void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym)
return;
}
void xf_kbd_unset_keypress(xfInfo* xfi, uint8 keycode)
void xf_kbd_unset_keypress(xfInfo* xfi, BYTE keycode)
{
if (keycode >= 8)
xfi->pressed_keys[keycode] = NoSymbol;
@ -81,7 +81,7 @@ BOOL xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym)
return (xfi->pressed_keys[keycode] == keysym);
}
void xf_kbd_send_key(xfInfo* xfi, BOOL down, uint8 keycode)
void xf_kbd_send_key(xfInfo* xfi, BOOL down, BYTE keycode)
{
RDP_SCANCODE rdp_scancode;
rdpInput* input;

View File

@ -26,11 +26,11 @@
void xf_kbd_init(xfInfo* xfi);
void xf_kbd_clear(xfInfo* xfi);
void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym);
void xf_kbd_unset_keypress(xfInfo* xfi, uint8 keycode);
void xf_kbd_set_keypress(xfInfo* xfi, BYTE keycode, KeySym keysym);
void xf_kbd_unset_keypress(xfInfo* xfi, BYTE keycode);
void xf_kbd_release_all_keypress(xfInfo* xfi);
BOOL xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym);
void xf_kbd_send_key(xfInfo* xfi, BOOL down, uint8 keycode);
void xf_kbd_send_key(xfInfo* xfi, BOOL down, BYTE keycode);
int xf_kbd_read_keyboard_state(xfInfo* xfi);
BOOL xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym);
int xf_kbd_get_toggle_keys_state(xfInfo* xfi);

View File

@ -162,7 +162,7 @@ static void xf_rail_MoveWindow(rdpRail* rail, rdpWindow* window)
window->windowWidth, window->windowHeight);
}
static void xf_rail_ShowWindow(rdpRail* rail, rdpWindow* window, uint8 state)
static void xf_rail_ShowWindow(rdpRail* rail, rdpWindow* window, BYTE state)
{
xfInfo* xfi;
xfWindow* xfw;
@ -249,7 +249,7 @@ static void xf_on_free_rail_client_event(RDP_EVENT* event)
}
}
static void xf_send_rail_client_event(rdpChannels* channels, uint16 event_type, void* param)
static void xf_send_rail_client_event(rdpChannels* channels, UINT16 event_type, void* param)
{
RDP_EVENT* out_event = NULL;
void * payload = NULL;
@ -284,7 +284,7 @@ void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled)
xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate);
}
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command)
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, UINT16 command)
{
rdpChannels* channels;
RAIL_SYSCOMMAND_ORDER syscommand;
@ -518,7 +518,7 @@ void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChannels* channels,
DEBUG_X11_LMS("windowId=0x%X maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d "
"minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d",
minmax->windowId, minmax->maxWidth, minmax->maxHeight,
(sint16)minmax->maxPosX, (sint16)minmax->maxPosY,
(INT16)minmax->maxPosX, (INT16)minmax->maxPosY,
minmax->minTrackWidth, minmax->minTrackHeight,
minmax->maxTrackWidth, minmax->maxTrackHeight);
@ -562,7 +562,7 @@ void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* channe
DEBUG_X11_LMS("windowId=0x%X isMoveSizeStart=%d moveSizeType=%s PosX=%d PosY=%d",
movesize->windowId, movesize->isMoveSizeStart,
movetype_names[movesize->moveSizeType], (sint16) movesize->posX, (sint16) movesize->posY);
movetype_names[movesize->moveSizeType], (INT16) movesize->posX, (INT16) movesize->posY);
switch (movesize->moveSizeType)
{

View File

@ -24,7 +24,7 @@
void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom);
void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail);
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command);
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, UINT16 command);
void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled);
void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event);
void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window);

View File

@ -200,8 +200,8 @@ xf_tsmf_is_format_supported(xfXvContext* xv, uint32 pixfmt)
static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT* vevent)
{
int i;
uint8* data1;
uint8* data2;
BYTE* data1;
BYTE* data2;
uint32 pixfmt;
uint32 xvpixfmt;
BOOL converti420yv12 = FALSE;

View File

@ -133,7 +133,7 @@ void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, BOOL fullscreen)
/* http://tronche.com/gui/x/xlib/window-information/XGetWindowProperty.html */
BOOL xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length,
unsigned long* nitems, unsigned long* bytes, uint8** prop)
unsigned long* nitems, unsigned long* bytes, BYTE** prop)
{
int status;
Atom actual_type;
@ -224,7 +224,7 @@ void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, BOOL show)
hints.status = 0;
XChangeProperty(xfi->display, window->handle, xfi->_MOTIF_WM_HINTS, xfi->_MOTIF_WM_HINTS, 32,
PropModeReplace, (uint8*) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS);
PropModeReplace, (BYTE*) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS);
}
void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window)
@ -235,7 +235,7 @@ void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window)
window_state[1] = xfi->_NET_WM_STATE_SKIP_TASKBAR;
XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_STATE,
XA_ATOM, 32, PropModeReplace, (uint8*) &window_state, 2);
XA_ATOM, 32, PropModeReplace, (BYTE*) &window_state, 2);
}
void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_style)
@ -282,7 +282,7 @@ void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_st
}
XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_WINDOW_TYPE,
XA_ATOM, 32, PropModeReplace, (uint8*) &window_type, 1);
XA_ATOM, 32, PropModeReplace, (BYTE*) &window_type, 1);
}
@ -373,7 +373,7 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height,
input_mask |= EnterWindowMask | LeaveWindowMask;
XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_ICON, XA_CARDINAL, 32,
PropModeReplace, (uint8*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop));
PropModeReplace, (BYTE*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop));
if (xfi->parent_window)
XReparentWindow(xfi->display, window->handle, xfi->parent_window, 0, 0);
@ -688,7 +688,7 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h
xf_UpdateWindowArea(xfi, window, 0, 0, width, height);
}
void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state)
void xf_ShowWindow(xfInfo* xfi, xfWindow* window, BYTE state)
{
switch (state)
{
@ -777,7 +777,7 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon)
}
XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_ICON, XA_CARDINAL, 32,
PropModeReplace, (uint8*) propdata, propsize);
PropModeReplace, (BYTE*) propdata, propsize);
XFlush(xfi->display);
}

View File

@ -77,7 +77,7 @@ struct xf_window
BOOL is_mapped;
BOOL is_transient;
xfLocalMove local_move;
uint8 rail_state;
BYTE rail_state;
BOOL rail_ignore_configure;
};
@ -96,7 +96,7 @@ void xf_ResizeDesktopWindow(xfInfo* xfi, xfWindow* window, int width, int height
xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, uint32 id);
void xf_SetWindowText(xfInfo *xfi, xfWindow* window, char *name);
void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height);
void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state);
void xf_ShowWindow(xfInfo* xfi, xfWindow* window, BYTE state);
void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon);
void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects);
void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects);
@ -107,7 +107,7 @@ void xf_DestroyWindow(xfInfo* xfi, xfWindow* window);
rdpWindow* xf_rdpWindowFromWindow(xfInfo* xfi, Window wnd);
BOOL xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length,
unsigned long* nitems, unsigned long* bytes, uint8** prop);
unsigned long* nitems, unsigned long* bytes, BYTE** prop);
void xf_SetWindowMinMaxInfo(xfInfo* xfi, xfWindow* window, int maxWidth, int maxHeight,
int maxPosX, int maxPosY, int minTrackWidth, int minTrackHeight, int maxTrackWidth, int maxTrackHeight);

View File

@ -75,7 +75,7 @@
static HANDLE g_sem;
static int g_thread_count = 0;
static uint8 g_disconnect_reason = 0;
static BYTE g_disconnect_reason = 0;
static long xv_port = 0;
static const size_t password_size = 512;
@ -759,7 +759,7 @@ BOOL xf_post_connect(freerdp* instance)
xfi->image = XCreateImage(xfi->display, xfi->visual, xfi->depth, ZPixmap, 0,
(char*) xfi->primary_buffer, xfi->width, xfi->height, xfi->scanline_pad, 0);
xfi->bmp_codec_none = (uint8*) malloc(64 * 64 * 4);
xfi->bmp_codec_none = (BYTE*) malloc(64 * 64 * 4);
if (xfi->sw_gdi)
{
@ -966,7 +966,7 @@ int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_D
return 1;
}
int xf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
int xf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size)
{
return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
}
@ -1272,7 +1272,7 @@ void* thread_func(void* param)
pthread_exit(NULL);
}
static uint8 exit_code_from_disconnect_reason(uint32 reason)
static BYTE exit_code_from_disconnect_reason(uint32 reason)
{
if (reason == 0 ||
(reason >= XF_EXIT_PARSE_ARGUMENTS && reason <= XF_EXIT_CONN_FAILED))

View File

@ -117,13 +117,13 @@ struct xf_info
HGDI_DC hdc;
BOOL sw_gdi;
uint8* primary_buffer;
BYTE* primary_buffer;
BOOL frame_begin;
uint16 frame_x1;
uint16 frame_y1;
uint16 frame_x2;
uint16 frame_y2;
UINT16 frame_x1;
UINT16 frame_y1;
UINT16 frame_x2;
UINT16 frame_y2;
BOOL focused;
BOOL mouse_active;
@ -136,8 +136,8 @@ struct xf_info
XSetWindowAttributes attribs;
BOOL complex_regions;
VIRTUAL_SCREEN vscreen;
uint8* bmp_codec_none;
uint8* bmp_codec_nsc;
BYTE* bmp_codec_none;
BYTE* bmp_codec_nsc;
void* rfx_context;
void* nsc_context;
void* xv_context;

View File

@ -24,17 +24,17 @@
#include "test_bitmap.h"
uint8 compressed_16x1x8[] =
BYTE compressed_16x1x8[] =
{
0x10
};
uint8 decompressed_16x1x8[] =
BYTE decompressed_16x1x8[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8 compressed_32x32x8[] =
BYTE compressed_32x32x8[] =
{
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06,
0xec, 0x6c, 0x0e, 0x0e, 0x44, 0x0e, 0x0e, 0x0e, 0x13, 0x06, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06,
@ -90,7 +90,7 @@ uint8 compressed_32x32x8[] =
0x04, 0x8b, 0x04, 0x6c, 0xe6, 0x04, 0x06, 0x82, 0x00, 0x00
};
uint8 decompressed_32x32x8[] =
BYTE decompressed_32x32x8[] =
{
0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x6c, 0x04, 0x8b,
0x04, 0x6c, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x00, 0x00,
@ -158,18 +158,18 @@ uint8 decompressed_32x32x8[] =
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8 compressed_16x1x16[] =
BYTE compressed_16x1x16[] =
{
0x0c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8 decompressed_16x1x16[] =
BYTE decompressed_16x1x16[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8 compressed_32x32x16[] =
BYTE compressed_32x32x16[] =
{
0x1c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0xef, 0x1a, 0x8a,
0xcf, 0x12, 0x4e, 0x12, 0xce, 0x09, 0xaf, 0x09, 0x8f, 0x01, 0x8f, 0x01, 0xaf, 0x09, 0xce, 0x09,
@ -268,7 +268,7 @@ uint8 compressed_32x32x16[] =
0xcf, 0x12, 0x69, 0xef, 0x1a, 0x84, 0xef, 0x1a, 0xef, 0x1a, 0x00, 0x00, 0x00, 0x00
};
uint8 decompressed_32x32x16[] =
BYTE decompressed_32x32x16[] =
{
0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a,
0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xcf, 0x12, 0xb0, 0x12, 0x91, 0x0a, 0xb3, 0x0a, 0xb3, 0x0a,
@ -400,19 +400,19 @@ uint8 decompressed_32x32x16[] =
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8 compressed_16x1x24[] =
BYTE compressed_16x1x24[] =
{
0x0c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8 decompressed_16x1x24[] =
BYTE decompressed_16x1x24[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8 compressed_32x32x24[] =
BYTE compressed_32x32x24[] =
{
0x84, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x38, 0x8a, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x80,
@ -479,7 +479,7 @@ uint8 compressed_32x32x24[] =
0xff, 0xff, 0xff, 0xff
};
uint8 decompressed_32x32x24[] =
BYTE decompressed_32x32x24[] =
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
@ -675,12 +675,12 @@ uint8 decompressed_32x32x24[] =
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
uint8 compressed_16x1x32[] =
BYTE compressed_16x1x32[] =
{
0x10, 0x01, 0x01, 0x01, 0x01
};
uint8 decompressed_16x1x32[] =
BYTE decompressed_16x1x32[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -688,7 +688,7 @@ uint8 decompressed_16x1x32[] =
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8 compressed_32x32x32[] =
BYTE compressed_32x32x32[] =
{
0x10, 0x02, 0x02, 0x0a, 0xbb, 0x22, 0x8e, 0xf6, 0xb9, 0x91, 0x91, 0xa9, 0xf5, 0xaa, 0x3c, 0x00,
0x08, 0xf9, 0x5e, 0xd1, 0x59, 0x8f, 0xf7, 0xb8, 0x90, 0x90, 0xa8, 0xf4, 0xab, 0x59, 0xa3, 0x8c,
@ -866,7 +866,7 @@ uint8 compressed_32x32x32[] =
0xcf, 0xb5, 0xb3, 0xc7, 0xd3, 0xc1, 0x85, 0x31, 0x03, 0x00
};
uint8 decompressed_32x32x32[] =
BYTE decompressed_32x32x32[] =
{
0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00,
0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00,
@ -1149,14 +1149,14 @@ void test_bitmap(void)
{
struct btest
{
uint8 decompressed_16x1x8[16 * 1 * 1];
uint8 decompressed_32x32x8[32 * 32 * 1];
uint8 decompressed_16x1x16[16 * 1 * 2];
uint8 decompressed_32x32x16[32 * 32 * 2];
uint8 decompressed_16x1x24[16 * 1 * 3];
uint8 decompressed_32x32x24[32 * 32 * 3];
uint8 decompressed_16x1x32[16 * 1 * 4];
uint8 decompressed_32x32x32[32 * 32 * 4];
BYTE decompressed_16x1x8[16 * 1 * 1];
BYTE decompressed_32x32x8[32 * 32 * 1];
BYTE decompressed_16x1x16[16 * 1 * 2];
BYTE decompressed_32x32x16[32 * 32 * 2];
BYTE decompressed_16x1x24[16 * 1 * 3];
BYTE decompressed_32x32x24[32 * 32 * 3];
BYTE decompressed_16x1x32[16 * 1 * 4];
BYTE decompressed_32x32x32[32 * 32 * 4];
};
struct btest* t;
int width;

View File

@ -51,18 +51,18 @@ int add_cliprdr_suite(void)
return 0;
}
static const uint8 test_clip_caps_data[] =
static const BYTE test_clip_caps_data[] =
{
"\x07\x00\x00\x00\x10\x00\x00\x00\x01\x00\x00\x00\x01\x00\x0C\x00"
"\x02\x00\x00\x00\x0E\x00\x00\x00"
};
static const uint8 test_monitor_ready_data[] =
static const BYTE test_monitor_ready_data[] =
{
"\x01\x00\x00\x00\x00\x00\x00\x00"
};
static const uint8 test_format_list_data[] =
static const BYTE test_format_list_data[] =
{
"\x02\x00\x00\x00\x48\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
@ -71,23 +71,23 @@ static const uint8 test_format_list_data[] =
"\x6D\x00\x61\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
};
static const uint8 test_format_list_response_data[] =
static const BYTE test_format_list_response_data[] =
{
"\x03\x00\x01\x00\x00\x00\x00\x00"
};
static const uint8 test_data_request_data[] =
static const BYTE test_data_request_data[] =
{
"\x04\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00"
};
static const uint8 test_data_response_data[] =
static const BYTE test_data_response_data[] =
{
"\x05\x00\x01\x00\x18\x00\x00\x00\x68\x00\x65\x00\x6C\x00\x6C\x00"
"\x6F\x00\x20\x00\x77\x00\x6F\x00\x72\x00\x6c\x00\x64\x00\x00\x00"
};
static int test_rdp_channel_data(freerdp* instance, int chan_id, uint8* data, int data_size)
static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int data_size)
{
printf("chan_id %d data_size %d\n", chan_id, data_size);
freerdp_hexdump(data, data_size);
@ -199,7 +199,7 @@ void test_cliprdr(void)
/* UI sends data response event to cliprdr */
event = freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_DATA_RESPONSE, event_process_callback, NULL);
data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*)event;
data_response_event->data = (uint8*)malloc(6);
data_response_event->data = (BYTE*)malloc(6);
strcpy((char*)data_response_event->data, "hello");
data_response_event->size = 6;
event_processed = 0;

View File

@ -83,7 +83,7 @@ void test_color_GetRGB_565(void)
*/
int r, g, b;
uint16 rgb16 = 0xAE7D;
UINT16 rgb16 = 0xAE7D;
GetRGB_565(r, g, b, rgb16);
CU_ASSERT(r == 0x15);
@ -103,7 +103,7 @@ void test_color_GetRGB16(void)
*/
int r, g, b;
uint16 rgb16 = 0xAE7D;
UINT16 rgb16 = 0xAE7D;
GetRGB16(r, g, b, rgb16);
CU_ASSERT(r == 0xAD);
@ -122,7 +122,7 @@ void test_color_GetBGR_565(void)
*/
int r, g, b;
uint16 bgr16 = 0xEE75;
UINT16 bgr16 = 0xEE75;
GetBGR_565(r, g, b, bgr16);
CU_ASSERT(r == 0x15);
@ -142,7 +142,7 @@ void test_color_GetBGR16(void)
*/
int r, g, b;
uint16 bgr16 = 0xEE75;
UINT16 bgr16 = 0xEE75;
GetBGR16(r, g, b, bgr16);
CU_ASSERT(r == 0xAD);

View File

@ -50,14 +50,14 @@ int add_drdynvc_suite(void)
return 0;
}
static const uint8 test_capability_request_data[] =
static const BYTE test_capability_request_data[] =
{
"\x58\x00\x02\x00\x33\x33\x11\x11\x3D\x0A\xA7\x04"
};
static int data_received = 0;
static int test_rdp_channel_data(freerdp* instance, int chan_id, uint8* data, int data_size)
static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int data_size)
{
printf("chan_id %d data_size %d\n", chan_id, data_size);
freerdp_hexdump(data, data_size);

View File

@ -63,11 +63,11 @@ void dump_data(unsigned char * p, int len, int width, char* name)
printf("\n");
}
void assert_stream(STREAM* s, uint8* data, int length, const char* func, int line)
void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line)
{
int i;
int actual_length;
uint8* actual_data;
BYTE* actual_data;
actual_data = s->data;
actual_length = stream_get_length(s);

View File

@ -38,6 +38,6 @@
}
void dump_data(unsigned char * p, int len, int width, char* name);
void assert_stream(STREAM* s, uint8* data, int length, const char* func, int line);
void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line);
#define ASSERT_STREAM(_s, _data, _length) assert_stream(_s, _data, _length, __FUNCTION__, __LINE__)

View File

@ -48,7 +48,7 @@ int add_gcc_suite(void)
return 0;
}
uint8 gcc_user_data[284] =
BYTE gcc_user_data[284] =
"\x01\xc0\xd8\x00\x04\x00\x08\x00\x00\x05\x00\x04\x01\xCA\x03\xAA"
"\x09\x04\x00\x00\xCE\x0E\x00\x00\x45\x00\x4c\x00\x54\x00\x4f\x00"
"\x4e\x00\x53\x00\x2d\x00\x44\x00\x45\x00\x56\x00\x32\x00\x00\x00"
@ -68,7 +68,7 @@ uint8 gcc_user_data[284] =
"\x00\x00\x80\x80\x63\x6c\x69\x70\x72\x64\x72\x00\x00\x00\xA0\xC0"
"\x72\x64\x70\x73\x6e\x64\x00\x00\x00\x00\x00\xc0";
uint8 gcc_conference_create_request_expected[307] =
BYTE gcc_conference_create_request_expected[307] =
"\x00\x05\x00\x14\x7C\x00\x01\x81\x2A\x00\x08\x00\x10\x00\x01\xC0"
"\x00\x44\x75\x63\x61\x81\x1c\x01\xc0\xd8\x00\x04\x00\x08\x00\x00"
"\x05\x00\x04\x01\xCA\x03\xAA\x09\x04\x00\x00\xCE\x0E\x00\x00\x45"
@ -102,10 +102,10 @@ void test_gcc_write_conference_create_request(void)
s = stream_new(sizeof(gcc_conference_create_request_expected));
gcc_write_conference_create_request(s, &user_data);
ASSERT_STREAM(s, (uint8*) gcc_conference_create_request_expected, sizeof(gcc_conference_create_request_expected));
ASSERT_STREAM(s, (BYTE*) gcc_conference_create_request_expected, sizeof(gcc_conference_create_request_expected));
}
uint8 gcc_client_core_data_expected[216] =
BYTE gcc_client_core_data_expected[216] =
"\x01\xc0\xd8\x00\x04\x00\x08\x00\x00\x05\x00\x04\x01\xCA\x03\xAA"
"\x09\x04\x00\x00\xCE\x0E\x00\x00\x45\x00\x4c\x00\x54\x00\x4f\x00"
"\x4e\x00\x53\x00\x2d\x00\x44\x00\x45\x00\x56\x00\x32\x00\x00\x00"
@ -142,10 +142,10 @@ void test_gcc_write_client_core_data(void)
gcc_write_client_core_data(s, settings);
ASSERT_STREAM(s, (uint8*) gcc_client_core_data_expected, sizeof(gcc_client_core_data_expected));
ASSERT_STREAM(s, (BYTE*) gcc_client_core_data_expected, sizeof(gcc_client_core_data_expected));
}
uint8 gcc_client_security_data_expected[12] =
BYTE gcc_client_security_data_expected[12] =
"\x02\xC0\x0C\x00\x1B\x00\x00\x00\x00\x00\x00\x00";
void test_gcc_write_client_security_data(void)
@ -165,10 +165,10 @@ void test_gcc_write_client_security_data(void)
gcc_write_client_security_data(s, settings);
ASSERT_STREAM(s, (uint8*) gcc_client_security_data_expected, sizeof(gcc_client_security_data_expected));
ASSERT_STREAM(s, (BYTE*) gcc_client_security_data_expected, sizeof(gcc_client_security_data_expected));
}
uint8 gcc_client_cluster_data_expected[12] =
BYTE gcc_client_cluster_data_expected[12] =
"\x04\xC0\x0C\x00\x0D\x00\x00\x00\x00\x00\x00\x00";
void test_gcc_write_client_cluster_data(void)
@ -181,10 +181,10 @@ void test_gcc_write_client_cluster_data(void)
gcc_write_client_cluster_data(s, settings);
ASSERT_STREAM(s, (uint8*) gcc_client_cluster_data_expected, sizeof(gcc_client_cluster_data_expected));
ASSERT_STREAM(s, (BYTE*) gcc_client_cluster_data_expected, sizeof(gcc_client_cluster_data_expected));
}
uint8 gcc_client_network_data_expected[44] =
BYTE gcc_client_network_data_expected[44] =
"\x03\xC0\x2C\x00\x03\x00\x00\x00\x72\x64\x70\x64\x72\x00\x00\x00"
"\x00\x00\x80\x80\x63\x6c\x69\x70\x72\x64\x72\x00\x00\x00\xA0\xC0"
"\x72\x64\x70\x73\x6e\x64\x00\x00\x00\x00\x00\xc0";
@ -211,5 +211,5 @@ void test_gcc_write_client_network_data(void)
gcc_write_client_network_data(s, settings);
ASSERT_STREAM(s, (uint8*) gcc_client_network_data_expected, sizeof(gcc_client_network_data_expected));
ASSERT_STREAM(s, (BYTE*) gcc_client_network_data_expected, sizeof(gcc_client_network_data_expected));
}

View File

@ -1162,7 +1162,7 @@ unsigned char polygon_case_2[256] =
int CompareBitmaps(HGDI_BITMAP hBmp1, HGDI_BITMAP hBmp2)
{
int x, y;
uint8 *p1, *p2;
BYTE *p1, *p2;
int minw = (hBmp1->width < hBmp2->width) ? hBmp1->width : hBmp2->width;
int minh = (hBmp1->height < hBmp2->height) ? hBmp1->height : hBmp2->height;
@ -1285,13 +1285,13 @@ void test_gdi_CreateBitmap(void)
int bpp;
int width;
int height;
uint8* data;
BYTE* data;
HGDI_BITMAP hBitmap;
bpp = 32;
width = 32;
height = 16;
data = (uint8*) malloc(width * height * 4);
data = (BYTE*) malloc(width * height * 4);
hBitmap = gdi_CreateBitmap(width, height, bpp, data);
CU_ASSERT(hBitmap->objectType == GDIOBJECT_BITMAP);
@ -1481,7 +1481,7 @@ void test_gdi_LineTo(void)
{
HGDI_DC hdc;
HGDI_PEN pen;
uint8* data;
BYTE* data;
HGDI_BITMAP hBmp;
HGDI_BITMAP hBmp_LineTo_1;
HGDI_BITMAP hBmp_LineTo_2;
@ -1533,88 +1533,88 @@ void test_gdi_LineTo(void)
clrconv->invert = 0;
clrconv->palette = hPalette;
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_4, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_4, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_4 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_6, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_6, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_6 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_7, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_7, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_7 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_8, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_8, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_8 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_9, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_9, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_9 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_10, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_10, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_10 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_11, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_11, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_11 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_BLACK, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_BLACK, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_BLACK = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTMERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTMERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOTMERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKNOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKNOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MASKNOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTCOPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTCOPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOTCOPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MASKPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_XORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_XORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_XORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTMASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTMASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOTMASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTXORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTXORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOTXORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOP, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOP, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOP = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGENOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGENOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MERGENOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_COPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_COPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_COPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGEPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGEPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MERGEPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_WHITE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_WHITE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_WHITE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
/* Test Case 1: (0,0) -> (15, 15) */
@ -1823,7 +1823,7 @@ void test_gdi_Ellipse(void)
{
HGDI_DC hdc;
HGDI_PEN pen;
uint8* data;
BYTE* data;
HGDI_BITMAP hBmp;
HGDI_BITMAP hBmp_Ellipse_1;
HGDI_BITMAP hBmp_Ellipse_2;
@ -1851,13 +1851,13 @@ void test_gdi_Ellipse(void)
clrconv->invert = 0;
clrconv->palette = hPalette;
data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_Ellipse_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_Ellipse_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_Ellipse_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
/* Test Case 1: (0,0) -> (16, 16) */
@ -1964,7 +1964,7 @@ void test_gdi_FillRect(void)
void test_gdi_BitBlt_32bpp(void)
{
uint8* data;
BYTE* data;
HGDI_DC hdcSrc;
HGDI_DC hdcDst;
HGDI_BRUSH hBrush;
@ -2009,64 +2009,64 @@ void test_gdi_BitBlt_32bpp(void)
clrconv->invert = 0;
clrconv->palette = hPalette;
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
@ -2218,7 +2218,7 @@ void test_gdi_BitBlt_32bpp(void)
void test_gdi_BitBlt_16bpp(void)
{
uint8* data;
BYTE* data;
HGDI_DC hdcSrc;
HGDI_DC hdcDst;
HGDI_BRUSH hBrush;
@ -2263,64 +2263,64 @@ void test_gdi_BitBlt_16bpp(void)
clrconv->invert = 0;
clrconv->palette = hPalette;
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
@ -2472,7 +2472,7 @@ void test_gdi_BitBlt_16bpp(void)
void test_gdi_BitBlt_8bpp(void)
{
uint8* data;
BYTE* data;
HGDI_DC hdcSrc;
HGDI_DC hdcDst;
HGDI_BRUSH hBrush;
@ -2517,64 +2517,64 @@ void test_gdi_BitBlt_8bpp(void)
clrconv->invert = 0;
clrconv->palette = hPalette;
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);

Some files were not shown because too many files have changed in this diff Show More