summaryrefslogtreecommitdiff
path: root/general
diff options
context:
space:
mode:
authorya-solnyshko <[email protected]>2024-12-29 18:38:40 +0100
committerGitHub <[email protected]>2024-12-29 18:38:40 +0100
commit3dbe73da0848fce170ff4f59459bc597f0d0cd34 (patch)
tree878510e10356226b2b529cac769be4c3573f5ef9 /general
parentd0b2ae23542a22bdddcb30c9d82d89c614027faa (diff)
parent57ecdd5d16347ef3bc1348a164ce90288c44c243 (diff)
Merge branch 'main' into fix-transaction-processing
Diffstat (limited to 'general')
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inxbin7898 -> 3827 bytes
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.inxbin3386 -> 1628 bytes
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inxbin3020 -> 1455 bytes
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inxbin3386 -> 1628 bytes
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inxbin2994 -> 1442 bytes
-rw-r--r--general/PLX9x5x/sys/pci9x5x.inxbin5334 -> 2574 bytes
-rw-r--r--general/SimpleMediaSource/SimpleMediaSourceDriver/SimpleMediaSourceDriver.infbin6768 -> 3283 bytes
-rw-r--r--general/echo/kmdf/driver/AutoSync/echo.inxbin4138 -> 1981 bytes
-rw-r--r--general/echo/kmdf/driver/DriverSync/echo_2.inxbin4272 -> 2047 bytes
-rw-r--r--general/echo/umdf2/driver/AutoSync/echoum.inxbin4596 -> 2198 bytes
-rw-r--r--general/ioctl/kmdf/exe/install.c432
-rw-r--r--general/ioctl/kmdf/exe/nonpnp.inf8
-rw-r--r--general/ioctl/kmdf/exe/testapp.c120
-rw-r--r--general/pcidrv/kmdf/genpci.inxbin6258 -> 3028 bytes
-rw-r--r--general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inxbin4794 -> 2309 bytes
-rw-r--r--general/toaster/toastDrv/kmdf/bus/static/statbus.inxbin4696 -> 2260 bytes
-rw-r--r--general/toaster/toastDrv/kmdf/filter/filter.inxbin6262 -> 3016 bytes
-rw-r--r--general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inxbin5076 -> 2442 bytes
-rw-r--r--general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inxbin6070 -> 2935 bytes
-rw-r--r--general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inxbin3964 -> 1898 bytes
-rw-r--r--general/toaster/umdf2/filter/generic/filterum.inxbin4586 -> 2197 bytes
-rw-r--r--general/toaster/umdf2/func/featured/wdffeaturedum.inxbin4730 -> 2267 bytes
-rw-r--r--general/toaster/umdf2/func/simple/wdfsimpleum.inxbin4606 -> 2206 bytes
23 files changed, 86 insertions, 474 deletions
diff --git a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inx b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inx
index 39bd5468..eca5c5cc 100644
--- a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inx
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inx
Binary files differ
diff --git a/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.inx b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
index 045fc91f..cc9e43a9 100644
--- a/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
Binary files differ
diff --git a/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
index a762b235..d824d08b 100644
--- a/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
Binary files differ
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inx b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
index 045fc91f..cc9e43a9 100644
--- a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
Binary files differ
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
index 17670efa..a8f2a505 100644
--- a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
Binary files differ
diff --git a/general/PLX9x5x/sys/pci9x5x.inx b/general/PLX9x5x/sys/pci9x5x.inx
index 8fdb2eea..0d98041d 100644
--- a/general/PLX9x5x/sys/pci9x5x.inx
+++ b/general/PLX9x5x/sys/pci9x5x.inx
Binary files differ
diff --git a/general/SimpleMediaSource/SimpleMediaSourceDriver/SimpleMediaSourceDriver.inf b/general/SimpleMediaSource/SimpleMediaSourceDriver/SimpleMediaSourceDriver.inf
index d9f05402..aa21c882 100644
--- a/general/SimpleMediaSource/SimpleMediaSourceDriver/SimpleMediaSourceDriver.inf
+++ b/general/SimpleMediaSource/SimpleMediaSourceDriver/SimpleMediaSourceDriver.inf
Binary files differ
diff --git a/general/echo/kmdf/driver/AutoSync/echo.inx b/general/echo/kmdf/driver/AutoSync/echo.inx
index cd83b6c0..60be19a8 100644
--- a/general/echo/kmdf/driver/AutoSync/echo.inx
+++ b/general/echo/kmdf/driver/AutoSync/echo.inx
Binary files differ
diff --git a/general/echo/kmdf/driver/DriverSync/echo_2.inx b/general/echo/kmdf/driver/DriverSync/echo_2.inx
index b4cf3c25..73987894 100644
--- a/general/echo/kmdf/driver/DriverSync/echo_2.inx
+++ b/general/echo/kmdf/driver/DriverSync/echo_2.inx
Binary files differ
diff --git a/general/echo/umdf2/driver/AutoSync/echoum.inx b/general/echo/umdf2/driver/AutoSync/echoum.inx
index 00320858..9962e6c2 100644
--- a/general/echo/umdf2/driver/AutoSync/echoum.inx
+++ b/general/echo/umdf2/driver/AutoSync/echoum.inx
Binary files differ
diff --git a/general/ioctl/kmdf/exe/install.c b/general/ioctl/kmdf/exe/install.c
index 7060243a..ed2aa6e8 100644
--- a/general/ioctl/kmdf/exe/install.c
+++ b/general/ioctl/kmdf/exe/install.c
@@ -22,101 +22,44 @@ Environment:
--*/
-#include <DriverSpecs.h>
-_Analysis_mode_(_Analysis_code_type_user_code_)
-
#include <windows.h>
-#include <strsafe.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strsafe.h>
#include "public.h"
-#include <wdfinstaller.h>
-
-#define ARRAY_SIZE(x) (sizeof(x) /sizeof(x[0]))
-
-extern
-PCHAR
-GetCoinstallerVersion(
- VOID
- ) ;
-
BOOLEAN
InstallDriver(
- IN SC_HANDLE SchSCManager,
- IN LPCTSTR DriverName,
- IN LPCTSTR ServiceExe
+ _In_ SC_HANDLE SchSCManager,
+ _In_ LPCTSTR DriverName,
+ _In_ LPCTSTR ServiceExe
);
BOOLEAN
RemoveDriver(
- IN SC_HANDLE SchSCManager,
- IN LPCTSTR DriverName
+ _In_ SC_HANDLE SchSCManager,
+ _In_ LPCTSTR DriverName
);
BOOLEAN
StartDriver(
- IN SC_HANDLE SchSCManager,
- IN LPCTSTR DriverName
+ _In_ SC_HANDLE SchSCManager,
+ _In_ LPCTSTR DriverName
);
BOOLEAN
StopDriver(
- IN SC_HANDLE SchSCManager,
- IN LPCTSTR DriverName
+ _In_ SC_HANDLE SchSCManager,
+ _In_ LPCTSTR DriverName
);
-#define SYSTEM32_DRIVERS "\\System32\\Drivers\\"
-#define NONPNP_INF_FILENAME L"\\nonpnp.inf"
-#define WDF_SECTION_NAME L"nonpnp.NT.Wdf"
-
-//----------------------------------------------------------------------------
-//
-//----------------------------------------------------------------------------
-PFN_WDFPREDEVICEINSTALLEX pfnWdfPreDeviceInstallEx;
-PFN_WDFPOSTDEVICEINSTALL pfnWdfPostDeviceInstall;
-PFN_WDFPREDEVICEREMOVE pfnWdfPreDeviceRemove;
-PFN_WDFPOSTDEVICEREMOVE pfnWdfPostDeviceRemove;
-
-//-----------------------------------------------------------------------------
-// 4127 -- Conditional Expression is Constant warning
-//-----------------------------------------------------------------------------
-#define WHILE(a) \
-__pragma(warning(suppress:4127)) while(a)
-
-LONG
-GetPathToInf(
- _Out_writes_(InfFilePathSize) PWCHAR InfFilePath,
- IN ULONG InfFilePathSize
- )
-{
- LONG error = ERROR_SUCCESS;
-
- if (GetCurrentDirectoryW(InfFilePathSize, InfFilePath) == 0) {
- error = GetLastError();
- printf("InstallDriver failed! Error = %d \n", error);
- return error;
- }
- if (FAILED( StringCchCatW(InfFilePath,
- InfFilePathSize,
- NONPNP_INF_FILENAME) )) {
- error = ERROR_BUFFER_OVERFLOW;
- return error;
- }
- return error;
-
-}
-
-//----------------------------------------------------------------------------
-//
-//----------------------------------------------------------------------------
BOOLEAN
InstallDriver(
- IN SC_HANDLE SchSCManager,
- IN LPCTSTR DriverName,
- IN LPCTSTR ServiceExe
+ _In_ SC_HANDLE SchSCManager,
+ _In_ LPCTSTR DriverName,
+ _In_ LPCTSTR ServiceExe
)
/*++
@@ -130,10 +73,6 @@ Return Value:
{
SC_HANDLE schService;
DWORD err;
- WCHAR infPath[MAX_PATH];
- WDF_COINSTALLER_INSTALL_OPTIONS clientOptions;
-
- WDF_COINSTALLER_INSTALL_OPTIONS_INIT(&clientOptions);
//
// NOTE: This creates an entry for a standalone driver. If this
@@ -142,22 +81,6 @@ Return Value:
// query the registry for existing driver information
// (in order to determine a unique Tag, etc.).
//
- //
- // PRE-INSTALL for WDF support
- //
- err = GetPathToInf(infPath, ARRAY_SIZE(infPath) );
- if (err != ERROR_SUCCESS) {
- return FALSE;
- }
- err = pfnWdfPreDeviceInstallEx(infPath, WDF_SECTION_NAME, &clientOptions);
-
- if (err != ERROR_SUCCESS) {
- if (err == ERROR_SUCCESS_REBOOT_REQUIRED) {
- printf("System needs to be rebooted, before the driver installation can proceed.\n");
- }
-
- return FALSE;
- }
//
// Create a new a service object.
@@ -205,15 +128,10 @@ Return Value:
//
// Close the service object.
//
- CloseServiceHandle(schService);
- //
- // POST-INSTALL for WDF support
- //
- err = pfnWdfPostDeviceInstall( infPath, WDF_SECTION_NAME );
+ if (schService) {
- if (err != ERROR_SUCCESS) {
- return FALSE;
+ CloseServiceHandle(schService);
}
//
@@ -226,9 +144,9 @@ Return Value:
BOOLEAN
ManageDriver(
- IN LPCTSTR DriverName,
- IN LPCTSTR ServiceName,
- IN USHORT Function
+ _In_ LPCTSTR DriverName,
+ _In_ LPCTSTR ServiceName,
+ _In_ USHORT Function
)
{
@@ -337,7 +255,11 @@ ManageDriver(
//
// Close handle to service control manager.
//
- CloseServiceHandle(schSCManager);
+
+ if (schSCManager) {
+
+ CloseServiceHandle(schSCManager);
+ }
return rCode;
@@ -346,28 +268,12 @@ ManageDriver(
BOOLEAN
RemoveDriver(
- IN SC_HANDLE SchSCManager,
- IN LPCTSTR DriverName
+ _In_ SC_HANDLE SchSCManager,
+ _In_ LPCTSTR DriverName
)
{
SC_HANDLE schService;
BOOLEAN rCode;
- DWORD err;
- WCHAR infPath[MAX_PATH];
-
- err = GetPathToInf(infPath, ARRAY_SIZE(infPath) );
- if (err != ERROR_SUCCESS) {
- return FALSE;
- }
-
- //
- // PRE-REMOVE of WDF support
- //
- err = pfnWdfPreDeviceRemove( infPath, WDF_SECTION_NAME );
-
- if (err != ERROR_SUCCESS) {
- return FALSE;
- }
//
// Open the handle to the existing service.
@@ -415,15 +321,10 @@ RemoveDriver(
//
// Close the service object.
//
- CloseServiceHandle(schService);
- //
- // POST-REMOVE of WDF support
- //
- err = pfnWdfPostDeviceRemove(infPath, WDF_SECTION_NAME );
+ if (schService) {
- if (err != ERROR_SUCCESS) {
- rCode = FALSE;
+ CloseServiceHandle(schService);
}
return rCode;
@@ -434,59 +335,73 @@ RemoveDriver(
BOOLEAN
StartDriver(
- IN SC_HANDLE SchSCManager,
- IN LPCTSTR DriverName
+ _In_ SC_HANDLE SchSCManager,
+ _In_ LPCTSTR DriverName
)
{
SC_HANDLE schService;
DWORD err;
- BOOL ok;
//
// Open the handle to the existing service.
//
+
schService = OpenService(SchSCManager,
DriverName,
SERVICE_ALL_ACCESS
);
if (schService == NULL) {
+
+ printf("OpenService failed! Error = %d \n", GetLastError());
+
//
// Indicate failure.
//
- printf("OpenService failed! Error = %d\n", GetLastError());
+
return FALSE;
}
//
// Start the execution of the service (i.e. start the driver).
//
- ok = StartService( schService, 0, NULL );
- if (!ok) {
+ if (!StartService(schService, // service identifier
+ 0, // number of arguments
+ NULL // pointer to arguments
+ )) {
err = GetLastError();
if (err == ERROR_SERVICE_ALREADY_RUNNING) {
+
//
// Ignore this error.
//
+
return TRUE;
} else {
+
+ printf("StartService failure! Error = %d \n", err );
+
//
- // Indicate failure.
- // Fall through to properly close the service handle.
+ // Indicate failure. Fall through to properly close the service handle.
//
- printf("StartService failure! Error = %d\n", err );
+
return FALSE;
}
+
}
//
// Close the service object.
//
- CloseServiceHandle(schService);
+
+ if (schService) {
+
+ CloseServiceHandle(schService);
+ }
return TRUE;
@@ -496,8 +411,8 @@ StartDriver(
BOOLEAN
StopDriver(
- IN SC_HANDLE SchSCManager,
- IN LPCTSTR DriverName
+ _In_ SC_HANDLE SchSCManager,
+ _In_ LPCTSTR DriverName
)
{
BOOLEAN rCode = TRUE;
@@ -549,264 +464,87 @@ StopDriver(
//
// Close the service object.
//
- CloseServiceHandle (schService);
-
- return rCode;
-
-} // StopDriver
-
-
-//
-// Caller must free returned pathname string.
-//
-PCHAR
-BuildDriversDirPath(
- _In_ PSTR DriverName
- )
-{
- size_t remain;
- size_t len;
- PCHAR dir;
-
- if (!DriverName || strlen(DriverName) == 0) {
- return NULL;
- }
-
- remain = MAX_PATH;
-
- //
- // Allocate string space
- //
- dir = (PCHAR) malloc( remain + 1 );
-
- if (!dir) {
- return NULL;
- }
-
- //
- // Get the base windows directory path.
- //
- len = GetWindowsDirectory( dir, (UINT) remain );
-
- if (len == 0 ||
- (remain - len) < sizeof(SYSTEM32_DRIVERS)) {
- free(dir);
- return NULL;
- }
- remain -= len;
- //
- // Build dir to have "%windir%\System32\Drivers\<DriverName>".
- //
- if (FAILED( StringCchCat(dir, remain, SYSTEM32_DRIVERS) )) {
- free(dir);
- return NULL;
- }
-
- remain -= sizeof(SYSTEM32_DRIVERS);
- len += sizeof(SYSTEM32_DRIVERS);
- len += strlen(DriverName);
-
- if (remain < len) {
- free(dir);
- return NULL;
- }
+ if (schService) {
- if (FAILED( StringCchCat(dir, remain, DriverName) )) {
- free(dir);
- return NULL;
+ CloseServiceHandle (schService);
}
- dir[len] = '\0'; // keeps prefast happy
-
- return dir;
-}
+ return rCode;
+} // StopDriver
BOOLEAN
SetupDriverName(
- _Inout_updates_all_(BufferLength) PCHAR DriverLocation,
+ _Inout_updates_bytes_all_(BufferLength) PCHAR DriverLocation,
_In_ ULONG BufferLength
)
{
HANDLE fileHandle;
- DWORD driverLocLen = 0;
- BOOL ok;
- PCHAR driversDir;
+ DWORD driverLocLen = 0;
//
- // Setup path name to driver file.
+ // Get the current directory.
//
- driverLocLen =
- GetCurrentDirectory(BufferLength, DriverLocation);
- if (!driverLocLen) {
+ driverLocLen = GetCurrentDirectory(BufferLength,
+ DriverLocation
+ );
- printf("GetCurrentDirectory failed! Error = %d \n",
- GetLastError());
+ if (driverLocLen == 0) {
- return FALSE;
- }
+ printf("GetCurrentDirectory failed! Error = %d \n", GetLastError());
- if (FAILED( StringCchCat(DriverLocation, BufferLength, "\\" DRIVER_NAME ".sys") )) {
return FALSE;
}
//
- // Insure driver file is in the specified directory.
+ // Setup path name to driver file.
//
- fileHandle = CreateFile( DriverLocation,
- GENERIC_READ,
- FILE_SHARE_READ,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL );
-
- if (fileHandle == INVALID_HANDLE_VALUE) {
- //
- // Indicate failure.
- //
- printf("Driver: %s.SYS is not in the %s directory. \n",
- DRIVER_NAME, DriverLocation );
+ if (FAILED( StringCbCat(DriverLocation, BufferLength, "\\"DRIVER_NAME".sys") )) {
return FALSE;
}
//
- // Build %windir%\System32\Drivers\<DRIVER_NAME> path.
- // Copy the driver to %windir%\system32\drivers
+ // Insure driver file is in the specified directory.
//
- driversDir = BuildDriversDirPath( DRIVER_NAME ".sys" );
- if (!driversDir) {
- printf("BuildDriversDirPath failed!\n");
- return FALSE;
- }
+ if ((fileHandle = CreateFile(DriverLocation,
+ GENERIC_READ,
+ 0,
+ NULL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL
+ )) == INVALID_HANDLE_VALUE) {
- ok = CopyFile( DriverLocation, driversDir, FALSE );
- if(!ok) {
- printf("CopyFile failed: error(%d) - \"%s\"\n",
- GetLastError(), driversDir );
- free(driversDir);
- return FALSE;
- }
+ printf("%s.sys is not loaded.\n", DRIVER_NAME);
+
+ //
+ // Indicate failure.
+ //
- if (FAILED( StringCchCopy(DriverLocation, BufferLength, driversDir) )) {
- free(driversDir);
return FALSE;
}
- free(driversDir);
-
//
// Close open file handle.
//
+
if (fileHandle) {
+
CloseHandle(fileHandle);
}
//
// Indicate success.
//
- return TRUE;
-
-} // SetupDriverName
+ return TRUE;
-HMODULE
-LoadWdfCoInstaller(
- VOID
- )
-{
- HMODULE library = NULL;
- DWORD error = ERROR_SUCCESS;
- CHAR szCurDir[MAX_PATH];
- CHAR tempCoinstallerName[MAX_PATH];
- PCHAR coinstallerVersion;
-
- do {
-
- if (GetCurrentDirectory(MAX_PATH, szCurDir) == 0) {
-
- printf("GetCurrentDirectory failed! Error = %d \n", GetLastError());
- break;
- }
- coinstallerVersion = GetCoinstallerVersion();
- if (FAILED( StringCchPrintf(tempCoinstallerName,
- MAX_PATH,
- "\\WdfCoInstaller%s.dll",
- coinstallerVersion) )) {
- break;
- }
- if (FAILED( StringCchCat(szCurDir, MAX_PATH, tempCoinstallerName) )) {
- break;
- }
-
- library = LoadLibrary(szCurDir);
-
- if (library == NULL) {
- error = GetLastError();
- printf("LoadLibrary(%s) failed: %d\n", szCurDir, error);
- break;
- }
-
- pfnWdfPreDeviceInstallEx =
- (PFN_WDFPREDEVICEINSTALLEX) GetProcAddress( library, "WdfPreDeviceInstallEx" );
-
- if (pfnWdfPreDeviceInstallEx == NULL) {
- error = GetLastError();
- printf("GetProcAddress(\"WdfPreDeviceInstallEx\") failed: %d\n", error);
- return NULL;
- }
-
- pfnWdfPostDeviceInstall =
- (PFN_WDFPOSTDEVICEINSTALL) GetProcAddress( library, "WdfPostDeviceInstall" );
-
- if (pfnWdfPostDeviceInstall == NULL) {
- error = GetLastError();
- printf("GetProcAddress(\"WdfPostDeviceInstall\") failed: %d\n", error);
- return NULL;
- }
-
- pfnWdfPreDeviceRemove =
- (PFN_WDFPREDEVICEREMOVE) GetProcAddress( library, "WdfPreDeviceRemove" );
-
- if (pfnWdfPreDeviceRemove == NULL) {
- error = GetLastError();
- printf("GetProcAddress(\"WdfPreDeviceRemove\") failed: %d\n", error);
- return NULL;
- }
-
- pfnWdfPostDeviceRemove =
- (PFN_WDFPREDEVICEREMOVE) GetProcAddress( library, "WdfPostDeviceRemove" );
-
- if (pfnWdfPostDeviceRemove == NULL) {
- error = GetLastError();
- printf("GetProcAddress(\"WdfPostDeviceRemove\") failed: %d\n", error);
- return NULL;
- }
-
- } WHILE (0);
-
- if (error != ERROR_SUCCESS) {
- if (library) {
- FreeLibrary( library );
- }
- library = NULL;
- }
- return library;
-}
+} // SetupDriverName
-VOID
-UnloadWdfCoInstaller(
- HMODULE Library
- )
-{
- if (Library) {
- FreeLibrary( Library );
- }
-}
diff --git a/general/ioctl/kmdf/exe/nonpnp.inf b/general/ioctl/kmdf/exe/nonpnp.inf
deleted file mode 100644
index b20a58b4..00000000
--- a/general/ioctl/kmdf/exe/nonpnp.inf
+++ /dev/null
@@ -1,8 +0,0 @@
-[Version]
-Signature="$WINDOWS NT$"
-
-[nonpnp.NT.Wdf]
-KmdfService = nonpnp, nonpnp_Service_kmdfInst
-
-[nonpnp_Service_kmdfInst]
-KmdfLibraryVersion = 1.11
diff --git a/general/ioctl/kmdf/exe/testapp.c b/general/ioctl/kmdf/exe/testapp.c
index 6586401e..492c6355 100644
--- a/general/ioctl/kmdf/exe/testapp.c
+++ b/general/ioctl/kmdf/exe/testapp.c
@@ -54,16 +54,6 @@ ManageDriver(
IN USHORT Function
);
-HMODULE
-LoadWdfCoInstaller(
- VOID
- );
-
-VOID
-UnloadWdfCoInstaller(
- HMODULE Library
- );
-
BOOLEAN
SetupDriverName(
_Inout_updates_all_(BufferLength) PCHAR DriverLocation,
@@ -80,14 +70,7 @@ DoIoctls(
HANDLE hDevice
);
-// for example, WDF 1.9 is "01009". the size 6 includes the ending NULL marker
-//
-#define MAX_VERSION_SIZE 6
-
-CHAR G_coInstallerVersion[MAX_VERSION_SIZE] = {0};
BOOLEAN G_fLoop = FALSE;
-BOOL G_versionSpecified = FALSE;
-
//-----------------------------------------------------------------------------
@@ -98,30 +81,9 @@ __pragma(warning(disable: 4127)) while(constant); __pragma(warning(default: 4127
#define USAGE \
-"Usage: nonpnpapp <-V version> <-l> \n" \
- " -V version {if no version is specified the version specified in the build environment will be used.}\n" \
- " The version is the version of the KMDF coinstaller to use \n" \
- " The format of version is MMmmm where MM -- major #, mmm - serial# \n" \
+"Usage: nonpnpapp <-l> \n" \
" -l { option to continuously read & write to the file} \n"
-BOOL
-ValidateCoinstallerVersion(
- _In_ PSTR Version
- )
-{ BOOL ok = FALSE;
- INT i;
-
- for(i= 0; i<MAX_VERSION_SIZE ;i++){
- if( ! IsCharAlphaNumericA(Version[i])) {
- break;
- }
- }
- if (i == (MAX_VERSION_SIZE -sizeof(CHAR))) {
- ok = TRUE;
- }
- return ok;
-}
-
LONG
Parse(
_In_ int argc,
@@ -143,42 +105,12 @@ Return Value:
--*/
{
int i;
- BOOL ok;
LONG error = ERROR_SUCCESS;
for (i=0; i<argc; i++) {
if (argv[i][0] == '-' ||
argv[i][0] == '/') {
switch(argv[i][1]) {
- case 'V':
- case 'v':
- if (( (i+1 < argc ) &&
- ( argv[i+1][0] != '-' && argv[i+1][0] != '/'))) {
- //
- // use version in commandline
- //
- i++;
- ok = ValidateCoinstallerVersion(argv[i]);
- if (!ok) {
- printf("Not a valid format for coinstaller version\n"
- "It should be characters between A-Z, a-z , 0-9\n"
- "The version format is MMmmm where MM -- major #, mmm - serial#");
- error = ERROR_INVALID_PARAMETER;
- break;
- }
- if (FAILED( StringCchCopy(G_coInstallerVersion,
- MAX_VERSION_SIZE,
- argv[i]) )) {
- break;
- }
- G_versionSpecified = TRUE;
-
- }
- else{
- printf(USAGE);
- error = ERROR_INVALID_PARAMETER;
- }
- break;
case 'l':
case 'L':
G_fLoop = TRUE;
@@ -193,24 +125,6 @@ Return Value:
return error;
}
-PCHAR
-GetCoinstallerVersion(
- VOID
- )
-{
- if (!G_versionSpecified &&
- FAILED( StringCchPrintf(G_coInstallerVersion,
- MAX_VERSION_SIZE,
- "%02d%03d", // for example, "01009"
- KMDF_VERSION_MAJOR,
- KMDF_VERSION_MINOR)))
- {
- printf("StringCchCopy failed with error \n");
- }
-
- return (PCHAR)&G_coInstallerVersion;
-}
-
VOID __cdecl
main(
_In_ ULONG argc,
@@ -221,9 +135,7 @@ main(
DWORD errNum = 0;
CHAR driverLocation [MAX_PATH];
BOOL ok;
- HMODULE library = NULL;
LONG error;
- PCHAR coinstallerVersion;
//
// Parse command line args
@@ -236,19 +148,6 @@ main(
}
}
- if (!G_versionSpecified ) {
- coinstallerVersion = GetCoinstallerVersion();
-
- //
- // if no version is specified or an invalid one is specified use default version
- //
- printf("No version specified. Using default version:%s\n",
- coinstallerVersion);
-
- } else {
- coinstallerVersion = (PCHAR)&G_coInstallerVersion;
- }
-
//
// open the device
//
@@ -273,17 +172,6 @@ main(
}
//
- // Load WdfCoInstaller.dll.
- //
- library = LoadWdfCoInstaller();
-
- if (library == NULL) {
- printf("The WdfCoInstaller%s.dll library needs to be "
- "in same directory as nonpnpapp.exe\n", coinstallerVersion);
- return;
- }
-
- //
// The driver is not started yet so let us install the driver.
// First setup full path to driver name.
//
@@ -351,12 +239,6 @@ main(
driverLocation,
DRIVER_FUNC_REMOVE );
- //
- // Unload WdfCoInstaller.dll
- //
- if ( library ) {
- UnloadWdfCoInstaller( library );
- }
return;
}
diff --git a/general/pcidrv/kmdf/genpci.inx b/general/pcidrv/kmdf/genpci.inx
index f8581414..1c474ca2 100644
--- a/general/pcidrv/kmdf/genpci.inx
+++ b/general/pcidrv/kmdf/genpci.inx
Binary files differ
diff --git a/general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inx b/general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inx
index f557b6e3..e42b1969 100644
--- a/general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inx
+++ b/general/toaster/toastDrv/kmdf/bus/dynamic/dynambus.inx
Binary files differ
diff --git a/general/toaster/toastDrv/kmdf/bus/static/statbus.inx b/general/toaster/toastDrv/kmdf/bus/static/statbus.inx
index 094bce09..8f433735 100644
--- a/general/toaster/toastDrv/kmdf/bus/static/statbus.inx
+++ b/general/toaster/toastDrv/kmdf/bus/static/statbus.inx
Binary files differ
diff --git a/general/toaster/toastDrv/kmdf/filter/filter.inx b/general/toaster/toastDrv/kmdf/filter/filter.inx
index 8a2ca006..31c6cf93 100644
--- a/general/toaster/toastDrv/kmdf/filter/filter.inx
+++ b/general/toaster/toastDrv/kmdf/filter/filter.inx
Binary files differ
diff --git a/general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inx b/general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inx
index b91edc1b..7310ceb2 100644
--- a/general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inx
+++ b/general/toaster/toastDrv/kmdf/func/featured/wdffeatured.inx
Binary files differ
diff --git a/general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inx b/general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inx
index 549f20e1..203e251f 100644
--- a/general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inx
+++ b/general/toaster/toastDrv/kmdf/func/simple/wdfsimple.inx
Binary files differ
diff --git a/general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inx b/general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inx
index 0c1a410b..384344c0 100644
--- a/general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inx
+++ b/general/toaster/toastDrv/kmdf/toastmon/wdftoastmon.inx
Binary files differ
diff --git a/general/toaster/umdf2/filter/generic/filterum.inx b/general/toaster/umdf2/filter/generic/filterum.inx
index e7e04b65..fad4882d 100644
--- a/general/toaster/umdf2/filter/generic/filterum.inx
+++ b/general/toaster/umdf2/filter/generic/filterum.inx
Binary files differ
diff --git a/general/toaster/umdf2/func/featured/wdffeaturedum.inx b/general/toaster/umdf2/func/featured/wdffeaturedum.inx
index 7b5f9c07..f93fcf91 100644
--- a/general/toaster/umdf2/func/featured/wdffeaturedum.inx
+++ b/general/toaster/umdf2/func/featured/wdffeaturedum.inx
Binary files differ
diff --git a/general/toaster/umdf2/func/simple/wdfsimpleum.inx b/general/toaster/umdf2/func/simple/wdfsimpleum.inx
index e07cf3a1..10f52074 100644
--- a/general/toaster/umdf2/func/simple/wdfsimpleum.inx
+++ b/general/toaster/umdf2/func/simple/wdfsimpleum.inx
Binary files differ