├── .editorconfig ├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ ├── build.yml │ ├── generate-docs.yml │ └── publish-to-nuget.yml ├── .gitignore ├── App ├── App.csproj ├── DemoService.cs └── Program.cs ├── CommonProjectProperties.targets ├── LICENSE ├── Nefarius.Drivers.HidHide.sln ├── Nefarius.Drivers.HidHide.sln.DotSettings ├── README.md ├── Tests ├── HidHideApiTests.cs ├── Tests.csproj └── Usings.cs ├── assets └── NSS-128x128.png ├── docs ├── index.md ├── nefarius.drivers.hidhide.downloadlocationmissingexception.md ├── nefarius.drivers.hidhide.exceptions.downloadlocationmissingexception.md ├── nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md ├── nefarius.drivers.hidhide.exceptions.hidhidedetectionfailedexception.md ├── nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md ├── nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md ├── nefarius.drivers.hidhide.exceptions.hidhideexception.md ├── nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md ├── nefarius.drivers.hidhide.exceptions.hidhideserverexceptions.md ├── nefarius.drivers.hidhide.exceptions.malformedurlexception.md ├── nefarius.drivers.hidhide.exceptions.missingreleasesexception.md ├── nefarius.drivers.hidhide.exceptions.updateresponsemissingexception.md ├── nefarius.drivers.hidhide.hidhidebufferoverflowexception.md ├── nefarius.drivers.hidhide.hidhidecontrolservice.md ├── nefarius.drivers.hidhide.hidhidedetectionfailedexception.md ├── nefarius.drivers.hidhide.hidhidedriveraccessfailedexception.md ├── nefarius.drivers.hidhide.hidhidedrivernotfoundexception.md ├── nefarius.drivers.hidhide.hidhideexception.md ├── nefarius.drivers.hidhide.hidhiderequestfailedexception.md ├── nefarius.drivers.hidhide.hidhideserverexceptions.md ├── nefarius.drivers.hidhide.hidhideserviceoptions.md ├── nefarius.drivers.hidhide.hidhidesetupprovider.md ├── nefarius.drivers.hidhide.ihidhidecontrolservice.md ├── nefarius.drivers.hidhide.malformedurlexception.md ├── nefarius.drivers.hidhide.missingreleasesexception.md ├── nefarius.drivers.hidhide.servicecollectionextensions.md ├── nefarius.drivers.hidhide.updateresponsemissingexception.md └── nefarius.drivers.hidhide.util.multiszhelper.md ├── nuget.config └── src ├── Exceptions ├── HidHideException.cs └── HidHideServerExceptions.cs ├── HidHideControlService.cs ├── HidHideServiceOptions.cs ├── HidHideSetupProvider.cs ├── IHidHideControlService.cs ├── NativeMethods.txt ├── Nefarius.Drivers.HidHide.csproj ├── ServiceCollectionExtensions.cs └── Util ├── LoggerExtensions.cs ├── MultiSzHelper.cs ├── SafeFileHandleExtensions.cs └── VolumeHelper.cs /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | # All files 4 | [*] 5 | indent_style = space 6 | 7 | # Xml files 8 | [*.xml] 9 | indent_size = 2 10 | 11 | # C# files 12 | [*.cs] 13 | 14 | #### Core EditorConfig Options #### 15 | 16 | # Indentation and spacing 17 | indent_size = 4 18 | tab_width = 4 19 | 20 | # New line preferences 21 | end_of_line = crlf 22 | insert_final_newline = false 23 | 24 | #### .NET Coding Conventions #### 25 | [*.{cs,vb}] 26 | 27 | # Organize usings 28 | dotnet_separate_import_directive_groups = true 29 | dotnet_sort_system_directives_first = true 30 | file_header_template = unset 31 | 32 | # this. and Me. preferences 33 | dotnet_style_qualification_for_event = false:warning 34 | dotnet_style_qualification_for_field = false:warning 35 | dotnet_style_qualification_for_method = false:silent 36 | dotnet_style_qualification_for_property = false:warning 37 | 38 | # Language keywords vs BCL types preferences 39 | dotnet_style_predefined_type_for_locals_parameters_members = true:silent 40 | dotnet_style_predefined_type_for_member_access = true:silent 41 | 42 | # Parentheses preferences 43 | dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent 44 | dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent 45 | dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent 46 | dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent 47 | 48 | # Modifier preferences 49 | dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent 50 | 51 | # Expression-level preferences 52 | dotnet_style_coalesce_expression = true:suggestion 53 | dotnet_style_collection_initializer = true:suggestion 54 | dotnet_style_explicit_tuple_names = true:suggestion 55 | dotnet_style_null_propagation = true:suggestion 56 | dotnet_style_object_initializer = true:suggestion 57 | dotnet_style_operator_placement_when_wrapping = beginning_of_line 58 | dotnet_style_prefer_auto_properties = true:silent 59 | dotnet_style_prefer_compound_assignment = true:suggestion 60 | dotnet_style_prefer_conditional_expression_over_assignment = true:silent 61 | dotnet_style_prefer_conditional_expression_over_return = true:silent 62 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion 63 | dotnet_style_prefer_inferred_tuple_names = true:suggestion 64 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion 65 | dotnet_style_prefer_simplified_boolean_expressions = true:suggestion 66 | dotnet_style_prefer_simplified_interpolation = true:suggestion 67 | 68 | # Field preferences 69 | dotnet_style_readonly_field = true:warning 70 | 71 | # Parameter preferences 72 | dotnet_code_quality_unused_parameters = all:suggestion 73 | 74 | # Suppression preferences 75 | dotnet_remove_unnecessary_suppression_exclusions = none 76 | 77 | #### C# Coding Conventions #### 78 | [*.cs] 79 | 80 | # var preferences 81 | csharp_style_var_elsewhere = false:silent 82 | csharp_style_var_for_built_in_types = false:silent 83 | csharp_style_var_when_type_is_apparent = false:silent 84 | 85 | # Expression-bodied members 86 | csharp_style_expression_bodied_accessors = true:silent 87 | csharp_style_expression_bodied_constructors = false:silent 88 | csharp_style_expression_bodied_indexers = true:silent 89 | csharp_style_expression_bodied_lambdas = true:silent 90 | csharp_style_expression_bodied_local_functions = false:silent 91 | csharp_style_expression_bodied_methods = false:silent 92 | csharp_style_expression_bodied_operators = false:silent 93 | csharp_style_expression_bodied_properties = true:silent 94 | 95 | # Pattern matching preferences 96 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 97 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 98 | csharp_style_prefer_not_pattern = true:suggestion 99 | csharp_style_prefer_pattern_matching = true:silent 100 | csharp_style_prefer_switch_expression = true:suggestion 101 | 102 | # Null-checking preferences 103 | csharp_style_conditional_delegate_call = true:suggestion 104 | 105 | # Modifier preferences 106 | csharp_prefer_static_local_function = true:warning 107 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent 108 | 109 | # Code-block preferences 110 | csharp_prefer_braces = true:silent 111 | csharp_prefer_simple_using_statement = true:suggestion 112 | 113 | # Expression-level preferences 114 | csharp_prefer_simple_default_expression = true:suggestion 115 | csharp_style_deconstructed_variable_declaration = true:suggestion 116 | csharp_style_inlined_variable_declaration = true:suggestion 117 | csharp_style_pattern_local_over_anonymous_function = true:suggestion 118 | csharp_style_prefer_index_operator = true:suggestion 119 | csharp_style_prefer_range_operator = true:suggestion 120 | csharp_style_throw_expression = true:suggestion 121 | csharp_style_unused_value_assignment_preference = discard_variable:suggestion 122 | csharp_style_unused_value_expression_statement_preference = discard_variable:silent 123 | 124 | # 'using' directive preferences 125 | csharp_using_directive_placement = outside_namespace:silent 126 | 127 | #### C# Formatting Rules #### 128 | 129 | # New line preferences 130 | csharp_new_line_before_catch = true 131 | csharp_new_line_before_else = true 132 | csharp_new_line_before_finally = true 133 | csharp_new_line_before_members_in_anonymous_types = true 134 | csharp_new_line_before_members_in_object_initializers = true 135 | csharp_new_line_before_open_brace = all 136 | csharp_new_line_between_query_expression_clauses = true 137 | 138 | # Indentation preferences 139 | csharp_indent_block_contents = true 140 | csharp_indent_braces = false 141 | csharp_indent_case_contents = true 142 | csharp_indent_case_contents_when_block = true 143 | csharp_indent_labels = one_less_than_current 144 | csharp_indent_switch_labels = true 145 | 146 | # Space preferences 147 | csharp_space_after_cast = false 148 | csharp_space_after_colon_in_inheritance_clause = true 149 | csharp_space_after_comma = true 150 | csharp_space_after_dot = false 151 | csharp_space_after_keywords_in_control_flow_statements = true 152 | csharp_space_after_semicolon_in_for_statement = true 153 | csharp_space_around_binary_operators = before_and_after 154 | csharp_space_around_declaration_statements = false 155 | csharp_space_before_colon_in_inheritance_clause = true 156 | csharp_space_before_comma = false 157 | csharp_space_before_dot = false 158 | csharp_space_before_open_square_brackets = false 159 | csharp_space_before_semicolon_in_for_statement = false 160 | csharp_space_between_empty_square_brackets = false 161 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 162 | csharp_space_between_method_call_name_and_opening_parenthesis = false 163 | csharp_space_between_method_call_parameter_list_parentheses = false 164 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 165 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 166 | csharp_space_between_method_declaration_parameter_list_parentheses = false 167 | csharp_space_between_parentheses = false 168 | csharp_space_between_square_brackets = false 169 | 170 | # Wrapping preferences 171 | csharp_preserve_single_line_blocks = true 172 | csharp_preserve_single_line_statements = true 173 | csharp_style_namespace_declarations = file_scoped:warning 174 | csharp_style_prefer_method_group_conversion = true:silent 175 | csharp_style_prefer_top_level_statements = true:silent 176 | csharp_style_prefer_null_check_over_type_check = true:suggestion 177 | csharp_style_prefer_local_over_anonymous_function = true:suggestion 178 | csharp_style_prefer_utf8_string_literals = true:suggestion 179 | csharp_style_prefer_tuple_swap = true:suggestion 180 | csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion 181 | csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent 182 | csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent 183 | csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent 184 | csharp_style_prefer_extended_property_pattern = true:suggestion 185 | 186 | #### Naming styles #### 187 | [*.{cs,vb}] 188 | 189 | # Naming rules 190 | 191 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = warning 192 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces 193 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase 194 | 195 | dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = warning 196 | dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces 197 | dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase 198 | 199 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = warning 200 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters 201 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase 202 | 203 | dotnet_naming_rule.methods_should_be_pascalcase.severity = warning 204 | dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods 205 | dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase 206 | 207 | dotnet_naming_rule.properties_should_be_pascalcase.severity = warning 208 | dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties 209 | dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase 210 | 211 | dotnet_naming_rule.events_should_be_pascalcase.severity = warning 212 | dotnet_naming_rule.events_should_be_pascalcase.symbols = events 213 | dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase 214 | 215 | dotnet_naming_rule.local_variables_should_be_camelcase.severity = warning 216 | dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables 217 | dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase 218 | 219 | dotnet_naming_rule.local_constants_should_be_camelcase.severity = warning 220 | dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants 221 | dotnet_naming_rule.local_constants_should_be_camelcase.style = all_caps 222 | 223 | dotnet_naming_rule.parameters_should_be_camelcase.severity = warning 224 | dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters 225 | dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase 226 | 227 | dotnet_naming_rule.public_fields_should_be_pascalcase.severity = warning 228 | dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields 229 | dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase 230 | 231 | dotnet_naming_rule.private_fields_should_be__camelcase.severity = warning 232 | dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields 233 | dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase 234 | 235 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = warning 236 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields 237 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = _camelcase 238 | 239 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = warning 240 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields 241 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase 242 | 243 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = warning 244 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields 245 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase 246 | 247 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = warning 248 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields 249 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase 250 | 251 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = warning 252 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields 253 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase 254 | 255 | dotnet_naming_rule.enums_should_be_pascalcase.severity = warning 256 | dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums 257 | dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase 258 | 259 | dotnet_naming_rule.local_functions_should_be_pascalcase.severity = warning 260 | dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions 261 | dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase 262 | 263 | dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = warning 264 | dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members 265 | dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase 266 | 267 | # Symbol specifications 268 | 269 | dotnet_naming_symbols.interfaces.applicable_kinds = interface 270 | dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 271 | dotnet_naming_symbols.interfaces.required_modifiers = 272 | 273 | dotnet_naming_symbols.enums.applicable_kinds = enum 274 | dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 275 | dotnet_naming_symbols.enums.required_modifiers = 276 | 277 | dotnet_naming_symbols.events.applicable_kinds = event 278 | dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 279 | dotnet_naming_symbols.events.required_modifiers = 280 | 281 | dotnet_naming_symbols.methods.applicable_kinds = method 282 | dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 283 | dotnet_naming_symbols.methods.required_modifiers = 284 | 285 | dotnet_naming_symbols.properties.applicable_kinds = property 286 | dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 287 | dotnet_naming_symbols.properties.required_modifiers = 288 | 289 | dotnet_naming_symbols.public_fields.applicable_kinds = field 290 | dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal 291 | dotnet_naming_symbols.public_fields.required_modifiers = 292 | 293 | dotnet_naming_symbols.private_fields.applicable_kinds = field 294 | dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 295 | dotnet_naming_symbols.private_fields.required_modifiers = 296 | 297 | dotnet_naming_symbols.private_static_fields.applicable_kinds = field 298 | dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 299 | dotnet_naming_symbols.private_static_fields.required_modifiers = static 300 | 301 | dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum 302 | dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 303 | dotnet_naming_symbols.types_and_namespaces.required_modifiers = 304 | 305 | dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method 306 | dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 307 | dotnet_naming_symbols.non_field_members.required_modifiers = 308 | 309 | dotnet_naming_symbols.type_parameters.applicable_kinds = namespace 310 | dotnet_naming_symbols.type_parameters.applicable_accessibilities = * 311 | dotnet_naming_symbols.type_parameters.required_modifiers = 312 | 313 | dotnet_naming_symbols.private_constant_fields.applicable_kinds = field 314 | dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 315 | dotnet_naming_symbols.private_constant_fields.required_modifiers = const 316 | 317 | dotnet_naming_symbols.local_variables.applicable_kinds = local 318 | dotnet_naming_symbols.local_variables.applicable_accessibilities = local 319 | dotnet_naming_symbols.local_variables.required_modifiers = 320 | 321 | dotnet_naming_symbols.local_constants.applicable_kinds = local 322 | dotnet_naming_symbols.local_constants.applicable_accessibilities = local 323 | dotnet_naming_symbols.local_constants.required_modifiers = const 324 | 325 | dotnet_naming_symbols.parameters.applicable_kinds = parameter 326 | dotnet_naming_symbols.parameters.applicable_accessibilities = * 327 | dotnet_naming_symbols.parameters.required_modifiers = 328 | 329 | dotnet_naming_symbols.public_constant_fields.applicable_kinds = field 330 | dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal 331 | dotnet_naming_symbols.public_constant_fields.required_modifiers = const 332 | 333 | dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field 334 | dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal 335 | dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static 336 | 337 | dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field 338 | dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 339 | dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static 340 | 341 | dotnet_naming_symbols.local_functions.applicable_kinds = local_function 342 | dotnet_naming_symbols.local_functions.applicable_accessibilities = * 343 | dotnet_naming_symbols.local_functions.required_modifiers = 344 | 345 | # Naming styles 346 | 347 | dotnet_naming_style.pascalcase.required_prefix = 348 | dotnet_naming_style.pascalcase.required_suffix = 349 | dotnet_naming_style.pascalcase.word_separator = 350 | dotnet_naming_style.pascalcase.capitalization = pascal_case 351 | 352 | dotnet_naming_style.ipascalcase.required_prefix = I 353 | dotnet_naming_style.ipascalcase.required_suffix = 354 | dotnet_naming_style.ipascalcase.word_separator = 355 | dotnet_naming_style.ipascalcase.capitalization = pascal_case 356 | 357 | dotnet_naming_style.tpascalcase.required_prefix = T 358 | dotnet_naming_style.tpascalcase.required_suffix = 359 | dotnet_naming_style.tpascalcase.word_separator = 360 | dotnet_naming_style.tpascalcase.capitalization = pascal_case 361 | 362 | dotnet_naming_style._camelcase.required_prefix = _ 363 | dotnet_naming_style._camelcase.required_suffix = 364 | dotnet_naming_style._camelcase.word_separator = 365 | dotnet_naming_style._camelcase.capitalization = camel_case 366 | 367 | dotnet_naming_style.camelcase.required_prefix = 368 | dotnet_naming_style.camelcase.required_suffix = 369 | dotnet_naming_style.camelcase.word_separator = 370 | dotnet_naming_style.camelcase.capitalization = camel_case 371 | 372 | dotnet_naming_style.s_camelcase.required_prefix = s_ 373 | dotnet_naming_style.s_camelcase.required_suffix = 374 | dotnet_naming_style.s_camelcase.word_separator = 375 | dotnet_naming_style.s_camelcase.capitalization = camel_case 376 | 377 | dotnet_naming_style.all_caps.required_prefix = 378 | dotnet_naming_style.all_caps.required_suffix = 379 | dotnet_naming_style.all_caps.word_separator = _ 380 | dotnet_naming_style.all_caps.capitalization = all_caps 381 | 382 | tab_width = 4 383 | indent_size = 4 384 | end_of_line = crlf 385 | dotnet_style_namespace_match_folder = true:suggestion 386 | dotnet_style_allow_statement_immediately_after_block_experimental = true:silent 387 | dotnet_style_allow_multiple_blank_lines_experimental = true:silent 388 | 389 | # Unnecessary usings 390 | dotnet_diagnostic.IDE0005.severity = warning 391 | 392 | resharper_csharp_place_attribute_on_same_line = false 393 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | updates: 4 | - package-ecosystem: "nuget" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: .NET 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Setup .Net SDK 18 | uses: actions/setup-dotnet@v4 19 | with: 20 | dotnet-version: 9.x 21 | 22 | - name: Build 23 | run: dotnet build -c Release 24 | -------------------------------------------------------------------------------- /.github/workflows/generate-docs.yml: -------------------------------------------------------------------------------- 1 | name: Generate API Documentation 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | paths-ignore: 7 | - 'docs/**' 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | with: 15 | ref: master 16 | 17 | - name: Setup .Net SDK 18 | uses: actions/setup-dotnet@v4 19 | with: 20 | dotnet-version: 9.x 21 | 22 | - name: Install XMLDoc2Markdown 23 | run: dotnet tool install -g Nefarius.Tools.XMLDoc2Markdown 24 | 25 | - name: Build 26 | run: dotnet build -c Release 27 | 28 | - name: Generate API docs 29 | run: xmldoc2md ./bin/netstandard2.0/${{ github.event.repository.name }}.dll ./docs/ 30 | 31 | - name: Check for changes 32 | id: check-for-changes 33 | run: | 34 | git config --global user.name "github-actions[bot]" 35 | git config --global user.email "github-actions[bot]@users.noreply.github.com" 36 | git add . 37 | git diff --cached --exit-code || git commit -m "Update API documentation" 38 | 39 | - name: Push changes 40 | if: success() && steps.check-for-changes.outcome == 'success' 41 | run: git push 42 | env: 43 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/publish-to-nuget.yml: -------------------------------------------------------------------------------- 1 | name: Publish Nuget Package 2 | 3 | on: 4 | push: 5 | tags: 6 | - v* 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | with: 14 | fetch-depth: 0 15 | 16 | - name: Setup .Net SDK 17 | uses: actions/setup-dotnet@v4 18 | with: 19 | dotnet-version: 9.x 20 | 21 | - name: Modify README.md for NuGet 22 | run: | 23 | sed -i 's/# ]*>/# /' README.md 24 | 25 | - name: Build 26 | run: dotnet build -c Release 27 | 28 | - name: Make Nuget Packages 29 | run: dotnet pack -c Release 30 | 31 | - name: Publish To Nuget 32 | run: dotnet nuget push bin/*.nupkg -k $NUGET_AUTH_TOKEN -s https://nuget.nefarius.at/v3/index.json 33 | env: 34 | NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd 364 | /.idea 365 | -------------------------------------------------------------------------------- /App/App.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | enable 8 | false 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /App/DemoService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Hosting; 2 | 3 | using Nefarius.Drivers.HidHide; 4 | using Nefarius.Vicius.Abstractions.Models; 5 | 6 | namespace App; 7 | 8 | public class DemoService : BackgroundService 9 | { 10 | // injects the service used to configure HidHide 11 | private readonly IHidHideControlService _hh; 12 | // injects the service for web communication (updates, setup etc.) 13 | private readonly HidHideSetupProvider _provider; 14 | 15 | public DemoService(IHidHideControlService hh, HidHideSetupProvider provider) 16 | { 17 | _hh = hh; 18 | _provider = provider; 19 | } 20 | 21 | protected override async Task ExecuteAsync(CancellationToken stoppingToken) 22 | { 23 | #region These calls require Internet access 24 | 25 | // demos how to get the latest release details 26 | UpdateRelease release = await _provider.GetLatestReleaseAsync(stoppingToken); 27 | // demos how to get the latest setup download URL 28 | // this takes the processor architecture of this machine into account 29 | Uri url = await _provider.GetLatestDownloadUrlAsync(stoppingToken); 30 | // demos how to get the latest available version 31 | Version version = await _provider.GetLatestVersionAsync(stoppingToken); 32 | 33 | #endregion 34 | 35 | #region These calls are issued to the local driver 36 | 37 | List apps = _hh.ApplicationPaths.ToList(); 38 | 39 | // this path must exist locally or will throw an exception 40 | _hh.AddApplicationPath(@"F:\Downloads\windowsdesktop-runtime-7.0.12-win-x64.exe"); 41 | 42 | #endregion 43 | } 44 | } -------------------------------------------------------------------------------- /App/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | using App; 4 | 5 | using Microsoft.Extensions.DependencyInjection; 6 | using Microsoft.Extensions.Hosting; 7 | using Microsoft.Extensions.Logging; 8 | 9 | using Nefarius.Drivers.HidHide; 10 | 11 | using Serilog; 12 | using Serilog.Events; 13 | 14 | HostApplicationBuilder builder = Host.CreateApplicationBuilder(); 15 | 16 | // adds Serilog to demonstrate library logging capabilities 17 | builder.Logging.ClearProviders(); 18 | Log.Logger = new LoggerConfiguration() 19 | .MinimumLevel.Debug() // most verbose stuff is Debug level 20 | .ReadFrom.Configuration(builder.Configuration) 21 | .WriteTo.Console(LogEventLevel.Debug) 22 | .CreateLogger(); 23 | builder.Logging.AddSerilog(); 24 | 25 | // adds all injectable types as services 26 | builder.Services.AddHidHide(options => // options are optional 27 | { 28 | // demonstrates overriding CPU architecture, default is auto-detect 29 | options.OSArchitecture = Architecture.Arm64; 30 | }, clientBuilder => 31 | { 32 | // the HTTP client the library uses internally can be further customized 33 | clientBuilder.AddStandardResilienceHandler(); 34 | }); 35 | 36 | // runs example code 37 | builder.Services.AddHostedService(); 38 | 39 | IHost app = builder.Build(); 40 | 41 | app.Run(); -------------------------------------------------------------------------------- /CommonProjectProperties.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Benjamin Höglinger-Stelzer 6 | Copyright © Benjamin Höglinger-Stelzer 2022-2024 7 | 8 | 9 | NSS-128x128.png 10 | 11 | README.md 12 | 13 | 14 | $(SolutionDir)bin\ 15 | latest 16 | 17 | 18 | true 19 | true 20 | true 21 | snupkg 22 | true 23 | 24 | 25 | 26 | 27 | True 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Benjamin Höglinger-Stelzer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Nefarius.Drivers.HidHide.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.3.32811.315 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nefarius.Drivers.HidHide", "src\Nefarius.Drivers.HidHide.csproj", "{BB35159C-2813-4D77-AB9E-29AE20CF6183}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{2F927944-03B9-4FD3-BF0A-9F66A0EAB142}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C924BECB-5ABE-45D8-AF77-3752DFE6A7C2}" 11 | ProjectSection(SolutionItems) = preProject 12 | .gitattributes = .gitattributes 13 | .gitignore = .gitignore 14 | LICENSE = LICENSE 15 | README.md = README.md 16 | .github\workflows\build.yml = .github\workflows\build.yml 17 | .github\workflows\publish-to-nuget.yml = .github\workflows\publish-to-nuget.yml 18 | CommonProjectProperties.targets = CommonProjectProperties.targets 19 | .github\workflows\generate-docs.yml = .github\workflows\generate-docs.yml 20 | EndProjectSection 21 | EndProject 22 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Other", "Other", "{FBE5D738-191F-40B6-B36A-ACB5A5FD0E86}" 23 | EndProject 24 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "App\App.csproj", "{26F0B7F8-4FF7-42A7-A822-B1429C86B239}" 25 | EndProject 26 | Global 27 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 28 | Debug|Any CPU = Debug|Any CPU 29 | Release|Any CPU = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 32 | {BB35159C-2813-4D77-AB9E-29AE20CF6183}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {BB35159C-2813-4D77-AB9E-29AE20CF6183}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {BB35159C-2813-4D77-AB9E-29AE20CF6183}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {BB35159C-2813-4D77-AB9E-29AE20CF6183}.Release|Any CPU.Build.0 = Release|Any CPU 36 | {2F927944-03B9-4FD3-BF0A-9F66A0EAB142}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 37 | {2F927944-03B9-4FD3-BF0A-9F66A0EAB142}.Debug|Any CPU.Build.0 = Debug|Any CPU 38 | {2F927944-03B9-4FD3-BF0A-9F66A0EAB142}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {2F927944-03B9-4FD3-BF0A-9F66A0EAB142}.Release|Any CPU.Build.0 = Release|Any CPU 40 | {26F0B7F8-4FF7-42A7-A822-B1429C86B239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 41 | {26F0B7F8-4FF7-42A7-A822-B1429C86B239}.Debug|Any CPU.Build.0 = Debug|Any CPU 42 | {26F0B7F8-4FF7-42A7-A822-B1429C86B239}.Release|Any CPU.ActiveCfg = Release|Any CPU 43 | {26F0B7F8-4FF7-42A7-A822-B1429C86B239}.Release|Any CPU.Build.0 = Release|Any CPU 44 | EndGlobalSection 45 | GlobalSection(SolutionProperties) = preSolution 46 | HideSolutionNode = FALSE 47 | EndGlobalSection 48 | GlobalSection(NestedProjects) = preSolution 49 | {2F927944-03B9-4FD3-BF0A-9F66A0EAB142} = {FBE5D738-191F-40B6-B36A-ACB5A5FD0E86} 50 | {26F0B7F8-4FF7-42A7-A822-B1429C86B239} = {FBE5D738-191F-40B6-B36A-ACB5A5FD0E86} 51 | EndGlobalSection 52 | GlobalSection(ExtensibilityGlobals) = postSolution 53 | SolutionGuid = {7FAAC21B-569F-43D0-A2C5-1744D85B545C} 54 | EndGlobalSection 55 | EndGlobal 56 | -------------------------------------------------------------------------------- /Nefarius.Drivers.HidHide.sln.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nefarius.Drivers.HidHide 2 | 3 | [![.NET](https://github.com/nefarius/Nefarius.Drivers.HidHide/actions/workflows/build.yml/badge.svg)](https://github.com/nefarius/Nefarius.Drivers.HidHide/actions/workflows/build.yml) ![Requirements](https://img.shields.io/badge/Requires-.NET%206%2F7%2F8-blue.svg) ![Requirements](https://img.shields.io/badge/Requires-.NET%20Standard%202.0-blue.svg) [![Nuget](https://img.shields.io/nuget/v/Nefarius.Drivers.HidHide)](https://www.nuget.org/packages/Nefarius.Drivers.HidHide/) [![Nuget](https://img.shields.io/nuget/dt/Nefarius.Drivers.HidHide)](https://www.nuget.org/packages/Nefarius.Drivers.HidHide/) 4 | 5 | Managed API for configuring [HidHide](https://github.com/nefarius/HidHide). 6 | 7 | ## Documentation 8 | 9 | [Link to API docs](docs/index.md). 10 | 11 | ### Generating documentation 12 | 13 | ```PowerShell 14 | dotnet build -c:Release 15 | dotnet tool install --global Nefarius.Tools.XMLDoc2Markdown 16 | xmldoc2md .\bin\net7-windows\Nefarius.Drivers.HidHide.dll .\docs\ 17 | ``` 18 | 19 | ## Usage (classic) 20 | 21 | > This is the deprecated approach. 22 | 23 | Create an instance of `HidHideControlService` whenever you need it. 24 | 25 | This class **will not block other configuration apps** so you can keep it in memory as long as you need. A handle to the 26 | driver is only opened when necessary (when the properties are read from or the methods get invoked). 27 | 28 | ## Usage (dependency injection) 29 | 30 | > This is the recommended approach. 31 | 32 | If you plan to make use of Microsoft Dependency Injection (in ASP.NET Core, Worker Services and alike) and the online 33 | services, your app also need to add these NuGet packages: 34 | 35 | - `Microsoft.Extensions.Http` 36 | - `NJsonSchema` 37 | 38 | You can skip them for the "traditional" use of version 1 of the library. Register it like: 39 | 40 | ```csharp 41 | builder.Services.AddHidHide(); 42 | ``` 43 | 44 | Now you can inject and consume: 45 | 46 | - `IHidHideControlService` for the HidHide settings API 47 | - `HidHideSetupProvider` for update and download information 48 | 49 | Check the [demo app sources](./App) for implementation and usage details. 50 | 51 | ## 3rd party sources 52 | 53 | - [C#/Win32 P/Invoke Source Generator](https://github.com/microsoft/CsWin32) 54 | - [MinVer](https://github.com/adamralph/minver) 55 | -------------------------------------------------------------------------------- /Tests/HidHideApiTests.cs: -------------------------------------------------------------------------------- 1 | using Nefarius.Drivers.HidHide; 2 | 3 | namespace Tests; 4 | 5 | public class Tests 6 | { 7 | [SetUp] 8 | public void Setup() 9 | { 10 | } 11 | 12 | [Test] 13 | public void TestIsActive() 14 | { 15 | var service = new HidHideControlService(); 16 | 17 | Assert.That(service.IsActive, Is.True); 18 | } 19 | 20 | [Test] 21 | public void TestIsAppListInverted() 22 | { 23 | var service = new HidHideControlService(); 24 | 25 | Assert.That(service.IsAppListInverted, Is.True); 26 | } 27 | 28 | [Test] 29 | public void TestAppList() 30 | { 31 | var service = new HidHideControlService(); 32 | 33 | service.ClearApplicationsList(); 34 | 35 | // make sure this exists or an exception will be thrown 36 | var fileName = @"F:\Downloads\amd-software-adrenalin-edition-22.10.1-minimalsetup-221003_web.exe"; 37 | 38 | service.AddApplicationPath(fileName); 39 | 40 | var list = service.ApplicationPaths.ToList(); 41 | 42 | Assert.That(list, Contains.Item(fileName)); 43 | } 44 | } -------------------------------------------------------------------------------- /Tests/Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0-windows 5 | enable 6 | enable 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | all 16 | runtime; build; native; contentfiles; analyzers; buildtransitive 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Tests/Usings.cs: -------------------------------------------------------------------------------- 1 | global using NUnit.Framework; -------------------------------------------------------------------------------- /assets/NSS-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nefarius/Nefarius.Drivers.HidHide/72b481fd1de3d0d1ac9a456a6a6070c40c3c7b7f/assets/NSS-128x128.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # Assembly Nefarius.Drivers.HidHide 2 | 3 | ## Namespace Nefarius.Drivers.HidHide 4 | 5 | - [HidHideControlService](./nefarius.drivers.hidhide.hidhidecontrolservice.md) 6 | 7 | - [HidHideServiceOptions](./nefarius.drivers.hidhide.hidhideserviceoptions.md) 8 | 9 | - [HidHideSetupProvider](./nefarius.drivers.hidhide.hidhidesetupprovider.md) 10 | 11 | - [IHidHideControlService](./nefarius.drivers.hidhide.ihidhidecontrolservice.md) 12 | 13 | - [ServiceCollectionExtensions](./nefarius.drivers.hidhide.servicecollectionextensions.md) 14 | 15 | ## Namespace Nefarius.Drivers.HidHide.Exceptions 16 | 17 | - [DownloadLocationMissingException](./nefarius.drivers.hidhide.exceptions.downloadlocationmissingexception.md) 18 | 19 | - [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md) 20 | 21 | - [HidHideDetectionFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedetectionfailedexception.md) 22 | 23 | - [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md) 24 | 25 | - [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md) 26 | 27 | - [HidHideException](./nefarius.drivers.hidhide.exceptions.hidhideexception.md) 28 | 29 | - [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md) 30 | 31 | - [HidHideServerExceptions](./nefarius.drivers.hidhide.exceptions.hidhideserverexceptions.md) 32 | 33 | - [MalformedUrlException](./nefarius.drivers.hidhide.exceptions.malformedurlexception.md) 34 | 35 | - [MissingReleasesException](./nefarius.drivers.hidhide.exceptions.missingreleasesexception.md) 36 | 37 | - [UpdateResponseMissingException](./nefarius.drivers.hidhide.exceptions.updateresponsemissingexception.md) 38 | 39 | ## Namespace Nefarius.Drivers.HidHide.Util 40 | 41 | - [MultiSzHelper](./nefarius.drivers.hidhide.util.multiszhelper.md) 42 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.downloadlocationmissingexception.md: -------------------------------------------------------------------------------- 1 | # DownloadLocationMissingException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Download location URL wasn't set for the selected release. 6 | 7 | ```csharp 8 | public sealed class DownloadLocationMissingException : HidHideServerExceptions, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.hidhideserverexceptions.md) → [DownloadLocationMissingException](./nefarius.drivers.hidhide.downloadlocationmissingexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ### **Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**Source** 67 | 68 | ```csharp 69 | public string Source { get; set; } 70 | ``` 71 | 72 | #### Property Value 73 | 74 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
75 | 76 | ###
**StackTrace** 77 | 78 | ```csharp 79 | public string StackTrace { get; } 80 | ``` 81 | 82 | #### Property Value 83 | 84 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
85 | 86 | ###
**TargetSite** 87 | 88 | ```csharp 89 | public MethodBase TargetSite { get; } 90 | ``` 91 | 92 | #### Property Value 93 | 94 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
95 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.downloadlocationmissingexception.md: -------------------------------------------------------------------------------- 1 | # DownloadLocationMissingException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Download location URL wasn't set for the selected release. 6 | 7 | ```csharp 8 | public sealed class DownloadLocationMissingException : HidHideServerExceptions, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.exceptions.hidhideserverexceptions.md) → [DownloadLocationMissingException](./nefarius.drivers.hidhide.exceptions.downloadlocationmissingexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**Source** 67 | 68 | ```csharp 69 | public string Source { get; set; } 70 | ``` 71 | 72 | #### Property Value 73 | 74 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
75 | 76 | ###
**StackTrace** 77 | 78 | ```csharp 79 | public string StackTrace { get; } 80 | ``` 81 | 82 | #### Property Value 83 | 84 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
85 | 86 | ###
**TargetSite** 87 | 88 | ```csharp 89 | public MethodBase TargetSite { get; } 90 | ``` 91 | 92 | #### Property Value 93 | 94 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
95 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md: -------------------------------------------------------------------------------- 1 | # HidHideBufferOverflowException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Buffer size exceeded maximum allowed characters. 6 | 7 | ```csharp 8 | public sealed class HidHideBufferOverflowException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.exceptions.hidhideexception.md) → [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.hidhidedetectionfailedexception.md: -------------------------------------------------------------------------------- 1 | # HidHideDetectionFailedException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Interface lookup failed. Check the 'NativeErrorCode' and 'NativeErrorMessage' property for more details. 6 | 7 | ```csharp 8 | public sealed class HidHideDetectionFailedException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.exceptions.hidhideexception.md) → [HidHideDetectionFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedetectionfailedexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**LastResult** 57 | 58 | The [CONFIGRET](./windows.win32.devices.deviceanddriverinstallation.configret.md) of the failing call. 59 | 60 | ```csharp 61 | public int LastResult { get; } 62 | ``` 63 | 64 | #### Property Value 65 | 66 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
67 | 68 | ###
**Message** 69 | 70 | ```csharp 71 | public string Message { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
77 | 78 | ###
**NativeErrorCode** 79 | 80 | Gets the native Win32 error code of the failed operation. 81 | 82 | ```csharp 83 | public int NativeErrorCode { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
89 | 90 | ###
**NativeErrorMessage** 91 | 92 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode). 93 | 94 | ```csharp 95 | public string NativeErrorMessage { get; } 96 | ``` 97 | 98 | #### Property Value 99 | 100 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
101 | 102 | ###
**Source** 103 | 104 | ```csharp 105 | public string Source { get; set; } 106 | ``` 107 | 108 | #### Property Value 109 | 110 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
111 | 112 | ###
**StackTrace** 113 | 114 | ```csharp 115 | public string StackTrace { get; } 116 | ``` 117 | 118 | #### Property Value 119 | 120 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
121 | 122 | ###
**TargetSite** 123 | 124 | ```csharp 125 | public MethodBase TargetSite { get; } 126 | ``` 127 | 128 | #### Property Value 129 | 130 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
131 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md: -------------------------------------------------------------------------------- 1 | # HidHideDriverAccessFailedException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Failed to open handle to driver. Make sure no other process is using the API at the same time. 6 | 7 | ```csharp 8 | public sealed class HidHideDriverAccessFailedException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.exceptions.hidhideexception.md) → [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md: -------------------------------------------------------------------------------- 1 | # HidHideDriverNotFoundException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Failed to locate driver. Make sure HidHide is installed and not in a faulty state. 6 | 7 | ```csharp 8 | public sealed class HidHideDriverNotFoundException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.exceptions.hidhideexception.md) → [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.hidhideexception.md: -------------------------------------------------------------------------------- 1 | # HidHideException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Describes a HidHide API exception. 6 | 7 | ```csharp 8 | public abstract class HidHideException : System.Exception, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.exceptions.hidhideexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md: -------------------------------------------------------------------------------- 1 | # HidHideRequestFailedException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Request failed. Check the 'NativeErrorCode' and 'NativeErrorMessage' property for more details. 6 | 7 | ```csharp 8 | public sealed class HidHideRequestFailedException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.exceptions.hidhideexception.md) → [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.hidhideserverexceptions.md: -------------------------------------------------------------------------------- 1 | # HidHideServerExceptions 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Describes a HidHide CDN server exception. 6 | 7 | ```csharp 8 | public abstract class HidHideServerExceptions : System.Exception, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.exceptions.hidhideserverexceptions.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**Source** 67 | 68 | ```csharp 69 | public string Source { get; set; } 70 | ``` 71 | 72 | #### Property Value 73 | 74 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
75 | 76 | ###
**StackTrace** 77 | 78 | ```csharp 79 | public string StackTrace { get; } 80 | ``` 81 | 82 | #### Property Value 83 | 84 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
85 | 86 | ###
**TargetSite** 87 | 88 | ```csharp 89 | public MethodBase TargetSite { get; } 90 | ``` 91 | 92 | #### Property Value 93 | 94 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
95 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.malformedurlexception.md: -------------------------------------------------------------------------------- 1 | # MalformedUrlException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | The supplied URL was ill formatted. 6 | 7 | ```csharp 8 | public sealed class MalformedUrlException : HidHideServerExceptions, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.exceptions.hidhideserverexceptions.md) → [MalformedUrlException](./nefarius.drivers.hidhide.exceptions.malformedurlexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**Source** 67 | 68 | ```csharp 69 | public string Source { get; set; } 70 | ``` 71 | 72 | #### Property Value 73 | 74 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
75 | 76 | ###
**StackTrace** 77 | 78 | ```csharp 79 | public string StackTrace { get; } 80 | ``` 81 | 82 | #### Property Value 83 | 84 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
85 | 86 | ###
**TargetSite** 87 | 88 | ```csharp 89 | public MethodBase TargetSite { get; } 90 | ``` 91 | 92 | #### Property Value 93 | 94 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
95 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.missingreleasesexception.md: -------------------------------------------------------------------------------- 1 | # MissingReleasesException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Server didn't supply any release information. 6 | 7 | ```csharp 8 | public sealed class MissingReleasesException : HidHideServerExceptions, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.exceptions.hidhideserverexceptions.md) → [MissingReleasesException](./nefarius.drivers.hidhide.exceptions.missingreleasesexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**Source** 67 | 68 | ```csharp 69 | public string Source { get; set; } 70 | ``` 71 | 72 | #### Property Value 73 | 74 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
75 | 76 | ###
**StackTrace** 77 | 78 | ```csharp 79 | public string StackTrace { get; } 80 | ``` 81 | 82 | #### Property Value 83 | 84 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
85 | 86 | ###
**TargetSite** 87 | 88 | ```csharp 89 | public MethodBase TargetSite { get; } 90 | ``` 91 | 92 | #### Property Value 93 | 94 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
95 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.exceptions.updateresponsemissingexception.md: -------------------------------------------------------------------------------- 1 | # UpdateResponseMissingException 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Exceptions 4 | 5 | Update response object missing, couldn't be deserialized or server error. Check 6 | [Exception.InnerException](https://docs.microsoft.com/en-us/dotnet/api/system.exception.innerexception) for details. 7 | 8 | ```csharp 9 | public sealed class UpdateResponseMissingException : HidHideServerExceptions, System.Runtime.Serialization.ISerializable 10 | ``` 11 | 12 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.exceptions.hidhideserverexceptions.md) → [UpdateResponseMissingException](./nefarius.drivers.hidhide.exceptions.updateresponsemissingexception.md)
13 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 14 | 15 | ## Properties 16 | 17 | ###
**Data** 18 | 19 | ```csharp 20 | public IDictionary Data { get; } 21 | ``` 22 | 23 | #### Property Value 24 | 25 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
26 | 27 | ###
**HelpLink** 28 | 29 | ```csharp 30 | public string HelpLink { get; set; } 31 | ``` 32 | 33 | #### Property Value 34 | 35 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
36 | 37 | ###
**HResult** 38 | 39 | ```csharp 40 | public int HResult { get; set; } 41 | ``` 42 | 43 | #### Property Value 44 | 45 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
46 | 47 | ###
**InnerException** 48 | 49 | ```csharp 50 | public Exception InnerException { get; } 51 | ``` 52 | 53 | #### Property Value 54 | 55 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
56 | 57 | ###
**Message** 58 | 59 | ```csharp 60 | public string Message { get; } 61 | ``` 62 | 63 | #### Property Value 64 | 65 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
66 | 67 | ###
**Source** 68 | 69 | ```csharp 70 | public string Source { get; set; } 71 | ``` 72 | 73 | #### Property Value 74 | 75 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
76 | 77 | ###
**StackTrace** 78 | 79 | ```csharp 80 | public string StackTrace { get; } 81 | ``` 82 | 83 | #### Property Value 84 | 85 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
86 | 87 | ###
**TargetSite** 88 | 89 | ```csharp 90 | public MethodBase TargetSite { get; } 91 | ``` 92 | 93 | #### Property Value 94 | 95 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
96 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhidebufferoverflowexception.md: -------------------------------------------------------------------------------- 1 | # HidHideBufferOverflowException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Buffer size exceeded maximum allowed characters. 6 | 7 | ```csharp 8 | public sealed class HidHideBufferOverflowException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.hidhideexception.md) → [HidHideBufferOverflowException](./nefarius.drivers.hidhide.hidhidebufferoverflowexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhidecontrolservice.md: -------------------------------------------------------------------------------- 1 | # HidHideControlService 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Provides a managed wrapper for communicating with HidHide driver. 6 | 7 | ```csharp 8 | public sealed class HidHideControlService : IHidHideControlService 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [HidHideControlService](./nefarius.drivers.hidhide.hidhidecontrolservice.md)
12 | Implements [IHidHideControlService](./nefarius.drivers.hidhide.ihidhidecontrolservice.md) 13 | 14 | ## Properties 15 | 16 | ###
**ApplicationPaths** 17 | 18 | ```csharp 19 | public IReadOnlyList ApplicationPaths { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IReadOnlyList<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1)
25 | 26 | ###
**BlockedInstanceIds** 27 | 28 | ```csharp 29 | public IReadOnlyList BlockedInstanceIds { get; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [IReadOnlyList<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1)
35 | 36 | ###
**DeviceInterface** 37 | 38 | Interface GUID to enumerate HidHide devices. 39 | 40 | ```csharp 41 | public static Guid DeviceInterface { get; } 42 | ``` 43 | 44 | #### Property Value 45 | 46 | [Guid](https://docs.microsoft.com/en-us/dotnet/api/system.guid)
47 | 48 | ###
**HardwareId** 49 | 50 | Hardware ID of the root-enumerated software node the driver attaches to. 51 | 52 | ```csharp 53 | public static string HardwareId { get; } 54 | ``` 55 | 56 | #### Property Value 57 | 58 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
59 | 60 | ###
**IsActive** 61 | 62 | ```csharp 63 | public bool IsActive { get; set; } 64 | ``` 65 | 66 | #### Property Value 67 | 68 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
69 | 70 | ###
**IsAppListInverted** 71 | 72 | ```csharp 73 | public bool IsAppListInverted { get; set; } 74 | ``` 75 | 76 | #### Property Value 77 | 78 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
79 | 80 | ###
**IsDriverNodePresent** 81 | 82 | ```csharp 83 | public bool IsDriverNodePresent { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
89 | 90 | ###
**IsInstalled** 91 | 92 | ```csharp 93 | public bool IsInstalled { get; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
99 | 100 | ###
**IsOperational** 101 | 102 | ```csharp 103 | public bool IsOperational { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
109 | 110 | ###
**LocalDriverVersion** 111 | 112 | ```csharp 113 | public Version LocalDriverVersion { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [Version](https://docs.microsoft.com/en-us/dotnet/api/system.version)
119 | 120 | ## Constructors 121 | 122 | ###
**HidHideControlService(ILoggerFactory)** 123 | 124 | Creates a new instance of [HidHideControlService](./nefarius.drivers.hidhide.hidhidecontrolservice.md) that is DI-aware. 125 | 126 | ```csharp 127 | public HidHideControlService(ILoggerFactory loggerFactory) 128 | ``` 129 | 130 | #### Parameters 131 | 132 | `loggerFactory` ILoggerFactory
133 | Injects a logging factory. 134 | 135 | ###
**HidHideControlService()** 136 | 137 | Creates a new instance of [HidHideControlService](./nefarius.drivers.hidhide.hidhidecontrolservice.md) that is not DI-aware. 138 | 139 | ```csharp 140 | public HidHideControlService() 141 | ``` 142 | 143 | **Remarks:** 144 | 145 | If the caller uses a dependency injection framework, do not instantiate this class directly. Use 146 | [ServiceCollectionExtensions.AddHidHide(IServiceCollection, Action<HidHideServiceOptions>, Action<IHttpClientBuilder>)](./nefarius.drivers.hidhide.servicecollectionextensions.md#addhidhideiservicecollection-actionhidhideserviceoptions-actionihttpclientbuilder) instead. 147 | 148 | ## Methods 149 | 150 | ### **AddApplicationPath(String)** 151 | 152 | ```csharp 153 | public void AddApplicationPath(string path) 154 | ``` 155 | 156 | #### Parameters 157 | 158 | `path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
159 | 160 | ###
**AddBlockedInstanceId(String)** 161 | 162 | ```csharp 163 | public void AddBlockedInstanceId(string instanceId) 164 | ``` 165 | 166 | #### Parameters 167 | 168 | `instanceId` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
169 | 170 | ###
**ClearApplicationsList()** 171 | 172 | ```csharp 173 | public void ClearApplicationsList() 174 | ``` 175 | 176 | ### **ClearBlockedInstancesList()** 177 | 178 | ```csharp 179 | public void ClearBlockedInstancesList() 180 | ``` 181 | 182 | ### **RemoveApplicationPath(String)** 183 | 184 | ```csharp 185 | public void RemoveApplicationPath(string path) 186 | ``` 187 | 188 | #### Parameters 189 | 190 | `path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
191 | 192 | ###
**RemoveBlockedInstanceId(String)** 193 | 194 | ```csharp 195 | public void RemoveBlockedInstanceId(string instanceId) 196 | ``` 197 | 198 | #### Parameters 199 | 200 | `instanceId` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
201 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhidedetectionfailedexception.md: -------------------------------------------------------------------------------- 1 | # HidHideDetectionFailedException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Interface lookup failed. Check the 'NativeErrorCode' and 'NativeErrorMessage' property for more details. 6 | 7 | ```csharp 8 | public sealed class HidHideDetectionFailedException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.hidhideexception.md) → [HidHideDetectionFailedException](./nefarius.drivers.hidhide.hidhidedetectionfailedexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**LastResult** 57 | 58 | The [CONFIGRET](./windows.win32.devices.deviceanddriverinstallation.configret.md) of the failing call. 59 | 60 | ```csharp 61 | public int LastResult { get; } 62 | ``` 63 | 64 | #### Property Value 65 | 66 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
67 | 68 | ###
**Message** 69 | 70 | ```csharp 71 | public string Message { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
77 | 78 | ###
**NativeErrorCode** 79 | 80 | Gets the native Win32 error code of the failed operation. 81 | 82 | ```csharp 83 | public int NativeErrorCode { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
89 | 90 | ###
**NativeErrorMessage** 91 | 92 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.hidhideexception.md#nativeerrorcode). 93 | 94 | ```csharp 95 | public string NativeErrorMessage { get; } 96 | ``` 97 | 98 | #### Property Value 99 | 100 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
101 | 102 | ###
**Source** 103 | 104 | ```csharp 105 | public string Source { get; set; } 106 | ``` 107 | 108 | #### Property Value 109 | 110 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
111 | 112 | ###
**StackTrace** 113 | 114 | ```csharp 115 | public string StackTrace { get; } 116 | ``` 117 | 118 | #### Property Value 119 | 120 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
121 | 122 | ###
**TargetSite** 123 | 124 | ```csharp 125 | public MethodBase TargetSite { get; } 126 | ``` 127 | 128 | #### Property Value 129 | 130 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
131 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhidedriveraccessfailedexception.md: -------------------------------------------------------------------------------- 1 | # HidHideDriverAccessFailedException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Failed to open handle to driver. Make sure no other process is using the API at the same time. 6 | 7 | ```csharp 8 | public sealed class HidHideDriverAccessFailedException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.hidhideexception.md) → [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.hidhidedriveraccessfailedexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhidedrivernotfoundexception.md: -------------------------------------------------------------------------------- 1 | # HidHideDriverNotFoundException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Failed to locate driver. Make sure HidHide is installed and not in a faulty state. 6 | 7 | ```csharp 8 | public sealed class HidHideDriverNotFoundException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.hidhideexception.md) → [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.hidhidedrivernotfoundexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhideexception.md: -------------------------------------------------------------------------------- 1 | # HidHideException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Describes a HidHide API exception. 6 | 7 | ```csharp 8 | public abstract class HidHideException : System.Exception, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.hidhideexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhiderequestfailedexception.md: -------------------------------------------------------------------------------- 1 | # HidHideRequestFailedException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Request failed. Check the 'NativeErrorCode' and 'NativeErrorMessage' property for more details. 6 | 7 | ```csharp 8 | public sealed class HidHideRequestFailedException : HidHideException, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideException](./nefarius.drivers.hidhide.hidhideexception.md) → [HidHideRequestFailedException](./nefarius.drivers.hidhide.hidhiderequestfailedexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**NativeErrorCode** 67 | 68 | Gets the native Win32 error code of the failed operation. 69 | 70 | ```csharp 71 | public int NativeErrorCode { get; } 72 | ``` 73 | 74 | #### Property Value 75 | 76 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
77 | 78 | ###
**NativeErrorMessage** 79 | 80 | Gets the error message related to [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.hidhideexception.md#nativeerrorcode). 81 | 82 | ```csharp 83 | public string NativeErrorMessage { get; } 84 | ``` 85 | 86 | #### Property Value 87 | 88 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
89 | 90 | ###
**Source** 91 | 92 | ```csharp 93 | public string Source { get; set; } 94 | ``` 95 | 96 | #### Property Value 97 | 98 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
99 | 100 | ###
**StackTrace** 101 | 102 | ```csharp 103 | public string StackTrace { get; } 104 | ``` 105 | 106 | #### Property Value 107 | 108 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
109 | 110 | ###
**TargetSite** 111 | 112 | ```csharp 113 | public MethodBase TargetSite { get; } 114 | ``` 115 | 116 | #### Property Value 117 | 118 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
119 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhideserverexceptions.md: -------------------------------------------------------------------------------- 1 | # HidHideServerExceptions 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Describes a HidHide CDN server exception. 6 | 7 | ```csharp 8 | public abstract class HidHideServerExceptions : System.Exception, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.hidhideserverexceptions.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**Source** 67 | 68 | ```csharp 69 | public string Source { get; set; } 70 | ``` 71 | 72 | #### Property Value 73 | 74 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
75 | 76 | ###
**StackTrace** 77 | 78 | ```csharp 79 | public string StackTrace { get; } 80 | ``` 81 | 82 | #### Property Value 83 | 84 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
85 | 86 | ###
**TargetSite** 87 | 88 | ```csharp 89 | public MethodBase TargetSite { get; } 90 | ``` 91 | 92 | #### Property Value 93 | 94 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
95 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhideserviceoptions.md: -------------------------------------------------------------------------------- 1 | # HidHideServiceOptions 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Optional options for HidHide service registration. 6 | 7 | ```csharp 8 | public sealed class HidHideServiceOptions 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [HidHideServiceOptions](./nefarius.drivers.hidhide.hidhideserviceoptions.md) 12 | 13 | ## Properties 14 | 15 | ###
**OSArchitecture** 16 | 17 | The processor/machine architecture to report to the CDN server. 18 | 19 | ```csharp 20 | public Architecture OSArchitecture { get; set; } 21 | ``` 22 | 23 | #### Property Value 24 | 25 | [Architecture](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture)
26 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.hidhidesetupprovider.md: -------------------------------------------------------------------------------- 1 | # HidHideSetupProvider 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Service to locate the latest HidHide setup resources, update information etc. 6 | 7 | ```csharp 8 | public sealed class HidHideSetupProvider 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [HidHideSetupProvider](./nefarius.drivers.hidhide.hidhidesetupprovider.md) 12 | 13 | ## Constructors 14 | 15 | ###
**HidHideSetupProvider(HttpClient)** 16 | 17 | Creates new instance of HidHide Setup Provider. 18 | 19 | ```csharp 20 | public HidHideSetupProvider(HttpClient client) 21 | ``` 22 | 23 | #### Parameters 24 | 25 | `client` HttpClient
26 | 27 | ## Methods 28 | 29 | ###
**DownloadLatestReleaseAsync(CancellationToken)** 30 | 31 | Downloads the setup asset of the most recent . 32 | 33 | ```csharp 34 | public Task DownloadLatestReleaseAsync(CancellationToken ct) 35 | ``` 36 | 37 | #### Parameters 38 | 39 | `ct` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
40 | Optional [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken). 41 | 42 | #### Returns 43 | 44 | A . 45 | 46 | #### Exceptions 47 | 48 | [UpdateResponseMissingException](./nefarius.drivers.hidhide.exceptions.updateresponsemissingexception.md)
49 | Server didn't respond with a proper reply, see 50 | [Exception.InnerException](https://docs.microsoft.com/en-us/dotnet/api/system.exception.innerexception) for details. 51 | 52 | [MissingReleasesException](./nefarius.drivers.hidhide.exceptions.missingreleasesexception.md)
53 | Mandatory releases collection was empty. 54 | 55 | T:System.Net.Http.HttpRequestException
56 | Server communication error occurred. 57 | 58 | ###
**DownloadReleaseAsync(UpdateRelease, CancellationToken)** 59 | 60 | Downloads the setup asset of the provided . 61 | 62 | ```csharp 63 | public Task DownloadReleaseAsync(UpdateRelease release, CancellationToken ct) 64 | ``` 65 | 66 | #### Parameters 67 | 68 | `release` UpdateRelease
69 | The who's asset7setup should be downloaded. 70 | 71 | `ct` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
72 | Optional [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken). 73 | 74 | #### Returns 75 | 76 | on success. 77 | 78 | #### Exceptions 79 | 80 | T:System.Net.Http.HttpRequestException
81 | Server communication error occurred. 82 | 83 | ###
**GetLatestDownloadUrlAsync(CancellationToken)** 84 | 85 | Fetches the latest setup download URL. 86 | 87 | ```csharp 88 | public Task GetLatestDownloadUrlAsync(CancellationToken ct) 89 | ``` 90 | 91 | #### Parameters 92 | 93 | `ct` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
94 | 95 | #### Returns 96 | 97 | [Task<Uri>](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1) 98 | 99 | #### Exceptions 100 | 101 | [UpdateResponseMissingException](./nefarius.drivers.hidhide.exceptions.updateresponsemissingexception.md)
102 | Server didn't respond with a proper reply, see 103 | [Exception.InnerException](https://docs.microsoft.com/en-us/dotnet/api/system.exception.innerexception) for details. 104 | 105 | [MissingReleasesException](./nefarius.drivers.hidhide.exceptions.missingreleasesexception.md)
106 | Mandatory releases collection was empty. 107 | 108 | [DownloadLocationMissingException](./nefarius.drivers.hidhide.exceptions.downloadlocationmissingexception.md)
109 | Mandatory release download location was missing. 110 | 111 | [MalformedUrlException](./nefarius.drivers.hidhide.exceptions.malformedurlexception.md)
112 | Provided download URL was malformed. 113 | 114 | ###
**GetLatestReleaseAsync(CancellationToken)** 115 | 116 | Fetches the latest available release. 117 | 118 | ```csharp 119 | public Task GetLatestReleaseAsync(CancellationToken ct) 120 | ``` 121 | 122 | #### Parameters 123 | 124 | `ct` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
125 | Optional [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken). 126 | 127 | #### Returns 128 | 129 | The latest available. 130 | 131 | #### Exceptions 132 | 133 | [UpdateResponseMissingException](./nefarius.drivers.hidhide.exceptions.updateresponsemissingexception.md)
134 | Server didn't respond with a proper reply, see 135 | [Exception.InnerException](https://docs.microsoft.com/en-us/dotnet/api/system.exception.innerexception) for details. 136 | 137 | [MissingReleasesException](./nefarius.drivers.hidhide.exceptions.missingreleasesexception.md)
138 | Mandatory releases collection was empty. 139 | 140 | ###
**GetLatestVersionAsync(CancellationToken)** 141 | 142 | Fetches the latest available version. 143 | 144 | ```csharp 145 | public Task GetLatestVersionAsync(CancellationToken ct) 146 | ``` 147 | 148 | #### Parameters 149 | 150 | `ct` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
151 | 152 | #### Returns 153 | 154 | [Task<Version>](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1) 155 | 156 | #### Exceptions 157 | 158 | [UpdateResponseMissingException](./nefarius.drivers.hidhide.exceptions.updateresponsemissingexception.md)
159 | Server didn't respond with a proper reply, see 160 | [Exception.InnerException](https://docs.microsoft.com/en-us/dotnet/api/system.exception.innerexception) for details. 161 | 162 | [MissingReleasesException](./nefarius.drivers.hidhide.exceptions.missingreleasesexception.md)
163 | Mandatory releases collection was empty. 164 | 165 | ###
**GetUpdateInformationAsync(CancellationToken)** 166 | 167 | Fetches the from the HidHide CDN server. 168 | 169 | ```csharp 170 | public Task GetUpdateInformationAsync(CancellationToken ct) 171 | ``` 172 | 173 | #### Parameters 174 | 175 | `ct` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
176 | 177 | #### Returns 178 | 179 | [Task<UpdateResponse>](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1) 180 | 181 | #### Exceptions 182 | 183 | [OperationCanceledException](https://docs.microsoft.com/en-us/dotnet/api/system.operationcanceledexception)
184 | The cancellation token was canceled. This exception is stored into the 185 | returned task. 186 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.ihidhidecontrolservice.md: -------------------------------------------------------------------------------- 1 | # IHidHideControlService 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Provides a managed wrapper for communicating with HidHide driver. 6 | 7 | ```csharp 8 | public interface IHidHideControlService 9 | ``` 10 | 11 | ## Properties 12 | 13 | ###
**ApplicationPaths** 14 | 15 | Returns list of currently allowed (or blocked, see [IHidHideControlService.IsAppListInverted](./nefarius.drivers.hidhide.ihidhidecontrolservice.md#isapplistinverted)) application paths. 16 | 17 | ```csharp 18 | public abstract IReadOnlyList ApplicationPaths { get; } 19 | ``` 20 | 21 | #### Property Value 22 | 23 | [IReadOnlyList<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1)
24 | 25 | #### Exceptions 26 | 27 | [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
28 | Failed to open handle to driver. Make sure no other process is 29 | using the API at the same time. 30 | 31 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
32 | Failed to locate driver. Make sure HidHide is installed and not in a 33 | faulty state. 34 | 35 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
36 | Driver communication has failed. See 37 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 38 | 39 | [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
40 | Buffer size exceeded maximum allowed characters. Happens when list 41 | grew out of supported bounds. 42 | 43 | ###
**BlockedInstanceIds** 44 | 45 | Returns list of currently blocked instance IDs. 46 | 47 | ```csharp 48 | public abstract IReadOnlyList BlockedInstanceIds { get; } 49 | ``` 50 | 51 | #### Property Value 52 | 53 | [IReadOnlyList<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1)
54 | 55 | #### Exceptions 56 | 57 | [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
58 | Failed to open handle to driver. Make sure no other process is 59 | using the API at the same time. 60 | 61 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
62 | Failed to locate driver. Make sure HidHide is installed and not in a 63 | faulty state. 64 | 65 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
66 | Driver communication has failed. See 67 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 68 | 69 | [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
70 | Buffer size exceeded maximum allowed characters. Happens when list 71 | grew out of supported bounds. 72 | 73 | ###
**IsActive** 74 | 75 | Gets or sets whether global device hiding is currently active or not. 76 | 77 | ```csharp 78 | public abstract bool IsActive { get; set; } 79 | ``` 80 | 81 | #### Property Value 82 | 83 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
84 | 85 | #### Exceptions 86 | 87 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
88 | Driver communication has failed. See 89 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 90 | 91 | ###
**IsAppListInverted** 92 | 93 | Gets or sets whether the application list is inverted (from block all/allow specific to allow all/block specific). 94 | 95 | ```csharp 96 | public abstract bool IsAppListInverted { get; set; } 97 | ``` 98 | 99 | #### Property Value 100 | 101 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
102 | 103 | #### Exceptions 104 | 105 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
106 | Driver communication has failed. See 107 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 108 | 109 | **Remarks:** 110 | 111 | The default behaviour of the application list is to block all processes by default and only treat listed paths 112 | as exempted. 113 | 114 | ###
**IsDriverNodePresent** 115 | 116 | Gets whether the virtual root-enumerated software device the driver attaches to is present on the system. 117 | 118 | ```csharp 119 | public abstract bool IsDriverNodePresent { get; } 120 | ``` 121 | 122 | #### Property Value 123 | 124 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
125 | 126 | #### Exceptions 127 | 128 | T:Nefarius.Utilities.DeviceManagement.Exceptions.ConfigManagerException
129 | An unexpected enumeration error occurred. 130 | 131 | ###
**IsInstalled** 132 | 133 | Gets whether the driver is present and operable. 134 | 135 | ```csharp 136 | public abstract bool IsInstalled { get; } 137 | ``` 138 | 139 | #### Property Value 140 | 141 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
142 | 143 | #### Exceptions 144 | 145 | [HidHideDetectionFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedetectionfailedexception.md)
146 | Driver lookup has failed. See [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and 147 | [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 148 | 149 | ###
**IsOperational** 150 | 151 | Gets whether the driver node is present and operational (has its device interface exposed). 152 | 153 | ```csharp 154 | public abstract bool IsOperational { get; } 155 | ``` 156 | 157 | #### Property Value 158 | 159 | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
160 | 161 | #### Exceptions 162 | 163 | [HidHideDetectionFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedetectionfailedexception.md)
164 | Driver lookup has failed. See [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and 165 | [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 166 | 167 | T:Nefarius.Utilities.DeviceManagement.Exceptions.ConfigManagerException
168 | An unexpected enumeration error occurred. 169 | 170 | ###
**LocalDriverVersion** 171 | 172 | Gets the local driver binary version. 173 | 174 | ```csharp 175 | public abstract Version LocalDriverVersion { get; } 176 | ``` 177 | 178 | #### Property Value 179 | 180 | [Version](https://docs.microsoft.com/en-us/dotnet/api/system.version)
181 | 182 | #### Exceptions 183 | 184 | T:Nefarius.Utilities.DeviceManagement.Exceptions.ConfigManagerException
185 | An unexpected enumeration error occurred. 186 | 187 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
188 | Failed to locate driver. Make sure HidHide is installed and not in a 189 | faulty state. 190 | 191 | ## Methods 192 | 193 | ###
**AddApplicationPath(String)** 194 | 195 | Submit a new application to allow (or deny if inverse flag is set). 196 | 197 | ```csharp 198 | void AddApplicationPath(string path) 199 | ``` 200 | 201 | #### Parameters 202 | 203 | `path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
204 | The absolute application path to allow. 205 | 206 | #### Exceptions 207 | 208 | [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
209 | Failed to open handle to driver. Make sure no other process is 210 | using the API at the same time. 211 | 212 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
213 | Failed to locate driver. Make sure HidHide is installed and not in a 214 | faulty state. 215 | 216 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
217 | Driver communication has failed. See 218 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 219 | 220 | [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
221 | Buffer size exceeded maximum allowed characters. Happens when list 222 | grew out of supported bounds. 223 | 224 | **Remarks:** 225 | 226 | Use the common local path notation (e.g. "C:\Windows\System32\rundll32.exe"). 227 | 228 | ###
**AddBlockedInstanceId(String)** 229 | 230 | Submit a new instance to block. 231 | 232 | ```csharp 233 | void AddBlockedInstanceId(string instanceId) 234 | ``` 235 | 236 | #### Parameters 237 | 238 | `instanceId` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
239 | The Instance ID to block. 240 | 241 | #### Exceptions 242 | 243 | [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
244 | Failed to open handle to driver. Make sure no other process is 245 | using the API at the same time. 246 | 247 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
248 | Failed to locate driver. Make sure HidHide is installed and not in a 249 | faulty state. 250 | 251 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
252 | Driver communication has failed. See 253 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 254 | 255 | [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
256 | Buffer size exceeded maximum allowed characters. Happens when list 257 | grew out of supported bounds. 258 | 259 | **Remarks:** 260 | 261 | To get the instance ID from e.g. a symbolic link (device path) you can use this companion library: 262 | https://github.com/nefarius/Nefarius.Utilities.DeviceManagement 263 | 264 | ###
**ClearApplicationsList()** 265 | 266 | Empties the application list. Useful if [IHidHideControlService.AddApplicationPath(String)](./nefarius.drivers.hidhide.ihidhidecontrolservice.md#addapplicationpathstring) or [IHidHideControlService.ApplicationPaths](./nefarius.drivers.hidhide.ihidhidecontrolservice.md#applicationpaths) throw 267 | exceptions due to nonexistent entries. 268 | 269 | ```csharp 270 | void ClearApplicationsList() 271 | ``` 272 | 273 | #### Exceptions 274 | 275 | [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
276 | Failed to open handle to driver. Make sure no other process is 277 | using the API at the same time. 278 | 279 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
280 | Failed to locate driver. Make sure HidHide is installed and not in a 281 | faulty state. 282 | 283 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
284 | Driver communication has failed. See 285 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 286 | 287 | [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
288 | Buffer size exceeded maximum allowed characters. Happens when list 289 | grew out of supported bounds. 290 | 291 | **Remarks:** 292 | 293 | Be very conservative in using this call, you might accidentally undo settings different apps have put in 294 | place. 295 | 296 | ###
**ClearBlockedInstancesList()** 297 | 298 | Empties the device instances list. Useful if [IHidHideControlService.AddBlockedInstanceId(String)](./nefarius.drivers.hidhide.ihidhidecontrolservice.md#addblockedinstanceidstring) or 299 | [IHidHideControlService.BlockedInstanceIds](./nefarius.drivers.hidhide.ihidhidecontrolservice.md#blockedinstanceids) throw exceptions due to nonexistent entries. 300 | 301 | ```csharp 302 | void ClearBlockedInstancesList() 303 | ``` 304 | 305 | #### Exceptions 306 | 307 | [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
308 | Failed to open handle to driver. Make sure no other process is 309 | using the API at the same time. 310 | 311 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
312 | Failed to locate driver. Make sure HidHide is installed and not in a 313 | faulty state. 314 | 315 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
316 | Driver communication has failed. See 317 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 318 | 319 | [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
320 | Buffer size exceeded maximum allowed characters. Happens when list 321 | grew out of supported bounds. 322 | 323 | **Remarks:** 324 | 325 | Be very conservative in using this call, you might accidentally undo settings different apps have put in 326 | place. 327 | 328 | ###
**RemoveApplicationPath(String)** 329 | 330 | Revokes an applications exemption. 331 | 332 | ```csharp 333 | void RemoveApplicationPath(string path) 334 | ``` 335 | 336 | #### Parameters 337 | 338 | `path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
339 | The absolute application path to revoke. 340 | 341 | #### Exceptions 342 | 343 | [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
344 | Failed to open handle to driver. Make sure no other process is 345 | using the API at the same time. 346 | 347 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
348 | Failed to locate driver. Make sure HidHide is installed and not in a 349 | faulty state. 350 | 351 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
352 | Driver communication has failed. See 353 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 354 | 355 | [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
356 | Buffer size exceeded maximum allowed characters. Happens when list 357 | grew out of supported bounds. 358 | 359 | **Remarks:** 360 | 361 | Use the common local path notation (e.g. "C:\Windows\System32\rundll32.exe"). 362 | 363 | ###
**RemoveBlockedInstanceId(String)** 364 | 365 | Remove an instance from being blocked. 366 | 367 | ```csharp 368 | void RemoveBlockedInstanceId(string instanceId) 369 | ``` 370 | 371 | #### Parameters 372 | 373 | `instanceId` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
374 | The Instance ID to unblock. 375 | 376 | #### Exceptions 377 | 378 | [HidHideDriverAccessFailedException](./nefarius.drivers.hidhide.exceptions.hidhidedriveraccessfailedexception.md)
379 | Failed to open handle to driver. Make sure no other process is 380 | using the API at the same time. 381 | 382 | [HidHideDriverNotFoundException](./nefarius.drivers.hidhide.exceptions.hidhidedrivernotfoundexception.md)
383 | Failed to locate driver. Make sure HidHide is installed and not in a 384 | faulty state. 385 | 386 | [HidHideRequestFailedException](./nefarius.drivers.hidhide.exceptions.hidhiderequestfailedexception.md)
387 | Driver communication has failed. See 388 | [HidHideException.NativeErrorCode](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrorcode) and [HidHideException.NativeErrorMessage](./nefarius.drivers.hidhide.exceptions.hidhideexception.md#nativeerrormessage) for details. 389 | 390 | [HidHideBufferOverflowException](./nefarius.drivers.hidhide.exceptions.hidhidebufferoverflowexception.md)
391 | Buffer size exceeded maximum allowed characters. Happens when list 392 | grew out of supported bounds. 393 | 394 | **Remarks:** 395 | 396 | To get the instance ID from e.g. a symbolic link (device path) you can use this companion library: 397 | https://github.com/nefarius/Nefarius.Utilities.DeviceManagement 398 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.malformedurlexception.md: -------------------------------------------------------------------------------- 1 | # MalformedUrlException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | The supplied URL was ill formatted. 6 | 7 | ```csharp 8 | public sealed class MalformedUrlException : HidHideServerExceptions, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.hidhideserverexceptions.md) → [MalformedUrlException](./nefarius.drivers.hidhide.malformedurlexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**Source** 67 | 68 | ```csharp 69 | public string Source { get; set; } 70 | ``` 71 | 72 | #### Property Value 73 | 74 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
75 | 76 | ###
**StackTrace** 77 | 78 | ```csharp 79 | public string StackTrace { get; } 80 | ``` 81 | 82 | #### Property Value 83 | 84 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
85 | 86 | ###
**TargetSite** 87 | 88 | ```csharp 89 | public MethodBase TargetSite { get; } 90 | ``` 91 | 92 | #### Property Value 93 | 94 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
95 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.missingreleasesexception.md: -------------------------------------------------------------------------------- 1 | # MissingReleasesException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Server didn't supply any release information. 6 | 7 | ```csharp 8 | public sealed class MissingReleasesException : HidHideServerExceptions, System.Runtime.Serialization.ISerializable 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.hidhideserverexceptions.md) → [MissingReleasesException](./nefarius.drivers.hidhide.missingreleasesexception.md)
12 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 13 | 14 | ## Properties 15 | 16 | ###
**Data** 17 | 18 | ```csharp 19 | public IDictionary Data { get; } 20 | ``` 21 | 22 | #### Property Value 23 | 24 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
25 | 26 | ###
**HelpLink** 27 | 28 | ```csharp 29 | public string HelpLink { get; set; } 30 | ``` 31 | 32 | #### Property Value 33 | 34 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
35 | 36 | ###
**HResult** 37 | 38 | ```csharp 39 | public int HResult { get; set; } 40 | ``` 41 | 42 | #### Property Value 43 | 44 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
45 | 46 | ###
**InnerException** 47 | 48 | ```csharp 49 | public Exception InnerException { get; } 50 | ``` 51 | 52 | #### Property Value 53 | 54 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
55 | 56 | ###
**Message** 57 | 58 | ```csharp 59 | public string Message { get; } 60 | ``` 61 | 62 | #### Property Value 63 | 64 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
65 | 66 | ###
**Source** 67 | 68 | ```csharp 69 | public string Source { get; set; } 70 | ``` 71 | 72 | #### Property Value 73 | 74 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
75 | 76 | ###
**StackTrace** 77 | 78 | ```csharp 79 | public string StackTrace { get; } 80 | ``` 81 | 82 | #### Property Value 83 | 84 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
85 | 86 | ###
**TargetSite** 87 | 88 | ```csharp 89 | public MethodBase TargetSite { get; } 90 | ``` 91 | 92 | #### Property Value 93 | 94 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
95 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.servicecollectionextensions.md: -------------------------------------------------------------------------------- 1 | # ServiceCollectionExtensions 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Service collection extension methods. 6 | 7 | ```csharp 8 | public static class ServiceCollectionExtensions 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ServiceCollectionExtensions](./nefarius.drivers.hidhide.servicecollectionextensions.md) 12 | 13 | ## Methods 14 | 15 | ###
**AddHidHide(IServiceCollection, Action<HidHideServiceOptions>, Action<IHttpClientBuilder>)** 16 | 17 | Registers [HidHideControlService](./nefarius.drivers.hidhide.hidhidecontrolservice.md) and [HidHideSetupProvider](./nefarius.drivers.hidhide.hidhidesetupprovider.md) with DI. 18 | 19 | ```csharp 20 | public static IServiceCollection AddHidHide(IServiceCollection services, Action options, Action builder) 21 | ``` 22 | 23 | #### Parameters 24 | 25 | `services` IServiceCollection
26 | The to modify. 27 | 28 | `options` [Action<HidHideServiceOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.action-1)
29 | Optional options to customize the registered HidHide services. 30 | 31 | `builder` [Action<IHttpClientBuilder>](https://docs.microsoft.com/en-us/dotnet/api/system.action-1)
32 | Optional to e.g. add resiliency policies or further customize 33 | the named HTTP client. 34 | 35 | #### Returns 36 | 37 | IServiceCollection 38 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.updateresponsemissingexception.md: -------------------------------------------------------------------------------- 1 | # UpdateResponseMissingException 2 | 3 | Namespace: Nefarius.Drivers.HidHide 4 | 5 | Update response object missing, couldn't be deserialized or server error. Check 6 | [Exception.InnerException](https://docs.microsoft.com/en-us/dotnet/api/system.exception.innerexception) for details. 7 | 8 | ```csharp 9 | public sealed class UpdateResponseMissingException : HidHideServerExceptions, System.Runtime.Serialization.ISerializable 10 | ``` 11 | 12 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [HidHideServerExceptions](./nefarius.drivers.hidhide.hidhideserverexceptions.md) → [UpdateResponseMissingException](./nefarius.drivers.hidhide.updateresponsemissingexception.md)
13 | Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) 14 | 15 | ## Properties 16 | 17 | ###
**Data** 18 | 19 | ```csharp 20 | public IDictionary Data { get; } 21 | ``` 22 | 23 | #### Property Value 24 | 25 | [IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
26 | 27 | ###
**HelpLink** 28 | 29 | ```csharp 30 | public string HelpLink { get; set; } 31 | ``` 32 | 33 | #### Property Value 34 | 35 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
36 | 37 | ###
**HResult** 38 | 39 | ```csharp 40 | public int HResult { get; set; } 41 | ``` 42 | 43 | #### Property Value 44 | 45 | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
46 | 47 | ###
**InnerException** 48 | 49 | ```csharp 50 | public Exception InnerException { get; } 51 | ``` 52 | 53 | #### Property Value 54 | 55 | [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
56 | 57 | ###
**Message** 58 | 59 | ```csharp 60 | public string Message { get; } 61 | ``` 62 | 63 | #### Property Value 64 | 65 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
66 | 67 | ###
**Source** 68 | 69 | ```csharp 70 | public string Source { get; set; } 71 | ``` 72 | 73 | #### Property Value 74 | 75 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
76 | 77 | ###
**StackTrace** 78 | 79 | ```csharp 80 | public string StackTrace { get; } 81 | ``` 82 | 83 | #### Property Value 84 | 85 | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
86 | 87 | ###
**TargetSite** 88 | 89 | ```csharp 90 | public MethodBase TargetSite { get; } 91 | ``` 92 | 93 | #### Property Value 94 | 95 | [MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
96 | -------------------------------------------------------------------------------- /docs/nefarius.drivers.hidhide.util.multiszhelper.md: -------------------------------------------------------------------------------- 1 | # MultiSzHelper 2 | 3 | Namespace: Nefarius.Drivers.HidHide.Util 4 | 5 | String manipulation helper methods. 6 | 7 | ```csharp 8 | public static class MultiSzHelper 9 | ``` 10 | 11 | Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [MultiSzHelper](./nefarius.drivers.hidhide.util.multiszhelper.md) 12 | 13 | ## Methods 14 | 15 | ###
**MultiSzPointerToStringArray(IntPtr, Int32)** 16 | 17 | Converts a double-null-terminated multi-byte character memory block into a string array. 18 | 19 | ```csharp 20 | public static IEnumerable MultiSzPointerToStringArray(IntPtr buffer, int length) 21 | ``` 22 | 23 | #### Parameters 24 | 25 | `buffer` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
26 | The memory buffer. 27 | 28 | `length` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
29 | The size in bytes of the memory buffer. 30 | 31 | #### Returns 32 | 33 | The extracted string array. 34 | 35 | ###
**StringArrayToMultiSzPointer(IEnumerable<String>, ref Int32)** 36 | 37 | Converts an array of [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) into a double-null-terminated multi-byte character memory block. 38 | 39 | ```csharp 40 | public static IntPtr StringArrayToMultiSzPointer(IEnumerable instances, ref Int32 length) 41 | ``` 42 | 43 | #### Parameters 44 | 45 | `instances` [IEnumerable<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
46 | Source array of strings. 47 | 48 | `length` [Int32&](https://docs.microsoft.com/en-us/dotnet/api/system.int32&)
49 | The length of the resulting byte array. 50 | 51 | #### Returns 52 | 53 | The allocated memory buffer. 54 | -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Exceptions/HidHideException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics.CodeAnalysis; 3 | using System.Runtime.InteropServices; 4 | 5 | using Windows.Win32; 6 | using Windows.Win32.Devices.DeviceAndDriverInstallation; 7 | using Windows.Win32.System.Diagnostics.Debug; 8 | 9 | namespace Nefarius.Drivers.HidHide.Exceptions; 10 | 11 | /// 12 | /// Describes a HidHide API exception. 13 | /// 14 | [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] 15 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 16 | public abstract class HidHideException : Exception 17 | { 18 | internal HidHideException() 19 | { 20 | } 21 | 22 | internal HidHideException(string message) : base(message) 23 | { 24 | NativeErrorCode = Marshal.GetLastWin32Error(); 25 | } 26 | 27 | internal HidHideException(string message, int errorCode) : this(message) 28 | { 29 | NativeErrorCode = errorCode; 30 | } 31 | 32 | /// 33 | /// Gets the native Win32 error code of the failed operation. 34 | /// 35 | public int NativeErrorCode { get; } 36 | 37 | /// 38 | /// Gets the error message related to . 39 | /// 40 | public unsafe string NativeErrorMessage 41 | { 42 | get 43 | { 44 | char* buffer = stackalloc char[1024]; 45 | 46 | uint chars = PInvoke.FormatMessage( 47 | FORMAT_MESSAGE_OPTIONS.FORMAT_MESSAGE_FROM_SYSTEM | 48 | FORMAT_MESSAGE_OPTIONS.FORMAT_MESSAGE_IGNORE_INSERTS, 49 | null, 50 | (uint)NativeErrorCode, 51 | 0, 52 | buffer, 53 | 512, 54 | null 55 | ); 56 | 57 | return chars > 0 ? new string(buffer).TrimEnd('\r', '\n') : null; 58 | } 59 | } 60 | } 61 | 62 | /// 63 | /// Failed to open handle to driver. Make sure no other process is using the API at the same time. 64 | /// 65 | public sealed class HidHideDriverAccessFailedException : HidHideException 66 | { 67 | internal HidHideDriverAccessFailedException() : base( 68 | "Failed to open handle to driver. Make sure no other process is using the API at the same time.") 69 | { 70 | } 71 | } 72 | 73 | /// 74 | /// Failed to locate driver. Make sure HidHide is installed and not in a faulty state. 75 | /// 76 | public sealed class HidHideDriverNotFoundException : HidHideException 77 | { 78 | internal HidHideDriverNotFoundException() : base( 79 | "Failed to locate driver. Make sure HidHide is installed and not in a faulty state.") 80 | { 81 | } 82 | } 83 | 84 | /// 85 | /// Buffer size exceeded maximum allowed characters. 86 | /// 87 | public sealed class HidHideBufferOverflowException : HidHideException 88 | { 89 | internal HidHideBufferOverflowException() : base( 90 | $"Buffer size exceeded maximum allowed value of {short.MaxValue} characters.") 91 | { 92 | } 93 | } 94 | 95 | /// 96 | /// Request failed. Check the 'NativeErrorCode' and 'NativeErrorMessage' property for more details. 97 | /// 98 | public sealed class HidHideRequestFailedException : HidHideException 99 | { 100 | internal HidHideRequestFailedException() : base( 101 | "Request failed. Check the 'NativeErrorCode' and 'NativeErrorMessage' property for more details.") 102 | { 103 | } 104 | } 105 | 106 | /// 107 | /// Interface lookup failed. Check the 'NativeErrorCode' and 'NativeErrorMessage' property for more details. 108 | /// 109 | public sealed class HidHideDetectionFailedException : HidHideException 110 | { 111 | internal HidHideDetectionFailedException(CONFIGRET result) : base( 112 | "Interface lookup failed. Check the 'LastResult', 'NativeErrorCode' and 'NativeErrorMessage' property for more details.") 113 | { 114 | LastResult = (int)result; 115 | } 116 | 117 | /// 118 | /// The of the failing call. 119 | /// 120 | public int LastResult { get; } 121 | } -------------------------------------------------------------------------------- /src/Exceptions/HidHideServerExceptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics.CodeAnalysis; 3 | 4 | namespace Nefarius.Drivers.HidHide.Exceptions; 5 | 6 | /// 7 | /// Describes a HidHide CDN server exception. 8 | /// 9 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 10 | public abstract class HidHideServerExceptions : Exception 11 | { 12 | /// 13 | internal HidHideServerExceptions() { } 14 | 15 | internal HidHideServerExceptions(string message) : base(message) 16 | { 17 | } 18 | 19 | internal HidHideServerExceptions(string message, Exception innerException) : base(message, innerException) 20 | { 21 | } 22 | } 23 | 24 | /// 25 | /// Update response object missing, couldn't be deserialized or server error. Check 26 | /// for details. 27 | /// 28 | public sealed class UpdateResponseMissingException : HidHideServerExceptions 29 | { 30 | internal UpdateResponseMissingException(Exception innerException = default) : base( 31 | "Update response object missing, couldn't be deserialized or server error. Check InnerException for details.") 32 | { 33 | } 34 | } 35 | 36 | /// 37 | /// Server didn't supply any release information. 38 | /// 39 | public sealed class MissingReleasesException : HidHideServerExceptions 40 | { 41 | internal MissingReleasesException() : base("Server didn't supply any release information.") { } 42 | } 43 | 44 | /// 45 | /// Download location URL wasn't set for the selected release. 46 | /// 47 | public sealed class DownloadLocationMissingException : HidHideServerExceptions 48 | { 49 | internal DownloadLocationMissingException() : base("Download location URL wasn't set for the selected release.") { } 50 | } 51 | 52 | /// 53 | /// The supplied URL was ill formatted. 54 | /// 55 | public sealed class MalformedUrlException : HidHideServerExceptions 56 | { 57 | internal MalformedUrlException() : base("The supplied URL was ill formatted.") { } 58 | } -------------------------------------------------------------------------------- /src/HidHideServiceOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.CodeAnalysis; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace Nefarius.Drivers.HidHide; 5 | 6 | /// 7 | /// Optional options for HidHide service registration. 8 | /// 9 | [SuppressMessage("ReSharper", "InconsistentNaming")] 10 | public sealed class HidHideServiceOptions 11 | { 12 | internal HidHideServiceOptions() { } 13 | 14 | /// 15 | /// The processor/machine architecture to report to the CDN server. 16 | /// 17 | public Architecture OSArchitecture { get; set; } = RuntimeInformation.OSArchitecture; 18 | } -------------------------------------------------------------------------------- /src/HidHideSetupProvider.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | 3 | using System; 4 | using System.Diagnostics.CodeAnalysis; 5 | using System.Linq; 6 | using System.Net.Http; 7 | using System.Net.Http.Json; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using System.Threading; 11 | using System.Threading.Tasks; 12 | 13 | using Nefarius.Drivers.HidHide.Exceptions; 14 | using Nefarius.Vicius.Abstractions.Converters; 15 | using Nefarius.Vicius.Abstractions.Models; 16 | 17 | namespace Nefarius.Drivers.HidHide; 18 | 19 | /// 20 | /// Service to locate the latest HidHide setup resources, update information etc. 21 | /// 22 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 23 | public sealed class HidHideSetupProvider 24 | { 25 | private readonly HttpClient _client; 26 | 27 | /// 28 | /// Creates new instance of HidHide Setup Provider. 29 | /// 30 | public HidHideSetupProvider(HttpClient client) 31 | { 32 | _client = client; 33 | } 34 | 35 | /// 36 | /// Fetches the from the HidHide CDN server. 37 | /// 38 | /// 39 | /// The cancellation token was canceled. This exception is stored into the 40 | /// returned task. 41 | /// 42 | public Task GetUpdateInformationAsync(CancellationToken ct = default) 43 | { 44 | JsonSerializerOptions opts = new() 45 | { 46 | // the client can handle missing fields that are optional, no need to transmit null values 47 | DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, 48 | // server supplies camelCase 49 | PropertyNamingPolicy = JsonNamingPolicy.CamelCase 50 | }; 51 | // we exchange timestamps as ISO 8601 string (UTC) 52 | opts.Converters.Add(new DateTimeOffsetConverter()); 53 | // we use the enum value names (strings) instead of numerical values 54 | opts.Converters.Add(new JsonStringEnumConverter()); 55 | 56 | return _client.GetFromJsonAsync("/api/nefarius/HidHide/updates.json", opts, ct); 57 | } 58 | 59 | /// 60 | /// Fetches the latest setup download URL. 61 | /// 62 | /// 63 | /// Server didn't respond with a proper reply, see 64 | /// for details. 65 | /// 66 | /// Mandatory releases collection was empty. 67 | /// Mandatory release download location was missing. 68 | /// Provided download URL was malformed. 69 | public async Task GetLatestDownloadUrlAsync(CancellationToken ct = default) 70 | { 71 | UpdateRelease release = await GetLatestReleaseAsync(ct); 72 | 73 | string location = release.DownloadUrl; 74 | 75 | if (string.IsNullOrEmpty(location)) 76 | { 77 | throw new DownloadLocationMissingException(); 78 | } 79 | 80 | return Uri.TryCreate(location, UriKind.Absolute, out Uri? uri) 81 | ? uri 82 | : throw new MalformedUrlException(); 83 | } 84 | 85 | /// 86 | /// Fetches the latest available version. 87 | /// 88 | /// 89 | /// Server didn't respond with a proper reply, see 90 | /// for details. 91 | /// 92 | /// Mandatory releases collection was empty. 93 | public async Task GetLatestVersionAsync(CancellationToken ct = default) 94 | { 95 | UpdateRelease release = await GetLatestReleaseAsync(ct); 96 | 97 | return release.Version; 98 | } 99 | 100 | /// 101 | /// Fetches the latest available release. 102 | /// 103 | /// Optional . 104 | /// The latest available. 105 | /// 106 | /// Server didn't respond with a proper reply, see 107 | /// for details. 108 | /// 109 | /// Mandatory releases collection was empty. 110 | public async Task GetLatestReleaseAsync(CancellationToken ct = default) 111 | { 112 | UpdateResponse? updates; 113 | 114 | try 115 | { 116 | updates = await GetUpdateInformationAsync(ct); 117 | } 118 | catch (Exception ex) 119 | { 120 | throw new UpdateResponseMissingException(ex); 121 | } 122 | 123 | if (updates is null) 124 | { 125 | throw new UpdateResponseMissingException(); 126 | } 127 | 128 | UpdateRelease? release = updates.Releases.OrderByDescending(r => r.Version).FirstOrDefault(); 129 | 130 | if (release is null) 131 | { 132 | throw new MissingReleasesException(); 133 | } 134 | 135 | return release; 136 | } 137 | 138 | /// 139 | /// Downloads the setup asset of the most recent . 140 | /// 141 | /// Optional . 142 | /// A . 143 | /// 144 | /// Server didn't respond with a proper reply, see 145 | /// for details. 146 | /// 147 | /// Mandatory releases collection was empty. 148 | /// Server communication error occurred. 149 | public async Task DownloadLatestReleaseAsync(CancellationToken ct = default) 150 | { 151 | UpdateRelease release = await GetLatestReleaseAsync(ct); 152 | 153 | return await _client.GetAsync(release.DownloadUrl, ct); 154 | } 155 | 156 | /// 157 | /// Downloads the setup asset of the provided . 158 | /// 159 | /// The who's asset7setup should be downloaded. 160 | /// Optional . 161 | /// on success. 162 | /// Server communication error occurred. 163 | public Task DownloadReleaseAsync(UpdateRelease release, CancellationToken ct = default) 164 | { 165 | return _client.GetAsync(release.DownloadUrl, ct); 166 | } 167 | } -------------------------------------------------------------------------------- /src/IHidHideControlService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics.CodeAnalysis; 4 | 5 | using Nefarius.Drivers.HidHide.Exceptions; 6 | using Nefarius.Utilities.DeviceManagement.Exceptions; 7 | 8 | namespace Nefarius.Drivers.HidHide; 9 | 10 | /// 11 | /// Provides a managed wrapper for communicating with HidHide driver. 12 | /// 13 | [SuppressMessage("ReSharper", "UnusedMemberInSuper.Global")] 14 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 15 | public interface IHidHideControlService 16 | { 17 | /// 18 | /// Gets or sets whether global device hiding is currently active or not. 19 | /// 20 | /// 21 | /// Driver communication has failed. See 22 | /// and for details. 23 | /// 24 | bool IsActive { get; set; } 25 | 26 | /// 27 | /// Gets whether the driver is present and operable. 28 | /// 29 | /// 30 | /// Driver lookup has failed. See and 31 | /// for details. 32 | /// 33 | bool IsInstalled { get; } 34 | 35 | /// 36 | /// Gets whether the virtual root-enumerated software device the driver attaches to is present on the system. 37 | /// 38 | /// An unexpected enumeration error occurred. 39 | bool IsDriverNodePresent { get; } 40 | 41 | /// 42 | /// Gets whether the driver node is present and operational (has its device interface exposed). 43 | /// 44 | /// 45 | /// Driver lookup has failed. See and 46 | /// for details. 47 | /// 48 | /// An unexpected enumeration error occurred. 49 | bool IsOperational { get; } 50 | 51 | /// 52 | /// Gets the local driver binary version. 53 | /// 54 | /// An unexpected enumeration error occurred. 55 | /// 56 | /// Failed to locate driver. Make sure HidHide is installed and not in a 57 | /// faulty state. 58 | /// 59 | Version LocalDriverVersion { get; } 60 | 61 | /// 62 | /// Gets or sets whether the application list is inverted (from block all/allow specific to allow all/block specific). 63 | /// 64 | /// 65 | /// The default behaviour of the application list is to block all processes by default and only treat listed paths 66 | /// as exempted. 67 | /// 68 | /// 69 | /// Driver communication has failed. See 70 | /// and for details. 71 | /// 72 | bool IsAppListInverted { get; set; } 73 | 74 | /// 75 | /// Returns list of currently blocked instance IDs. 76 | /// 77 | /// 78 | /// Failed to open handle to driver. Make sure no other process is 79 | /// using the API at the same time. 80 | /// 81 | /// 82 | /// Failed to locate driver. Make sure HidHide is installed and not in a 83 | /// faulty state. 84 | /// 85 | /// 86 | /// Driver communication has failed. See 87 | /// and for details. 88 | /// 89 | /// 90 | /// Buffer size exceeded maximum allowed characters. Happens when list 91 | /// grew out of supported bounds. 92 | /// 93 | IReadOnlyList BlockedInstanceIds { get; } 94 | 95 | /// 96 | /// Returns list of currently allowed (or blocked, see ) application paths. 97 | /// 98 | /// 99 | /// Failed to open handle to driver. Make sure no other process is 100 | /// using the API at the same time. 101 | /// 102 | /// 103 | /// Failed to locate driver. Make sure HidHide is installed and not in a 104 | /// faulty state. 105 | /// 106 | /// 107 | /// Driver communication has failed. See 108 | /// and for details. 109 | /// 110 | /// 111 | /// Buffer size exceeded maximum allowed characters. Happens when list 112 | /// grew out of supported bounds. 113 | /// 114 | IReadOnlyList ApplicationPaths { get; } 115 | 116 | /// 117 | /// Submit a new instance to block. 118 | /// 119 | /// 120 | /// To get the instance ID from e.g. a symbolic link (device path) you can use this companion library: 121 | /// https://github.com/nefarius/Nefarius.Utilities.DeviceManagement 122 | /// 123 | /// The Instance ID to block. 124 | /// 125 | /// Failed to open handle to driver. Make sure no other process is 126 | /// using the API at the same time. 127 | /// 128 | /// 129 | /// Failed to locate driver. Make sure HidHide is installed and not in a 130 | /// faulty state. 131 | /// 132 | /// 133 | /// Driver communication has failed. See 134 | /// and for details. 135 | /// 136 | /// 137 | /// Buffer size exceeded maximum allowed characters. Happens when list 138 | /// grew out of supported bounds. 139 | /// 140 | void AddBlockedInstanceId(string instanceId); 141 | 142 | /// 143 | /// Remove an instance from being blocked. 144 | /// 145 | /// 146 | /// To get the instance ID from e.g. a symbolic link (device path) you can use this companion library: 147 | /// https://github.com/nefarius/Nefarius.Utilities.DeviceManagement 148 | /// 149 | /// The Instance ID to unblock. 150 | /// 151 | /// Failed to open handle to driver. Make sure no other process is 152 | /// using the API at the same time. 153 | /// 154 | /// 155 | /// Failed to locate driver. Make sure HidHide is installed and not in a 156 | /// faulty state. 157 | /// 158 | /// 159 | /// Driver communication has failed. See 160 | /// and for details. 161 | /// 162 | /// 163 | /// Buffer size exceeded maximum allowed characters. Happens when list 164 | /// grew out of supported bounds. 165 | /// 166 | void RemoveBlockedInstanceId(string instanceId); 167 | 168 | /// 169 | /// Empties the device instances list. Useful if or 170 | /// throw exceptions due to nonexistent entries. 171 | /// 172 | /// 173 | /// Be very conservative in using this call, you might accidentally undo settings different apps have put in 174 | /// place. 175 | /// 176 | /// 177 | /// Failed to open handle to driver. Make sure no other process is 178 | /// using the API at the same time. 179 | /// 180 | /// 181 | /// Failed to locate driver. Make sure HidHide is installed and not in a 182 | /// faulty state. 183 | /// 184 | /// 185 | /// Driver communication has failed. See 186 | /// and for details. 187 | /// 188 | /// 189 | /// Buffer size exceeded maximum allowed characters. Happens when list 190 | /// grew out of supported bounds. 191 | /// 192 | void ClearBlockedInstancesList(); 193 | 194 | /// 195 | /// Submit a new application to allow (or deny if inverse flag is set). 196 | /// 197 | /// Use the common local path notation (e.g. "C:\Windows\System32\rundll32.exe"). 198 | /// The absolute application path to allow. 199 | /// 200 | /// Failed to open handle to driver. Make sure no other process is 201 | /// using the API at the same time. 202 | /// 203 | /// 204 | /// Failed to locate driver. Make sure HidHide is installed and not in a 205 | /// faulty state. 206 | /// 207 | /// 208 | /// Driver communication has failed. See 209 | /// and for details. 210 | /// 211 | /// 212 | /// Buffer size exceeded maximum allowed characters. Happens when list 213 | /// grew out of supported bounds. 214 | /// 215 | void AddApplicationPath(string path); 216 | 217 | /// 218 | /// Revokes an applications exemption. 219 | /// 220 | /// Use the common local path notation (e.g. "C:\Windows\System32\rundll32.exe"). 221 | /// The absolute application path to revoke. 222 | /// 223 | /// Failed to open handle to driver. Make sure no other process is 224 | /// using the API at the same time. 225 | /// 226 | /// 227 | /// Failed to locate driver. Make sure HidHide is installed and not in a 228 | /// faulty state. 229 | /// 230 | /// 231 | /// Driver communication has failed. See 232 | /// and for details. 233 | /// 234 | /// 235 | /// Buffer size exceeded maximum allowed characters. Happens when list 236 | /// grew out of supported bounds. 237 | /// 238 | void RemoveApplicationPath(string path); 239 | 240 | /// 241 | /// Empties the application list. Useful if or throw 242 | /// exceptions due to nonexistent entries. 243 | /// 244 | /// 245 | /// Be very conservative in using this call, you might accidentally undo settings different apps have put in 246 | /// place. 247 | /// 248 | /// 249 | /// Failed to open handle to driver. Make sure no other process is 250 | /// using the API at the same time. 251 | /// 252 | /// 253 | /// Failed to locate driver. Make sure HidHide is installed and not in a 254 | /// faulty state. 255 | /// 256 | /// 257 | /// Driver communication has failed. See 258 | /// and for details. 259 | /// 260 | /// 261 | /// Buffer size exceeded maximum allowed characters. Happens when list 262 | /// grew out of supported bounds. 263 | /// 264 | void ClearApplicationsList(); 265 | } -------------------------------------------------------------------------------- /src/NativeMethods.txt: -------------------------------------------------------------------------------- 1 | CreateFile 2 | DeviceIoControl 3 | GetVolumePathNamesForVolumeNameW 4 | FindFirstVolume 5 | FindNextVolume 6 | QueryDosDevice 7 | METHOD_BUFFERED 8 | METHOD_IN_DIRECT 9 | METHOD_OUT_DIRECT 10 | METHOD_NEITHER 11 | FILE_ACCESS_RIGHTS 12 | FormatMessage 13 | FORMAT_MESSAGE_OPTIONS 14 | CM_Get_Device_Interface_List 15 | CM_Get_Device_Interface_List_Size 16 | CM_GET_DEVICE_INTERFACE_LIST_FLAGS 17 | WIN32_ERROR -------------------------------------------------------------------------------- /src/Nefarius.Drivers.HidHide.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0;net6-windows;net7-windows;net8-windows 5 | true 6 | true 7 | MIT 8 | 1.0.0 9 | https://github.com/nefarius/Nefarius.Drivers.HidHide 10 | https://github.com/nefarius/Nefarius.Drivers.HidHide 11 | Managed API for configuring HidHide. 12 | 13 | 14 | 15 | v 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | all 34 | 35 | 36 | all 37 | runtime; build; native; contentfiles; analyzers; buildtransitive 38 | 39 | 40 | 41 | 42 | all 43 | runtime; build; native; contentfiles; analyzers; buildtransitive 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/ServiceCollectionExtensions.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | 3 | using System; 4 | 5 | using Microsoft.Extensions.DependencyInjection; 6 | using Microsoft.Extensions.DependencyInjection.Extensions; 7 | 8 | namespace Nefarius.Drivers.HidHide; 9 | 10 | /// 11 | /// Service collection extension methods. 12 | /// 13 | public static class ServiceCollectionExtensions 14 | { 15 | /// 16 | /// Registers and with DI. 17 | /// 18 | /// The to modify. 19 | /// Optional options to customize the registered HidHide services. 20 | /// 21 | /// Optional to e.g. add resiliency policies or further customize 22 | /// the named HTTP client. 23 | /// 24 | public static IServiceCollection AddHidHide(this IServiceCollection services, 25 | Action? options = default, Action? builder = default) 26 | { 27 | HidHideServiceOptions serviceOptions = new(); 28 | 29 | options?.Invoke(serviceOptions); 30 | 31 | services.TryAddSingleton(); 32 | 33 | IHttpClientBuilder clientBuilder = services.AddHttpClient(client => 34 | { 35 | client.BaseAddress = new Uri("https://vicius.api.nefarius.systems/"); 36 | client.DefaultRequestHeaders.UserAgent.ParseAdd(nameof(HidHideSetupProvider)); 37 | client.DefaultRequestHeaders.Add("X-Vicius-OS-Architecture", 38 | serviceOptions.OSArchitecture.ToString().ToLowerInvariant()); 39 | }); 40 | 41 | builder?.Invoke(clientBuilder); 42 | 43 | return services; 44 | } 45 | } -------------------------------------------------------------------------------- /src/Util/LoggerExtensions.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | using Microsoft.Extensions.Logging; 7 | 8 | namespace Nefarius.Drivers.HidHide.Util; 9 | 10 | internal static class LoggerExtensions 11 | { 12 | public static IDisposable? StartScope(this ILogger? logger) 13 | { 14 | return logger?.BeginScope(new Dictionary { ["SourceContext"] = "Nefarius.Drivers.HidHide" }); 15 | } 16 | } -------------------------------------------------------------------------------- /src/Util/MultiSzHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | 7 | namespace Nefarius.Drivers.HidHide.Util; 8 | 9 | /// 10 | /// String manipulation helper methods. 11 | /// 12 | public static class MultiSzHelper 13 | { 14 | /// 15 | /// Converts an array of into a double-null-terminated multi-byte character memory block. 16 | /// 17 | /// Source array of strings. 18 | /// The length of the resulting byte array. 19 | /// The allocated memory buffer. 20 | public static IntPtr StringArrayToMultiSzPointer(this IEnumerable instances, out int length) 21 | { 22 | // Temporary byte array 23 | IEnumerable multiSz = new List(); 24 | 25 | // Convert each string into wide multi-byte and add NULL-terminator in between 26 | multiSz = instances 27 | /* skip invalid entries */ 28 | .Where(x => !string.IsNullOrWhiteSpace(x)) 29 | .Aggregate(multiSz, 30 | (current, entry) => current.Concat(Encoding.Unicode.GetBytes(entry)) 31 | .Concat(Encoding.Unicode.GetBytes(new[] { char.MinValue }))); 32 | 33 | // Add another NULL-terminator to signal end of the list 34 | multiSz = multiSz.Concat(Encoding.Unicode.GetBytes(new[] { char.MinValue })); 35 | 36 | // Convert expression to array 37 | byte[] multiSzArray = multiSz.ToArray(); 38 | 39 | // Convert array to managed native buffer 40 | IntPtr buffer = Marshal.AllocHGlobal(multiSzArray.Length); 41 | Marshal.Copy(multiSzArray, 0, buffer, multiSzArray.Length); 42 | 43 | length = multiSzArray.Length; 44 | 45 | // Return usable buffer, don't forget to free! 46 | return buffer; 47 | } 48 | 49 | /// 50 | /// Converts a double-null-terminated multi-byte character memory block into a string array. 51 | /// 52 | /// The memory buffer. 53 | /// The size in bytes of the memory buffer. 54 | /// The extracted string array. 55 | public static IEnumerable MultiSzPointerToStringArray(this IntPtr buffer, int length) 56 | { 57 | // Temporary byte array 58 | byte[] rawBuffer = new byte[length]; 59 | 60 | // Grab data from buffer 61 | Marshal.Copy(buffer, rawBuffer, 0, length); 62 | 63 | // Trims away potential redundant NULL-characters and splits at NULL-terminator 64 | string trimmed = Encoding.Unicode.GetString(rawBuffer).TrimEnd(char.MinValue); 65 | 66 | return string.IsNullOrWhiteSpace(trimmed) ? Array.Empty() : trimmed.Split(char.MinValue); 67 | } 68 | } -------------------------------------------------------------------------------- /src/Util/SafeFileHandleExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | using Windows.Win32.Foundation; 4 | 5 | using Microsoft.Win32.SafeHandles; 6 | 7 | using Nefarius.Drivers.HidHide.Exceptions; 8 | 9 | namespace Nefarius.Drivers.HidHide.Util; 10 | 11 | internal static class SafeFileHandleExtensions 12 | { 13 | /// 14 | /// Throws an exception on invalid handle state. 15 | /// 16 | /// The handle to test. 17 | /// 18 | /// 19 | internal static SafeFileHandle HaltAndCatchFireOnError(this SafeFileHandle handle) 20 | { 21 | if (!handle.IsInvalid || handle.IsClosed) 22 | { 23 | return handle; 24 | } 25 | 26 | switch ((WIN32_ERROR)Marshal.GetLastWin32Error()) 27 | { 28 | case WIN32_ERROR.ERROR_ACCESS_DENIED: 29 | throw new HidHideDriverAccessFailedException(); 30 | case WIN32_ERROR.ERROR_NOT_FOUND: 31 | throw new HidHideDriverNotFoundException(); 32 | } 33 | 34 | return handle; 35 | } 36 | } -------------------------------------------------------------------------------- /src/Util/VolumeHelper.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.RegularExpressions; 9 | 10 | using Windows.Win32; 11 | using Windows.Win32.Foundation; 12 | 13 | using Microsoft.Extensions.Logging; 14 | 15 | namespace Nefarius.Drivers.HidHide.Util; 16 | 17 | /// 18 | /// Path manipulation and volume helper methods. 19 | /// 20 | internal class VolumeHelper 21 | { 22 | private static readonly Regex ExtractDevicePathPrefixRegex = new(@"^(\\Device\\HarddiskVolume\d*)\\.*"); 23 | private readonly ILogger? _logger; 24 | 25 | internal VolumeHelper(ILogger? logger) 26 | { 27 | _logger = logger; 28 | } 29 | 30 | /// 31 | /// Curates and returns a collection of volume to path mappings. 32 | /// 33 | /// A collection of . 34 | private static unsafe IEnumerable GetVolumeMappings() 35 | { 36 | char[] volumeName = new char[ushort.MaxValue]; 37 | char[] pathName = new char[ushort.MaxValue]; 38 | char[] mountPoint = new char[ushort.MaxValue]; 39 | 40 | fixed (char* pVolumeName = volumeName) 41 | fixed (char* pPathName = pathName) 42 | fixed (char* pMountPoint = mountPoint) 43 | { 44 | HANDLE volumeHandle = PInvoke.FindFirstVolume(pVolumeName, ushort.MaxValue); 45 | 46 | List list = new(); 47 | 48 | do 49 | { 50 | string volume = new string(volumeName).TrimEnd('\0'); 51 | 52 | if (!PInvoke.GetVolumePathNamesForVolumeName( 53 | volume, 54 | pMountPoint, 55 | ushort.MaxValue, 56 | out uint returnLength 57 | )) 58 | { 59 | continue; 60 | } 61 | 62 | // Extract volume name for use with QueryDosDevice 63 | string deviceName = volume.Substring(4, volume.Length - 1 - 4); 64 | 65 | // Grab device path 66 | returnLength = PInvoke.QueryDosDevice(deviceName, pPathName, ushort.MaxValue); 67 | 68 | if (returnLength <= 0) 69 | { 70 | continue; 71 | } 72 | 73 | VolumeMeta entry = new() 74 | { 75 | DriveLetter = new string(mountPoint).TrimEnd('\0'), 76 | VolumeName = volume, 77 | DevicePath = new string(pathName).TrimEnd('\0') 78 | }; 79 | 80 | list.Add(entry); 81 | } while (PInvoke.FindNextVolume(volumeHandle, pVolumeName, ushort.MaxValue)); 82 | 83 | return list.ToArray(); 84 | } 85 | } 86 | 87 | /// 88 | /// Checks if a path is a junction point. 89 | /// 90 | /// A instance. 91 | /// True if it's a junction, false otherwise. 92 | private static bool IsPathReparsePoint(FileSystemInfo di) 93 | { 94 | return di.Attributes.HasFlag(FileAttributes.ReparsePoint); 95 | } 96 | 97 | /// 98 | /// Helper to make paths comparable. 99 | /// 100 | /// The source path. 101 | /// The normalized path. 102 | private static string NormalizePath(string path) 103 | { 104 | return Path 105 | .GetFullPath(new Uri(path).LocalPath) 106 | .TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) 107 | .ToUpperInvariant(); 108 | } 109 | 110 | /// 111 | /// Translates a "DOS device" path to user-land path. 112 | /// 113 | /// The DOS device path to convert. 114 | /// Throw exception on any sort of parsing error if true, false returns empty string. 115 | /// The user-land path. 116 | public string? DosDevicePathToPath(string devicePath, bool throwOnError = true) 117 | { 118 | _logger?.LogDebug("++ Resolving DOS device path {DevicePath} to path", devicePath); 119 | 120 | // 121 | // TODO: cover and test junctions! 122 | // 123 | 124 | Match prefixMatch = ExtractDevicePathPrefixRegex.Match(devicePath); 125 | 126 | if (!prefixMatch.Success) 127 | { 128 | _logger?.LogDebug("Prefix {Prefix} didn't match path {DevicePath}", 129 | ExtractDevicePathPrefixRegex, devicePath); 130 | 131 | if (throwOnError) 132 | { 133 | throw new ArgumentException("Failed to parse provided device path prefix"); 134 | } 135 | 136 | return null; 137 | } 138 | 139 | string prefix = prefixMatch.Groups[1].Value; 140 | _logger?.LogDebug("Extracted prefix: {Prefix}", prefix); 141 | 142 | VolumeMeta? mapping = GetVolumeMappings() 143 | .SingleOrDefault(m => prefix.Equals(m.DevicePath)); 144 | 145 | if (mapping is null) 146 | { 147 | if (throwOnError) 148 | { 149 | throw new ArgumentException("Failed to translate provided path"); 150 | } 151 | 152 | return null; 153 | } 154 | 155 | string relativePath = devicePath 156 | .Replace(mapping.DevicePath, string.Empty) 157 | .TrimStart(Path.DirectorySeparatorChar); 158 | 159 | _logger?.LogDebug("Built relative path: {Path}", relativePath); 160 | 161 | string fullPath = Path.Combine(mapping.DriveLetter, relativePath); 162 | 163 | _logger?.LogDebug("-- Returning path {Path} for device path {DevicePath}", fullPath, devicePath); 164 | 165 | return fullPath; 166 | } 167 | 168 | /// 169 | /// Translates a user-land file path to "DOS device" path. 170 | /// 171 | /// The file path in normal namespace format. 172 | /// Throw exception on any sort of parsing error if true, false returns empty string. 173 | /// The device namespace path (DOS device). 174 | public string? PathToDosDevicePath(string path, bool throwOnError = true) 175 | { 176 | _logger?.LogDebug("++ Resolving path {Path} to DOS device path", path); 177 | 178 | if (!File.Exists(path)) 179 | { 180 | _logger?.LogWarning("The provided path {Path} doesn't exist", path); 181 | 182 | if (throwOnError) 183 | { 184 | throw new ArgumentException($"The supplied file path {path} doesn't exist", nameof(path)); 185 | } 186 | 187 | return null; 188 | } 189 | 190 | string filePart = Path.GetFileName(path); 191 | _logger?.LogDebug("File part: {File}", filePart); 192 | string? pathPart = Path.GetDirectoryName(path); 193 | _logger?.LogDebug("Directory part: {Path}", pathPart); 194 | 195 | if (string.IsNullOrEmpty(pathPart)) 196 | { 197 | _logger?.LogWarning("Directory part of path was empty"); 198 | 199 | if (throwOnError) 200 | { 201 | throw new IOException($"Couldn't resolve directory of path {path}"); 202 | } 203 | 204 | return null; 205 | } 206 | 207 | string pathNoRoot = string.Empty; 208 | string? devicePath = string.Empty; 209 | 210 | // Walk up the directory tree to get the "deepest" potential junction 211 | for (DirectoryInfo? current = new(pathPart); 212 | current is { Exists: true }; 213 | current = Directory.GetParent(current.FullName)) 214 | { 215 | if (!IsPathReparsePoint(current)) 216 | { 217 | _logger?.LogDebug("Path {Path} is not a reparse point", current); 218 | continue; 219 | } 220 | 221 | devicePath = GetVolumeMappings() 222 | .SingleOrDefault(m => 223 | !string.IsNullOrEmpty(m.DriveLetter) && 224 | NormalizePath(m.DriveLetter) == NormalizePath(current.FullName)) 225 | ?.DevicePath; 226 | _logger?.LogDebug("Mapped current path node {Path} to device path {DevicePath}", current, devicePath); 227 | 228 | pathNoRoot = pathPart.Substring(current.FullName.Length); 229 | _logger?.LogDebug("Set root-less path to {Path}", pathNoRoot); 230 | 231 | break; 232 | } 233 | 234 | // No junctions found, translate original path 235 | if (string.IsNullOrEmpty(devicePath)) 236 | { 237 | _logger?.LogDebug("No junctions found for path {Path}, resolving directly", path); 238 | 239 | string driveLetter = Path.GetPathRoot(pathPart)!; 240 | devicePath = GetVolumeMappings() 241 | .SingleOrDefault(m => 242 | m.DriveLetter.Equals(driveLetter, StringComparison.InvariantCultureIgnoreCase))?.DevicePath; 243 | _logger?.LogDebug("Mapped path {Path} to device path {DevicePath}", path, devicePath); 244 | pathNoRoot = pathPart.Substring(Path.GetPathRoot(pathPart)!.Length); 245 | _logger?.LogDebug("Set root-less path to {Path}", pathNoRoot); 246 | } 247 | 248 | if (string.IsNullOrEmpty(devicePath)) 249 | { 250 | _logger?.LogWarning("Failed to resolve path {Path}", path); 251 | 252 | if (throwOnError) 253 | { 254 | throw new IOException($"Couldn't resolve device path of path {path}"); 255 | } 256 | 257 | return null; 258 | } 259 | 260 | StringBuilder fullDevicePath = new(); 261 | 262 | // Build new DOS Device path 263 | fullDevicePath.AppendFormat("{0}{1}", devicePath, Path.DirectorySeparatorChar); 264 | fullDevicePath.Append(Path.Combine(pathNoRoot, filePart).TrimStart(Path.DirectorySeparatorChar)); 265 | 266 | _logger?.LogDebug("-- Returning device path {DevicePath} for path {Path}", fullDevicePath, path); 267 | 268 | return fullDevicePath.ToString(); 269 | } 270 | 271 | private class VolumeMeta 272 | { 273 | public string DriveLetter { get; set; } = null!; 274 | 275 | public string VolumeName { get; set; } = null!; 276 | 277 | public string DevicePath { get; set; } = null!; 278 | } 279 | } --------------------------------------------------------------------------------