freerdp: fix offsets in padding

This commit is contained in:
Marc-André Moreau 2011-11-19 11:18:45 -05:00
parent 666fbb0405
commit 300fe32eba
5 changed files with 32 additions and 32 deletions

View File

@ -58,11 +58,11 @@ struct rdp_context
{
freerdp* instance;
freerdp_peer* peer;
uint32 paddingA[16 - 2]; /* offset 16 */
uint32 paddingA[16 - 2]; /* offset 64 */
int argc;
char** argv;
uint32 paddingB[16 - 2]; /* offset 32 */
uint32 paddingB[16 - 2]; /* offset 128 */
rdpRdp* rdp;
rdpGdi* gdi;
@ -70,33 +70,33 @@ struct rdp_context
rdpCache* cache;
rdpChannels* channels;
rdpGraphics* graphics;
uint32 paddingC[32 - 6]; /* offset 64 */
uint32 paddingC[32 - 6]; /* offset 256 */
};
struct rdp_freerdp
{
rdpContext* context;
uint32 paddingA[16 - 1]; /* offset 16 */
uint32 paddingA[16 - 1]; /* offset 64 */
rdpInput* input;
rdpUpdate* update;
rdpSettings* settings;
uint32 paddingB[16 - 3]; /* offset 32 */
uint32 paddingB[16 - 3]; /* offset 128 */
size_t context_size;
pContextNew ContextNew;
pContextFree ContextFree;
uint32 paddingC[16 - 3]; /* offset 48 */
uint32 paddingC[16 - 3]; /* offset 192 */
pPreConnect PreConnect;
pPostConnect PostConnect;
pAuthenticate Authenticate;
pVerifyCertificate VerifyCertificate;
uint32 paddingD[16 - 4]; /* offset 64 */
uint32 paddingD[16 - 4]; /* offset 256 */
pSendChannelData SendChannelData;
pReceiveChannelData ReceiveChannelData;
uint32 paddingE[16 - 2]; /* offset 80 */
uint32 paddingE[16 - 2]; /* offset 320 */
};
FREERDP_API void freerdp_context_new(freerdp* instance);

View File

@ -46,7 +46,7 @@ struct rdp_bitmap
pBitmap_Paint Paint;
pBitmap_Decompress Decompress;
pBitmap_SetSurface SetSurface;
uint32 paddingA[16 - 6]; /* offset 16 */
uint32 paddingA[16 - 6]; /* offset 64 */
uint32 left;
uint32 top;
@ -58,11 +58,11 @@ struct rdp_bitmap
uint32 flags;
uint32 length;
uint8* data;
uint32 paddingB[16 - 10]; /* offset 32 */
uint32 paddingB[16 - 10]; /* offset 128 */
boolean compressed;
boolean ephemeral;
uint32 paddingC[16 - 2]; /* offset 48 */
uint32 paddingC[16 - 2]; /* offset 192 */
};
FREERDP_API rdpBitmap* Bitmap_Alloc(rdpContext* context);
@ -88,7 +88,7 @@ struct rdp_pointer
pPointer_New New;
pPointer_Free Free;
pPointer_Set Set;
uint32 paddingA[16 - 4]; /* offset 16 */
uint32 paddingA[16 - 4]; /* offset 64 */
uint32 xPos;
uint32 yPos;
@ -99,7 +99,7 @@ struct rdp_pointer
uint32 lengthXorMask;
uint8* xorMaskData;
uint8* andMaskData;
uint32 paddingB[16 - 9]; /* offset 32 */
uint32 paddingB[16 - 9]; /* offset 128 */
};
FREERDP_API rdpPointer* Pointer_Alloc(rdpContext* context);
@ -123,7 +123,7 @@ struct rdp_glyph
pGlyph_Draw Draw;
pGlyph_BeginDraw BeginDraw;
pGlyph_EndDraw EndDraw;
uint32 paddingA[16 - 6]; /* offset 16 */
uint32 paddingA[16 - 6]; /* offset 64 */
sint32 x;
sint32 y;
@ -131,7 +131,7 @@ struct rdp_glyph
uint32 cy;
uint32 cb;
uint8* aj;
uint32 paddingB[16 - 6]; /* offset 32 */
uint32 paddingB[16 - 6]; /* offset 128 */
};
FREERDP_API rdpGlyph* Glyph_Alloc(rdpContext* context);
@ -149,7 +149,7 @@ struct rdp_graphics
rdpBitmap* Bitmap_Prototype;
rdpPointer* Pointer_Prototype;
rdpGlyph* Glyph_Prototype;
uint32 paddingA[16 - 4]; /* offset 16 */
uint32 paddingA[16 - 4]; /* offset 64 */
};
FREERDP_API void graphics_register_bitmap(rdpGraphics* graphics, rdpBitmap* bitmap);

View File

