diff options
Diffstat (limited to 'setup/DIFxAPI')
| -rw-r--r-- | setup/DIFxAPI/AppDrv/AppDrv.vcxproj | 186 | ||||
| -rw-r--r-- | setup/DIFxAPI/AppDrv/AppDrv.vcxproj.Filters | 22 | ||||
| -rw-r--r-- | setup/DIFxAPI/AppDrv/AppDrvDepend.c | 147 | ||||
| -rw-r--r-- | setup/DIFxAPI/DIFxAPI.sln | 46 | ||||
| -rw-r--r-- | setup/DIFxAPI/DIFxCmd/DIFxCmd.vcxproj | 186 | ||||
| -rw-r--r-- | setup/DIFxAPI/DIFxCmd/DIFxCmd.vcxproj.Filters | 22 | ||||
| -rw-r--r-- | setup/DIFxAPI/DIFxCmd/difxcmd.c | 218 | ||||
| -rw-r--r-- | setup/DIFxAPI/README.md | 5 |
8 files changed, 0 insertions, 832 deletions
diff --git a/setup/DIFxAPI/AppDrv/AppDrv.vcxproj b/setup/DIFxAPI/AppDrv/AppDrv.vcxproj deleted file mode 100644 index 728bebcb..00000000 --- a/setup/DIFxAPI/AppDrv/AppDrv.vcxproj +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}</ProjectGuid> - <RootNamespace>$(MSBuildProjectName)</RootNamespace> - <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> - <SampleGuid>{3C7BBEA0-B28D-4F55-906C-8BACD934B0E6}</SampleGuid> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <PropertyGroup> - <OutDir>$(IntDir)</OutDir> - </PropertyGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='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)'=='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)'=='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)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ItemGroup Label="WrappedTaskItems" /> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetName>AppDrv</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetName>AppDrv</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetName>AppDrv</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetName>AppDrv</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);difxapi.lib</AdditionalDependencies> - </Link> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);difxapi.lib</AdditionalDependencies> - </Link> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);difxapi.lib</AdditionalDependencies> - </Link> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);difxapi.lib</AdditionalDependencies> - </Link> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="AppDrvDepend.c" /> - </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/setup/DIFxAPI/AppDrv/AppDrv.vcxproj.Filters b/setup/DIFxAPI/AppDrv/AppDrv.vcxproj.Filters deleted file mode 100644 index 15c2b2a3..00000000 --- a/setup/DIFxAPI/AppDrv/AppDrv.vcxproj.Filters +++ /dev/null @@ -1,22 +0,0 @@ -<?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>{A172B090-25B7-4514-8F55-96E7C6A68739}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files"> - <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - <UniqueIdentifier>{CF690082-91EA-49D0-BBA9-7DFB89E69FD9}</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>{C14644AC-BA2E-46C9-968B-4C2B2D5CCC3F}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="AppDrvDepend.c"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/setup/DIFxAPI/AppDrv/AppDrvDepend.c b/setup/DIFxAPI/AppDrv/AppDrvDepend.c deleted file mode 100644 index 27180f00..00000000 --- a/setup/DIFxAPI/AppDrv/AppDrvDepend.c +++ /dev/null @@ -1,147 +0,0 @@ -/*++ - -Copyright (c) Microsoft Corporation - - -Description: - -This sample demonstrates how to use the application-to-driver dependency -feature of the Driver Install Frameworks (DIFx) API. The DriverPackageInstall -and the DriverPackageUninstall APIs allow the calling application to register -and remove dependencies on a driver package. In order to register or remove -a dependency on a driver package, the calling application needs to populate -the fields of an INSTALLERINFO structure with information about itself. It -then needs to pass in this structure as a parameter to the DIFx APIs, as -shown in this sample. - ---*/ -#include <windows.h> -#include <stdio.h> -#include <difxapi.h> - -int __cdecl -wmain( int argc, WCHAR* argv[] ) -{ - WCHAR *InfPath = NULL; - INSTALLERINFO AppInfo; - BOOL Result; - BOOL NeedReboot; - - if (argc < 7) { - wprintf( TEXT("USAGE: AppDrv.exe <option> <full path to the inf file> <Application ID> <Product display name> <Product name> <Manufacturer name>\n") ); - wprintf( TEXT("<option> can be one of the following -\n") ); - wprintf( TEXT("/i - Install the driver\n") ); - wprintf( TEXT("/u - Uninstall the driver\n") ); - return 0; - } - - // - // Initialization - // - NeedReboot = FALSE; - - // - // Get the path to the INF file - // - InfPath = argv[2]; - - // - // Fill in the fields of the INSTALLERINFO structure with information about - // the application performing the install. - // - - // - // The application ID should be some random string unique to this - // application. - // - AppInfo.pApplicationId = argv[3]; - AppInfo.pDisplayName = argv[4]; - AppInfo.pProductName = argv[5]; - AppInfo.pMfgName = argv[6]; - - // - // The option parameter should be present and be exactly two characters. - // - if ((argv[1] == NULL) || - (argv[1][0] == TEXT('\0')) || - (argv[1][1] == TEXT('\0')) || - (argv[1][2] != TEXT('\0'))) { - wprintf( TEXT("ERROR: An invalid command line option %ws was passed in!\n"), argv[1] ); - goto clean0; - } - - if ((argv[1][0] == TEXT('/')) && - ((argv[1][1] == TEXT('i')) || - (argv[1][1] == TEXT('I')))) { - // - // Install the driver package, passing in the INSTALLERINFO structure with - // information about the application performing the install. By passing in - // this structure, the "MySoftware" application is expressing a dependency - // on the driver being installed. - // - wprintf( TEXT("INFO: Attempting to install the driver package %ws.\n"), InfPath ); - - Result = DriverPackageInstall(InfPath, - 0, // flags - &AppInfo, // dependency information - &NeedReboot); - - if (ERROR_SUCCESS == Result) { - wprintf( TEXT("SUCCESS: installed driver package %ws.\n"), InfPath ); - } else if (ERROR_NO_MORE_ITEMS == Result) { - wprintf( TEXT("INFO: the driver package %ws was successfully staged on the machine.\n"), InfPath ); - wprintf( TEXT("INFO: All devices found already have a better driver than what is contained in the specified inf file.\n")); - } else if (ERROR_NO_SUCH_DEVINST == Result) { - wprintf( TEXT("INFO: the driver package %ws was successfully staged on the machine.\n"), InfPath ); - wprintf( TEXT("INFO: There aren't any live devnodes with the device ID contained in the INF.\n")); - } else if (ERROR_NO_DEVICE_ID == Result) { - wprintf( TEXT("INFO: the driver package %ws was successfully staged on the machine.\n"), InfPath ); - wprintf( TEXT("INFO: No device IDs found in INF '%ws' for current platform.\n"), InfPath); - } else { - wprintf( TEXT("ERROR: An error occurred while installing driver package %ws. Error code - 0x%X.\n"), InfPath, Result); - goto clean0; - } - - if (NeedReboot){ - wprintf( TEXT("INFO: Machine will have to be rebooted to complete install.\n")); - } - - } else if ((argv[1][0] == TEXT('/')) && - ((argv[1][1] == TEXT('u')) || - (argv[1][1] == TEXT('U')))) { - // - // Uninstall the driver package, passing in the INSTALLERINFO structure - // with information about the application performing the uninstall. By - // passing in this structure, the "MySoftware" application is removing - // its dependency on the driver. The driver will actually be - // uninstalled only if there are no other applications dependent on it. - // If there are other applications depending on the driver, then the call - // to DriverPackageUninstall will simply remove the dependency of the - // "MySoftware" application on the driver, and return - // ERROR_DEPENDENT_APPLICATIONS_EXIST. - // - wprintf( TEXT("INFO: Attempting to uninstall the driver package %ws.\n"), InfPath ); - - Result = DriverPackageUninstall(InfPath, - 0, // flags - &AppInfo, // dependency information - &NeedReboot); - if (ERROR_SUCCESS != Result) { - if (ERROR_DEPENDENT_APPLICATIONS_EXIST == Result) { - wprintf( TEXT("INFO: The driver package %ws was not uninstalled because there were some applications still depending on it.\n"), InfPath); - } else { - wprintf( TEXT("ERROR: An error occurred while uninstalling driver package %ws\n."), InfPath); - goto clean0; - } - } else { - wprintf( TEXT("SUCCESS: Uninstalled driver package %ws.\n"), InfPath ); - } - } else { - wprintf( TEXT("ERROR: An invalid command line option %ws was passed in!\n"), argv[1] ); - } - - clean0: - return 0; -} - - diff --git a/setup/DIFxAPI/DIFxAPI.sln b/setup/DIFxAPI/DIFxAPI.sln deleted file mode 100644 index 03954267..00000000 --- a/setup/DIFxAPI/DIFxAPI.sln +++ /dev/null @@ -1,46 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0 -MinimumVisualStudioVersion = 12.0 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AppDrv", "AppDrv", "{1DD702C0-4A0D-4B8E-880A-2BE850481A3C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DIFxCmd", "DIFxCmd", "{612D3FC0-9B4E-4193-87B4-494CED38A160}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppDrv", "AppDrv\AppDrv.vcxproj", "{AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DIFxCmd", "DIFxCmd\DIFxCmd.vcxproj", "{66FF5637-A914-478C-A484-0395CF982522}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}.Debug|Win32.Build.0 = Debug|Win32 - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}.Release|Win32.ActiveCfg = Release|Win32 - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}.Release|Win32.Build.0 = Release|Win32 - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}.Debug|x64.ActiveCfg = Debug|x64 - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}.Debug|x64.Build.0 = Debug|x64 - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}.Release|x64.ActiveCfg = Release|x64 - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A}.Release|x64.Build.0 = Release|x64 - {66FF5637-A914-478C-A484-0395CF982522}.Debug|Win32.ActiveCfg = Debug|Win32 - {66FF5637-A914-478C-A484-0395CF982522}.Debug|Win32.Build.0 = Debug|Win32 - {66FF5637-A914-478C-A484-0395CF982522}.Release|Win32.ActiveCfg = Release|Win32 - {66FF5637-A914-478C-A484-0395CF982522}.Release|Win32.Build.0 = Release|Win32 - {66FF5637-A914-478C-A484-0395CF982522}.Debug|x64.ActiveCfg = Debug|x64 - {66FF5637-A914-478C-A484-0395CF982522}.Debug|x64.Build.0 = Debug|x64 - {66FF5637-A914-478C-A484-0395CF982522}.Release|x64.ActiveCfg = Release|x64 - {66FF5637-A914-478C-A484-0395CF982522}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {AD9DA6AF-774B-44BE-A2D6-FDFDF465040A} = {1DD702C0-4A0D-4B8E-880A-2BE850481A3C} - {66FF5637-A914-478C-A484-0395CF982522} = {612D3FC0-9B4E-4193-87B4-494CED38A160} - EndGlobalSection -EndGlobal diff --git a/setup/DIFxAPI/DIFxCmd/DIFxCmd.vcxproj b/setup/DIFxAPI/DIFxCmd/DIFxCmd.vcxproj deleted file mode 100644 index eea47159..00000000 --- a/setup/DIFxAPI/DIFxCmd/DIFxCmd.vcxproj +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{66FF5637-A914-478C-A484-0395CF982522}</ProjectGuid> - <RootNamespace>$(MSBuildProjectName)</RootNamespace> - <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> - <SampleGuid>{4C70B696-E995-42AF-99EE-F18B509A43A7}</SampleGuid> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <PropertyGroup> - <OutDir>$(IntDir)</OutDir> - </PropertyGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='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)'=='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)'=='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)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ItemGroup Label="WrappedTaskItems" /> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - </ItemDefinitionGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetName>DIFxCmd</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetName>DIFxCmd</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetName>DIFxCmd</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetName>DIFxCmd</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);difxapi.lib</AdditionalDependencies> - </Link> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);difxapi.lib</AdditionalDependencies> - </Link> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);difxapi.lib</AdditionalDependencies> - </Link> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);difxapi.lib</AdditionalDependencies> - </Link> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="difxcmd.c" /> - </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/setup/DIFxAPI/DIFxCmd/DIFxCmd.vcxproj.Filters b/setup/DIFxAPI/DIFxCmd/DIFxCmd.vcxproj.Filters deleted file mode 100644 index e797a87a..00000000 --- a/setup/DIFxAPI/DIFxCmd/DIFxCmd.vcxproj.Filters +++ /dev/null @@ -1,22 +0,0 @@ -<?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>{48B1E348-F61D-4DDB-BAAE-3C46E25E7398}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files"> - <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - <UniqueIdentifier>{9EE62BE7-B509-4B1E-ADB3-C99D5052EAE0}</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>{C053FE62-1D7A-499E-B3D7-19DAA77C2372}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="difxcmd.c"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/setup/DIFxAPI/DIFxCmd/difxcmd.c b/setup/DIFxAPI/DIFxCmd/difxcmd.c deleted file mode 100644 index 7cc64b95..00000000 --- a/setup/DIFxAPI/DIFxCmd/difxcmd.c +++ /dev/null @@ -1,218 +0,0 @@ -/*++ - -Copyright (c) Microsoft Corporation - - -Description: - - Command line program that demonstrates how to use DIFxAPI. - - Link with either DIFXAPI.LIB and have DIFXAPI.DLL on the path. - - This sample demonstrates how to use DIFXAPI to preinstall, install and uninstall - a driver package. It also allows to retrieve the path to an already preinstalled - or installed driver package. It further shows how to capture logging information - and print it out. ---*/ - -#include <windows.h> -#include <tchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <difxapi.h> - -static VOID __cdecl -LogCallback( - DIFXAPI_LOG Event, - DWORD Error, - const TCHAR * pEventDescription, - PVOID CallbackContext - ); - - -int __cdecl -_tmain( - int argc, - TCHAR* argv[] - ) -{ - TCHAR DestPath[MAX_PATH]; - ULONG Size = MAX_PATH; - TCHAR * InfPath = NULL; - TCHAR DriverPackageInfPath[MAX_PATH]; - DWORD Ret; - TCHAR Option; - BOOL NeedReboot = FALSE; - DWORD Flags = 0; - LPTSTR lpFilePart; - int i; - DWORD dw; - Size = MAX_PATH; - - - _tprintf( TEXT("DIFxAPI Sample Program\n") ); - if( argc < 3 ) - { - _tprintf( TEXT("USAGE: test /p /i /u /g <inf-filename> [Flag(s)]\n") ); - _tprintf( TEXT("\nOptions:\n")); - _tprintf( TEXT("/p : preinstall driver package.\n") ); - _tprintf( TEXT("/i : install driver package.\n") ); - _tprintf( TEXT("/u : uninstall driver package.\n") ); - _tprintf( TEXT("/g : get driver package path.\n") ); - - _tprintf( TEXT("\n<inf-filename> : has to be in the current directory.\n") ); - _tprintf( TEXT("\nFlags:\n")); - _tprintf( TEXT("DRIVER_PACKAGE_REPAIR: 0x00000001 ( 1)\n")); - _tprintf( TEXT("DRIVER_PACKAGE_SILENT: 0x00000002 ( 2)\n")); - _tprintf( TEXT("DRIVER_PACKAGE_FORCE: 0x00000004 ( 4)\n")); - _tprintf( TEXT("DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT: 0x00000008 ( 8)\n")); - _tprintf( TEXT("DRIVER_PACKAGE_LEGACY: 0x00000010 (16)\n")); - _tprintf( TEXT("DRIVER_PACKAGE_DELETE_FILES: 0x00000020 (32)\n")); - - return 0; - } - - // - // Get command line choices - // - - // - // The code suppresses the warning 28193 for the call to _totlower. - // This suppression is done because that function has a check return - // annotation on it. However, it doesn't return an error code - // and the check return annotation is really being used to indicate - // that the return value of the function should be looked at and/or - // assigned to a variable. The check return annotation means the return - // value should always be checked in all code paths. The return value is - // assigned to a variable, but the return in the for loop could cause - // this function to exit before Option is ever examined. For that case, - // the code doesn't need to check the value of Option so the warning - // is being suppressed - // -#pragma warning( suppress: 28193) - Option = (TCHAR)_totlower(argv[1][1]); - InfPath = argv[2]; - - for ( i = 3; i<argc; i++ ){ - dw = _ttol( argv[i] ); - // - // Either an error occurred during conversion of a flags parameter - // into a long or a flag of 0 was specified. Either way, - // this is invalid input. - // - if (0 == dw) - { - _tprintf( TEXT("An invalid flag was specified.") ); - - return 0; - } - - Flags |= dw; - } - - - GetFullPathName( InfPath, MAX_PATH, DriverPackageInfPath, &lpFilePart); - - _tprintf( TEXT("INFO: Option \"/%c\"\n"), Option ); - _tprintf( TEXT("INFO: Input file \"%s\"\n"), DriverPackageInfPath ); - _tprintf( TEXT("INFO: Flags 0x%X (%u)\n\n"), Flags, Flags ); - - - DIFXAPISetLogCallback( LogCallback, (PVOID)NULL ); - - Ret = ERROR_SUCCESS; - - if ( TEXT('p') == Option ) - { - _tprintf( TEXT("TEST: preinstalling driver package.\n")); - Ret = DriverPackagePreinstall( DriverPackageInfPath, Flags ); - if( ERROR_SUCCESS == Ret ){ - _tprintf( TEXT("INFO: preinstalled package.\n") ); - } else if (ERROR_ALREADY_EXISTS == Ret){ - _tprintf( TEXT("INFO: package was already in store.\n") ); - } else { - _tprintf( TEXT("ERROR: failed with error code 0x%X\n"), Ret ); - } - } - else if ( TEXT('i') == Option ) - { - _tprintf( TEXT("TEST: installing driver package.\n")); - - Ret = DriverPackageInstall( - DriverPackageInfPath, - Flags, - NULL, - &NeedReboot ); - - if( ERROR_SUCCESS == Ret ){ - _tprintf( TEXT("SUCCESS: installed package %s.\n"), DriverPackageInfPath ); - } else if (ERROR_NO_MORE_ITEMS == Ret){ - _tprintf( TEXT("INFO: All devices found already have a better driver than what is contained in the specified inf file. To force an install, use the ForceIfNotBetter flag.\n")); - } else if (ERROR_NO_SUCH_DEVINST == Ret){ - _tprintf( TEXT("INFO: There aren't any live devnodes with the DeviceId contained in the INF.\n")); - } - else{ - _tprintf( TEXT("ERROR: failed with error code 0x%X\n"), Ret ); - } - - if (NeedReboot){ - _tprintf( TEXT("INFO: Machine will have to be rebooted to complete install.") ); - } - - } - else if ( TEXT('u') == Option ) - { - _tprintf( TEXT("TEST: uninstalling driver package.\n")); - - Ret = DriverPackageUninstall( - DriverPackageInfPath, - Flags, - NULL, - &NeedReboot ); - - if( ERROR_SUCCESS == Ret ){ - _tprintf( TEXT("SUCCESS: uninstalled driver package %s.\n"), DriverPackageInfPath ); - } else { - _tprintf( TEXT("ERROR: failed with error code 0x%X\n"), Ret ); - } - - if (NeedReboot) { - _tprintf( TEXT("INFO: Machine will have to be rebooted to complete uninstall.") ); - } - - } - else if ( TEXT('g') == Option ) - { - _tprintf( TEXT("TEST: getting driver package path.\n")); - Ret = DriverPackageGetPath( DriverPackageInfPath, DestPath, &Size ); - if ( ERROR_SUCCESS==Ret ){ - _tprintf( TEXT("INFO: INF path is %s\n"), DestPath ); - } else { - _tprintf( TEXT("ERROR: failed with error code 0x%X\n"), Ret ); - } - } else { - _tprintf( TEXT("ERROR: invalid command line option /%c.\n"), Option ); - } - - DIFXAPISetLogCallback( NULL, (PVOID)NULL ); - - return 1; -} - - - -VOID __cdecl -LogCallback( - DIFXAPI_LOG Event, - DWORD Error, - const TCHAR * pEventDescription, - PVOID CallbackContext - ) -{ - UNREFERENCED_PARAMETER(CallbackContext); - if (0==Error){ - _tprintf( TEXT("LOG Event: %u, %s\n"), Event, pEventDescription ); - } else { - _tprintf( TEXT("LOG Event: %u, Error = %u, %s\n"), Event, Error, pEventDescription); - } -} diff --git a/setup/DIFxAPI/README.md b/setup/DIFxAPI/README.md deleted file mode 100644 index cbbea926..00000000 --- a/setup/DIFxAPI/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Driver Install Frameworks API (DIFxAPI) Sample -============================================== - -[Driver Install Frameworks API (DIFxAPI)](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544834) Sample. - |
