diff options
| author | karlf <[email protected]> | 2016-08-11 13:28:13 -0700 |
|---|---|---|
| committer | karlf <[email protected]> | 2016-08-11 13:28:13 -0700 |
| commit | 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc (patch) | |
| tree | ad5f3ede5cbcd6b598677ce41bcf8318471bdd92 /network/radio | |
| parent | 687b274aa38fd05c8c26e3068932121876d7f745 (diff) | |
Updated for "Windows 10 Anniversary Update" (Version 1607)
Diffstat (limited to 'network/radio')
| -rw-r--r-- | network/radio/HidSwitchDriverSample/HidSwitchDriverSample.sln | 18 | ||||
| -rw-r--r-- | network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.inx | bin | 3582 -> 7394 bytes | |||
| -rw-r--r-- | network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj | 4 | ||||
| -rw-r--r-- | network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj.Filters | 8 | ||||
| -rw-r--r-- | network/radio/HidSwitchDriverSample/driver.c | 2 | ||||
| -rw-r--r-- | network/radio/HidSwitchDriverSample/usb.c | 2 | ||||
| -rw-r--r-- | network/radio/RadioManagerSample/RadioManagerSample.sln | 18 | ||||
| -rw-r--r-- | network/radio/RadioManagerSample/cpp/SampleRM.vcxproj | 4 | ||||
| -rw-r--r-- | network/radio/RadioManagerSample/cpp/SampleRM.vcxproj.Filters | 6 | ||||
| -rw-r--r-- | network/radio/RadioManagerSample/readme.txt | 192 |
10 files changed, 31 insertions, 223 deletions
diff --git a/network/radio/HidSwitchDriverSample/HidSwitchDriverSample.sln b/network/radio/HidSwitchDriverSample/HidSwitchDriverSample.sln index 4be1a134..7bbffb25 100644 --- a/network/radio/HidSwitchDriverSample/HidSwitchDriverSample.sln +++ b/network/radio/HidSwitchDriverSample/HidSwitchDriverSample.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 MinimumVisualStudioVersion = 12.0 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RadioSwitchHidUsbFx2", "RadioSwitchHidUsbFx2.vcxproj", "{B5BA81A6-4044-4AAA-9101-F6B84922B842}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RadioSwitchHidUsbFx2", "RadioSwitchHidUsbFx2.vcxproj", "{43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,14 +13,14 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B5BA81A6-4044-4AAA-9101-F6B84922B842}.Debug|Win32.ActiveCfg = Debug|Win32 - {B5BA81A6-4044-4AAA-9101-F6B84922B842}.Debug|Win32.Build.0 = Debug|Win32 - {B5BA81A6-4044-4AAA-9101-F6B84922B842}.Release|Win32.ActiveCfg = Release|Win32 - {B5BA81A6-4044-4AAA-9101-F6B84922B842}.Release|Win32.Build.0 = Release|Win32 - {B5BA81A6-4044-4AAA-9101-F6B84922B842}.Debug|x64.ActiveCfg = Debug|x64 - {B5BA81A6-4044-4AAA-9101-F6B84922B842}.Debug|x64.Build.0 = Debug|x64 - {B5BA81A6-4044-4AAA-9101-F6B84922B842}.Release|x64.ActiveCfg = Release|x64 - {B5BA81A6-4044-4AAA-9101-F6B84922B842}.Release|x64.Build.0 = Release|x64 + {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Debug|Win32.Build.0 = Debug|Win32 + {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Release|Win32.ActiveCfg = Release|Win32 + {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Release|Win32.Build.0 = Release|Win32 + {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Debug|x64.ActiveCfg = Debug|x64 + {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Debug|x64.Build.0 = Debug|x64 + {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Release|x64.ActiveCfg = Release|x64 + {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.inx b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.inx Binary files differindex 69dee305..a1f0bf1a 100644 --- a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.inx +++ b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.inx diff --git a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj index a2c21dec..754c11c8 100644 --- a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj +++ b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj @@ -19,12 +19,12 @@ </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> - <ProjectGuid>{B5BA81A6-4044-4AAA-9101-F6B84922B842}</ProjectGuid> + <ProjectGuid>{43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> <Platform Condition="'$(Platform)' == ''">Win32</Platform> - <SampleGuid>{B02E786E-7854-4691-9A77-2FC43BADC689}</SampleGuid> + <SampleGuid>{88093BCB-F03A-40B7-B648-891643B48CC0}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> diff --git a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj.Filters b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj.Filters index 0bd5107d..9c0e4102 100644 --- a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj.Filters +++ b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj.Filters @@ -3,19 +3,19 @@ <ItemGroup> <Filter Include="Source Files"> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions> - <UniqueIdentifier>{53A053E8-9459-4AAE-8121-C8E18D611B9A}</UniqueIdentifier> + <UniqueIdentifier>{652E78B0-5E7D-4A38-BAF7-486EBD37CAF8}</UniqueIdentifier> </Filter> <Filter Include="Header Files"> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - <UniqueIdentifier>{CD5A6D68-BA75-419E-8BC0-ECBAB00BE55B}</UniqueIdentifier> + <UniqueIdentifier>{D1C9D70E-E910-4C53-9624-EB5A85A5A36B}</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>{25DF7F05-F2BC-4531-AEFD-F9A4B083145B}</UniqueIdentifier> + <UniqueIdentifier>{91962FEB-66CF-4C7D-A911-BA196B70A87A}</UniqueIdentifier> </Filter> <Filter Include="Driver Files"> <Extensions>inf;inv;inx;mof;mc;</Extensions> - <UniqueIdentifier>{D805F501-79BE-4A7A-B472-8EE48E64C4E2}</UniqueIdentifier> + <UniqueIdentifier>{DCB61952-1CBD-4DF7-A231-3432A7250271}</UniqueIdentifier> </Filter> </ItemGroup> <ItemGroup> diff --git a/network/radio/HidSwitchDriverSample/driver.c b/network/radio/HidSwitchDriverSample/driver.c index a14d4fc4..54e80dae 100644 --- a/network/radio/HidSwitchDriverSample/driver.c +++ b/network/radio/HidSwitchDriverSample/driver.c @@ -24,7 +24,7 @@ NTSTATUS DriverEntry (_In_ PDRIVER_OBJECT pDriverObject, _In_ PUNICODE_STRING ps // Initialize WPP Tracing WPP_INIT_TRACING(pDriverObject, pszRegistryPath); - TraceInfo(DBG_INIT, "(%!FUNC!) Enter -Sample Built %s %s\n", __DATE__, __TIME__); + TraceInfo(DBG_INIT, "(%!FUNC!) Enter -DriverEntry\n"); WDF_DRIVER_CONFIG_INIT(&config, HidFx2EvtDeviceAdd); diff --git a/network/radio/HidSwitchDriverSample/usb.c b/network/radio/HidSwitchDriverSample/usb.c index e6ac2da7..bacd1bce 100644 --- a/network/radio/HidSwitchDriverSample/usb.c +++ b/network/radio/HidSwitchDriverSample/usb.c @@ -66,7 +66,7 @@ HidFx2EvtDevicePrepareHardware( WDF_OBJECT_ATTRIBUTES_INIT(&attributes); attributes.ParentObject = hDevice; status = WdfMemoryCreate(&attributes, - NonPagedPool, + NonPagedPoolNx, 0, sizeof(USB_DEVICE_DESCRIPTOR), &pDevContext->hDeviceDescriptor, diff --git a/network/radio/RadioManagerSample/RadioManagerSample.sln b/network/radio/RadioManagerSample/RadioManagerSample.sln index 37eb8bd0..8f24bfc5 100644 --- a/network/radio/RadioManagerSample/RadioManagerSample.sln +++ b/network/radio/RadioManagerSample/RadioManagerSample.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 MinimumVisualStudioVersion = 12.0 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleRM", "cpp\SampleRM.vcxproj", "{3A2C6344-A162-433C-B8DE-2282825DE084}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleRM", "cpp\SampleRM.vcxproj", "{1138E033-EEBF-4BA3-B74F-D51443EF5EE0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,14 +13,14 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3A2C6344-A162-433C-B8DE-2282825DE084}.Debug|Win32.ActiveCfg = Debug|Win32 - {3A2C6344-A162-433C-B8DE-2282825DE084}.Debug|Win32.Build.0 = Debug|Win32 - {3A2C6344-A162-433C-B8DE-2282825DE084}.Release|Win32.ActiveCfg = Release|Win32 - {3A2C6344-A162-433C-B8DE-2282825DE084}.Release|Win32.Build.0 = Release|Win32 - {3A2C6344-A162-433C-B8DE-2282825DE084}.Debug|x64.ActiveCfg = Debug|x64 - {3A2C6344-A162-433C-B8DE-2282825DE084}.Debug|x64.Build.0 = Debug|x64 - {3A2C6344-A162-433C-B8DE-2282825DE084}.Release|x64.ActiveCfg = Release|x64 - {3A2C6344-A162-433C-B8DE-2282825DE084}.Release|x64.Build.0 = Release|x64 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|Win32.Build.0 = Debug|Win32 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|Win32.ActiveCfg = Release|Win32 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|Win32.Build.0 = Release|Win32 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|x64.ActiveCfg = Debug|x64 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|x64.Build.0 = Debug|x64 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|x64.ActiveCfg = Release|x64 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj b/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj index 740c3399..0e5f41be 100644 --- a/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj +++ b/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj @@ -19,11 +19,11 @@ </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> - <ProjectGuid>{3A2C6344-A162-433C-B8DE-2282825DE084}</ProjectGuid> + <ProjectGuid>{1138E033-EEBF-4BA3-B74F-D51443EF5EE0}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> <Platform Condition="'$(Platform)' == ''">Win32</Platform> - <SampleGuid>{0029FEAE-6B50-419B-8919-DFCC68EE0819}</SampleGuid> + <SampleGuid>{249F8230-A77D-4B97-A61C-30A168C1C626}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> diff --git a/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj.Filters b/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj.Filters index 8393d394..7c12923f 100644 --- a/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj.Filters +++ b/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj.Filters @@ -3,15 +3,15 @@ <ItemGroup> <Filter Include="Source Files"> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions> - <UniqueIdentifier>{6E87A5A2-6E58-40A3-8118-0E8CFBE8A8B4}</UniqueIdentifier> + <UniqueIdentifier>{5C7660B1-E831-4348-9962-44ACC9C075CA}</UniqueIdentifier> </Filter> <Filter Include="Header Files"> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - <UniqueIdentifier>{BDDFBC01-9DDC-4697-AE54-4EA76DE17211}</UniqueIdentifier> + <UniqueIdentifier>{12369C10-A1CA-49F9-A620-5BB0B1DC9471}</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>{FF6DC7A4-CA52-411E-A705-BB9DAEBFED69}</UniqueIdentifier> + <UniqueIdentifier>{459D1AE4-DF98-4AD0-80D3-AC9F5666BAC4}</UniqueIdentifier> </Filter> </ItemGroup> <ItemGroup> diff --git a/network/radio/RadioManagerSample/readme.txt b/network/radio/RadioManagerSample/readme.txt deleted file mode 100644 index 2bdd69bd..00000000 --- a/network/radio/RadioManagerSample/readme.txt +++ /dev/null @@ -1,192 +0,0 @@ -Sample Radio Manager -==================== -Demonstrates how to structure a Radio Manager for use with the Windows 8 Radio Management APIs. - -On Windows 8 and later, the operating system contains a set of APIs which are used as a software mechanism -to control the various radios found on the machine. The APIs work by communicating with a Radio Manager, -which is a COM object that relays commands from the APIs to turn the radio on or off, and reports back -radio information to the APIs. This feature is designed in such a way that a separate Radio Manager is -required for each radio media type. For example, a WLAN radio will be controlled by a different Radio -Manager than a GPS radio. If there are 2 WLAN radios and a GPS radio, the 2 WLAN radios will be controlled -by one Radio Manager, and the GPS radio will be controlled by a different Radio Manager. The Radio Manager -must be able to run correctly within Local Service Account context. Under this context, the Radio Manager -will have the minimum privilege on the local computer. - -When the user turns the radio off (either by using the specific radio software switch or the airplane mode switch), -radio transmission must be turned off. The device can be powered off as long as the radio switch does not disappear -from the UI. It is very important that the radio manager developer ensures that when the device is powered off, the -radio switch does not disappear from the UI. If the radio switch disappears from the UI when the radio is turned off -by the user, then user has no way to turn the radio back on! If it is desired to conserve power by cutting power to -the device when the radio is turned off, but the device cannot be completely powered off because it disappears from -the UI, then the solution would be to put the device in a low power state (e.g. D3). - -IMPORTANT! The radio manager must be given a name � this is the name of the radio switch that is displayed to the -user in the Wireless page of PC Settings. The name must be simple, yet descriptive of what the radio is. For example, -for NFC radios, the value of the name field should be "NFC", and for GPS radios, the value of the name field should -be "GPS" or "GNSS", whichever is more appropriate. The name must not include the word "radio" or the manufacturer's -name or some other word related to the functionality of the radio (e.g. "Location" OR "port"). - - - -Sample Language Implementations -=============================== -This sample is available in the following language implementations: - C++ - - -Installation Files -================== -install.cmd -- Installation script. Copies and registers the dll and executes SampleRM.reg - -SampleRM.reg -- script to install the Sample Radio Manager into the registry, along with 2 radio instances - - -Source Files -============ -SampleRM.sln -- The Visual Studio 2010 solution file for building the Sample Radio Manager dll - -sampleRM.idl -- The interface definition for the Sample Radio Manager - -RadioMgr.idl -- The interface definition for a Windows Radio Manager - -SampleRadioManager.h -- Header file for the functions required for a Radio Manager - -SampleRadioInstance.h -- Header file for the functions required for a Radio Instance - -SampleInstanceCollection.h -- Header file for the functions required for a Collection of Radio Instances - -precomp.h -- Common header file - -InternalInterfaces.h -- Header file for internal interface used for this sample - -dllmain.cpp -- Standard dllmain - -SampleRadioManager.cpp -- Implementation details for the Sample Radio Manager. Important concepts include: - - Utilizing IMediaRadioManagerNotifySink for radio instance events - - Adding/Removing radio instances - - Queuing and deploying worker jobs for system events - -SampleRadioInstance.cpp -- Implementation details for the Sample Radio Instance. Important concepts include: - - Accessors & Modifiers for radio information - - Instance change functions - -SampleInstanceCollection.cpp -- Implementation details for the Sample Instance Collection. Important concepts include: - - Radio Instance discovery and retrieval - -RadioMgr_interface.cpp -- Helper source file to include the MIDL-generated files. - - -How the sample works -==================== -This sample Radio Manager does not operate on an actual radio. Instead, it uses registry keys to act as -virtual radios. Each "radio" instance can have the following values: - -Name - -RadioState - -PreviousRadioState - -IsMultiComm - -IsAssociatingDevice - -***It is required that the registry key has AT LEAST a Name value, otherwise the Sample Radio Manager will -fail to initialize*** - -IMPORTANT! The radio manager must be given a name � this is the name of the radio switch that is displayed to the -user in the Wireless page of PC Settings. The name must be simple, yet descriptive of what the radio is. For example, -for NFC radios, the value of the name field should be "NFC", and for GPS radios, the value of the name field should -be "GPS" or "GNSS", whichever is more appropriate. The name must not include the word "radio" or the manufacturer's -name or some other word related to the functionality of the radio (e.g. "Location" OR "port"). - - -When the Radio Manager is initialized, it uses these registry keys to retrieve the "radio" information. -The radio state values can be any of the following enum values: - - typedef enum _DEVICE_RADIO_STATE - { - DRS_RADIO_ON = 0, - DRS_SW_RADIO_OFF = 1, - DRS_HW_RADIO_OFF = 2, - DRS_SW_HW_RADIO_OFF = 3, - DRS_HW_RADIO_ON_UNCONTROLLABLE = 4, - DRS_RADIO_INVALID = 5, - DRS_HW_RADIO_OFF_UNCONTROLLABLE = 6, - DRS_RADIO_MAX = DRS_HW_RADIO_OFF_UNCONTROLLABLE - } DEVICE_RADIO_STATE; - -For IsMultiComm and IsAssociatingDevice, a value of 0 means 'no' and 1 means 'yes. - - -To Add a Radio Instance -======================= -Add a new item to the registry: -[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\RadioManagement\Misc\SampleRadioManager\SampleRadioX] -"RadioState"=dword:00000000 -"Name"="SampleRadioX" -"IsMultiComm"=dword:00000000 - -To Edit a Radio Instance -======================== -Simply change the values in the registry. For example, change the radio state from DRS_RADIO_ON to DRS_SW_RADIO_OFF -by changing the 'RadioState' value from 0 to 1. - - -To Remove a Radio Instance -========================== -Delete the corresponding registry key. - - -Prerequisites for viewing and building solution -=============================================== -1. Windows 7 -2. Visual Studio 2010 - - -To build the sample using Visual Studio 2010 (preferred method): -=============================================================== -1. Open File Explorer and navigate to the directory. -2. Double-click the icon for the SampleRM.sln (solution) file to open the file in Visual Studio. -3. In the Build menu, select Build Solution. The dll will be built in the default \Debug or \Release directory - - -Prerequisites for installing Radio Manager -========================================== -1. Windows 8 -2. The VC++ 2010 Redistributable package must be installed for this dll to load. - - -Installing Radio Manager -======================== -1. Copy the install.cmd, SampleRM.reg and SampleRM.dll files to a directory -2. Run install.cmd - - - - - - - - - - - - - - - - - - - |