@ -62,14 +62,14 @@ struct rdp_input
{
rdpContext* context;
void* param1;
uint32 paddingA[16 - 2]; /* offset 16 */
uint32 paddingA[16 - 2]; /* offset 64 */
pSynchronizeEvent SynchronizeEvent;
pKeyboardEvent KeyboardEvent;
pUnicodeKeyboardEvent UnicodeKeyboardEvent;
pMouseEvent MouseEvent;
pExtendedMouseEvent ExtendedMouseEvent;
uint32 paddingB[16 - 5]; /* offset 32 */
uint32 paddingB[16 - 5]; /* offset 128 */
};
#endif /* __INPUT_API_H */

View File

@ -183,7 +183,7 @@ struct rdp_monitor
struct rdp_settings
{
void* instance;
uint32 paddingA[16 - 1]; /* offset 16 */
uint32 paddingA[16 - 1]; /* offset 64 */
/* Core Protocol Parameters */
uint32 width;
@ -200,7 +200,7 @@ struct rdp_settings
uint32 encryption_method;
uint32 encryption_level;
boolean authentication;
uint32 paddingB[32 - 14]; /* offset 48 */
uint32 paddingB[32 - 14]; /* offset 192 */
/* Connection Settings */
uint32 port;
@ -216,7 +216,7 @@ struct rdp_settings
boolean autologon;
boolean compression;
uint32 performance_flags;
uint32 paddingC[32 - 13]; /* offset 80 */
uint32 paddingC[32 - 13]; /* offset 320 */
/* User Interface Parameters */
boolean sw_gdi;
@ -226,7 +226,7 @@ struct rdp_settings
boolean decorations;
uint32 percent_screen;
boolean mouse_motion;
uint32 paddingD[32 - 7]; /* offset 112 */
uint32 paddingD[32 - 7]; /* offset 448 */
/* Internal Parameters */
char* home_path;
@ -234,7 +234,7 @@ struct rdp_settings
uint32 pdu_source;
UNICONV* uniconv;
boolean server_mode;
uint32 paddingE[32 - 5]; /* offset 144 */
uint32 paddingE[32 - 5]; /* offset 576 */
/* Session */
boolean console_audio;

View File

@ -1141,7 +1141,7 @@ typedef void (*pSurfaceCommand)(rdpUpdate* update, STREAM* s);
struct rdp_update
{
rdpContext* context;
uint32 paddingA[16 - 1];
uint32 paddingA[16 - 1]; /* offset 64 */
pBeginPaint BeginPaint;
pEndPaint EndPaint;
@ -1151,14 +1151,14 @@ struct rdp_update
pBitmapUpdate BitmapUpdate;
pPalette Palette;
pPlaySound PlaySound;
uint32 paddingB[16 - 8];
uint32 paddingB[16 - 8]; /* offset 128 */
pPointerPosition PointerPosition;
pPointerSystem PointerSystem;
pPointerColor PointerColor;
pPointerNew PointerNew;
pPointerCached PointerCached;
uint32 paddingC[16 - 5];
uint32 paddingC[16 - 5]; /* offset 192 */
pDstBlt DstBlt;
pPatBlt PatBlt;
@ -1182,7 +1182,7 @@ struct rdp_update
pPolygonCB PolygonCB;
pEllipseSC EllipseSC;
pEllipseCB EllipseCB;
uint32 paddingD[32 - 22];
uint32 paddingD[32 - 22]; /* offset 320 */
pCacheBitmap CacheBitmap;
pCacheBitmapV2 CacheBitmapV2;
@ -1191,7 +1191,7 @@ struct rdp_update
pCacheGlyph CacheGlyph;
pCacheGlyphV2 CacheGlyphV2;
pCacheBrush CacheBrush;
uint32 paddingE[32 - 7];
uint32 paddingE[32 - 7]; /* offset 448 */
pCreateOffscreenBitmap CreateOffscreenBitmap;
pSwitchSurface SwitchSurface;
@ -1205,7 +1205,7 @@ struct rdp_update
pDrawGdiPlusCacheFirst DrawGdiPlusCacheFirst;
pDrawGdiPlusCacheNext DrawGdiPlusCacheNext;
pDrawGdiPlusCacheEnd DrawGdiPlusCacheEnd;
uint32 paddingF[32 - 12];
uint32 paddingF[32 - 12]; /* offset 576 */
pWindowCreate WindowCreate;
pWindowUpdate WindowUpdate;
@ -1217,15 +1217,15 @@ struct rdp_update
pNotifyIconDelete NotifyIconDelete;
pMonitoredDesktop MonitoredDesktop;
pNonMonitoredDesktop NonMonitoredDesktop;
uint32 paddingG[32 - 10];
uint32 paddingG[32 - 10]; /* offset 704 */
pRefreshRect RefreshRect;
pSuppressOutput SuppressOutput;
uint32 paddingH[16 - 2];
uint32 paddingH[16 - 2]; /* offset 768 */
pSurfaceBits SurfaceBits;
pSurfaceCommand SurfaceCommand;
uint32 paddingI[16 - 2];
uint32 paddingI[16 - 2]; /* offset 832 */
/* everything below is internal, and should not be directly accessed */