diff options
| author | Luke <[email protected]> | 2017-11-28 00:22:11 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-11-28 00:22:11 -0800 |
| commit | 79bbbca2f6e37d94fbbbd60d12c5c1e7dde650da (patch) | |
| tree | 793ff943b8b641f95d05401156badd42da4a0f12 /print/OEM Printer Customization Plug-in Samples/C++/SyncSet | |
| parent | ed1df9a8b80b154b71b79635e40af75f4f19001c (diff) | |
| parent | 2817004092cee784d4aaf36c045fdb5b0bc09f7e (diff) | |
Merge pull request #1 from Microsoft/master
Updating Local
Diffstat (limited to 'print/OEM Printer Customization Plug-in Samples/C++/SyncSet')
19 files changed, 4538 insertions, 0 deletions
diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SYNCSET.vcxproj b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SYNCSET.vcxproj new file mode 100644 index 00000000..cf56c5f6 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SYNCSET.vcxproj @@ -0,0 +1,1066 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Win10 Debug|ARM64"> + <Configuration>Win10 Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win10 Debug|Win32"> + <Configuration>Win10 Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win10 Debug|x64"> + <Configuration>Win10 Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win10 Release|ARM64"> + <Configuration>Win10 Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win10 Release|Win32"> + <Configuration>Win10 Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win10 Release|x64"> + <Configuration>Win10 Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win8.1 Debug|Win32"> + <Configuration>Win8.1 Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win8 Debug|Win32"> + <Configuration>Win8 Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win7 Debug|Win32"> + <Configuration>Win7 Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win8.1 Release|Win32"> + <Configuration>Win8.1 Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win8 Release|Win32"> + <Configuration>Win8 Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win7 Release|Win32"> + <Configuration>Win7 Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win8.1 Debug|x64"> + <Configuration>Win8.1 Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win8 Debug|x64"> + <Configuration>Win8 Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win7 Debug|x64"> + <Configuration>Win7 Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win8.1 Release|x64"> + <Configuration>Win8.1 Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win8 Release|x64"> + <Configuration>Win8 Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Win7 Release|x64"> + <Configuration>Win7 Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{60E61442-4E2A-41A1-BC70-EDC0B8DC4EB8}</ProjectGuid> + <RootNamespace>$(MSBuildProjectName)</RootNamespace> + <Configuration Condition="'$(Configuration)' == ''">Win10 Debug</Configuration> + <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <SampleGuid>{A7A17685-16BD-4A90-9E09-A46B09CF3A1F}</SampleGuid> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> + <TargetVersion>Win7</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> + <TargetVersion>Win8</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> + <TargetVersion>WindowsV6.3</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> + <TargetVersion>Win7</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> + <TargetVersion>Win8</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'"> + <TargetVersion>WindowsV6.3</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|ARM64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> + <TargetVersion>Win7</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> + <TargetVersion>Win8</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'"> + <TargetVersion>WindowsV6.3</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> + <TargetVersion>Win7</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> + <TargetVersion>Win8</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|Win32'"> + <TargetVersion>WindowsV6.3</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverType /> + <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <PropertyGroup> + <OutDir>$(IntDir)</OutDir> + </PropertyGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|ARM64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ItemGroup Label="WrappedTaskItems" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|ARM64'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|Win32'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> + <TargetName>SYNCSET</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|ARM64'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|Win32'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + </ClCompile> + <Link> + <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> + <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|ARM64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|Win32'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);USERMODE_DRIVER;_UNICODE;UNICODE;_DEBUG</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);kernel32.lib;user32.lib;winspool.lib;ole32.lib;advapi32.lib;uuid.lib</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x0A000000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'"> + <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x0A000000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x0A000000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|ARM64'"> + <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x0A000000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> + <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x0A000000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|Win32'"> + <WIN32_WINNT_VERSION>0x0603</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x06030000</NTDDI_VERSION> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> + <WIN32_WINNT_VERSION>0x0A00</WIN32_WINNT_VERSION> + <NTDDI_VERSION>0x0A000000</NTDDI_VERSION> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|ARM64'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|Win32'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> + <Link> + <AdditionalOptions>%(AdditionalOptions) /ignore:4070</AdditionalOptions> + <ModuleDefinitionFile>SYNCSET.def</ModuleDefinitionFile> + </Link> + <ClCompile> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="debug.cpp"> + <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile> + <PreCompiledHeader>Use</PreCompiledHeader> + <PreCompiledHeaderOutputFile>$(IntDir)\precomp.h.pch</PreCompiledHeaderOutputFile> + </ClCompile> + <ClCompile Include="devmode.cpp"> + <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile> + <PreCompiledHeader>Use</PreCompiledHeader> + <PreCompiledHeaderOutputFile>$(IntDir)\precomp.h.pch</PreCompiledHeaderOutputFile> + </ClCompile> + <ClCompile Include="dllentry.cpp"> + <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile> + <PreCompiledHeader>Use</PreCompiledHeader> + <PreCompiledHeaderOutputFile>$(IntDir)\precomp.h.pch</PreCompiledHeaderOutputFile> + </ClCompile> + <ClCompile Include="globals.cpp"> + <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile> + <PreCompiledHeader>Use</PreCompiledHeader> + <PreCompiledHeaderOutputFile>$(IntDir)\precomp.h.pch</PreCompiledHeaderOutputFile> + </ClCompile> + <ClCompile Include="intrface.cpp"> + <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile> + <PreCompiledHeader>Use</PreCompiledHeader> + <PreCompiledHeaderOutputFile>$(IntDir)\precomp.h.pch</PreCompiledHeaderOutputFile> + </ClCompile> + <ClCompile Include="oemui.cpp"> + <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile> + <PreCompiledHeader>Use</PreCompiledHeader> + <PreCompiledHeaderOutputFile>$(IntDir)\precomp.h.pch</PreCompiledHeaderOutputFile> + </ClCompile> + <ClCompile Include="precompsrc.cpp"> + <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile> + <PreCompiledHeader>Create</PreCompiledHeader> + <PreCompiledHeaderOutputFile>$(IntDir)\precomp.h.pch</PreCompiledHeaderOutputFile> + </ClCompile> + <ResourceCompile Include="oemui.rc" /> + </ItemGroup> + <ItemGroup> + <Inf Exclude="@(Inf)" Include="*.inf" /> + <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'" /> + </ItemGroup> + <ItemGroup> + <None Exclude="@(None)" Include="*.txt;*.htm;*.html" /> + <None Exclude="@(None)" Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2" /> + <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" /> + </ItemGroup> + <ItemGroup> + <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> +</Project>
\ No newline at end of file diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SYNCSET.vcxproj.Filters b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SYNCSET.vcxproj.Filters new file mode 100644 index 00000000..9737750a --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SYNCSET.vcxproj.Filters @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions> + <UniqueIdentifier>{72226DBB-2FE2-4E91-99A5-A18952A112EB}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files"> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + <UniqueIdentifier>{C3708A9B-9215-44CC-96A2-0C0B656486BF}</UniqueIdentifier> + </Filter> + <Filter Include="Resource Files"> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions> + <UniqueIdentifier>{D44A3AF2-69E5-4F32-BC8A-7636FB947722}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="debug.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="devmode.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="dllentry.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="globals.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="intrface.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="oemui.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="precompsrc.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="devmode.h" /> + <ClInclude Include="globals.h" /> + <ClInclude Include="intrface.h" /> + <ClInclude Include="oem.h" /> + <ClInclude Include="oemui.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="resource.h" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="oemui.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> + <ItemGroup> + <None Include="SyncSet.def"> + <Filter>Source Files</Filter> + </None> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SyncSet.def b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SyncSet.def new file mode 100644 index 00000000..68bdffc0 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/SyncSet.def @@ -0,0 +1,3 @@ +LIBRARY OEMUI +EXPORTS DllGetClassObject PRIVATE + DllCanUnloadNow PRIVATE
\ No newline at end of file diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/debug.cpp b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/debug.cpp new file mode 100644 index 00000000..f7a3d842 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/debug.cpp @@ -0,0 +1,405 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1996 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: Debug.cpp +// +// PURPOSE: Debug functions. +// +// + +#include "precomp.h" +#include "debug.h" + +// This indicates to Prefast that this is a usermode driver file. +_Analysis_mode_(_Analysis_code_type_user_driver_); + +//////////////////////////////////////////////////////// +// INTERNAL DEFINES +//////////////////////////////////////////////////////// + +#define DEBUG_BUFFER_SIZE 1024 +#define PATH_SEPARATOR '\\' +#define MAX_LOOP 10 + +// Determine what level of debugging messages to eject. +#ifdef VERBOSE_MSG + #define DEBUG_LEVEL DBG_VERBOSE +#elif TERSE_MSG + #define DEBUG_LEVEL DBG_TERSE +#elif WARNING_MSG + #define DEBUG_LEVEL DBG_WARNING +#elif ERROR_MSG + #define DEBUG_LEVEL DBG_ERROR +#elif RIP_MSG + #define DEBUG_LEVEL DBG_RIP +#elif NO_DBG_MSG + #define DEBUG_LEVEL DBG_NONE +#else + #define DEBUG_LEVEL DBG_WARNING +#endif + + + +//////////////////////////////////////////////////////// +// EXTERNAL GLOBALS +//////////////////////////////////////////////////////// + +INT giDebugLevel = DEBUG_LEVEL; + + + + +//////////////////////////////////////////////////////// +// INTERNAL PROTOTYPES +//////////////////////////////////////////////////////// + +static BOOL DebugMessageV(LPCSTR lpszMessage, va_list arglist); +static BOOL DebugMessageV(DWORD dwSize, LPCWSTR lpszMessage, va_list arglist); + + + + +////////////////////////////////////////////////////////////////////////// +// Function: DebugMessageV +// +// Description: Outputs variable argument debug string. +// +// +// Parameters: +// +// dwSize Size of temp buffer to hold formated string. +// +// lpszMessage Format string. +// +// arglist Variable argument list.. +// +// +// Returns: +// +// +// Comments: +// +// +////////////////////////////////////////////////////////////////////////// + +static BOOL DebugMessageV(LPCSTR lpszMessage, va_list arglist) +{ + DWORD dwSize = DEBUG_BUFFER_SIZE; + DWORD dwLoop = 0; + LPSTR lpszMsgBuf = NULL; + HRESULT hr; + + + // Parameter checking. + if( (NULL == lpszMessage) + || + (0 == dwSize) + ) + { + return FALSE; + } + + do + { + // Allocate memory for message buffer. + if(NULL != lpszMsgBuf) + { + delete[] lpszMsgBuf; + dwSize *= 2; + } + lpszMsgBuf = new CHAR[dwSize + 1]; + if(NULL == lpszMsgBuf) + { + return FALSE; + } + + hr = StringCbVPrintfA(lpszMsgBuf, (dwSize + 1) * sizeof(CHAR), lpszMessage, arglist); + + // Pass the variable parameters to wvsprintf to be formated. + } while (FAILED(hr) && (STRSAFE_E_INSUFFICIENT_BUFFER == hr) && (++dwLoop < MAX_LOOP) ); + + // Dump string to Debug output. + OutputDebugStringA(lpszMsgBuf); + + // Cleanup. + delete[] lpszMsgBuf; + + return SUCCEEDED(hr); +} + + +////////////////////////////////////////////////////////////////////////// +// Function: DebugMessageV +// +// Description: Outputs variable argument debug string. +// +// +// Parameters: +// +// dwSize Size of temp buffer to hold formated string. +// +// lpszMessage Format string. +// +// arglist Variable argument list.. +// +// +// Returns: +// +// +// Comments: +// +// +////////////////////////////////////////////////////////////////////////// + +static BOOL DebugMessageV(DWORD dwSize, LPCWSTR lpszMessage, va_list arglist) +{ + LPWSTR lpszMsgBuf; + HRESULT hResult; + + + // Parameter checking. + if( (NULL == lpszMessage) + || + (0 == dwSize) + ) + { + return FALSE; + } + + // Allocate memory for message buffer. + lpszMsgBuf = new WCHAR[dwSize + 1]; + if(NULL == lpszMsgBuf) + return FALSE; + + // Pass the variable parameters to wvsprintf to be formated. + hResult = StringCbVPrintfW(lpszMsgBuf, (dwSize + 1) * sizeof(WCHAR), lpszMessage, arglist); + + // Dump string to debug output. + OutputDebugStringW(lpszMsgBuf); + + // Clean up. + delete[] lpszMsgBuf; + + return SUCCEEDED(hResult); +} + + +////////////////////////////////////////////////////////////////////////// +// Function: DebugMessage +// +// Description: Outputs variable argument debug string. +// +// +// Parameters: +// +// lpszMessage Format string. +// +// +// Returns: +// +// +// Comments: +// +// +////////////////////////////////////////////////////////////////////////// + +BOOL DebugMessage(LPCSTR lpszMessage, ...) +{ + BOOL bResult; + va_list VAList; + + + // Pass the variable parameters to DebugMessageV for processing. + va_start(VAList, lpszMessage); + bResult = DebugMessageV(lpszMessage, VAList); + va_end(VAList); + + return bResult; +} + + +////////////////////////////////////////////////////////////////////////// +// Function: DebugMessage +// +// Description: Outputs variable argument debug string. +// +// +// Parameters: +// +// lpszMessage Format string. +// +// +// Returns: +// +// +// Comments: +// +// +////////////////////////////////////////////////////////////////////////// + +BOOL DebugMessage(LPCWSTR lpszMessage, ...) +{ + BOOL bResult; + va_list VAList; + + + // Pass the variable parameters to DebugMessageV to be processed. + va_start(VAList, lpszMessage); + bResult = DebugMessageV(MAX_PATH, lpszMessage, VAList); + va_end(VAList); + + return bResult; +} + +void Dump(PPUBLISHERINFO pPublisherInfo) +{ + VERBOSE(TEXT("pPublisherInfo:\r\n")); + if(NULL == pPublisherInfo) + { + VERBOSE(TEXT("\tpPublisherInfo is NULL!\r\n")); + return; + } + VERBOSE(TEXT("\tdwMode = %#x\r\n"), pPublisherInfo->dwMode); + VERBOSE(TEXT("\twMinoutlinePPEM = %d\r\n"), pPublisherInfo->wMinoutlinePPEM); + VERBOSE(TEXT("\twMaxbitmapPPEM = %d\r\n"), pPublisherInfo->wMaxbitmapPPEM); +} + +void Dump(POEMDMPARAM pOemDMParam) +{ + VERBOSE(TEXT("pOemDMParam:\r\n")); + if(NULL == pOemDMParam) + { + VERBOSE(TEXT("\tpOemDMParam is NULL!\r\n")); + return; + } + VERBOSE(TEXT("\tcbSize = %d\r\n"), pOemDMParam->cbSize); + VERBOSE(TEXT("\tpdriverobj = %#x\r\n"), pOemDMParam->pdriverobj); + VERBOSE(TEXT("\thPrinter = %#x\r\n"), pOemDMParam->hPrinter); + VERBOSE(TEXT("\thModule = %#x\r\n"), pOemDMParam->hModule); + VERBOSE(TEXT("\tpPublicDMIn = %#x\r\n"), pOemDMParam->pPublicDMIn); + VERBOSE(TEXT("\tpPublicDMOut = %#x\r\n"), pOemDMParam->pPublicDMOut); + VERBOSE(TEXT("\tpOEMDMIn = %#x\r\n"), pOemDMParam->pOEMDMIn); + VERBOSE(TEXT("\tpOEMDMOut = %#x\r\n"), pOemDMParam->pOEMDMOut); + VERBOSE(TEXT("\tcbBufSize = %d\r\n"), pOemDMParam->cbBufSize); +} + +void Dump(PPROPSHEETUI_INFO pPSUIInfo) +{ + VERBOSE(TEXT("pPSUIInfo:\r\n")); + if(NULL == pPSUIInfo) + { + VERBOSE(TEXT("\tpPSUIInfo is NULL!\r\n")); + return; + } + VERBOSE(TEXT("\tcbSize = %d\r\n"), pPSUIInfo->cbSize); + VERBOSE(TEXT("\tVersion = %#x\r\n"), pPSUIInfo->Version); + VERBOSE(TEXT("\tFlags = %#x\r\n"), pPSUIInfo->Flags); + VERBOSE(TEXT("\tReason = %d\r\n"), pPSUIInfo->Reason); + VERBOSE(TEXT("\thComPropSheet = %#x\r\n"), pPSUIInfo->hComPropSheet); + VERBOSE(TEXT("\tpfnComPropSheet = %#x\r\n"), pPSUIInfo->pfnComPropSheet); + VERBOSE(TEXT("\tlParamInit = %#x\r\n"), pPSUIInfo->lParamInit); + VERBOSE(TEXT("\tUserData = %#x\r\n"), pPSUIInfo->UserData); + VERBOSE(TEXT("\tResult = %#x\r\n"), pPSUIInfo->Result); +} + +void Dump(POPTITEM pOptItem) +{ + VERBOSE(TEXT("pOptItem:\r\n")); + if(NULL == pOptItem) + { + VERBOSE(TEXT("\tpOptItem is NULL!\r\n")); + return; + } + VERBOSE(TEXT("\tcbSize = %d\r\n"), pOptItem->cbSize); + VERBOSE(TEXT("\tLevel = %d\r\n"), pOptItem->Level); + VERBOSE(TEXT("\tDlgPageIdx = %d\r\n"), pOptItem->DlgPageIdx); + VERBOSE(TEXT("\tFlags = 0x%x\r\n"), pOptItem->Flags); + VERBOSE(TEXT("\tUserData = 0x%p\r\n"), pOptItem->UserData); + VERBOSE(TEXT("\tpName = %s\r\n"), pOptItem->pName ? pOptItem->pName : TEXT("<NULL>")); + VERBOSE(TEXT("\tpSel = 0x%p\r\n"), pOptItem->pSel); + VERBOSE(TEXT("\tpExtChkBox = 0x%p\r\n"), pOptItem->pExtChkBox); + VERBOSE(TEXT("\tpExtChkBox = 0x%p\r\n"), pOptItem->pExtChkBox); + VERBOSE(TEXT("\tHelpIndex = 0x%x\r\n"), pOptItem->HelpIndex); + VERBOSE(TEXT("\tDMPubID = 0x%x\r\n"), pOptItem->DMPubID); + VERBOSE(TEXT("\tUserItemID = 0x%x\r\n"), pOptItem->UserItemID); + VERBOSE(TEXT("\twReserved = 0x%x\r\n"), pOptItem->wReserved); + VERBOSE(TEXT("\tpOIExt = 0x%p\r\n"), pOptItem->pOIExt); + + Dump(pOptItem->pOptType); +} + +void Dump(POPTTYPE pOptType) +{ + VERBOSE(TEXT("\tpOptType:\r\n")); + if(NULL == pOptType) + { + VERBOSE(TEXT("\t\tpOptType is NULL!\r\n")); + return; + } + VERBOSE(TEXT("\t\tcbSize = %d\r\n"), pOptType->cbSize); + VERBOSE(TEXT("\t\tType = 0x%x\r\n"), pOptType->Type); + VERBOSE(TEXT("\t\tFlags = 0x%x\r\n"), pOptType->Flags); + VERBOSE(TEXT("\t\tCount = %d\r\n"), pOptType->Count); + VERBOSE(TEXT("\t\tCount = 0x%x\r\n"), pOptType->BegCtrlID); + VERBOSE(TEXT("\t\tStyle = 0x%x\r\n"), pOptType->Style); + + Dump(pOptType->pOptParam, pOptType->Count); +} + +void Dump(POPTPARAM pOptParam, WORD wCount) +{ + if(NULL == pOptParam) + { + VERBOSE(TEXT("\t\tpOptParam is NULL!\r\n")); + return; + } + + for(WORD wIndex = 0; wIndex < wCount; ++wIndex) + { + VERBOSE(TEXT("\t\tpOptParam[wIndex]:\r\n")); + VERBOSE(TEXT("\t\t\tcbSize = %d\r\n"), pOptParam[wIndex].cbSize); + VERBOSE(TEXT("\t\t\tFlags = 0x%x\r\n"), pOptParam[wIndex].Flags); + VERBOSE(TEXT("\t\t\tStyle = 0x%x\r\n"), pOptParam[wIndex].Style); + VERBOSE(TEXT("\t\t\tpData = 0x%p\r\n"), pOptParam[wIndex].pData); + VERBOSE(TEXT("\t\t\tIconID = 0x%p\r\n"), pOptParam[wIndex].IconID); + VERBOSE(TEXT("\t\t\tlParam = 0x%p\r\n"), pOptParam[wIndex].lParam); + } +} + + +PCSTR +StripDirPrefixA( + IN PCSTR pstrFilename + ) + +/*++ + +Routine Description: + + Strip the directory prefix off a filename (ANSI version) + +Arguments: + + pstrFilename - Pointer to filename string + +Return Value: + + Pointer to the last component of a filename (without directory prefix) + +--*/ + +{ + PCSTR pstr; + + pstr = strrchr(pstrFilename, PATH_SEPARATOR); + if (pstr) + return pstr + 1; + + return pstrFilename; +} + + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/debug.h b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/debug.h new file mode 100644 index 00000000..b4d57b0b --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/debug.h @@ -0,0 +1,166 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1996 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: Debug.H +// +// +// PURPOSE: Define common data types, and external function prototypes +// for debugging functions. +// +// + +#pragma once + +// VC and Build use different debug defines. +// The following makes it so either will +// cause the inclusion of debugging code. +#if !defined(_DEBUG) && defined(DBG) + #define _DEBUG DBG +#elif defined(_DEBUG) && !defined(DBG) + #define DBG _DEBUG +#endif + + + +///////////////////////////////////////////////////////// +// Macros +///////////////////////////////////////////////////////// + +// +// These macros are used for debugging purposes. They expand +// to white spaces on a free build. Here is a brief description +// of what they do and how they are used: +// +// giDebugLevel +// Global variable which set the current debug level to control +// the amount of debug messages emitted. +// +// VERBOSE(msg) +// Display a message if the current debug level is <= DBG_VERBOSE. +// +// TERSE(msg) +// Display a message if the current debug level is <= DBG_TERSE. +// +// WARNING(msg) +// Display a message if the current debug level is <= DBG_WARNING. +// The message format is: WRN filename (linenumber): message +// +// ERR(msg) +// Similiar to WARNING macro above - displays a message +// if the current debug level is <= DBG_ERROR. +// +// ASSERT(cond) +// Verify a condition is true. If not, force a breakpoint. +// +// ASSERTMSG(cond, msg) +// Verify a condition is true. If not, display a message and +// force a breakpoint. +// +// RIP(msg) +// Display a message and force a breakpoint. +// +// Usage: +// These macros require extra parantheses for the msg argument +// example, ASSERTMSG(x > 0, ("x is less than 0\n")); +// WARNING(("App passed NULL pointer, ignoring...\n")); +// + +#define DBG_VERBOSE 1 +#define DBG_TERSE 2 +#define DBG_WARNING 3 +#define DBG_ERROR 4 +#define DBG_RIP 5 +#define DBG_NONE 6 + +#if DBG + + #define DebugMsg DebugMessage + + // + // Strip the directory prefix from a filename (ANSI version) + // + + PCSTR + StripDirPrefixA( + IN PCSTR pstrFilename + ); + + extern INT giDebugLevel; + + + #define DBGMSG(level, prefix, msg) { \ + if (giDebugLevel <= (level)) { \ + DebugMsg("%s %s (%d): ", prefix, StripDirPrefixA(__FILE__), __LINE__); \ + DebugMsg(msg); \ + } \ + } + + #define DBGPRINT(level, msg) { \ + if (giDebugLevel <= (level)) { \ + DebugMsg(msg); \ + } \ + } + + #define VERBOSE if(giDebugLevel <= DBG_VERBOSE) DebugMsg + #define TERSE if(giDebugLevel <= DBG_TERSE) DebugMsg + #define WARNING if(giDebugLevel <= DBG_WARNING) DebugMsg + #define ERR if(giDebugLevel <= DBG_ERROR) DebugMsg + + #define ASSERT(cond) { \ + if (! (cond)) { \ + RIP(("\n")); \ + } \ + } + + #define ASSERTMSG(cond, msg) { \ + if (! (cond)) { \ + RIP(msg); \ + } \ + } + + #define RIP(msg) { \ + DBGMSG(DBG_RIP, "RIP", msg); \ + DebugBreak(); \ + } + + +#else // !DBG + + #define DebugMsg NOP_FUNCTION + + #define VERBOSE NOP_FUNCTION + #define TERSE NOP_FUNCTION + #define WARNING NOP_FUNCTION + #define ERR NOP_FUNCTION + + #define ASSERT(cond) + + #define ASSERTMSG(cond, msg) + #define RIP(msg) + #define DBGMSG(level, prefix, msg) + #define DBGPRINT(level, msg) + +#endif + + + + +///////////////////////////////////////////////////////// +// ProtoTypes +///////////////////////////////////////////////////////// + +BOOL DebugMessage(LPCSTR, ...); +BOOL DebugMessage(LPCWSTR, ...); +void Dump(PPUBLISHERINFO pPublisherInfo); +void Dump(POEMDMPARAM pOemDMParam); +void Dump(PPROPSHEETUI_INFO pPSUIInfo); +void Dump(POPTITEM pOptItem); +void Dump(POPTTYPE pOptType); +void Dump(POPTPARAM pOptParam, WORD wCount); + + + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/devmode.cpp b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/devmode.cpp new file mode 100644 index 00000000..2a19310c --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/devmode.cpp @@ -0,0 +1,214 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: Devmode.cpp +// +// +// PURPOSE: Implementation of Devmode functions shared with OEM UI and OEM rendering modules. +// + +#include "precomp.h" +#include "oemui.h" +#include "debug.h" +#include "devmode.h" + +// This indicates to Prefast that this is a usermode driver file. +_Analysis_mode_(_Analysis_code_type_user_driver_); + + +// +//Performs operation on UI Plugins Private DevMode Members. +//Called via IOemUI::DevMode +// + +HRESULT hrOEMDevMode(DWORD dwMode, POEMDMPARAM pOemDMParam) +{ + POEMDEV pOEMDevIn; + POEMDEV pOEMDevOut; + + + // Verify parameters. + if( (NULL == pOemDMParam) + || + ( (OEMDM_SIZE != dwMode) + && + (OEMDM_DEFAULT != dwMode) + && + (OEMDM_CONVERT != dwMode) + && + (OEMDM_MERGE != dwMode) + ) + ) + { + ERR(ERRORTEXT("DevMode() ERROR_INVALID_PARAMETER.\r\n")); + VERBOSE(DLLTEXT("\tdwMode = %d, pOemDMParam = %#lx.\r\n"), dwMode, pOemDMParam); + + SetLastError(ERROR_INVALID_PARAMETER); + return E_FAIL; + } + + // Cast generic (i.e. PVOID) to OEM private devomode pointer type. + pOEMDevIn = (POEMDEV) pOemDMParam->pOEMDMIn; + pOEMDevOut = (POEMDEV) pOemDMParam->pOEMDMOut; + + switch(dwMode) + { + // + //The Method should return the size of the memory allocation needed to store the UI plugin Private DEVMODE. + // + case OEMDM_SIZE: + pOemDMParam->cbBufSize = sizeof(OEMDEV); + break; + + // + //Should fill the Private DEVMODE with the default values. + // + case OEMDM_DEFAULT: + // + //OEM_DMEXTRAHEADER Members + // + pOEMDevOut->dmOEMExtra.dwSize = sizeof(OEMDEV); + pOEMDevOut->dmOEMExtra.dwSignature = OEM_SIGNATURE; + pOEMDevOut->dmOEMExtra.dwVersion = OEM_VERSION; + + // + //Private members + // + pOEMDevOut->dwDriverData = 0; + pOEMDevOut->dwAdvancedData = 0; + + VERBOSE(DLLTEXT("pOEMDevOut after setting default values:\r\n")); + Dump(pOEMDevOut); + break; + + // + //The method should convert private DEVMODE members to the current version, if necessary. + // + case OEMDM_CONVERT: + ConvertOEMDevmode(pOEMDevIn, pOEMDevOut); + break; + + // + //The method should validate the information contained in private DEVMODE members and merge validated values into a private DEVMODE structure containing default values + // + case OEMDM_MERGE: + ConvertOEMDevmode(pOEMDevIn, pOEMDevOut); + MakeOEMDevmodeValid(pOEMDevOut); + break; + } + Dump(pOemDMParam); + + return S_OK; +} + + +BOOL ConvertOEMDevmode(PCOEMDEV pOEMDevIn, POEMDEV pOEMDevOut) +{ + if( (NULL == pOEMDevIn) + || + (NULL == pOEMDevOut) + ) + { + ERR(ERRORTEXT("ConvertOEMDevmode() invalid parameters.\r\n")); + return FALSE; + } + + // Check OEM Signature, if it doesn't match ours, + // then just assume DMIn is bad and use defaults. + if(pOEMDevIn->dmOEMExtra.dwSignature == pOEMDevOut->dmOEMExtra.dwSignature) + { + VERBOSE(DLLTEXT("Converting private OEM Devmode.\r\n")); + VERBOSE(DLLTEXT("pOEMDevIn:\r\n")); + Dump(pOEMDevIn); + + // Set the devmode defaults so that anything the isn't copied over will + // be set to the default value. + pOEMDevOut->dwDriverData = 0; + pOEMDevOut->dwAdvancedData = 0; + + // Copy the old structure in to the new using which ever size is the smaller. + // Devmode maybe from newer Devmode (not likely since there is only one), or + // Devmode maybe a newer Devmode, in which case it maybe larger, + // but the first part of the structure should be the same. + + // DESIGN ASSUMPTION: the private DEVMODE structure only gets added to; + // the fields that are in the DEVMODE never change only new fields get added to the end. + + memcpy(pOEMDevOut, pOEMDevIn, __min(pOEMDevOut->dmOEMExtra.dwSize, pOEMDevIn->dmOEMExtra.dwSize)); + + // Re-fill in the size and version fields to indicated + // that the DEVMODE is the current private DEVMODE version. + pOEMDevOut->dmOEMExtra.dwSize = sizeof(OEMDEV); + pOEMDevOut->dmOEMExtra.dwVersion = OEM_VERSION; + } + else + { + WARNING(DLLTEXT("Unknown DEVMODE signature, pOEMDMIn ignored.\r\n")); + + // Don't know what the input DEVMODE is, so just use defaults. + pOEMDevOut->dmOEMExtra.dwSize = sizeof(OEMDEV); + pOEMDevOut->dmOEMExtra.dwSignature = OEM_SIGNATURE; + pOEMDevOut->dmOEMExtra.dwVersion = OEM_VERSION; + pOEMDevOut->dwDriverData = 0; + pOEMDevOut->dwAdvancedData = 0; + } + + return TRUE; +} + + +BOOL MakeOEMDevmodeValid(POEMDEV pOEMDevmode) +{ + if(NULL == pOEMDevmode) + { + return FALSE; + } + + // ASSUMPTION: pOEMDevmode is large enough to contain OEMDEV structure. + + // Make sure that dmOEMExtra indicates the current OEMDEV structure. + pOEMDevmode->dmOEMExtra.dwSize = sizeof(OEMDEV); + pOEMDevmode->dmOEMExtra.dwSignature = OEM_SIGNATURE; + pOEMDevmode->dmOEMExtra.dwVersion = OEM_VERSION; + + // Set driver data, if not valid. + if(pOEMDevmode->dwDriverData > 100) + { + pOEMDevmode->dwDriverData = 0; + } + + // Set Advanced driver data, if not valid. + if(pOEMDevmode->dwAdvancedData > 100) + { + pOEMDevmode->dwAdvancedData = 0; + } + + return TRUE; +} + + +void Dump(PCOEMDEV pOEMDevmode) +{ + if( (NULL != pOEMDevmode) + && + (pOEMDevmode->dmOEMExtra.dwSize >= sizeof(OEMDEV)) + && + (OEM_SIGNATURE == pOEMDevmode->dmOEMExtra.dwSignature) + ) + { + VERBOSE(TEXT("\tdmOEMExtra.dwSize = %d\r\n"), pOEMDevmode->dmOEMExtra.dwSize); + VERBOSE(TEXT("\tdmOEMExtra.dwSignature = %#x\r\n"), pOEMDevmode->dmOEMExtra.dwSignature); + VERBOSE(TEXT("\tdmOEMExtra.dwVersion = %#x\r\n"), pOEMDevmode->dmOEMExtra.dwVersion); + VERBOSE(TEXT("\tdwDriverData = %#x\r\n"), pOEMDevmode->dwDriverData); + VERBOSE(TEXT("\tdwAdvancedData = %#x\r\n"), pOEMDevmode->dwAdvancedData); + } + else + { + ERR(ERRORTEXT("Dump(POEMDEV) unknown private OEM DEVMODE.\r\n")); + } +} + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/devmode.h b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/devmode.h new file mode 100644 index 00000000..e2f9c6b7 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/devmode.h @@ -0,0 +1,57 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: Devmode.h +// +// PURPOSE: Define common data types, and external function prototypes +// for devmode functions. +// +#pragma once + +//////////////////////////////////////////////////////// +// OEM Devmode Defines +//////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////// +// OEM Devmode Type Definitions +//////////////////////////////////////////////////////// + +// +//Can add info to the private devmode bellow here. +//Note : +// This structure must be prefixed by OEM_DMEXTRAHEADER +// Your plug-in must implement the IPrintOemUI::DevMode method +// +typedef struct tagOEMDEV +{ + OEM_DMEXTRAHEADER dmOEMExtra; + DWORD dwDriverData; + DWORD dwAdvancedData; + + // + //Private DevMode Members + // + +} OEMDEV, *POEMDEV; + +typedef const OEMDEV *PCOEMDEV; + + + +///////////////////////////////////////////////////////// +// ProtoTypes +///////////////////////////////////////////////////////// + +HRESULT hrOEMDevMode(DWORD dwMode, POEMDMPARAM pOemDMParam); +BOOL ConvertOEMDevmode(PCOEMDEV pOEMDevIn, POEMDEV pOEMDevOut); +BOOL MakeOEMDevmodeValid(POEMDEV pOEMDevmode); +void Dump(PCOEMDEV pOEMDevIn); + + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/dllentry.cpp b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/dllentry.cpp new file mode 100644 index 00000000..dcac51ef --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/dllentry.cpp @@ -0,0 +1,49 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: dllentry.cpp +// +// PURPOSE: Source module for DLL entry function(s). +// + +#include "precomp.h" +#include "oemui.h" +#include "debug.h" + +// This indicates to Prefast that this is a usermode driver file. +_Analysis_mode_(_Analysis_code_type_user_driver_); + +/////////////////////////////////////////////////////////// +// +// DLL entry point +// +BOOL WINAPI DllMain(HINSTANCE hInst, WORD wReason, LPVOID lpReserved) +{ + UNREFERENCED_PARAMETER(lpReserved); + + switch(wReason) + { + case DLL_PROCESS_ATTACH: + VERBOSE(DLLTEXT("Process attach.\r\n")); + ghInstance = hInst; + break; + + case DLL_THREAD_ATTACH: + VERBOSE(DLLTEXT("Thread attach.\r\n")); + break; + + case DLL_PROCESS_DETACH: + VERBOSE(DLLTEXT("Process detach.\r\n")); + break; + + case DLL_THREAD_DETACH: + VERBOSE(DLLTEXT("Thread detach.\r\n")); + break; + } + + return TRUE; +} diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/globals.cpp b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/globals.cpp new file mode 100644 index 00000000..9e77a228 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/globals.cpp @@ -0,0 +1,26 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: Globals.cpp +// +// +// PURPOSE: File that contains all the globals. +// +// +#include "precomp.h" + +#include "oemui.h" + +// This indicates to Prefast that this is a usermode driver file. +_Analysis_mode_(_Analysis_code_type_user_driver_); + +/////////////////////////////////////// +// Globals +/////////////////////////////////////// + +// Module's Instance handle from DLLEntry of process. +HINSTANCE ghInstance = NULL; diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/globals.h b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/globals.h new file mode 100644 index 00000000..b6c7d0ee --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/globals.h @@ -0,0 +1,22 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: Globals.h +// +// +// PURPOSE: Lists of globals declared in Globals.cpp. +// +// +#pragma once + +/////////////////////////////////////// +// Globals +/////////////////////////////////////// + +// Module's Instance handle from DLLEntry of process. +extern HINSTANCE ghInstance; + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/intrface.cpp b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/intrface.cpp new file mode 100644 index 00000000..493d36f7 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/intrface.cpp @@ -0,0 +1,612 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: intrface.cpp +// +// PURPOSE: UI plug-in implementation. +// +// + +#include "precomp.h" + +#include "oemui.h" +#include "debug.h" +#include "intrface.h" + +// This indicates to Prefast that this is a usermode driver file. +_Analysis_mode_(_Analysis_code_type_user_driver_); + +//////////////////////////////////////////////////////// +// Internal Globals +//////////////////////////////////////////////////////// + +static long g_cComponents = 0 ; // Count of active components +static long g_cServerLocks = 0 ; // Count of locks + + + +//////////////////////////////////////////////////////////////////////////////// +// +// IOemUI body +// +IOemUI::~IOemUI() +{ + // Make sure that helper interface is released. + if(NULL != m_pOEMHelp) + { + m_pOEMHelp->Release(); + m_pOEMHelp = NULL; + } + + // If this instance of the object is being deleted, then the reference + // count should be zero. + assert(0 == m_cRef); +} + +HRESULT __stdcall IOemUI::QueryInterface(const IID& iid, void** ppv) +{ + VERBOSE(DLLTEXT("IOemUI:QueryInterface entry.\r\n\r\n")); + if (iid == IID_IUnknown) + { + *ppv = static_cast<IUnknown*>(this); + VERBOSE(DLLTEXT("IOemUI:Return pointer to IUnknown.\r\n\r\n")); + } + else if (iid == IID_IPrintOemUI) + { + *ppv = static_cast<IPrintOemUI*>(this) ; + VERBOSE(DLLTEXT("IOemUI:Return pointer to IPrintOemUI.\r\n")); + } + else + { + *ppv = NULL ; + VERBOSE(DLLTEXT("IOemUI:No Interface. Return NULL.\r\n")); + return E_NOINTERFACE ; + } + reinterpret_cast<IUnknown*>(*ppv)->AddRef() ; + return S_OK ; +} + +ULONG __stdcall IOemUI::AddRef() +{ + VERBOSE(DLLTEXT("IOemUI:AddRef entry.\r\n")); + return InterlockedIncrement(&m_cRef) ; +} + +_At_(this, __drv_freesMem(object)) +ULONG __stdcall IOemUI::Release() +{ + VERBOSE(DLLTEXT("IOemUI:Release entry.\r\n")); + ASSERT( 0 != m_cRef); + ULONG cRef = InterlockedDecrement(&m_cRef); + if (0 == cRef) + { + delete this; + + } + return cRef; +} + +// +//(Implamentation is required) Supplies a pointer to UNIDRIVE /PScript IPrintOemDriverUI +// +HRESULT __stdcall IOemUI::PublishDriverInterface( + IUnknown *pIUnknown) +{ + VERBOSE(DLLTEXT("IOemUI:PublishDriverInterface entry.\r\n")); + + // Need to store pointer to Driver Helper functions, if we already haven't. + if (m_pOEMHelp == NULL) + { + HRESULT hResult; + + + // Get Interface to Helper Functions. + hResult = pIUnknown->QueryInterface(IID_IPrintOemDriverUI, (void** ) &(m_pOEMHelp)); + + if(!SUCCEEDED(hResult)) + { + // Make sure that interface pointer reflects interface query failure. + m_pOEMHelp = NULL; + + return E_FAIL; + } + } + + return S_OK; +} + +// +//(Implamentation is required) Returns the UI Plugin's identification information +// +HRESULT __stdcall IOemUI::GetInfo( + DWORD dwMode, + PVOID pBuffer, + DWORD cbSize, + PDWORD pcbNeeded) +{ + VERBOSE(DLLTEXT("IOemUI::GetInfo(%d) entry.\r\r\n"), dwMode); + + // Validate parameters. + if( (NULL == pcbNeeded) + || + ( (OEMGI_GETSIGNATURE != dwMode) + && + (OEMGI_GETVERSION != dwMode) + && + (OEMGI_GETPUBLISHERINFO != dwMode) + ) + ) + { + WARNING(DLLTEXT("IOemUI::GetInfo() exit pcbNeeded is NULL! ERROR_INVALID_PARAMETER\r\r\n")); + SetLastError(ERROR_INVALID_PARAMETER); + return E_FAIL; + } + + // Set expected buffer size and number of bytes written. + *pcbNeeded = sizeof(DWORD); + + // Check buffer size is sufficient. + if((cbSize < *pcbNeeded) || (NULL == pBuffer)) + { + WARNING(DLLTEXT("IOemUI::GetInfo() exit insufficient buffer!\r\r\n")); + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return E_FAIL; + } + + switch(dwMode) + { + // OEM DLL Signature + case OEMGI_GETSIGNATURE: + *(PDWORD)pBuffer = OEM_SIGNATURE; + break; + + // OEM DLL version + case OEMGI_GETVERSION: + *(PDWORD)pBuffer = OEM_VERSION; + break; + + // dwMode not supported. + default: + // Set written bytes to zero since nothing was written. + WARNING(DLLTEXT("IOemUI::GetInfo() exit mode not supported.\r\r\n")); + *pcbNeeded = 0; + SetLastError(ERROR_NOT_SUPPORTED); + return E_FAIL; + } + + VERBOSE(DLLTEXT("IOemUI::GetInfo() exit S_OK, (*pBuffer is %#x).\r\r\n"), *(PDWORD)pBuffer); + return S_OK; +} + + +// +//Performs operation on UI Plugins Private DevMode Members. +// +HRESULT __stdcall IOemUI::DevMode( + DWORD dwMode, + POEMDMPARAM pOemDMParam) +{ + VERBOSE(DLLTEXT("IOemUI:DevMode(%d, %#x) entry.\r\n"), dwMode, pOemDMParam); + + return hrOEMDevMode(dwMode, pOemDMParam); +} + + +// +//Allows UI Plugin to Modifiy Existing printer porp sheet and document property sheet page.. +// +HRESULT __stdcall IOemUI::CommonUIProp( + DWORD dwMode, + POEMCUIPPARAM pOemCUIPParam) +{ + VERBOSE(DLLTEXT("IOemUI:CommonUIProp entry.\r\n")); + + // + //We want to keep this pointer so the we can modifie the data and OPTITEMS from the OEM plugin page. + // + m_OemSheetData.pOEMCUIParam = pOemCUIPParam; + return hrOEMPropertyPage(dwMode, pOemCUIPParam); +} + + +// +//Adds a New page to the device Documment property sheet. +// + +HRESULT __stdcall IOemUI::DocumentPropertySheets( + PPROPSHEETUI_INFO pPSUIInfo, + LPARAM lParam) +{ + VERBOSE(DLLTEXT("IOemUI:DocumentPropertySheets entry.\r\n")); + + return hrOEMDocumentPropertySheets(pPSUIInfo, lParam, m_pOEMHelp); +} + +// +//Adds a New page to the device printer property page. +// +HRESULT __stdcall IOemUI::DevicePropertySheets( + PPROPSHEETUI_INFO pPSUIInfo, + LPARAM lParam) +{ + VERBOSE(DLLTEXT("IOemUI:DevicePropertySheets entry.\r\n")); + + // + //Store the This pointer in the OEMSHEETDATA + // + m_OemSheetData.pOEMHelp = m_pOEMHelp; + return hrOEMDevicePropertySheets(pPSUIInfo, lParam, &(m_OemSheetData)); +} + + +// +//Allows the UI plugin to spec Customized device capabilaties (TODO) +// +HRESULT __stdcall IOemUI::DeviceCapabilities( + POEMUIOBJ poemuiobj, + HANDLE hPrinter, + _In_ PWSTR pDeviceName, + WORD wCapability, + PVOID pOutput, + PDEVMODE pPublicDM, + PVOID pOEMDM, + DWORD dwOld, + DWORD *dwResult) +{ + VERBOSE(DLLTEXT("IOemUI:DeviceCapabilities entry.\r\n")); + + UNREFERENCED_PARAMETER(poemuiobj); + UNREFERENCED_PARAMETER(hPrinter); + UNREFERENCED_PARAMETER(pDeviceName); + UNREFERENCED_PARAMETER(wCapability); + UNREFERENCED_PARAMETER(pOutput); + UNREFERENCED_PARAMETER(pPublicDM); + UNREFERENCED_PARAMETER(pOEMDM); + UNREFERENCED_PARAMETER(dwOld); + UNREFERENCED_PARAMETER(dwResult); + + return E_NOTIMPL; +} + + +// +//Allows the UI plugin to help determine if a print Job is printable. +// +HRESULT __stdcall IOemUI::DevQueryPrintEx( + POEMUIOBJ poemuiobj, + PDEVQUERYPRINT_INFO pDQPInfo, + PDEVMODE pPublicDM, + PVOID pOEMDM) +{ + VERBOSE(DLLTEXT("IOemUI:DevQueryPrintEx entry.\r\n")); + + UNREFERENCED_PARAMETER(poemuiobj); + UNREFERENCED_PARAMETER(pDQPInfo); + UNREFERENCED_PARAMETER(pPublicDM); + UNREFERENCED_PARAMETER(pOEMDM); + + return E_NOTIMPL; +} + + +// +//Allows the UI Plugin to upgrade its dev options stored in the registry. +// +HRESULT __stdcall IOemUI::UpgradePrinter( + DWORD dwLevel, + PBYTE pDriverUpgradeInfo) +{ + VERBOSE(DLLTEXT("IOemUI:UpgradePrinter entry.\r\n")); + + UNREFERENCED_PARAMETER(dwLevel); + UNREFERENCED_PARAMETER(pDriverUpgradeInfo); + + return E_NOTIMPL; +} + +HRESULT __stdcall IOemUI::PrinterEvent( + _In_ PWSTR pPrinterName, + INT iDriverEvent, + DWORD dwFlags, + LPARAM lParam) +{ + VERBOSE(DLLTEXT("IOemUI:PrinterEvent entry.\r\n")); + + UNREFERENCED_PARAMETER(pPrinterName); + UNREFERENCED_PARAMETER(iDriverEvent); + UNREFERENCED_PARAMETER(dwFlags); + UNREFERENCED_PARAMETER(lParam); + + return E_NOTIMPL; +} + +HRESULT __stdcall IOemUI::DriverEvent( + DWORD dwDriverEvent, + DWORD dwLevel, + LPBYTE pDriverInfo, + LPARAM lParam) +{ + VERBOSE(DLLTEXT("IOemUI:DriverEvent entry.\r\n")); + + UNREFERENCED_PARAMETER(dwDriverEvent); + UNREFERENCED_PARAMETER(dwLevel); + UNREFERENCED_PARAMETER(pDriverInfo); + UNREFERENCED_PARAMETER(lParam); + + return E_NOTIMPL; +}; + + +#define PROFILE_NAME L"OEMPROFILE.icm\0" + +HRESULT __stdcall IOemUI::QueryColorProfile( + HANDLE hPrinter, + POEMUIOBJ poemuiobj, + PDEVMODE pPublicDM, + PVOID pOEMDM, + ULONG ulQueryMode, + VOID *pvProfileData, + ULONG *pcbProfileData, + FLONG *pflProfileData) +{ + HRESULT Result = E_FAIL; + + VERBOSE(DLLTEXT("IOemUI:QueryColorProfile entry.\r\n")); + + UNREFERENCED_PARAMETER(hPrinter); + UNREFERENCED_PARAMETER(poemuiobj); + UNREFERENCED_PARAMETER(pPublicDM); + UNREFERENCED_PARAMETER(pOEMDM); + + if(QCP_DEVICEPROFILE == ulQueryMode) + { + if(NULL == pvProfileData) + { + *pcbProfileData = sizeof(PROFILE_NAME); + SetLastError(ERROR_INSUFFICIENT_BUFFER); + } + else + { + if(*pcbProfileData < sizeof(PROFILE_NAME)) + { + *pcbProfileData = sizeof(PROFILE_NAME); + SetLastError(ERROR_INSUFFICIENT_BUFFER); + } + else + { + Result = StringCbCopy((LPWSTR)pvProfileData, *pcbProfileData, PROFILE_NAME); + *pcbProfileData = sizeof(PROFILE_NAME); + *pflProfileData = QCP_PROFILEDISK; + + if(FAILED(Result)) + { + SetLastError(Result); + } + } + } + } + + return Result; +}; + +HRESULT __stdcall IOemUI::FontInstallerDlgProc( + HWND hWnd, + UINT usMsg, + WPARAM wParam, + LPARAM lParam) +{ + VERBOSE(DLLTEXT("IOemUI:FontInstallerDlgProc entry.\r\n")); + + UNREFERENCED_PARAMETER(hWnd); + UNREFERENCED_PARAMETER(usMsg); + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + return E_NOTIMPL; +}; + +HRESULT __stdcall IOemUI::UpdateExternalFonts( + HANDLE hPrinter, + HANDLE hHeap, + _In_ PWSTR pwstrCartridges) +{ + VERBOSE(DLLTEXT("IOemUI:UpdateExternalFonts entry.\r\n")); + + UNREFERENCED_PARAMETER(hPrinter); + UNREFERENCED_PARAMETER(hHeap); + UNREFERENCED_PARAMETER(pwstrCartridges); + + return E_NOTIMPL; +} + +//////////////////////////////////////////////////////////////////////////////// +// +// oem class factory +// +class IOemCF : public IClassFactory +{ +public: + // *** IUnknown methods *** + + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj); + + STDMETHOD_(ULONG,AddRef) (THIS); + + // the _At_ tag here tells prefast that once release + // is called, the memory should not be considered leaked + _At_(this, __drv_freesMem(object)) + STDMETHOD_(ULONG,Release) (THIS); + + // *** IClassFactory methods *** + STDMETHOD(CreateInstance) (THIS_ + LPUNKNOWN pUnkOuter, + REFIID riid, + LPVOID FAR* ppvObject); + STDMETHOD(LockServer) (THIS_ BOOL bLock); + + + // Constructor + IOemCF(): m_cRef(1) { }; + ~IOemCF() { }; + +protected: + LONG m_cRef; + +}; + +/////////////////////////////////////////////////////////// +// +// Class factory body +// +HRESULT __stdcall IOemCF::QueryInterface(const IID& iid, void** ppv) +{ + if ((iid == IID_IUnknown) || (iid == IID_IClassFactory)) + { + *ppv = static_cast<IOemCF*>(this) ; + } + else + { + *ppv = NULL ; + return E_NOINTERFACE ; + } + reinterpret_cast<IUnknown*>(*ppv)->AddRef() ; + return S_OK ; +} + +ULONG __stdcall IOemCF::AddRef() +{ + return InterlockedIncrement(&m_cRef) ; +} + +_At_(this, __drv_freesMem(object)) +ULONG __stdcall IOemCF::Release() +{ + ASSERT( 0 != m_cRef); + ULONG cRef = InterlockedDecrement(&m_cRef); + if (0 == cRef) + { + delete this; + + } + return cRef; +} + +// IClassFactory implementation +HRESULT __stdcall IOemCF::CreateInstance(IUnknown* pUnknownOuter, + const IID& iid, + void** ppv) +{ + //DbgPrint(DLLTEXT("Class factory:\t\tCreate component.")) ; + + if (ppv == NULL) + { + return E_POINTER; + } + *ppv = NULL; + + // Cannot aggregate. + if (pUnknownOuter != NULL) + { + return CLASS_E_NOAGGREGATION ; + } + + // Create component. + IOemUI* pOemCB = new IOemUI ; + if (pOemCB == NULL) + { + return E_OUTOFMEMORY ; + } + // Get the requested interface. + HRESULT hr = pOemCB->QueryInterface(iid, ppv) ; + + // Release the IUnknown pointer. + // (If QueryInterface failed, component will delete itself.) + pOemCB->Release() ; + return hr ; +} + +// LockServer +HRESULT __stdcall IOemCF::LockServer(BOOL bLock) +{ + if (bLock) + { + InterlockedIncrement(&g_cServerLocks) ; + } + else + { + InterlockedDecrement(&g_cServerLocks) ; + } + return S_OK ; +} + +/////////////////////////////////////////////////////////// +// +// Exported functions +// + + +// Can DLL unload now? +// +STDAPI DllCanUnloadNow() +{ + // + // To avoid leaving OEM DLL still in memory when Unidrv or Pscript drivers + // are unloaded, Unidrv and Pscript driver ignore the return value of + // DllCanUnloadNow of the OEM DLL, and always call FreeLibrary on the OEMDLL. + // + // If OEM DLL spins off a working thread that also uses the OEM DLL, the + // thread needs to call LoadLibrary and FreeLibraryAndExitThread, otherwise + // it may crash after Unidrv or Pscript calls FreeLibrary. + // + + if ((g_cComponents == 0) && (g_cServerLocks == 0)) + { + return S_OK ; + } + else + { + return S_FALSE; + } +} + +// +// Get class factory +// +STDAPI DllGetClassObject( + _In_ REFCLSID clsid, + _In_ REFIID iid, + _Outptr_ LPVOID* ppv) +{ + VERBOSE(DLLTEXT("DllGetClassObject:Create class factory.\r\n")); + + if (ppv == NULL) + { + return E_POINTER; + } + *ppv = NULL; + + // Can we create this component? + if (clsid != CLSID_OEMUI) + { + return CLASS_E_CLASSNOTAVAILABLE ; + } + + // Create class factory. + IOemCF* pFontCF = new IOemCF ; // Reference count set to 1 + // in constructor + if (pFontCF == NULL) + { + return E_OUTOFMEMORY ; + } + + // Get requested interface. + HRESULT hr = pFontCF->QueryInterface(iid, ppv) ; + pFontCF->Release() ; + + return hr ; +} + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/intrface.h b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/intrface.h new file mode 100644 index 00000000..6ec38f73 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/intrface.h @@ -0,0 +1,192 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: intrface.h +// +// PURPOSE: UI plug-in definition. +// +// +#pragma once + +//////////////////////////////////////////////////////////////////////////////// +// +// IOemUI +// +class IOemUI: public IPrintOemUI +{ +public: + // *** IUnknown methods *** + + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj); + + STDMETHOD_(ULONG,AddRef) (THIS); + + // the _At_ tag here tells prefast that once release + // is called, the memory should not be considered leaked + _At_(this, __drv_freesMem(object)) + STDMETHOD_(ULONG,Release) (THIS); + + // + // Method for publishing Driver interface. + // + STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown); + + // + // Get OEM dll related information + // + + STDMETHOD(GetInfo) (THIS_ DWORD dwMode, PVOID pBuffer, DWORD cbSize, + PDWORD pcbNeeded); + + // + // OEMDevMode + // + + STDMETHOD(DevMode) (THIS_ DWORD dwMode, POEMDMPARAM pOemDMParam) ; + + // + // OEMCommonUIProp + // + + STDMETHOD(CommonUIProp) (THIS_ + DWORD dwMode, + POEMCUIPPARAM pOemCUIPParam + ); + + // + // OEMDocumentPropertySheets + // + + STDMETHOD(DocumentPropertySheets) (THIS_ + PPROPSHEETUI_INFO pPSUIInfo, + LPARAM lParam + ); + + // + // OEMDevicePropertySheets + // + + STDMETHOD(DevicePropertySheets) (THIS_ + PPROPSHEETUI_INFO pPSUIInfo, + LPARAM lParam + ); + + + // + // OEMDevQueryPrintEx + // + + STDMETHOD(DevQueryPrintEx) (THIS_ + POEMUIOBJ poemuiobj, + PDEVQUERYPRINT_INFO pDQPInfo, + PDEVMODE pPublicDM, + PVOID pOEMDM + ); + + // + // OEMDeviceCapabilities + // + + STDMETHOD(DeviceCapabilities) (THIS_ + POEMUIOBJ poemuiobj, + HANDLE hPrinter, + _In_ PWSTR pDeviceName, + WORD wCapability, + PVOID pOutput, + PDEVMODE pPublicDM, + PVOID pOEMDM, + DWORD dwOld, + DWORD *dwResult + ); + + // + // OEMUpgradePrinter + // + + STDMETHOD(UpgradePrinter) (THIS_ + DWORD dwLevel, + PBYTE pDriverUpgradeInfo + ); + + // + // OEMPrinterEvent + // + + STDMETHOD(PrinterEvent) (THIS_ + _In_ PWSTR pPrinterName, + INT iDriverEvent, + DWORD dwFlags, + LPARAM lParam + ); + + // + // OEMDriverEvent + // + + STDMETHOD(DriverEvent)(THIS_ + DWORD dwDriverEvent, + DWORD dwLevel, + LPBYTE pDriverInfo, + LPARAM lParam + ); + + // + // OEMQueryColorProfile + // + + STDMETHOD(QueryColorProfile) (THIS_ + HANDLE hPrinter, + POEMUIOBJ poemuiobj, + PDEVMODE pPublicDM, + PVOID pOEMDM, + ULONG ulReserved, + VOID *pvProfileData, + ULONG *pcbProfileData, + FLONG *pflProfileData); + + // + // OEMFontInstallerDlgProc + // + + STDMETHOD(FontInstallerDlgProc) (THIS_ + HWND hWnd, + UINT usMsg, + WPARAM wParam, + LPARAM lParam + ); + // + // UpdateExternalFonts + // + + STDMETHOD(UpdateExternalFonts) (THIS_ + HANDLE hPrinter, + HANDLE hHeap, + _In_ PWSTR pwstrCartridges + ); + + IOemUI() + { + m_cRef = 1; + m_pOEMHelp = NULL; + m_OemSheetData.pfnComPropSheet = NULL; + m_OemSheetData.pOEMCUIParam=NULL; + m_OemSheetData.hComPropSheet=INVALID_HANDLE_VALUE; + m_OemSheetData.hmyPlugin=INVALID_HANDLE_VALUE; + }; + + ~IOemUI(); + +protected: + LONG m_cRef; + IPrintOemDriverUI* m_pOEMHelp; + + // + //Used to link common ui in device settings tab and the OEM plugin tab. + // + OEMSHEETDATA m_OemSheetData; +}; + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oem.h b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oem.h new file mode 100644 index 00000000..daad3e27 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oem.h @@ -0,0 +1,24 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1997 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: oem.h +// +// +// PURPOSE: Define common data types, and external function prototypes +// for debug.cpp. +// + +#pragma once + +//////////////////////////////////////////////////////// +// OEM Defines +//////////////////////////////////////////////////////// + +#define OEM_SIGNATURE 'MSFT' +#define OEM_VERSION 0x00000001L + + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.cpp b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.cpp new file mode 100644 index 00000000..5802a776 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.cpp @@ -0,0 +1,1099 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1997 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: OEMUI.cpp +// +// PURPOSE: Main file for OEM UI test module. +// + +#include "precomp.h" +#include "resource.h" +#include "debug.h" +#include "oemui.h" + +// This indicates to Prefast that this is a usermode driver file. +_Analysis_mode_(_Analysis_code_type_user_driver_); + + +//////////////////////////////////////////////////////// +// INTERNAL MACROS and DEFINES +//////////////////////////////////////////////////////// + +typedef struct _tagCBUserData +{ + HANDLE hComPropSheet; + HANDLE hPropPage; + POEMUIPSPARAM pOEMUIParam; + PFNCOMPROPSHEET pfnComPropSheet; + +} CBUSERDATA, *PCBUSERDATA; + + +//////////////////////////////////////////////////////// +// INTERNAL PROTOTYPES +//////////////////////////////////////////////////////// + +static HRESULT hrDocumentPropertyPage(DWORD dwMode, POEMCUIPPARAM pOEMUIParam); +static HRESULT hrPrinterPropertyPage(DWORD dwMode, POEMCUIPPARAM pOEMUIParam); + +LONG APIENTRY OEMPrinterUICallBack(PCPSUICBPARAM pCallbackParam, POEMCUIPPARAM pOEMUIParam); +LONG APIENTRY OEMDocUICallBack(PCPSUICBPARAM pCallbackParam, POEMCUIPPARAM pOEMUIParam); +LONG APIENTRY OEMDocUICallBack2(PCPSUICBPARAM pCallbackParam); +INT_PTR CALLBACK DevicePropPageProc(HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam); + +void SetOEMUiState (HWND hDlg, POEMSHEETDATA pOEMSheetData); +void SetOEMCommonDataIntoOptItem (POEMSHEETDATA pOEMSheetData, _In_ PSTR PName, LONG Sel); +void ChangeOpItem (IPrintOemDriverUI *pIPrintOEMDrvUI, POEMUIOBJ pOEMObj, POPTITEM pOptItem, int iSel); +POPTITEM FindDrvOptItem (POPTITEM pDrvOptItems, DWORD dwItemCount, _In_ PSTR pKeyWordName, BYTE dmPubID = DMPUB_NONE); + +static POPTITEM CreateOptItems(HANDLE hHeap, DWORD dwOptItems); +static void InitOptItems(POPTITEM pOptItems, DWORD dwOptItems); +static POPTTYPE CreateOptType(HANDLE hHeap, WORD wOptParams); +static PTSTR GetStringResource(HANDLE hHeap, HANDLE hModule, UINT uResource); + +//////////////////////////////////////////////////////////////////////////////// +// +// Initializes OptItems to display OEM device or document property UI. +// Called via IOemUI::CommonUIProp +// +HRESULT hrOEMPropertyPage(DWORD dwMode, POEMCUIPPARAM pOEMUIParam) +{ + HRESULT hResult = S_OK; + + + VERBOSE(DLLTEXT("hrOEMPropertyPage(%d) entry.\r\n"), dwMode); + + // Validate parameters. + if( (OEMCUIP_DOCPROP != dwMode) + && + (OEMCUIP_PRNPROP != dwMode) + ) + { + ERR(ERRORTEXT("hrOEMPropertyPage() ERROR_INVALID_PARAMETER.\r\n")); + VERBOSE(DLLTEXT("\tdwMode = %d, pOEMUIParam = %#lx.\r\n"), dwMode, pOEMUIParam); + + // Return invalid parameter error. + SetLastError(ERROR_INVALID_PARAMETER); + return E_FAIL; + } + + switch(dwMode) + { + case OEMCUIP_DOCPROP: + hResult = hrDocumentPropertyPage(dwMode, pOEMUIParam); + break; + + case OEMCUIP_PRNPROP: + hResult = hrPrinterPropertyPage(dwMode, pOEMUIParam); + break; + + default: + // Should never reach this! + ERR(ERRORTEXT("hrOEMPropertyPage() Invalid dwMode, %d"), dwMode); + SetLastError(ERROR_INVALID_PARAMETER); + hResult = E_FAIL; + break; + } + + return hResult; +} + +//////////////////////////////////////////////////////////////////////////////// +// +// Initializes OptItems to display OEM document property UI. +// +static HRESULT hrDocumentPropertyPage(DWORD dwMode, POEMCUIPPARAM pOEMUIParam) +{ + UNREFERENCED_PARAMETER(dwMode); + + if(NULL == pOEMUIParam->pOEMOptItems) + { + // Fill in the number of OptItems to create for OEM document property UI. + pOEMUIParam->cOEMOptItems = 1; + VERBOSE(DLLTEXT("hrDocumentPropertyPage() requesting %d number of items.\r\n"), pOEMUIParam->cOEMOptItems); + } + else + { + POEMDEV pOEMDev = (POEMDEV) pOEMUIParam->pOEMDM; + + + VERBOSE(DLLTEXT("hrDocumentPropertyPage() fill out %d items.\r\n"), pOEMUIParam->cOEMOptItems); + + // Init UI Callback reference. + pOEMUIParam->OEMCUIPCallback = OEMDocUICallBack; + + // Init OEMOptItmes. + InitOptItems(pOEMUIParam->pOEMOptItems, pOEMUIParam->cOEMOptItems); + + // Fill out tree view items. + + // New section. + pOEMUIParam->pOEMOptItems[0].Level = 1; + pOEMUIParam->pOEMOptItems[0].Flags = OPTIF_COLLAPSE; + pOEMUIParam->pOEMOptItems[0].pName = GetStringResource(pOEMUIParam->hOEMHeap, pOEMUIParam->hModule, IDS_ADV_SECTION); + pOEMUIParam->pOEMOptItems[0].Sel = pOEMDev->dwAdvancedData; + + pOEMUIParam->pOEMOptItems[0].pOptType = CreateOptType(pOEMUIParam->hOEMHeap, 2); + + // + //Setup the Optional Item + // + pOEMUIParam->pOEMOptItems[0].pOptType->Type = TVOT_UDARROW; + pOEMUIParam->pOEMOptItems[0].pOptType->pOptParam[1].IconID = 0; + pOEMUIParam->pOEMOptItems[0].pOptType->pOptParam[1].lParam = 100; + } + + return S_OK; +} + + + +//////////////////////////////////////////////////////////////////////////////// +// +// Initializes OptItems to display OEM printer property UI. +// +static HRESULT hrPrinterPropertyPage(DWORD dwMode, POEMCUIPPARAM pOEMUIParam) +{ + UNREFERENCED_PARAMETER(dwMode); + + // + //This is null the first time the interface is called. + // + if(NULL == pOEMUIParam->pOEMOptItems) + { + // Fill in the number of OptItems to create for OEM printer property UI. + pOEMUIParam->cOEMOptItems = 1; + VERBOSE(DLLTEXT("hrPrinterPropertyPage() requesting %d number of items.\r\n"), pOEMUIParam->cOEMOptItems); + } + else + { + // + //This is the second time we are called Now setup the optional items. + // + DWORD dwError; + DWORD dwDeviceValue; + DWORD dwType; + DWORD dwNeeded; + + VERBOSE(DLLTEXT("hrPrinterPropertyPage() fill out %d items.\r\n"), pOEMUIParam->cOEMOptItems); + + // + //Add OEM Optitem to the Device + // + + // Get device settings value from printer. + dwError = GetPrinterData(pOEMUIParam->hPrinter, OEMUI_VALUE, &dwType, (PBYTE) &dwDeviceValue, + sizeof(dwDeviceValue), &dwNeeded); + if( (ERROR_SUCCESS != dwError) + || + (dwDeviceValue > 100) + ) + { + // Failed to get the device value or value is invalid, just use the default. + dwDeviceValue = 0; + } + + // Init UI Callback reference. + pOEMUIParam->OEMCUIPCallback = OEMPrinterUICallBack; + + + // Init OEMOptItmes. + InitOptItems(pOEMUIParam->pOEMOptItems, pOEMUIParam->cOEMOptItems); + + // Fill out tree view items. + // New section. + pOEMUIParam->pOEMOptItems[0].Level = 1; + pOEMUIParam->pOEMOptItems[0].Flags = OPTIF_COLLAPSE; + pOEMUIParam->pOEMOptItems[0].pName = GetStringResource(pOEMUIParam->hOEMHeap, pOEMUIParam->hModule, IDS_DEV_SECTION); + pOEMUIParam->pOEMOptItems[0].Sel = dwDeviceValue; + + pOEMUIParam->pOEMOptItems[0].pOptType = CreateOptType(pOEMUIParam->hOEMHeap, 2); + + // + //Setup the Optional Item + // + pOEMUIParam->pOEMOptItems[0].pOptType->Type = TVOT_UDARROW; + pOEMUIParam->pOEMOptItems[0].pOptType->pOptParam[1].IconID = 0; + pOEMUIParam->pOEMOptItems[0].pOptType->pOptParam[1].lParam = 100; + + + } + return S_OK; +} + +//////////////////////////////////////////////////////////////////////////////// +// +// Adds property page to Document property sheet. Called via IOemUI::DocumentPropertySheets +// +HRESULT hrOEMDocumentPropertySheets(PPROPSHEETUI_INFO pPSUIInfo, LPARAM lParam, + IPrintOemDriverUI* pOEMHelp) +{ + LONG_PTR lResult = 0; + HRESULT hrResult = S_OK; + + VERBOSE(DLLTEXT("hrOEMDocumentPropertySheets() entry.\r\n")); + + UNREFERENCED_PARAMETER(pOEMHelp); + + // Validate parameters. + if( (NULL == pPSUIInfo) + || + (PROPSHEETUI_INFO_VERSION != pPSUIInfo->Version) + ) + { + ERR(ERRORTEXT("hrOEMDocumentPropertySheets() ERROR_INVALID_PARAMETER.\r\n")); + + // Return invalid parameter error. + SetLastError(ERROR_INVALID_PARAMETER); + return E_FAIL; + } + + // Do action. + switch(pPSUIInfo->Reason) + { + case PROPSHEETUI_REASON_INIT: + { + DWORD dwSheets = 0; + PCBUSERDATA pUserData; + POEMUIPSPARAM pOEMUIParam = (POEMUIPSPARAM) pPSUIInfo->lParamInit; + HANDLE hHeap = pOEMUIParam->hOEMHeap; + POEMDEV pOEMDev = (POEMDEV) pOEMUIParam->pOEMDM; + COMPROPSHEETUI Sheet; + + + // Init property page. + memset(&Sheet, 0, sizeof(COMPROPSHEETUI)); + Sheet.cbSize = sizeof(COMPROPSHEETUI); + Sheet.Flags = CPSUIF_UPDATE_PERMISSION; + Sheet.hInstCaller = ghInstance; + Sheet.pCallerName = GetStringResource(hHeap, ghInstance, IDS_NAME); + Sheet.pHelpFile = NULL; + Sheet.pfnCallBack = OEMDocUICallBack2; + Sheet.pDlgPage = CPSUI_PDLGPAGE_TREEVIEWONLY; + Sheet.cOptItem = 1; + Sheet.IconID = IDI_CPSUI_PRINTER; + Sheet.pOptItemName = GetStringResource(hHeap, ghInstance, IDS_SECTION); + Sheet.CallerVersion = 0x100; + Sheet.OptItemVersion = 0x100; + + // Init user data. + pUserData = (PCBUSERDATA) HeapAlloc(hHeap, HEAP_ZERO_MEMORY, sizeof(CBUSERDATA)); + if (NULL == pUserData) + { + ERR(ERRORTEXT("hrOEMDocumentPropertySheets() failed to allocate user data.\r\n")); + + hrResult = E_OUTOFMEMORY; + goto Exit; + } + + pUserData->hComPropSheet = pPSUIInfo->hComPropSheet; + pUserData->pfnComPropSheet = pPSUIInfo->pfnComPropSheet; + pUserData->pOEMUIParam = pOEMUIParam; + Sheet.UserData = (ULONG_PTR) pUserData; + + // Create OptItems for page. + Sheet.pOptItem = CreateOptItems(hHeap, Sheet.cOptItem); + if (NULL == Sheet.pOptItem) + { + ERR(ERRORTEXT("hrOEMDocumentPropertySheets() failed to allocate OPTITEMs.\r\n")); + + hrResult = E_OUTOFMEMORY; + goto Exit; + } + + // Initialize OptItems + Sheet.pOptItem[0].Level = 1; + Sheet.pOptItem[0].Flags = OPTIF_COLLAPSE; + Sheet.pOptItem[0].pName = GetStringResource(hHeap, ghInstance, IDS_SECTION); + Sheet.pOptItem[0].Sel = pOEMDev->dwDriverData; + + Sheet.pOptItem[0].pOptType = CreateOptType(hHeap, 2); + if (NULL == Sheet.pOptItem[0].pOptType) + { + ERR(ERRORTEXT("hrOEMDocumentPropertySheets() failed to allocate OPTTYPE.\r\n")); + + hrResult = E_OUTOFMEMORY; + goto Exit; + } + + // + //Set the UI prop of this OPTYPE item. + // + Sheet.pOptItem[0].pOptType->Type = TVOT_UDARROW; + Sheet.pOptItem[0].pOptType->pOptParam[1].IconID = 0; + Sheet.pOptItem[0].pOptType->pOptParam[1].lParam = 100; + + // Adds the property sheets. + lResult = pPSUIInfo->pfnComPropSheet(pPSUIInfo->hComPropSheet, CPSFUNC_ADD_PCOMPROPSHEETUI, + (LPARAM)&Sheet, (LPARAM)&dwSheets); + } + break; + + case PROPSHEETUI_REASON_GET_INFO_HEADER: + { + PPROPSHEETUI_INFO_HEADER pHeader = (PPROPSHEETUI_INFO_HEADER) lParam; + + pHeader->pTitle = (LPTSTR)PROP_TITLE; + lResult = TRUE; + } + break; + + case PROPSHEETUI_REASON_GET_ICON: + // No icon + lResult = 0; + break; + + case PROPSHEETUI_REASON_SET_RESULT: + { + PSETRESULT_INFO pInfo = (PSETRESULT_INFO) lParam; + + lResult = pInfo->Result; + } + break; + + case PROPSHEETUI_REASON_DESTROY: + lResult = TRUE; + break; + } + +Exit: + + pPSUIInfo->Result = lResult; + return hrResult; +} + + +//////////////////////////////////////////////////////////////////////////////// +// +// Adds property page to printer property sheet. Called via IOemUI::DevicePropertySheets +// +HRESULT hrOEMDevicePropertySheets(PPROPSHEETUI_INFO pPSUIInfo, LPARAM lParam, POEMSHEETDATA pOemSheetData) +{ + LONG_PTR lResult = 0; + + + VERBOSE(DLLTEXT("hrOEMDevicePropertySheets(%#x, %#x) entry\r\n"), pPSUIInfo, lParam); + + // Validate parameters. + if( (NULL == pPSUIInfo) + + || + (PROPSHEETUI_INFO_VERSION != pPSUIInfo->Version) + ) + { + ERR(ERRORTEXT("hrOEMDevicePropertySheets() ERROR_INVALID_PARAMETER.\r\n")); + + // Return invalid parameter error. + SetLastError(ERROR_INVALID_PARAMETER); + return E_FAIL; + } + + Dump(pPSUIInfo); + + + // Do action. + switch(pPSUIInfo->Reason) + { + + case PROPSHEETUI_REASON_INIT: + { + PROPSHEETPAGE Page; + + // Init property page. + memset(&Page, 0, sizeof(PROPSHEETPAGE)); + Page.dwSize = sizeof(PROPSHEETPAGE); + Page.dwFlags = PSP_DEFAULT; + Page.hInstance = ghInstance; + Page.pszTemplate = MAKEINTRESOURCE(IDD_DEVICE_PROPPAGE); + Page.pfnDlgProc = DevicePropPageProc; + + // + //This is the OEMPlugIN Sheets Shared Data. Use this Pointer to gain access to shared driver data + // + pOemSheetData->hComPropSheet = pPSUIInfo->hComPropSheet; + pOemSheetData->pfnComPropSheet = pPSUIInfo->pfnComPropSheet; + Page.lParam = (LPARAM)pOemSheetData; + + // Add property sheets. + pOemSheetData->hmyPlugin = (HANDLE)(pPSUIInfo->pfnComPropSheet(pPSUIInfo->hComPropSheet, CPSFUNC_ADD_PROPSHEETPAGE, (LPARAM)&Page, 0)); + + VERBOSE(DLLTEXT("hrOEMDevicePropertySheets() pfnComPropSheet returned %d.\r\n"), pOemSheetData->hmyPlugin); + } + break; + + case PROPSHEETUI_REASON_GET_INFO_HEADER: + { + PPROPSHEETUI_INFO_HEADER pHeader = (PPROPSHEETUI_INFO_HEADER) lParam; + + pHeader->pTitle = (LPTSTR)PROP_TITLE; + lResult = TRUE; + } + break; + + case PROPSHEETUI_REASON_GET_ICON: + // No icon + lResult = 0; + break; + + case PROPSHEETUI_REASON_SET_RESULT: + { + PSETRESULT_INFO pInfo = (PSETRESULT_INFO) lParam; + + lResult = pInfo->Result; + } + break; + + case PROPSHEETUI_REASON_DESTROY: + lResult = TRUE; + break; + } + + pPSUIInfo->Result = lResult; + return S_OK; +} + + +//////////////////////////////////////////////////////////////////////////////// +// +// OptItems call back for OEM printer property UI. +// +LONG APIENTRY OEMPrinterUICallBack(PCPSUICBPARAM pCallbackParam, POEMCUIPPARAM pOEMUIParam) +{ + LONG lReturn = CPSUICB_ACTION_NONE; + + VERBOSE(DLLTEXT("OEMPrinterUICallBack() entry, Reason is %d.\r\n"), pCallbackParam->Reason); + + switch(pCallbackParam->Reason) + { + case CPSUICB_REASON_APPLYNOW: + { + DWORD dwDriverValue = pOEMUIParam->pOEMOptItems[0].Sel; + + // + // Store OptItems state in printer data. + // + SetPrinterData(pOEMUIParam->hPrinter, OEMUI_VALUE, REG_DWORD, (PBYTE) &dwDriverValue, sizeof(DWORD)); + } + break; + + // + //Because the plugin page is changing items in this CPSUI page we need to rinitalise the data on the page. + // + case CPSUICB_REASON_SETACTIVE: + return CPSUICB_ACTION_OPTIF_CHANGED; + break; + + default: + break; + } + + return lReturn; +} + + + +//////////////////////////////////////////////////////////////////////////////// +// +// Call back for OEM device property UI. +// +// This OEM plugin page is using the OPTITEMS in the Device tab to store data. (Installabale Options) +// If you hide these option in the device tab and only access them from your UI you dont have to worry about sync the views. +// If you want the Options in both tabs you need to have a CPSUICALLBACK function defined for the Device tab. (OEMPrinterUICallBack) +// OEMPrinterUICallBack will return CPSUICB_ACTION_OPTIF_CHANGED; to indicate that some of the controls have change. Resulting in CPSUI to refresh the view. +// +INT_PTR CALLBACK DevicePropPageProc(HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) +{ + + VERBOSE(DLLTEXT("DevicePropPageProc() entry, Reason is %d.\r\n"), uiMsg); + + POEMSHEETDATA pOEMSheetData = NULL; + LONG lState = 0; + DWORD fDataValid = 0; + WORD dlgControl = 0; + PSTR pControlName = NULL; + + + if ( uiMsg != WM_INITDIALOG ) + { + // + //Retrieves Application data storded by the call to SetWindowLongPtr. + // + pOEMSheetData = (POEMSHEETDATA)GetWindowLongPtr( hDlg, DWLP_USER); + + + if (!pOEMSheetData) + { + // + //Failed to get the OEM Prop Page Data Pointer. + // + ERR(ERRORTEXT("DevicePropPageProc : GetWindowLongPtr Failed (%d)\r\n"), GetLastError()); + return FALSE; + } + } + + switch (uiMsg) + { + case WM_INITDIALOG: + // + //PROPSHEETPAGE structure is passed to the dialog box procedure with a WM_INITDIALOG message. + //The lParam member is provided to allow you to pass application-specific information to the dialog box procedure + // + SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)((LPPROPSHEETPAGE)lParam)->lParam); + break; + + case WM_COMMAND: + switch(HIWORD(wParam)) + { + + case BN_CLICKED: + + // + //Change the UI to activate the apply button Send the prop dailog a change message. + // + PropSheet_Changed(GetParent(hDlg), hDlg); + + switch(LOWORD(wParam)) + { + + // + //USER modified OEM Controls on the plugin page. + // + case IDC_CHECK_DUPLPEX: + dlgControl = IDC_CHECK_DUPLPEX; + fDataValid = TRUE; + pControlName = (PSTR)DUPLEXUNIT; + break; + + case IDC_CHECK_HDRIVE: + dlgControl = IDC_CHECK_HDRIVE; + fDataValid = TRUE; + pControlName = (PSTR)PRINTERHDISK; + break; + + case IDC_CHECK_ENVFEEDER: + dlgControl = IDC_CHECK_ENVFEEDER; + fDataValid = TRUE; + pControlName = (PSTR)ENVFEEDER; + break; + + default: + fDataValid = 0; + break; + + } + + // + //If the Control is valid Get the ctrl state and UPdate the OPTITEM. + // + if ( fDataValid ) + { + lState = (LONG)(SendDlgItemMessage (hDlg, dlgControl, BM_GETSTATE, 0, 0) & 0x0003); + VERBOSE(DLLTEXT("DevicePropPageProc : Clicked dlgControl (%d)\r\n"), lState); + + // + //Saves the Data to the OPTITEMS in the device settings page. + // + SetOEMCommonDataIntoOptItem (pOEMSheetData, pControlName, lState); + } + break; + + + default: + return FALSE; + } + return TRUE; + + // + //Dailog is going to paint set up the UI controls to match the relavent OPTITEMS Data. + // + case WM_CTLCOLORDLG: + { + VERBOSE(DLLTEXT("DevicePropPageProc : WM_CTLCOLORDLG \r\n")); + SetOEMUiState (hDlg, pOEMSheetData); + } + return TRUE; + + + case WM_NOTIFY: + { + switch (((LPNMHDR)lParam)->code) // type of notification message + { + case PSN_SETACTIVE: + return TRUE; + break; + + case PSN_KILLACTIVE: + return TRUE; + break; + + case PSN_APPLY: + + // + //Calls ComPropSheet + //causes the ComPropSheet function to pass a specified result value to all PFNPROPSHEETUI-typed functions associated with a specified page and its parents + // + pOEMSheetData->pfnComPropSheet(pOEMSheetData->hComPropSheet, + CPSFUNC_SET_RESULT, + (LPARAM) pOEMSheetData->hmyPlugin, + (LPARAM)CPSUI_OK); + + // + //Accept the apply if the data was invalid and you are checking for this set PSNRET_INVALID | PSNRET_INVALID_NOCHANGEPAGE + //Disables the APPLY button and saves the Data. + // + PropSheet_UnChanged(GetParent(hDlg), hDlg); + SetWindowLongPtr(hDlg,DWLP_MSGRESULT,PSNRET_NOERROR); + return TRUE; + break; + + // + // Need To undo the changes + // + case PSN_RESET: + break; + } + } + break; + } + + return FALSE; +} + +//////////////////////////////////////////////////////////////////////////////// +// +// Update the OEM page controls to match the Device settings page +// + +void SetOEMUiState (HWND hDlg, POEMSHEETDATA pOEMSheetData) +{ + LRESULT lstate = 0; + POEMCUIPPARAM pOEMCUIParam = NULL; + PUSERDATA pUserData = NULL; + POPTITEM pOptItem = NULL; + DWORD cDrvOptItems = 0; + + + if (pOEMSheetData->pOEMCUIParam) + { + pOEMCUIParam = pOEMSheetData->pOEMCUIParam; + cDrvOptItems = pOEMCUIParam->cDrvOptItems; + } + + // + //loop down the OPITEMS and retrieve the data that is needed from the control + //(all Optitesm are ref from DMPubID of the UserData->pKeyWordName) + // + for (DWORD i=0; i < cDrvOptItems; i++) + { + pOptItem = &(pOEMCUIParam->pDrvOptItems[i]); + if (pOptItem->UserData) + { + pUserData = (PUSERDATA)(pOptItem->UserData); + if ( pUserData->pKeyWordName ) + { + // + //Get the Selection of the OPITEM + // + if (pOptItem->Sel) + { + lstate = BST_CHECKED; + } + else + { + lstate = BST_UNCHECKED; + } + + // + //Update the Data in OEM Page to mactch the data in the Device Settings TAB. + //Send a message to the Cntrol to update its State. + // + + //Set the Duplex Option + if ( strcmp(pUserData->pKeyWordName, DUPLEXUNIT ) == 0 ) + { + SendDlgItemMessage (hDlg, IDC_CHECK_DUPLPEX, BM_SETCHECK, lstate, 0); + } + + //Set HardDrive Option + if ( strcmp (pUserData->pKeyWordName, PRINTERHDISK ) == 0 ) + { + SendDlgItemMessage (hDlg, IDC_CHECK_HDRIVE, BM_SETCHECK, lstate, 0); + } + + //Set the Env Feeder Option + if ( strcmp (pUserData->pKeyWordName, ENVFEEDER ) == 0 ) + { + SendDlgItemMessage (hDlg, IDC_CHECK_ENVFEEDER, BM_SETCHECK, lstate, 0); + } + } + } + } +} + +//////////////////////////////////////////////////////////////////////////////// +// +// Save the OEM change into the correct OPTITEM. +// The UI data is been stored in the driver supplied OPTITEM +// +void SetOEMCommonDataIntoOptItem (POEMSHEETDATA pOEMSheetData, _In_ PSTR PName, LONG Sel) +{ + + VERBOSE(DLLTEXT("SetOEMCommonDataIntoOptItem (%S) \r\n"), PName); + + POEMCUIPPARAM pOEMCUIParam = pOEMSheetData->pOEMCUIParam; + POPTITEM pOptItem = NULL; + + // + //Find the OPTITEM that needs to be Updated. + // + pOptItem = FindDrvOptItem (pOEMCUIParam->pDrvOptItems, + pOEMCUIParam->cDrvOptItems, + PName, + DMPUB_NONE); + + if (pOptItem) + { + ChangeOpItem (pOEMSheetData->pOEMHelp, + pOEMCUIParam->poemuiobj, + pOptItem, + Sel); + } + else + { + ERR(ERRORTEXT("SetOEMCommonDataIntoOptItem Item Not Found OPTITEM(%S) \r\n"), PName); + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// +// Help Change the data set in the OPTITEM +// +void ChangeOpItem (IPrintOemDriverUI *pIPrintOEMDrvUI, POEMUIOBJ pOEMUIObj, POPTITEM pOptItem, int iSel) +{ + HRESULT hRestult = S_OK; + + // + //Change the Item (Change which OPTPARAM is selected fot the required OPTTYPE) + // + pOptItem->Sel = iSel; + + // + //Set the Flag indicating it is changed + // + pOptItem->Flags |= OPTIF_CHANGED; + + // + //Update the Driver UI. (this updates the UI but it does not cause CPSUI to update the its pages), + //Look at OEMPrinterUICallBack to see how CPSUI pages are updated + //The IPrintOemDriverUI::DrvUpdateUISetting method is provided by the + //Unidrv and Pscript5 minidrivers so that user interface plug-ins can + //notify the driver of a modified user interface option. + // + hRestult = pIPrintOEMDrvUI->DrvUpdateUISetting((PVOID)pOEMUIObj, (PVOID)pOptItem, 0, OEMCUIP_PRNPROP); + + if (hRestult != S_OK) + { + ERR(ERRORTEXT("ChangeOpItem DrvUpdateUISetting FAILED \r\n") ); + } + +} + + +//////////////////////////////////////////////////////////////////////////////// +// +// Help Find a OPTITEM from the array based on USERDATA->pKeyWordName or DMPubID +// +POPTITEM FindDrvOptItem (POPTITEM pDrvOptItems, DWORD dwItemCount, _In_ PSTR pKeyWordName, BYTE dmPubID ) +{ + VERBOSE(DLLTEXT("FindDrvOptItem Looking (%S) (%d) \r\n"), pKeyWordName, dmPubID); + + POPTITEM pOptItem = NULL; + PUSERDATA pUserData = NULL; + + for (DWORD i=0; i < dwItemCount; i++) + { + // + //OPTITEM has valid data compare these now (Search on DMPubID) + // + if (pKeyWordName == NULL) + { + if (dmPubID == pDrvOptItems[i].DMPubID) + { + pOptItem = &(pDrvOptItems[i]); + break; + } + } + else + { + // + //(Search a printer freature pKeyWordName) + // + //For Common Printer Features the key name is set to a common non localised string + //Note the these are only ansi strings ie PSTR + // + if (pDrvOptItems[i].UserData) + { + pUserData = (PUSERDATA)pDrvOptItems[i].UserData; + if (pUserData->pKeyWordName) + { + // + //OPTITEM has valid data compare these now + // + if ( strcmp (pUserData->pKeyWordName, pKeyWordName) == 0) + { + pOptItem = &(pDrvOptItems[i]); + break; + } + } + } + } + } + + if (!pOptItem) + { + ERR(ERRORTEXT("FindDrvOptItem OPTITEM NOT Found \r\n") ); + } + + return pOptItem; +} + + +//////////////////////////////////////////////////////////////////////////////// +// +// OptItems call back for OEM document property UI. +// +LONG APIENTRY OEMDocUICallBack(PCPSUICBPARAM pCallbackParam, POEMCUIPPARAM pOEMUIParam) +{ + LONG lReturn = CPSUICB_ACTION_NONE; + POEMDEV pOEMDev = (POEMDEV) pOEMUIParam->pOEMDM; + + + VERBOSE(DLLTEXT("OEMDocUICallBack() entry, Reason is %d.\r\n"), pCallbackParam->Reason); + + switch(pCallbackParam->Reason) + { + case CPSUICB_REASON_APPLYNOW: + // Store OptItems state in DEVMODE. + pOEMDev->dwAdvancedData = pOEMUIParam->pOEMOptItems[0].Sel; + break; + + case CPSUICB_REASON_KILLACTIVE: + pOEMDev->dwAdvancedData = pOEMUIParam->pOEMOptItems[0].Sel; + break; + + // + //Refress the Data in the view and tell CPUSI that the data has changed by ret CPSUICB_ACTION_OPTIF_CHANGED + // + case CPSUICB_REASON_SETACTIVE: + if((DWORD)(pOEMUIParam->pOEMOptItems[0].Sel) != pOEMDev->dwAdvancedData) + { + pOEMUIParam->pOEMOptItems[0].Sel = pOEMDev->dwAdvancedData; + pOEMUIParam->pOEMOptItems[0].Flags |= OPTIF_CHANGED; + lReturn = CPSUICB_ACTION_OPTIF_CHANGED; + } + break; + + default: + break; + } + + return lReturn; +} + + +LONG APIENTRY OEMDocUICallBack2(PCPSUICBPARAM pCallbackParam) +{ + LONG lReturn = CPSUICB_ACTION_NONE; + PCBUSERDATA pUserData = (PCBUSERDATA) pCallbackParam->UserData; + POEMDEV pOEMDev = (POEMDEV) pUserData->pOEMUIParam->pOEMDM; + + + VERBOSE(DLLTEXT("OEMDocUICallBack2() entry, Reason is %d.\r\n"), pCallbackParam->Reason); + + switch(pCallbackParam->Reason) + { + case CPSUICB_REASON_APPLYNOW: + pOEMDev->dwDriverData = pCallbackParam->pOptItem[0].Sel; + pUserData->pfnComPropSheet(pUserData->hComPropSheet, CPSFUNC_SET_RESULT, + (LPARAM)pUserData->hPropPage, + (LPARAM)CPSUI_OK); + break; + + case CPSUICB_REASON_KILLACTIVE: + pOEMDev->dwDriverData = pCallbackParam->pOptItem[0].Sel; + break; + + case CPSUICB_REASON_SETACTIVE: + if((DWORD)(pCallbackParam->pOptItem[0].Sel) != pOEMDev->dwDriverData) + { + pCallbackParam->pOptItem[0].Sel = pOEMDev->dwDriverData; + pCallbackParam->pOptItem[0].Flags |= OPTIF_CHANGED; + lReturn = CPSUICB_ACTION_OPTIF_CHANGED; + } + break; + + default: + break; + } + + return lReturn; +} + + +//////////////////////////////////////////////////////////////////////////////// +// +// Creates and Initializes OptItems. +// +static POPTITEM CreateOptItems(HANDLE hHeap, DWORD dwOptItems) +{ + POPTITEM pOptItems = NULL; + SIZE_T sizeOfOptItems = 0; + + // Compute the size of memory needed for the OptItems: + if (SUCCEEDED(SIZETMult(sizeof(OPTITEM), (SIZE_T)dwOptItems, &sizeOfOptItems))) + { + // Allocate memory for OptItems; + pOptItems = (POPTITEM) HeapAlloc(hHeap, HEAP_ZERO_MEMORY, sizeOfOptItems); + if(NULL != pOptItems) + { + InitOptItems(pOptItems, dwOptItems); + } + else + { + ERR(ERRORTEXT("CreateOptItems() failed to allocate memory for OPTITEMs!\r\n")); + } + } + else + { + ERR(ERRORTEXT("CreateOptItems() failed to compute necessary memory size for OPTITEMs!\r\n")); + } + + return pOptItems; +} + + +//////////////////////////////////////////////////////////////////////////////// +// +// Initializes OptItems. +// +static void InitOptItems(POPTITEM pOptItems, DWORD dwOptItems) +{ + VERBOSE(DLLTEXT("InitOptItems() entry.\r\n")); + + // Zero out memory. + memset(pOptItems, 0, sizeof(OPTITEM) * dwOptItems); + + // Set each OptItem's size, and Public DM ID. + for(DWORD dwCount = 0; dwCount < dwOptItems; dwCount++) + { + pOptItems[dwCount].cbSize = sizeof(OPTITEM); + pOptItems[dwCount].DMPubID = DMPUB_NONE; + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// +// Allocates and initializes OptType for OptItem. +// +static POPTTYPE CreateOptType(HANDLE hHeap, WORD wOptParams) +{ + POPTTYPE pOptType = NULL; + + + VERBOSE(DLLTEXT("CreateOptType() entry.\r\n")); + + // Allocate memory from the heap for the OPTTYPE; the driver will take care of clean up. + pOptType = (POPTTYPE) HeapAlloc(hHeap, HEAP_ZERO_MEMORY, sizeof(OPTTYPE)); + if(NULL != pOptType) + { + // Initialize OPTTYPE. + pOptType->cbSize = sizeof(OPTTYPE); + pOptType->Count = wOptParams; + + // Allocate memory from the heap for the OPTPARAMs for the OPTTYPE. + pOptType->pOptParam = (POPTPARAM) HeapAlloc(hHeap, HEAP_ZERO_MEMORY, wOptParams * sizeof(OPTPARAM)); + if(NULL != pOptType->pOptParam) + { + // Initialize the OPTPARAMs. + for(WORD wCount = 0; wCount < wOptParams; wCount++) + { + pOptType->pOptParam[wCount].cbSize = sizeof(OPTPARAM); + } + } + else + { + ERR(ERRORTEXT("CreateOptType() failed to allocated memory for OPTPARAMs!\r\n")); + + // Free allocated memory and return NULL. + HeapFree(hHeap, 0, pOptType); + pOptType = NULL; + } + } + else + { + ERR(ERRORTEXT("CreateOptType() failed to allocated memory for OPTTYPE!\r\n")); + } + + return pOptType; +} + +//////////////////////////////////////////////////////////////////////////////////// +// +// Retrieves pointer to a String resource. +// +static PTSTR GetStringResource(HANDLE hHeap, HANDLE hModule, UINT uResource) +{ + int nResult; + DWORD dwSize = MAX_PATH; + PTSTR pszString = NULL; + + + VERBOSE(DLLTEXT("GetStringResource(%#x, %#x, %d) entered.\r\n"), hHeap, hModule, uResource); + + // Allocate buffer for string resource from heap; let the driver clean it up. + pszString = (PTSTR) HeapAlloc(hHeap, HEAP_ZERO_MEMORY, dwSize * sizeof(TCHAR)); + if(NULL != pszString) + { + // Load string resource; resize after loading so as not to waste memory. + nResult = LoadString((HMODULE)hModule, uResource, pszString, dwSize); + if(nResult > 0) + { + PTSTR pszTemp; + + + VERBOSE(DLLTEXT("LoadString() returned %d!\r\n"), nResult); + VERBOSE(DLLTEXT("String load was \"%s\".\r\n"), pszString); + + pszTemp = (PTSTR) HeapReAlloc(hHeap, HEAP_ZERO_MEMORY, pszString, (nResult + 1) * sizeof(TCHAR)); + if(NULL != pszTemp) + { + pszString = pszTemp; + } + else + { + ERR(ERRORTEXT("GetStringResource() HeapReAlloc() of string retrieved failed! (Last Error was %d)\r\n"), GetLastError()); + } + } + else + { + ERR(ERRORTEXT("LoadString() returned %d! (Last Error was %d)\r\n"), nResult, GetLastError()); + ERR(ERRORTEXT("GetStringResource() failed to load string resource %d!\r\n"), uResource); + + pszString = NULL; + } + } + else + { + ERR(ERRORTEXT("GetStringResource() failed to allocate string buffer!\r\n")); + } + + return pszString; +} + + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.h b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.h new file mode 100644 index 00000000..1c07802f --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.h @@ -0,0 +1,74 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright 1997 - 2003 Microsoft Corporation. All Rights Reserved. +// +// FILE: OEMUI.H +// +// +// PURPOSE: Define common data types, and external function prototypes +// for OEMUI Test Module. +// +// +#pragma once + +#include "OEM.H" +#include "DEVMODE.H" +#include "globals.h" + +//////////////////////////////////////////////////////// +// OEM UI Defines +//////////////////////////////////////////////////////// + + +// OEM Signature and version. +#define PROP_TITLE L"OEM UI Page" +#define DLLTEXT(s) __TEXT("UI: ") __TEXT(s) + +// OEM UI Misc defines. +#define ERRORTEXT(s) __TEXT("ERROR ") DLLTEXT(s) + + +// Printer registry keys where OEM data is stored. +#define OEMUI_VALUE TEXT("OEMUI_VALUE") +#define OEMUI_DEVICE_VALUE TEXT("OEMUI_DEVICE_VALUE") + +// +//KeyWordNames for OPTITEMS (These are nonlocalised keywords assocaited with driver features. in the OPTITEMS) +// +const char DUPLEXUNIT[] = "DuplexUnit"; +const char ENVFEEDER[] = "EnvFeeder"; +const char PRINTERHDISK[] = "PrinterHardDisk"; + +// +//This structure is used to link the common pages and the OEM plugin page. +// +typedef struct _OEMSHEETDATA { + + // + //Any other OEM Data you may want to store. + // + + + // + //Hold Pointers you may need. + // + HANDLE hComPropSheet; //Handle to the Prop Sheet Parent Page Used when calling ComPropSheet + HANDLE hmyPlugin; //Handle to the OEM Plugin page. Page Used when calling ComPropSheet + PFNCOMPROPSHEET pfnComPropSheet; //Is the Pointer to ComPropSheet This is needed when APPLY is clicked (CPSFUNC_SET_RESULT) + + POEMCUIPPARAM pOEMCUIParam; //Holds links to the DEVMODE and OPTITEMS needed. + IPrintOemDriverUI* pOEMHelp; + +} OEMSHEETDATA, *POEMSHEETDATA; + +//////////////////////////////////////////////////////// +// Prototypes +//////////////////////////////////////////////////////// + +HRESULT hrOEMPropertyPage(DWORD dwMode, POEMCUIPPARAM pOEMUIParam); +HRESULT hrOEMDocumentPropertySheets(PPROPSHEETUI_INFO pPSUIInfo, LPARAM lParam, IPrintOemDriverUI* pOEMHelp); +HRESULT hrOEMDevicePropertySheets(PPROPSHEETUI_INFO pPSUIInfo, LPARAM lParam, POEMSHEETDATA pOemSheetData); + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.rc b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.rc new file mode 100644 index 00000000..e87badbe --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/oemui.rc @@ -0,0 +1,175 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Written by Windows Printing & Imaging Team" + VALUE "CompanyName", "Microsoft Corp." + VALUE "FileDescription", "OEM UI Test Module." + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "OEMUI" + VALUE "LegalCopyright", "Copyright � 1998 - 2003 Microsoft Corp." + VALUE "LegalTrademarks", "Microsoft� is a registered trademark of Microsoft Corporation. Windows(TM) is a trademark of Microsoft Corporation" + VALUE "OriginalFilename", "OEMUI.dll" + VALUE "ProductName", "Microsoft OEMUI" + VALUE "ProductVersion", "1.1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DEVICE_PROPPAGE DIALOG 0, 0, 179, 113 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Device Property Page" +FONT 8, "MS Shell Dialog" +BEGIN + GROUPBOX "Oem Install Options",IDC_STATIC,15,29,81,59 + LTEXT "OEM UI Controls",IDC_STATIC,55,14,68,11,WS_TABSTOP + CONTROL "Duplex Unit",IDC_CHECK_DUPLPEX,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,20,42,54,10 + CONTROL "Printer Hard Drive",IDC_CHECK_HDRIVE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,20,67,75,10 + CONTROL "Envelope Feeder",IDC_CHECK_ENVFEEDER,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,20,54,71,10 +END + +IDD_DOC_PROPPAGE DIALOG 0, 0, 210, 154 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Document Property Page" +FONT 8, "MS Shell Dialog" +BEGIN + LTEXT "OEM UI Document Property Page",IDC_STATIC,60,73,108,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DEVICE_PROPPAGE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 170 + TOPMARGIN, 8 + BOTTOMMARGIN, 106 + END + + IDD_DOC_PROPPAGE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 203 + TOPMARGIN, 7 + BOTTOMMARGIN, 147 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_SECTION "OEM UI Added Item" + IDS_CALIBRATED "Printer has been calibrated." + IDS_NAME "OEM UI Customization DLL" + IDS_DEV_SECTION "Device Settings OEM UI Added Item" + IDS_ADV_SECTION "Advanced OEM UI Added Item" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/precomp.h b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/precomp.h new file mode 100644 index 00000000..2d502998 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/precomp.h @@ -0,0 +1,53 @@ +// +// +// PURPOSE: Header files that should be in the precompiled header. +// +// + +#pragma once + + +// Necessary for compiling under VC. +#if(!defined(WINVER) || (WINVER < 0x0500)) + #undef WINVER + #define WINVER 0x0500 +#endif +#if(!defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)) + #undef _WIN32_WINNT + #define _WIN32_WINNT 0x0500 +#endif + + +// Required header files that shouldn't change often. + + +#include <STDDEF.H> +#include <STDLIB.H> +#include <OBJBASE.H> +#include <STDARG.H> +#include <STDIO.H> +#include <WINDEF.H> +#include <WINERROR.H> +#include <WINBASE.H> +#include <WINGDI.H> +#include <WINDDI.H> +#include <WINSPOOL.H> +#include <TCHAR.H> +#include <EXCPT.H> +#include <ASSERT.H> +#include <PRSHT.H> +#include <COMPSTUI.H> +#include <WINDDIUI.H> +#include <PRINTOEM.H> +#include <INITGUID.H> +#include <PRCOMOEM.H> + +// Safe integer functions to detect integer overflow/underflow conditions: +#include <intsafe.h> + +// Include this last to disallow +// unsafe string functions +#include <strsafe.h> + + + diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/precompsrc.cpp b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/precompsrc.cpp new file mode 100644 index 00000000..5944cf51 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/precompsrc.cpp @@ -0,0 +1 @@ +#include "precomp.h"
\ No newline at end of file diff --git a/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/resource.h b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/resource.h new file mode 100644 index 00000000..aacf0218 --- /dev/null +++ b/print/OEM Printer Customization Plug-in Samples/C++/SyncSet/resource.h @@ -0,0 +1,28 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by oemui.rc +// +#define IDS_SECTION 1 +#define IDS_CALIBRATED 2 +#define IDS_NAME 3 +#define IDS_HELPFILE 4 +#define IDS_DEV_SECTION 5 +#define IDS_ADV_SECTION 10 +#define IDD_DEVICE_PROPPAGE 106 +#define IDD_DOC_PROPPAGE 107 +#define IDC_CALIBRATE 1001 +#define IDC_RADIO3 1004 +#define IDC_CHECK_DUPLPEX 1008 +#define IDC_CHECK_HDRIVE 1009 +#define IDC_CHECK_ENVFEEDER 1010 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 103 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1011 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif |
