1 /* 2 * PROJECT: ReactOS Printing Stack Marshalling Functions 3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) 4 * PURPOSE: Marshalling definitions for DRIVER_INFO_* 5 * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen@reactos.org) 6 */ 7 8 static const MARSHALLING PrinterDriver1Marshalling = { 9 sizeof(DRIVER_INFO_1W), 10 { 11 { FIELD_OFFSET(DRIVER_INFO_1W, pName), RTL_FIELD_SIZE(DRIVER_INFO_1W, pName), RTL_FIELD_SIZE(DRIVER_INFO_1W, pName), TRUE }, 12 { MAXDWORD, 0, 0, FALSE } 13 } 14 }; 15 16 static const MARSHALLING PrinterDriver2Marshalling = { 17 sizeof(DRIVER_INFO_2W), 18 { 19 { FIELD_OFFSET(DRIVER_INFO_2W, pName), RTL_FIELD_SIZE(DRIVER_INFO_2W, pName), RTL_FIELD_SIZE(DRIVER_INFO_2W, pName), TRUE }, 20 { FIELD_OFFSET(DRIVER_INFO_2W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_2W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_2W, pEnvironment), TRUE }, 21 { FIELD_OFFSET(DRIVER_INFO_2W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_2W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_2W, pDriverPath), TRUE }, 22 { FIELD_OFFSET(DRIVER_INFO_2W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_2W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_2W, pDataFile), TRUE }, 23 { FIELD_OFFSET(DRIVER_INFO_2W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_2W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_2W, pConfigFile), TRUE }, 24 { MAXDWORD, 0, 0, FALSE } 25 } 26 }; 27 28 static const MARSHALLING PrinterDriver3Marshalling = { 29 sizeof(DRIVER_INFO_3W), 30 { 31 { FIELD_OFFSET(DRIVER_INFO_3W, pName), RTL_FIELD_SIZE(DRIVER_INFO_3W, pName), RTL_FIELD_SIZE(DRIVER_INFO_3W, pName), TRUE }, 32 { FIELD_OFFSET(DRIVER_INFO_3W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_3W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_3W, pEnvironment), TRUE }, 33 { FIELD_OFFSET(DRIVER_INFO_3W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_3W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_3W, pDriverPath), TRUE }, 34 { FIELD_OFFSET(DRIVER_INFO_3W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_3W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_3W, pDataFile), TRUE }, 35 { FIELD_OFFSET(DRIVER_INFO_3W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_3W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_3W, pConfigFile), TRUE }, 36 { FIELD_OFFSET(DRIVER_INFO_3W, pHelpFile), RTL_FIELD_SIZE(DRIVER_INFO_3W, pHelpFile), RTL_FIELD_SIZE(DRIVER_INFO_3W, pHelpFile), TRUE }, 37 { FIELD_OFFSET(DRIVER_INFO_3W, pDependentFiles), RTL_FIELD_SIZE(DRIVER_INFO_3W, pDependentFiles), RTL_FIELD_SIZE(DRIVER_INFO_3W, pDependentFiles), TRUE }, 38 { FIELD_OFFSET(DRIVER_INFO_3W, pMonitorName), RTL_FIELD_SIZE(DRIVER_INFO_3W, pMonitorName), RTL_FIELD_SIZE(DRIVER_INFO_3W, pMonitorName), TRUE }, 39 { FIELD_OFFSET(DRIVER_INFO_3W, pDefaultDataType), RTL_FIELD_SIZE(DRIVER_INFO_3W, pDefaultDataType), RTL_FIELD_SIZE(DRIVER_INFO_3W, pDefaultDataType), TRUE }, 40 { MAXDWORD, 0, 0, FALSE } 41 } 42 }; 43 44 static const MARSHALLING PrinterDriver4Marshalling = { 45 sizeof(DRIVER_INFO_4W), 46 { 47 { FIELD_OFFSET(DRIVER_INFO_4W, pName), RTL_FIELD_SIZE(DRIVER_INFO_4W, pName), RTL_FIELD_SIZE(DRIVER_INFO_4W, pName), TRUE }, 48 { FIELD_OFFSET(DRIVER_INFO_4W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_4W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_4W, pEnvironment), TRUE }, 49 { FIELD_OFFSET(DRIVER_INFO_4W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_4W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_4W, pDriverPath), TRUE }, 50 { FIELD_OFFSET(DRIVER_INFO_4W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_4W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_4W, pDataFile), TRUE }, 51 { FIELD_OFFSET(DRIVER_INFO_4W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_4W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_4W, pConfigFile), TRUE }, 52 { FIELD_OFFSET(DRIVER_INFO_4W, pHelpFile), RTL_FIELD_SIZE(DRIVER_INFO_4W, pHelpFile), RTL_FIELD_SIZE(DRIVER_INFO_4W, pHelpFile), TRUE }, 53 { FIELD_OFFSET(DRIVER_INFO_4W, pDependentFiles), RTL_FIELD_SIZE(DRIVER_INFO_4W, pDependentFiles), RTL_FIELD_SIZE(DRIVER_INFO_4W, pDependentFiles), TRUE }, 54 { FIELD_OFFSET(DRIVER_INFO_4W, pMonitorName), RTL_FIELD_SIZE(DRIVER_INFO_4W, pMonitorName), RTL_FIELD_SIZE(DRIVER_INFO_4W, pMonitorName), TRUE }, 55 { FIELD_OFFSET(DRIVER_INFO_4W, pDefaultDataType), RTL_FIELD_SIZE(DRIVER_INFO_4W, pDefaultDataType), RTL_FIELD_SIZE(DRIVER_INFO_4W, pDefaultDataType), TRUE }, 56 { FIELD_OFFSET(DRIVER_INFO_4W, pszzPreviousNames), RTL_FIELD_SIZE(DRIVER_INFO_4W, pszzPreviousNames), RTL_FIELD_SIZE(DRIVER_INFO_4W, pszzPreviousNames), TRUE }, 57 { MAXDWORD, 0, 0, FALSE } 58 } 59 }; 60 61 static const MARSHALLING PrinterDriver5Marshalling = { 62 sizeof(DRIVER_INFO_5W), 63 { 64 { FIELD_OFFSET(DRIVER_INFO_5W, pName), RTL_FIELD_SIZE(DRIVER_INFO_5W, pName), RTL_FIELD_SIZE(DRIVER_INFO_5W, pName), TRUE }, 65 { FIELD_OFFSET(DRIVER_INFO_5W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_5W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_5W, pEnvironment), TRUE }, 66 { FIELD_OFFSET(DRIVER_INFO_5W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_5W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_5W, pDriverPath), TRUE }, 67 { FIELD_OFFSET(DRIVER_INFO_5W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_5W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_5W, pDataFile), TRUE }, 68 { FIELD_OFFSET(DRIVER_INFO_5W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_5W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_5W, pConfigFile), TRUE }, 69 { MAXDWORD, 0, 0, FALSE } 70 } 71 }; 72 73 static const MARSHALLING PrinterDriver6Marshalling = { 74 sizeof(DRIVER_INFO_6W), 75 { 76 { FIELD_OFFSET(DRIVER_INFO_6W, pName), RTL_FIELD_SIZE(DRIVER_INFO_6W, pName), RTL_FIELD_SIZE(DRIVER_INFO_6W, pName), TRUE }, 77 { FIELD_OFFSET(DRIVER_INFO_6W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_6W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_6W, pEnvironment), TRUE }, 78 { FIELD_OFFSET(DRIVER_INFO_6W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_6W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_6W, pDriverPath), TRUE }, 79 { FIELD_OFFSET(DRIVER_INFO_6W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_6W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_6W, pDataFile), TRUE }, 80 { FIELD_OFFSET(DRIVER_INFO_6W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_6W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_6W, pConfigFile), TRUE }, 81 { FIELD_OFFSET(DRIVER_INFO_6W, pHelpFile), RTL_FIELD_SIZE(DRIVER_INFO_6W, pHelpFile), RTL_FIELD_SIZE(DRIVER_INFO_6W, pHelpFile), TRUE }, 82 { FIELD_OFFSET(DRIVER_INFO_6W, pDependentFiles), RTL_FIELD_SIZE(DRIVER_INFO_6W, pDependentFiles), RTL_FIELD_SIZE(DRIVER_INFO_6W, pDependentFiles), TRUE }, 83 { FIELD_OFFSET(DRIVER_INFO_6W, pMonitorName), RTL_FIELD_SIZE(DRIVER_INFO_6W, pMonitorName), RTL_FIELD_SIZE(DRIVER_INFO_6W, pMonitorName), TRUE }, 84 { FIELD_OFFSET(DRIVER_INFO_6W, pDefaultDataType), RTL_FIELD_SIZE(DRIVER_INFO_6W, pDefaultDataType), RTL_FIELD_SIZE(DRIVER_INFO_6W, pDefaultDataType), TRUE }, 85 { FIELD_OFFSET(DRIVER_INFO_6W, pszzPreviousNames), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszzPreviousNames), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszzPreviousNames), TRUE }, 86 { FIELD_OFFSET(DRIVER_INFO_6W, pszMfgName), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszMfgName), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszMfgName), TRUE }, 87 { FIELD_OFFSET(DRIVER_INFO_6W, pszOEMUrl), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszOEMUrl), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszOEMUrl), TRUE }, 88 { FIELD_OFFSET(DRIVER_INFO_6W, pszHardwareID), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszHardwareID), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszHardwareID), TRUE }, 89 { FIELD_OFFSET(DRIVER_INFO_6W, pszProvider), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszProvider), RTL_FIELD_SIZE(DRIVER_INFO_6W, pszProvider), TRUE }, 90 { MAXDWORD, 0, 0, FALSE } 91 } 92 }; 93 94 static const MARSHALLING PrinterDriver8Marshalling = { 95 sizeof(DRIVER_INFO_8W), 96 { 97 { FIELD_OFFSET(DRIVER_INFO_8W, pName), RTL_FIELD_SIZE(DRIVER_INFO_8W, pName), RTL_FIELD_SIZE(DRIVER_INFO_8W, pName), TRUE }, 98 { FIELD_OFFSET(DRIVER_INFO_8W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_8W, pEnvironment), RTL_FIELD_SIZE(DRIVER_INFO_8W, pEnvironment), TRUE }, 99 { FIELD_OFFSET(DRIVER_INFO_8W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_8W, pDriverPath), RTL_FIELD_SIZE(DRIVER_INFO_8W, pDriverPath), TRUE }, 100 { FIELD_OFFSET(DRIVER_INFO_8W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_8W, pDataFile), RTL_FIELD_SIZE(DRIVER_INFO_8W, pDataFile), TRUE }, 101 { FIELD_OFFSET(DRIVER_INFO_8W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_8W, pConfigFile), RTL_FIELD_SIZE(DRIVER_INFO_8W, pConfigFile), TRUE }, 102 { FIELD_OFFSET(DRIVER_INFO_8W, pHelpFile), RTL_FIELD_SIZE(DRIVER_INFO_8W, pHelpFile), RTL_FIELD_SIZE(DRIVER_INFO_8W, pHelpFile), TRUE }, 103 { FIELD_OFFSET(DRIVER_INFO_8W, pDependentFiles), RTL_FIELD_SIZE(DRIVER_INFO_8W, pDependentFiles), RTL_FIELD_SIZE(DRIVER_INFO_8W, pDependentFiles), TRUE }, 104 { FIELD_OFFSET(DRIVER_INFO_8W, pMonitorName), RTL_FIELD_SIZE(DRIVER_INFO_8W, pMonitorName), RTL_FIELD_SIZE(DRIVER_INFO_8W, pMonitorName), TRUE }, 105 { FIELD_OFFSET(DRIVER_INFO_8W, pDefaultDataType), RTL_FIELD_SIZE(DRIVER_INFO_8W, pDefaultDataType), RTL_FIELD_SIZE(DRIVER_INFO_8W, pDefaultDataType), TRUE }, 106 { FIELD_OFFSET(DRIVER_INFO_8W, pszzPreviousNames), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszzPreviousNames), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszzPreviousNames), TRUE }, 107 { FIELD_OFFSET(DRIVER_INFO_8W, pszMfgName), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszMfgName), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszMfgName), TRUE }, 108 { FIELD_OFFSET(DRIVER_INFO_8W, pszOEMUrl), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszOEMUrl), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszOEMUrl), TRUE }, 109 { FIELD_OFFSET(DRIVER_INFO_8W, pszHardwareID), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszHardwareID), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszHardwareID), TRUE }, 110 { FIELD_OFFSET(DRIVER_INFO_8W, pszProvider), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszProvider), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszProvider), TRUE }, 111 { FIELD_OFFSET(DRIVER_INFO_8W, pszPrintProcessor), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszPrintProcessor), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszPrintProcessor), TRUE }, 112 { FIELD_OFFSET(DRIVER_INFO_8W, pszVendorSetup), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszVendorSetup), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszVendorSetup), TRUE }, 113 { FIELD_OFFSET(DRIVER_INFO_8W, pszzColorProfiles), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszzColorProfiles), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszzColorProfiles), TRUE }, 114 { FIELD_OFFSET(DRIVER_INFO_8W, pszInfPath), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszInfPath), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszInfPath), TRUE }, 115 { FIELD_OFFSET(DRIVER_INFO_8W, pszzCoreDriverDependencies), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszzCoreDriverDependencies), RTL_FIELD_SIZE(DRIVER_INFO_8W, pszzCoreDriverDependencies), TRUE }, 116 { MAXDWORD, 0, 0, FALSE } 117 } 118 }; 119 120 static const MARSHALLING* pPrinterDriverMarshalling[] = { 121 NULL, 122 &PrinterDriver1Marshalling, 123 &PrinterDriver2Marshalling, 124 &PrinterDriver3Marshalling, 125 &PrinterDriver4Marshalling, 126 &PrinterDriver5Marshalling, 127 &PrinterDriver6Marshalling, 128 NULL, 129 &PrinterDriver8Marshalling, 130 }; 131