2010-01-30 21:12:42 +00:00
|
|
|
|
|
|
|
extern IMAGE_DOS_HEADER __ImageBase;
|
|
|
|
|
2012-07-29 11:20:05 +00:00
|
|
|
static const unsigned GDI_ENGINE_VERSION = DDI_DRIVER_VERSION_NT5_01;
|
2010-01-30 21:12:42 +00:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
LDEV_DEVICE_DISPLAY = 1,
|
|
|
|
LDEV_DEVICE_PRINTER = 2,
|
|
|
|
LDEV_DEVICE_META = 3,
|
|
|
|
LDEV_DEVICE_MIRROR = 4,
|
|
|
|
LDEV_IMAGE = 5,
|
|
|
|
LDEV_FONT = 6,
|
|
|
|
} LDEVTYPE;
|
|
|
|
|
|
|
|
typedef struct _LDEVOBJ
|
|
|
|
{
|
2014-02-09 12:46:19 +00:00
|
|
|
LIST_ENTRY leLink;
|
2010-01-30 21:12:42 +00:00
|
|
|
SYSTEM_GDI_DRIVER_INFORMATION *pGdiDriverInfo;
|
|
|
|
LDEVTYPE ldevtype;
|
|
|
|
ULONG cRefs;
|
|
|
|
ULONG ulDriverVersion;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
PVOID apfn[INDEX_LAST];
|
|
|
|
DRIVER_FUNCTIONS pfn;
|
|
|
|
};
|
|
|
|
|
|
|
|
} LDEVOBJ, *PLDEVOBJ;
|
|
|
|
|
2021-05-11 15:13:14 +00:00
|
|
|
CODE_SEG("INIT")
|
2013-11-11 19:09:53 +00:00
|
|
|
NTSTATUS
|
2010-01-30 21:12:42 +00:00
|
|
|
NTAPI
|
2013-11-11 19:09:53 +00:00
|
|
|
InitLDEVImpl(VOID);
|
2010-01-30 21:12:42 +00:00
|
|
|
|
2022-01-09 08:54:53 +00:00
|
|
|
/* Get all available device modes from a driver
|
|
|
|
* - pwszDriverName: name of the driver
|
|
|
|
* - hDriver: handle of the driver
|
|
|
|
* - ppdm: allocated memory containing driver modes or NULL on error
|
|
|
|
* Return value: number of bytes allocated for *ppdm buffer or 0 on error
|
|
|
|
*/
|
|
|
|
ULONG
|
|
|
|
LDEVOBJ_ulGetDriverModes(
|
|
|
|
_In_ LPWSTR pwszDriverName,
|
|
|
|
_In_ HANDLE hDriver,
|
|
|
|
_Out_ PDEVMODEW *ppdm);
|
2010-01-30 21:12:42 +00:00
|
|
|
|
2022-01-09 10:02:27 +00:00
|
|
|
PLDEVOBJ
|
|
|
|
LDEVOBJ_pLoadInternal(
|
|
|
|
_In_ PFN_DrvEnableDriver pfnEnableDriver,
|
|
|
|
_In_ ULONG ldevtype);
|
|
|
|
|
2010-01-30 21:12:42 +00:00
|
|
|
PLDEVOBJ
|
|
|
|
APIENTRY
|
2022-01-09 08:42:23 +00:00
|
|
|
LDEVOBJ_pLoadDriver(
|
2015-03-10 00:11:29 +00:00
|
|
|
_In_z_ LPWSTR pwszDriverName,
|
|
|
|
_In_ ULONG ldevtype);
|
2010-01-30 21:12:42 +00:00
|
|
|
|
2022-01-09 09:33:10 +00:00
|
|
|
BOOL
|
|
|
|
LDEVOBJ_bBuildDevmodeList(
|
|
|
|
_Inout_ PGRAPHICS_DEVICE pGraphicsDevice);
|
|
|
|
|
2022-01-09 09:44:53 +00:00
|
|
|
/* This function selects the best available mode corresponding to requested mode */
|
|
|
|
BOOL
|
|
|
|
LDEVOBJ_bProbeAndCaptureDevmode(
|
|
|
|
_Inout_ PGRAPHICS_DEVICE pGraphicsDevice,
|
|
|
|
_In_ PDEVMODEW RequestedMode,
|
|
|
|
_Out_ PDEVMODEW *pSelectedMode,
|
|
|
|
_In_ BOOL bSearchClosestMode);
|
|
|
|
|
2021-05-11 15:13:14 +00:00
|
|
|
CODE_SEG("INIT")
|
2010-01-30 21:12:42 +00:00
|
|
|
NTSTATUS
|
|
|
|
APIENTRY
|
|
|
|
DriverEntry (
|
2013-11-11 19:09:53 +00:00
|
|
|
_In_ PDRIVER_OBJECT DriverObject,
|
|
|
|
_In_ PUNICODE_STRING RegistryPath);
|
2010-01-30 21:12:42 +00:00
|
|
|
|