Index: drivers/directx/dxg/dxg_int.h =================================================================== --- drivers/directx/dxg/dxg_int.h (revision 43196) +++ drivers/directx/dxg/dxg_int.h (working copy) @@ -20,6 +20,8 @@ #include #include +#include + /* DXG treats this as opaque */ typedef PVOID PDC; typedef PVOID PW32THREAD; @@ -95,6 +97,7 @@ DWORD NTAPI DxDdIoctl(ULONG ulIoctl, PVOID pBuffer, ULONG ulBufferSize); PDD_SURFACE_LOCAL NTAPI DxDdLockDirectDrawSurface(HANDLE hDdSurface); BOOL NTAPI DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface); +BOOL NTAPI DxDdEnableDirectDraw(PPDEVOBJ ppdevobj, BOOL unknown); /* Internal functions */ BOOL FASTCALL VerifyObjectOwner(PDD_ENTRY pEntry); Index: drivers/directx/dxg/eng.c =================================================================== --- drivers/directx/dxg/eng.c (revision 43196) +++ drivers/directx/dxg/eng.c (working copy) @@ -9,9 +9,14 @@ */ -#include +#include "dxg_int.h" +#define NDEBUG +#include +#define TAG_EDDGBL 'GDDE' + + PDD_SURFACE_LOCAL NTAPI DxDdLockDirectDrawSurface(HANDLE hDdSurface) @@ -46,9 +51,73 @@ } +BOOL +NTAPI +DxDdEnableDirectDraw(PPDEVOBJ ppdevobj, BOOL unknown) +{ + PEDD_DIRECTDRAW_GLOBAL pEDDgpl = ppdevobj->pEDDgpl ; + PFN_DrvEnableDirectDraw pEnableDirectDraw = NULL ; + PFN_DrvGetDirectDrawInfo pGetDirectDrawInfo = NULL ; + PFN_DrvDisableDirectDraw pDisableDirectDraw = NULL ; + /*Some Checks*/ + if(!pEDDgpl->ddCallbacks.dwSize < sizeof(DD_CALLBACKS)) + return FALSE ; + if(!pEDDgpl->ddSurfaceCallbacks.dwSize < sizeof(DD_SURFACECALLBACKS)) + return FALSE ; + if(!pEDDgpl->ddPaletteCallbacks.dwSize < sizeof(DD_PALETTECALLBACKS)) + return FALSE ; + if(!pEDDgpl->ddHalInfo.dwSize < sizeof(DD_HALINFO)) + return FALSE ; + /*Initialize callbacks*/ + pEnableDirectDraw = ppdevobj->DriverFunctions.EnableDirectDraw ; + pDisableDirectDraw = ppdevobj->DriverFunctions.DisableDirectDraw ; + if(!pEnableDirectDraw || !pDisableDirectDraw) + { + /*This should really not happen*/ + DPRINT1("No EnableDirectDraw or DisableDirectDraw callbacks... OUCH!\n") ; + return FALSE ; + } + if(!pEnableDirectDraw(ppdevobj->dhpdev, + &pEDDgpl->ddCallbacks, + &pEDDgpl->ddSurfaceCallbacks, + &pEDDgpl->ddPaletteCallbacks)) + { + DPRINT1("Driver's EnableDirectDraw FAILED!!!\n") ; + return FALSE ; + } + pGetDirectDrawInfo = ppdevobj->DriverFunctions.GetDirectDrawInfo ; + /* Retrieve information */ + if(!pGetDirectDrawInfo || !pGetDirectDrawInfo(ppdevobj->dhpdev, + &pEDDgpl->ddHalInfo, + &pEDDgpl->dwNumHeaps, + NULL, + &pEDDgpl->dwNumFourCC, + NULL)) + { + DPRINT1("Wrong call to GetDirectDrawInfo?\n") ; + pDisableDirectDraw(ppdevobj->dhpdev) ; + return FALSE ; + } + pEDDgpl->pvmList = ExAllocatePoolWithTag(PagedPool, pEDDgpl->dwNumHeaps*sizeof(VIDEOMEMORY), TAG_EDDGBL) ; + pEDDgpl->pdwFourCC = ExAllocatePoolWithTag(PagedPool, pEDDgpl->dwNumFourCC*sizeof(DWORD), TAG_EDDGBL) ; + if(!pEDDgpl->pvmList || !pEDDgpl->pdwFourCC) { + DPRINT1("Failed to allocate memory!!\n"); + pDisableDirectDraw(ppdevobj->dhpdev) ; + return FALSE ; + } - - - + if(!pGetDirectDrawInfo(ppdevobj->dhpdev, + &pEDDgpl->ddHalInfo, + &pEDDgpl->dwNumHeaps, + pEDDgpl->pvmList, + &pEDDgpl->dwNumFourCC, + pEDDgpl->pdwFourCC)) + { + DPRINT1("Uh? Second call to GetDirectDrawInfo failed...\n") ; + pDisableDirectDraw(ppdevobj->dhpdev) ; + return FALSE ; + } + return TRUE; +} Index: drivers/directx/dxg/main.c =================================================================== --- drivers/directx/dxg/main.c (revision 43196) +++ drivers/directx/dxg/main.c (working copy) @@ -10,8 +10,107 @@ #include -#include "dxg_driver.h" + + +DRVFN gaDxgFuncs [] = +{ + {DXG_INDEX_DxDxgGenericThunk, (PFN)DxDxgGenericThunk}, + {DXG_INDEX_DxD3dContextCreate, (PFN)NULL}, + {DXG_INDEX_DxD3dContextDestroy, (PFN)NULL}, + {DXG_INDEX_DxD3dContextDestroyAll, (PFN)NULL}, + {DXG_INDEX_DxD3dValidateTextureStageState, (PFN)NULL}, + {DXG_INDEX_DxD3dDrawPrimitives2, (PFN)NULL}, + {DXG_INDEX_DxDdGetDriverState, (PFN)NULL}, + {DXG_INDEX_DxDdAddAttachedSurface, (PFN)NULL}, + {DXG_INDEX_DxDdAlphaBlt, (PFN)NULL}, + {DXG_INDEX_DxDdAttachSurface, (PFN)NULL}, + {DXG_INDEX_DxDdBeginMoCompFrame, (PFN)NULL}, + {DXG_INDEX_DxDdBlt, (PFN)NULL}, + {DXG_INDEX_DxDdCanCreateSurface, (PFN)NULL}, + {DXG_INDEX_DxDdCanCreateD3DBuffer, (PFN)NULL}, + {DXG_INDEX_DxDdColorControl, (PFN)NULL}, + {DXG_INDEX_DxDdCreateDirectDrawObject, (PFN)NULL}, + {DXG_INDEX_DxDdCreateSurface, (PFN)NULL}, + {DXG_INDEX_DxDdCreateD3DBuffer, (PFN)NULL}, + {DXG_INDEX_DxDdCreateMoComp, (PFN)NULL}, + {DXG_INDEX_DxDdCreateSurfaceObject, (PFN)NULL}, + {DXG_INDEX_DxDdDeleteDirectDrawObject, (PFN)NULL}, + {DXG_INDEX_DxDdDeleteSurfaceObject, (PFN)NULL}, + {DXG_INDEX_DxDdDestroyMoComp, (PFN)NULL}, + {DXG_INDEX_DxDdDestroySurface, (PFN)NULL}, + {DXG_INDEX_DxDdDestroyD3DBuffer, (PFN)NULL}, + {DXG_INDEX_DxDdEndMoCompFrame, (PFN)NULL}, + {DXG_INDEX_DxDdFlip, (PFN)NULL}, + {DXG_INDEX_DxDdFlipToGDISurface, (PFN)NULL}, + {DXG_INDEX_DxDdGetAvailDriverMemory, (PFN)NULL}, + {DXG_INDEX_DxDdGetBltStatus, (PFN)NULL}, + {DXG_INDEX_DxDdGetDC, (PFN)NULL}, + {DXG_INDEX_DxDdGetDriverInfo, (PFN)NULL}, + {DXG_INDEX_DxDdGetDxHandle, (PFN)NULL}, + {DXG_INDEX_DxDdGetFlipStatus, (PFN)NULL}, + {DXG_INDEX_DxDdGetInternalMoCompInfo, (PFN)NULL}, + {DXG_INDEX_DxDdGetMoCompBuffInfo, (PFN)NULL}, + {DXG_INDEX_DxDdGetMoCompGuids, (PFN)NULL}, + {DXG_INDEX_DxDdGetMoCompFormats, (PFN)NULL}, + {DXG_INDEX_DxDdGetScanLine, (PFN)NULL}, + {DXG_INDEX_DxDdLock, (PFN)NULL}, + {DXG_INDEX_DxDdLockD3D, (PFN)NULL}, + {DXG_INDEX_DxDdQueryDirectDrawObject, (PFN)NULL}, + {DXG_INDEX_DxDdQueryMoCompStatus, (PFN)NULL}, + {DXG_INDEX_DxDdReenableDirectDrawObject, (PFN)NULL}, + {DXG_INDEX_DxDdReleaseDC, (PFN)NULL}, + {DXG_INDEX_DxDdRenderMoComp, (PFN)NULL}, + {DXG_INDEX_DxDdResetVisrgn, (PFN)NULL}, + {DXG_INDEX_DxDdSetColorKey, (PFN)NULL}, + {DXG_INDEX_DxDdSetExclusiveMode, (PFN)NULL}, + {DXG_INDEX_DxDdSetGammaRamp, (PFN)NULL}, + {DXG_INDEX_DxDdCreateSurfaceEx, (PFN)NULL}, + {DXG_INDEX_DxDdSetOverlayPosition, (PFN)NULL}, + {DXG_INDEX_DxDdUnattachSurface, (PFN)NULL}, + {DXG_INDEX_DxDdUnlock, (PFN)NULL}, + {DXG_INDEX_DxDdUnlockD3D, (PFN)NULL}, + {DXG_INDEX_DxDdUpdateOverlay, (PFN)NULL}, + {DXG_INDEX_DxDdWaitForVerticalBlank, (PFN)NULL}, + {DXG_INDEX_DxDvpCanCreateVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpColorControl, (PFN)NULL}, + {DXG_INDEX_DxDvpCreateVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpDestroyVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpFlipVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortBandwidth, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortField, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortFlipStatus, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortInputFormats, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortLine, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortOutputFormats, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortConnectInfo, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoSignalStatus, (PFN)NULL}, + {DXG_INDEX_DxDvpUpdateVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpWaitForVideoPortSync, (PFN)NULL}, + {DXG_INDEX_DxDvpAcquireNotification, (PFN)NULL}, + {DXG_INDEX_DxDvpReleaseNotification, (PFN)NULL}, + {DXG_INDEX_DxDdHeapVidMemAllocAligned, (PFN)NULL}, + {DXG_INDEX_DxDdHeapVidMemFree, (PFN)NULL}, + {DXG_INDEX_DxDdEnableDirectDraw, (PFN)DxDdEnableDirectDraw}, + {DXG_INDEX_DxDdDisableDirectDraw, (PFN)NULL}, + {DXG_INDEX_DxDdSuspendDirectDraw, (PFN)NULL}, + {DXG_INDEX_DxDdResumeDirectDraw, (PFN)NULL}, + {DXG_INDEX_DxDdDynamicModeChange, (PFN)NULL}, + {DXG_INDEX_DxDdCloseProcess, (PFN)NULL}, + {DXG_INDEX_DxDdGetDirectDrawBound, (PFN)NULL}, + {DXG_INDEX_DxDdEnableDirectDrawRedirection, (PFN)NULL}, + {DXG_INDEX_DxDdAllocPrivateUserMem, (PFN)NULL}, + {DXG_INDEX_DxDdFreePrivateUserMem, (PFN)NULL}, + {DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface}, + {DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface}, + {DXG_INDEX_DxDdSetAccelLevel, (PFN)NULL}, + {DXG_INDEX_DxDdGetSurfaceLock, (PFN)NULL}, + {DXG_INDEX_DxDdEnumLockedSurfaceRect, (PFN)NULL}, + {DXG_INDEX_DxDdIoctl, (PFN)DxDdIoctl} + +}; + + LONG gcDummyPageRefCnt = 0; HSEMAPHORE ghsemDummyPage = NULL; VOID *gpDummyPage = NULL; Index: include/reactos/win32k/ntgdityp.h =================================================================== --- include/reactos/win32k/ntgdityp.h (revision 43196) +++ include/reactos/win32k/ntgdityp.h (working copy) @@ -545,7 +545,7 @@ // typedef struct _DRIVER_FUNCTIONS { - PFN_DrvEnablePDEV EnablePDEV; + PFN_DrvEnablePDEV EnablePDEV; PFN_DrvCompletePDEV CompletePDEV; PFN_DrvDisablePDEV DisablePDEV; PFN_DrvEnableSurface EnableSurface; @@ -581,10 +581,10 @@ PFN_DrvStartPage StartPage; PFN_DrvEndDoc EndDoc; PFN_DrvStartDoc StartDoc; - PVOID Unknown3; + PVOID Unknown3; PFN_DrvGetGlyphMode GetGlyphMode; PFN_DrvSynchronize Synchronize; - PVOID Unknown4; + PVOID Unknown4; PFN_DrvSaveScreenBits SaveScreenBits; PFN_DrvGetModes GetModes; PFN_DrvFree Free; @@ -638,7 +638,7 @@ PVOID Reserved9; PVOID Reserved10; PVOID Reserved11; /* 92 */ - + /* ReactOS specify */ PFN_DrvEnableDriver EnableDriver; //ReactOS Extra } DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS; @@ -731,4 +731,15 @@ ASSERT_PFN(Notify); ASSERT_PFN(SynchronizeSurface); +/* Every GDI Object must have this standard type of header. + * It's for thread locking. */ +typedef struct _BASEOBJECT +{ + HGDIOBJ hHmgr; + ULONG ulShareCount; + USHORT cExclusiveLock; + USHORT BaseFlags; + struct _THREADINFO *Tid; +} BASEOBJECT, *POBJ; + #endif Index: include/reactos/win32k/pdevobj.h =================================================================== --- include/reactos/win32k/pdevobj.h (revision 0) +++ include/reactos/win32k/pdevobj.h (revision 0) @@ -0,0 +1,148 @@ +#ifndef __WIN32K_PDEVOBJ_H +#define __WIN32K_PDEVOBJ_H + +#include + +/* PDEVOBJ flags */ +#define PDEV_DISPLAY 0x00000001 /* Display device */ +#define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */ +#define PDEV_SOFTWARE_POINTER 0x00000004 +#define PDEV_GOTFONTS 0x00000040 /* Has font driver */ +#define PDEV_PRINTER 0x00000080 +#define PDEV_ALLOCATEDBRUSHES 0x00000100 +#define PDEV_HTPAL_IS_DEVPAL 0x00000200 +#define PDEV_DISABLED 0x00000400 +#define PDEV_SYNCHRONIZE_ENABLED 0x00000800 +#define PDEV_FONTDRIVER 0x00002000 /* Font device */ +#define PDEV_GAMMARAMP_TABLE 0x00004000 +#define PDEV_UMPD 0x00008000 +#define PDEV_SHARED_DEVLOCK 0x00010000 +#define PDEV_META_DEVICE 0x00020000 +#define PDEV_DRIVER_PUNTED_CALL 0x00040000 /* Driver calls back to GDI engine */ +#define PDEV_CLONE_DEVICE 0x00080000 + +/* Type definitions ***********************************************************/ + +typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */ +{ + /* private GDI pointer handling information, required for software emulation */ + BOOL Enabled; + SIZEL Size; + POINTL HotSpot; + XLATEOBJ *XlateObject; + struct _SURFACE *psurfColor; + struct _SURFACE *psurfMask; + struct _SURFACE *psurfSave; + int ShowPointer; /* counter negtive do not show the mouse postive show the mouse */ + + /* public pointer information */ + RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */ +} GDIPOINTER, *PGDIPOINTER; + +typedef struct _GRAPHICS_DEVICE +{ + WCHAR szNtDeviceName[CCHDEVICENAME/2]; + WCHAR szWinDeviceName[CCHDEVICENAME/2]; + struct _GRAPHICS_DEVICE * pNextGraphicsDevice; + struct _GRAPHICS_DEVICE * pVgaDevice; + PDEVICE_OBJECT DeviceObject; + PVOID pDeviceHandle; + DWORD hkClassDriverConfig; + DWORD StateFlags; /* See DISPLAY_DEVICE_* */ + ULONG cbdevmodeInfo; + PVOID devmodeInfo; + DWORD cbdevmodeInfo1; + PVOID devmodeInfo1; + LPWSTR pwszDeviceNames; + LPWSTR pwszDescription; + DWORD dwUnknown; + PVOID pUnknown; + PFILE_OBJECT FileObject; + DWORD ProtocolType; +} GRAPHICS_DEVICE, *PGRAPHICS_DEVICE; + +typedef struct _PDEVOBJ +{ + BASEOBJECT BaseObject; + + struct _PDEVOBJ * ppdevNext; + INT cPdevRefs; + INT cPdevOpenRefs; + struct _PDEVOBJ * ppdevParent; + FLONG flFlags; // flags +// FLONG flAccelerated; + HSEMAPHORE hsemDevLock; /* Device lock. */ +// HSEMAPHORE hsemPointer; + POINTL ptlPointer; +// SIZEL szlPointer; +// SPRITESTATE SpriteState; +// HFONT hlfntDefault; +// HFONT hlfntAnsiVariable; +// HFONT hlfntAnsiFixed; + HSURF ahsurf[HS_DDI_MAX]; +// PUNICODE_STRING pusPrtDataFileName; +// PVOID pDevHTInfo; +// RFONT * prfntActive; +// RFONT * prfntInactive; +// ULONG cInactive; +// BYTE ajbo[0x5C]; +// ULONG cDirectDrawDisableLocks; +// PVOID TypeOneInfo; + PVOID pvGammaRamp; /* Gamma ramp pointer. */ +// PVOID RemoteTypeOne; +// ULONG ulHorzRes; +// ULONG ulVertRes; +// PFN_DrvSetPointerShape pfnDrvSetPointerShape; +// PFN_DrvMovePointer pfnDrvMovePointer; + PFN_DrvMovePointer pfnMovePointer; +// PFN_DrvSynchronize pfnDrvSynchronize; +// PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface; +// PFN_DrvSetPalette pfnDrvSetPalette; +// PFN_DrvNotify pfnDrvNotify; +// ULONG TagSig; +// PLDEVOBJ pldev; + DHPDEV dhpdev; /* DHPDEV for device. */ + PVOID ppalSurf; /* PEPALOBJ/PPALETTE for this device. */ + DEVINFO devinfo; + GDIINFO gdiinfo; + HSURF pSurface; /* SURFACE for this device., FIXME: PSURFACE */ +// HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */ +// PVOID pDesktopId; + PGRAPHICS_DEVICE pGraphicsDevice; +// POINTL ptlOrigion; + PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */ +// DWORD Unknown3; + FLONG DxDd_Flags; /* DxDD active status flags. */ +// LONG devAttr; +// PVOID WatchDogContext; +// ULONG WatchDogs; + union + { + DRIVER_FUNCTIONS DriverFunctions; + PVOID apfn[INDEX_LAST]; // B8C 0x0598 + }; + + /* ros specific */ + ULONG DxDd_nCount; + ULONG DisplayNumber; + DEVMODEW DMW; + PFILE_OBJECT VideoFileObject; + BOOLEAN PreparedDriver; + GDIPOINTER Pointer; + /* Stuff to keep track of software cursors; win32k gdi part */ + UINT SafetyRemoveLevel; /* at what level was the cursor removed? + 0 for not removed */ + UINT SafetyRemoveCount; + struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl; +} PDEVOBJ, *PPDEVOBJ; + +/* PDEV and EDDX extra data container.*/ +/*typedef struct _PDEVEDD +{ + PDEVOBJ pdevobj; + EDD_DIRECTDRAW_GLOBAL EDDgpl; +} PDEVEDD, *PPDEVEDD;*/ + +extern ULONG gdwDirectDrawContext; + +#endif /* !__WIN32K_PDEVOBJ_H */ Index: subsystems/win32/win32k/include/dc.h =================================================================== --- subsystems/win32/win32k/include/dc.h (revision 43196) +++ subsystems/win32/win32k/include/dc.h (working copy) @@ -3,9 +3,10 @@ typedef struct _DC *PDC; +#include + #include "brush.h" #include "bitmaps.h" -#include "pdevobj.h" #include "palette.h" /* Constants ******************************************************************/ Index: subsystems/win32/win32k/include/gdiobj.h =================================================================== --- subsystems/win32/win32k/include/gdiobj.h (revision 43196) +++ subsystems/win32/win32k/include/gdiobj.h (working copy) @@ -36,17 +36,6 @@ typedef BOOL (INTERNAL_CALL *GDICLEANUPPROC)(PVOID ObjectBody); -/* Every GDI Object must have this standard type of header. - * It's for thread locking. */ -typedef struct _BASEOBJECT -{ - HGDIOBJ hHmgr; - ULONG ulShareCount; - USHORT cExclusiveLock; - USHORT BaseFlags; - PTHREADINFO Tid; -} BASEOBJECT, *POBJ; - typedef struct _CLIENTOBJ { BASEOBJECT BaseObject; @@ -87,7 +76,7 @@ BOOL FASTCALL IntGdiSetDCOwnerEx( HDC, DWORD, BOOL); /*! - * Release GDI object. Every object locked by GDIOBJ_LockObj() must be unlocked. + * Release GDI object. Every object locked by GDIOBJ_LockObj() must be unlocked. * You should unlock the object * as soon as you don't need to have access to it's data. Index: subsystems/win32/win32k/include/win32k.h =================================================================== --- subsystems/win32/win32k/include/win32k.h (revision 43196) +++ subsystems/win32/win32k/include/win32k.h (working copy) @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include Index: subsystems/win32/win32k/ntddraw/ddraw.c =================================================================== --- subsystems/win32/win32k/ntddraw/ddraw.c (revision 43196) +++ subsystems/win32/win32k/ntddraw/ddraw.c (working copy) @@ -76,6 +76,7 @@ pDev->pEDDgpl->ddCallbacks.dwSize = sizeof(DD_CALLBACKS); pDev->pEDDgpl->ddSurfaceCallbacks.dwSize = sizeof(DD_SURFACECALLBACKS); pDev->pEDDgpl->ddPaletteCallbacks.dwSize = sizeof(DD_PALETTECALLBACKS); + pDev->pEDDgpl->ddHalInfo.dwSize = sizeof(DD_HALINFO) ; pfnDdEnableDirectDraw = (PGD_DXDDENABLEDIRECTDRAW)gpDxFuncs[DXG_INDEX_DxDdEnableDirectDraw].pfn; if (pfnDdEnableDirectDraw == NULL) Index: subsystems/win32/win32k/pch.h =================================================================== --- subsystems/win32/win32k/pch.h (revision 43196) +++ subsystems/win32/win32k/pch.h (working copy) @@ -57,6 +57,7 @@ #include #include #include +#include #include /* Internal Win32K Header */