From 25c179503319f88661ed1fc58b0c09a3441a76cb Mon Sep 17 00:00:00 2001 From: Cam Soper Date: Fri, 4 Nov 2022 16:03:35 -0500 Subject: [PATCH] Revert "Push live (#32203)" This reverts commit 61e97e77dfceffab1c327b5c6be93e8bd533ab2b. --- .github/workflows/quest-bulk.yml | 34 - .github/workflows/quest.yml | 13 +- docfx.json | 1 - .../dapr-at-20000-feet.md | 2 +- .../maui/accessing-remote-data.md | 12 +- docs/architecture/maui/introduction.md | 2 +- docs/architecture/maui/mvvm.md | 4 +- docs/architecture/maui/preface.md | 2 +- docs/architecture/maui/validation.md | 2 +- ...ry-to-implement-resilient-http-requests.md | 3 - .../work-with-data-in-asp-net-core-apps.md | 11 +- docs/breadcrumb/toc.yml | 4 - docs/core/compatibility/7.0.md | 2 - .../filestream-doesnt-sync-offset-with-os.md | 17 +- ...s-after-readasync-writeasync-completion.md | 17 +- .../7.0/filestream-compat-switch.md | 56 -- .../7.0/symbolic-link-timestamps.md | 168 ----- docs/core/compatibility/toc.yml | 8 - docs/core/tools/dotnet-test.md | 12 +- docs/csharp/misc/cs0282.md | 3 - .../classes-and-structs/using-properties.md | 2 +- .../constraints-on-type-parameters.md | 2 - docs/framework/additional-apis/index.md | 1 - .../adding-plug-and-play-support.md | 72 -- .../pos-for-net/asynchronous-output-sample.md | 161 ---- ...-service-objects-and-assigning-hardware.md | 39 - .../pos-for-net/base-class-directio-method.md | 31 - .../pos-for-net/capability-properties.md | 35 - .../pos-for-net/cashdrawer-implementation.md | 49 -- .../command-line-help-for-posdm.md | 31 - ...onfigure-a-device-for-remote-management.md | 64 -- ...right-information-for-pos-for-net-v1141.md | 17 - ...ng-a-basic-service-object-code-template.md | 74 -- .../creating-a-service-object-sample.md | 162 ---- ...-a-working-multithreaded-service-object.md | 458 ------------ .../pos-for-net/data-decoding.md | 157 ---- .../developing-a-custom-service-object.md | 56 -- .../developing-a-pos-application.md | 37 - ...ping-service-objects-using-base-classes.md | 39 - .../pos-for-net/device-input-and-events.md | 61 -- .../pos-for-net/device-output-models.md | 55 -- .../pos-for-net/deviceinfo-class.md | 52 -- .../pos-for-net/deviceproperty-class.md | 35 - .../pos-for-net/event-handler-sample.md | 444 ----------- .../pos-for-net/event-management.md | 86 --- .../pos-for-net/exception-classes.md | 122 --- .../pos-for-net/general-posdm-switches.md | 29 - .../pos-for-net/hydra-devices.md | 31 - .../additional-apis/pos-for-net/index.md | 86 --- .../integration-of-legacy-service-objects.md | 22 - ...troducing-service-object-reader-threads.md | 283 ------- .../pos-for-net/linedisplay-capabilities.md | 160 ---- .../pos-for-net/linedisplay-implementation.md | 25 - .../pos-for-net/linedisplay-sample.md | 171 ----- .../additional-apis/pos-for-net/log-files.md | 106 --- .../pos-for-net/logicaldevice-class.md | 30 - ...anually-manage-your-pos-for-net-devices.md | 219 ------ .../pos-for-net/media/pos-architecture.png | Bin 16664 -> 0 bytes .../media/typical-pos-architecture.gif | Bin 27211 -> 0 bytes .../pos-for-net/pinpad-capabilities.md | 51 -- .../pos-for-net/pinpad-implementation.md | 37 - .../pos-for-net/pinpad-sample.md | 168 ----- .../pos-for-net/plug-and-play-support.md | 92 --- .../plug-and-play-xml-configuration.md | 51 -- .../point-of-service-performance-counters.md | 51 -- .../pos-for-net/pos-device-manager-output.md | 29 - .../pos-for-net/pos-device-manager.md | 47 -- .../pos-for-net/pos-exception-handling.md | 61 -- .../pos-for-net/pos-for-net-api-support.md | 36 - ...bility-with-32-bit-opos-service-objects.md | 131 ---- .../pos-for-net/pos-for-net-architecture.md | 61 -- .../pos-for-net/pos-for-net-class-tree.md | 50 -- .../pos-for-net-device-basic-classes.md | 60 -- .../pos-for-net/pos-for-net-faq.md | 163 ---- ...-for-net-integration-with-plug-and-play.md | 41 - .../pos-for-net-registry-settings.md | 81 -- ...pos-for-net-service-object-architecture.md | 48 -- .../pos-for-net/pos-for-net-v1141-features.md | 55 -- .../pos-for-net/poscommon-class.md | 112 --- ...formation-for-service-object-developers.md | 227 ------ .../pos-for-net/posdevice-class.md | 77 -- .../pos-for-net/posdm-command-arguments.md | 56 -- .../pos-for-net/posdm-commands.md | 245 ------ .../pos-for-net/posexplorer-class.md | 103 --- .../pos-for-net/poskeyboard-implementation.md | 368 --------- .../pos-for-net/scanner-events.md | 99 --- .../pos-for-net/scanner-implementation.md | 37 - .../pos-for-net/service-object-overview.md | 33 - .../service-object-samples-getting-started.md | 41 - .../pos-for-net/serviceobject-class.md | 64 -- .../setting-up-a-service-object-project.md | 53 -- .../pos-for-net/statistics-sample.md | 700 ------------------ .../pos-for-net/supported-device-classes.md | 83 --- .../pos-for-net/system-configuration.md | 33 - .../typical-pos-application-architecture.md | 43 -- ...-for-synchronous-or-asynchronous-output.md | 103 --- ...he-pos-device-manager-command-line-tool.md | 37 - .../using-the-wmi-api-to-manage-devices.md | 41 - .../using-vbscript-to-manage-devices.md | 182 ----- ...-the-pos-for-net-wmi-management-classes.md | 83 --- ...whats-new-in-pos-for-net-v114-and-v1141.md | 401 ---------- docs/framework/toc.yml | 169 ----- 102 files changed, 56 insertions(+), 8524 deletions(-) delete mode 100644 .github/workflows/quest-bulk.yml delete mode 100644 docs/core/compatibility/core-libraries/7.0/filestream-compat-switch.md delete mode 100644 docs/core/compatibility/core-libraries/7.0/symbolic-link-timestamps.md delete mode 100644 docs/framework/additional-apis/pos-for-net/adding-plug-and-play-support.md delete mode 100644 docs/framework/additional-apis/pos-for-net/asynchronous-output-sample.md delete mode 100644 docs/framework/additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md delete mode 100644 docs/framework/additional-apis/pos-for-net/base-class-directio-method.md delete mode 100644 docs/framework/additional-apis/pos-for-net/capability-properties.md delete mode 100644 docs/framework/additional-apis/pos-for-net/cashdrawer-implementation.md delete mode 100644 docs/framework/additional-apis/pos-for-net/command-line-help-for-posdm.md delete mode 100644 docs/framework/additional-apis/pos-for-net/configure-a-device-for-remote-management.md delete mode 100644 docs/framework/additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md delete mode 100644 docs/framework/additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md delete mode 100644 docs/framework/additional-apis/pos-for-net/creating-a-service-object-sample.md delete mode 100644 docs/framework/additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md delete mode 100644 docs/framework/additional-apis/pos-for-net/data-decoding.md delete mode 100644 docs/framework/additional-apis/pos-for-net/developing-a-custom-service-object.md delete mode 100644 docs/framework/additional-apis/pos-for-net/developing-a-pos-application.md delete mode 100644 docs/framework/additional-apis/pos-for-net/developing-service-objects-using-base-classes.md delete mode 100644 docs/framework/additional-apis/pos-for-net/device-input-and-events.md delete mode 100644 docs/framework/additional-apis/pos-for-net/device-output-models.md delete mode 100644 docs/framework/additional-apis/pos-for-net/deviceinfo-class.md delete mode 100644 docs/framework/additional-apis/pos-for-net/deviceproperty-class.md delete mode 100644 docs/framework/additional-apis/pos-for-net/event-handler-sample.md delete mode 100644 docs/framework/additional-apis/pos-for-net/event-management.md delete mode 100644 docs/framework/additional-apis/pos-for-net/exception-classes.md delete mode 100644 docs/framework/additional-apis/pos-for-net/general-posdm-switches.md delete mode 100644 docs/framework/additional-apis/pos-for-net/hydra-devices.md delete mode 100644 docs/framework/additional-apis/pos-for-net/index.md delete mode 100644 docs/framework/additional-apis/pos-for-net/integration-of-legacy-service-objects.md delete mode 100644 docs/framework/additional-apis/pos-for-net/introducing-service-object-reader-threads.md delete mode 100644 docs/framework/additional-apis/pos-for-net/linedisplay-capabilities.md delete mode 100644 docs/framework/additional-apis/pos-for-net/linedisplay-implementation.md delete mode 100644 docs/framework/additional-apis/pos-for-net/linedisplay-sample.md delete mode 100644 docs/framework/additional-apis/pos-for-net/log-files.md delete mode 100644 docs/framework/additional-apis/pos-for-net/logicaldevice-class.md delete mode 100644 docs/framework/additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md delete mode 100644 docs/framework/additional-apis/pos-for-net/media/pos-architecture.png delete mode 100644 docs/framework/additional-apis/pos-for-net/media/typical-pos-architecture.gif delete mode 100644 docs/framework/additional-apis/pos-for-net/pinpad-capabilities.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pinpad-implementation.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pinpad-sample.md delete mode 100644 docs/framework/additional-apis/pos-for-net/plug-and-play-support.md delete mode 100644 docs/framework/additional-apis/pos-for-net/plug-and-play-xml-configuration.md delete mode 100644 docs/framework/additional-apis/pos-for-net/point-of-service-performance-counters.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-device-manager-output.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-device-manager.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-exception-handling.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-api-support.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-architecture.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-class-tree.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-device-basic-classes.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-faq.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-registry-settings.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-service-object-architecture.md delete mode 100644 docs/framework/additional-apis/pos-for-net/pos-for-net-v1141-features.md delete mode 100644 docs/framework/additional-apis/pos-for-net/poscommon-class.md delete mode 100644 docs/framework/additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md delete mode 100644 docs/framework/additional-apis/pos-for-net/posdevice-class.md delete mode 100644 docs/framework/additional-apis/pos-for-net/posdm-command-arguments.md delete mode 100644 docs/framework/additional-apis/pos-for-net/posdm-commands.md delete mode 100644 docs/framework/additional-apis/pos-for-net/posexplorer-class.md delete mode 100644 docs/framework/additional-apis/pos-for-net/poskeyboard-implementation.md delete mode 100644 docs/framework/additional-apis/pos-for-net/scanner-events.md delete mode 100644 docs/framework/additional-apis/pos-for-net/scanner-implementation.md delete mode 100644 docs/framework/additional-apis/pos-for-net/service-object-overview.md delete mode 100644 docs/framework/additional-apis/pos-for-net/service-object-samples-getting-started.md delete mode 100644 docs/framework/additional-apis/pos-for-net/serviceobject-class.md delete mode 100644 docs/framework/additional-apis/pos-for-net/setting-up-a-service-object-project.md delete mode 100644 docs/framework/additional-apis/pos-for-net/statistics-sample.md delete mode 100644 docs/framework/additional-apis/pos-for-net/supported-device-classes.md delete mode 100644 docs/framework/additional-apis/pos-for-net/system-configuration.md delete mode 100644 docs/framework/additional-apis/pos-for-net/typical-pos-application-architecture.md delete mode 100644 docs/framework/additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md delete mode 100644 docs/framework/additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md delete mode 100644 docs/framework/additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md delete mode 100644 docs/framework/additional-apis/pos-for-net/using-vbscript-to-manage-devices.md delete mode 100644 docs/framework/additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md delete mode 100644 docs/framework/additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md diff --git a/.github/workflows/quest-bulk.yml b/.github/workflows/quest-bulk.yml deleted file mode 100644 index 52c3c7ac684ec..0000000000000 --- a/.github/workflows/quest-bulk.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "bulk quest import" -on: - workflow_dispatch: - inputs: - reason: - description: "The reason for running the bulk import workflow" - required: true - default: "Initial import into Quest (Azure DevOps)" - -jobs: - bulk-import: - runs-on: ubuntu-latest - permissions: - contents: write - issues: write - - steps: - - name: "Print manual bulk import run reason" - if: ${{ github.event_name == 'workflow_dispatch' }} - run: | - echo "Reason: ${{ github.event.inputs.reason }}" - - - name: bulk-sequester - if: ${{ github.event_name == 'workflow_dispatch' }} - id: bulk-sequester - uses: dotnet/docs-tools/actions/sequester@main - env: - ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }} - ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }} - ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }} - with: - org: ${{ github.repository_owner }} - repo: ${{ github.repository }} - issue: '-1' diff --git a/.github/workflows/quest.yml b/.github/workflows/quest.yml index 3d419c585ac64..9ffb7e3a6b2ad 100644 --- a/.github/workflows/quest.yml +++ b/.github/workflows/quest.yml @@ -2,7 +2,7 @@ name: "quest import" on: issues: types: - [ labeled, closed, reopened, assigned, unassigned ] + [ labeled ] workflow_dispatch: inputs: reason: @@ -15,12 +15,7 @@ on: jobs: import: - if: | - github.event_name == 'workflow_dispatch' || - github.event.label.name == ':world_map: reQUEST' || - github.event.label.name == ':pushpin: seQUESTered' || - contains(github.event.issue.labels.*.name, ':world_map: reQUEST') || - contains(github.event.issue.labels.*.name, ':pushpin: seQUESTered') + if: github.event.label.name == join(fromJson('[":", "world_map", ":", " reQUEST"]'), '') || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest permissions: contents: write @@ -37,7 +32,7 @@ jobs: - name: manual-sequester if: ${{ github.event_name == 'workflow_dispatch' }} id: manual-sequester - uses: dotnet/docs-tools/actions/sequester@main + uses: BillWagner/Quest2GitHub@main env: ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }} ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }} @@ -51,7 +46,7 @@ jobs: - name: auto-sequester if: ${{ github.event_name != 'workflow_dispatch' }} id: auto-sequester - uses: dotnet/docs-tools/actions/sequester@main + uses: BillWagner/Quest2GitHub@main env: ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }} ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }} diff --git a/docfx.json b/docfx.json index a6af039e3fa09..f8f64ef9ea727 100644 --- a/docfx.json +++ b/docfx.json @@ -303,7 +303,6 @@ "docs/core/whats-new/**/**.md": "adegeo", "docs/csharp/**/*.*": "billwagner", "docs/framework/**/**.md": "gewarren", - "docs/framework/additional-apis/pos-for-net/**/**.md": "TerryWarwick", "docs/framework/app-domains/**/**.md": "gewarren", "docs/framework/configure-apps/file-schema/network/**/**.md": "karelz", "docs/framework/configure-apps/file-schema/wcf/**/**.md": "HongGit", diff --git a/docs/architecture/dapr-for-net-developers/dapr-at-20000-feet.md b/docs/architecture/dapr-for-net-developers/dapr-at-20000-feet.md index 960b8a68d1f64..b66cc0aea84e8 100644 --- a/docs/architecture/dapr-for-net-developers/dapr-at-20000-feet.md +++ b/docs/architecture/dapr-for-net-developers/dapr-at-20000-feet.md @@ -64,7 +64,7 @@ The following table describes the infrastructure services provided by each block | [Bindings](bindings.md) | Trigger code from events raised by external resources with bi-directional communication. | | [Observability](observability.md) | Monitor and measure message calls across networked services. | | [Secrets](secrets-management.md) | Securely access external secret stores. | -| [Actors](actors.md) | Encapsulate logic and data in reusable actor objects. | +| Actors | Encapsulate logic and data in reusable actor objects. | Building blocks abstract the implementation of distributed application capabilities from your services. Figure 2-3 shows this interaction. diff --git a/docs/architecture/maui/accessing-remote-data.md b/docs/architecture/maui/accessing-remote-data.md index ece36c812275d..c6ac5543bea53 100644 --- a/docs/architecture/maui/accessing-remote-data.md +++ b/docs/architecture/maui/accessing-remote-data.md @@ -82,7 +82,9 @@ public async Task GetAsync(string uri, string token = "") HttpResponseMessage response = await httpClient.GetAsync(uri); await HandleResponse(response); - TResult result = await response.Content.ReadFromJsonAsync(); + string serialized = await response.Content.ReadAsStringAsync(); + + TResult result = JsonConvert.DeserializeObject(serialized, _serializerSettings); return result; } @@ -200,13 +202,15 @@ public async Task PostAsync( { HttpClient httpClient = GetOrCreateHttpClient(token); - var content = new StringContent(JsonSerializer.Serialize(data)); + var content = new StringContent(JsonConvert.SerializeObject(data)); content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); HttpResponseMessage response = await httpClient.PostAsync(uri, content); await HandleResponse(response); - TResult result = await response.Content.ReadFromJsonAsync(); - + string serialized = await response.Content.ReadAsStringAsync(); + + TResult result = JsonConvert.DeserializeObject(serialized, _serializerSettings); + return result; } ``` diff --git a/docs/architecture/maui/introduction.md b/docs/architecture/maui/introduction.md index 27ff936acb87e..2c18f33276214 100644 --- a/docs/architecture/maui/introduction.md +++ b/docs/architecture/maui/introduction.md @@ -134,6 +134,6 @@ The eShopOnContainers project contains the following folders: ## Summary -Microsoft's cross-platform multi-platform app development tools and platforms provide a comprehensive solution for B2E, B2B, and B2C mobile client apps, providing the ability to share code across all target platforms (iOS, macOS, Android, and Windows) and helping to lower the total cost of ownership. Apps can share their user interface and app logic code, while retaining the native platform look and feel. +Microsoft's cross-platform multi-platform app development tools and platforms provide a comprehensive solution for B2E, B2B, and B2C mobile client apps, providing the ability to share code across all target platforms (iOS, Android, and Windows) and helping to lower the total cost of ownership. Apps can share their user interface and app logic code, while retaining the native platform look and feel. Developers of enterprise apps face several challenges that can alter the architecture of the app during development. Therefore, it's important to build an app so that it can be modified or extended over time. Designing for such adaptability can be difficult, but typically involves partitioning an app into discrete, loosely coupled components that can be easily integrated together into an app. diff --git a/docs/architecture/maui/mvvm.md b/docs/architecture/maui/mvvm.md index c146197be880d..e11543a9fcac6 100644 --- a/docs/architecture/maui/mvvm.md +++ b/docs/architecture/maui/mvvm.md @@ -26,7 +26,7 @@ The benefits of using the MVVM pattern are as follows: - If an existing model implementation encapsulates existing business logic, it can be difficult or risky to change it. In this scenario, the view model acts as an adapter for the model classes and prevents you from making major changes to the model code. - Developers can create unit tests for the view model and the model, without using the view. The unit tests for the view model can exercise exactly the same functionality as used by the view. -- The app UI can be redesigned without touching the view model and model code, provided that the view is implemented entirely in XAML or C#. Therefore, a new version of the view should work with the existing view model. +- The app UI can be redesigned without touching the code, provided that the view is implemented entirely in XAML. Therefore, a new version of the view should work with the existing view model. - Designers and developers can work independently and concurrently on their components during development. Designers can focus on the view, while developers can work on the view model and model components. The key to using MVVM effectively lies in understanding how to factor app code into the correct classes and how the classes interact. The following sections discuss the responsibilities of each of the classes in the MVVM pattern. @@ -35,7 +35,7 @@ The key to using MVVM effectively lies in understanding how to factor app code i The view is responsible for defining the structure, layout, and appearance of what the user sees on screen. Ideally, each view is defined in XAML, with a limited code-behind that does not contain business logic. However, in some cases, the code-behind might contain UI logic that implements visual behavior that is difficult to express in XAML, such as animations. -In a .NET MAUI application, a view is typically a `ContentPage`-derived or `ContentView`-derived class. However, views can also be represented by a data template, which specifies the UI elements to be used to visually represent an object when it's displayed. A data template as a view does not have any code-behind, and is designed to bind to a specific view model type. +In a .NET MAUI application, a view is typically a `Page`-derived or `ContentView`-derived class. However, views can also be represented by a data template, which specifies the UI elements to be used to visually represent an object when it's displayed. A data template as a view does not have any code-behind, and is designed to bind to a specific view model type. > [!TIP] > Avoid enabling and disabling UI elements in the code-behind. diff --git a/docs/architecture/maui/preface.md b/docs/architecture/maui/preface.md index f86e60319ab31..3ff15c3322256 100644 --- a/docs/architecture/maui/preface.md +++ b/docs/architecture/maui/preface.md @@ -10,7 +10,7 @@ ms.date: 06/18/2022 [!INCLUDE [download-alert](includes/download-alert.md)] -This eBook provides guidance on building cross-platform enterprise apps using .NET MAUI. .NET MAUI is a cross-platform UI toolkit that allows developers to easily create native user interface layouts that can be shared across platforms, including iOS, macOS, Android, and Windows 10/11. It provides a comprehensive solution for Business to Employee (B2E), Business to Business (B2B), and Business to Consumer (B2C) apps, providing the ability to share code across all target platforms and helping to lower the total cost of ownership (TCO). +This eBook provides guidance on building cross-platform enterprise apps using .NET MAUI. .NET MAUI is a cross-platform UI toolkit that allows developers to easily create native user interface layouts that can be shared across platforms, including iOS, macOS Android, and Windows 10/11. It provides a comprehensive solution for Business to Employee (B2E), Business to Business (B2B), and Business to Consumer (B2C) apps, providing the ability to share code across all target platforms and helping to lower the total cost of ownership (TCO). The guide provides architectural guidance for developing adaptable, maintainable, and testable .NET MAUI enterprise apps. Guidance is provided on how to implement MVVM, dependency injection, navigation, validation, and configuration management, while maintaining loose coupling. In addition, there's also guidance on performing authentication and authorization with IdentityServer, accessing data from containerized microservices, and unit testing. diff --git a/docs/architecture/maui/validation.md b/docs/architecture/maui/validation.md index 73db457eccc69..ab443a1a0e4f7 100644 --- a/docs/architecture/maui/validation.md +++ b/docs/architecture/maui/validation.md @@ -12,7 +12,7 @@ ms.date: 07/09/2022 Any app that accepts input from users should ensure that the input is valid. An app could, for example, check for input that contains only characters in a particular range, is of a certain length, or matches a particular format. Without validation, a user can supply data that causes the app to fail. Proper validation enforces business rules and could help to prevent an attacker from injecting malicious data. -In the context of the Model-View-ViewModel (MVVM) pattern, a view model or model will often be required to perform data validation and signal any validation errors to the view so that the user can correct them. The eShopOnContainers multi-platform app performs synchronous client-side validation of view model properties and notifies the user of any validation errors by highlighting the control that contains the invalid data, and by displaying error messages that inform the user of why the data is invalid. The image below shows the classes involved in performing validation in the eShopOnContainers multi-platform app. +In the context of the Model-ViewModel-Model (MVVM) pattern, a view model or model will often be required to perform data validation and signal any validation errors to the view so that the user can correct them. The eShopOnContainers multi-platform app performs synchronous client-side validation of view model properties and notifies the user of any validation errors by highlighting the control that contains the invalid data, and by displaying error messages that inform the user of why the data is invalid. The image below shows the classes involved in performing validation in the eShopOnContainers multi-platform app. ![Validation classes in the eShopOnContainers multi-platform app.](./media/validation-workflow.png) diff --git a/docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md b/docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md index 3878f0f00d5b7..52a221dbd45ea 100644 --- a/docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md +++ b/docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md @@ -53,9 +53,6 @@ There are several ways that you can use `IHttpClientFactory` in your application For the sake of brevity, this guidance shows the most structured way to use `IHttpClientFactory`, which is to use Typed Clients (Service Agent pattern). However, all options are documented and are currently listed in this [article covering the `IHttpClientFactory` usage](/aspnet/core/fundamentals/http-requests#consumption-patterns). -> [!NOTE] -> If your app requires cookies, it might be better to avoid using in your app. For alternative ways of managing clients, see [Guidelines for using HTTP clients](../../../fundamentals/networking/http/httpclient-guidelines.md) - ## How to use Typed Clients with IHttpClientFactory So, what's a "Typed Client"? It's just an `HttpClient` that's pre-configured for some specific use. This configuration can include specific values such as the base server, HTTP headers or time outs. diff --git a/docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md b/docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md index 474961715e84e..22e03308fbc79 100644 --- a/docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md +++ b/docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md @@ -111,8 +111,6 @@ await _context.SaveChangesAsync(); EF Core supports both synchronous and async methods for fetching and saving. In web applications, it's recommended to use the async/await pattern with the async methods, so that web server threads are not blocked while waiting for data access operations to complete. -For more information, see [Buffering and Streaming](/ef/core/performance/efficient-querying#buffering-and-streaming). - ### Fetching related data When EF Core retrieves entities, it populates all of the properties that are stored directly with that entity in the database. Navigation properties, such as lists of related entities, are not populated and may have their value set to null. This process ensures EF Core is not fetching more data than is needed, which is especially important for web applications, which must quickly process requests and return responses in an efficient manner. To include relationships with an entity using _eager loading_, you specify the property using the Include extension method on the query, as shown: @@ -161,8 +159,7 @@ public class Basket : BaseEntity public void AddItem(int catalogItemId, decimal unitPrice, int quantity = 1) { - var existingItem = Items.FirstOrDefault(i => i.CatalogItemId == catalogItemId); - if (existingItem == null) + if (!Items.Any(i => i.CatalogItemId == catalogItemId)) { _items.Add(new BasketItem() { @@ -170,8 +167,10 @@ public class Basket : BaseEntity Quantity = quantity, UnitPrice = unitPrice }); - } - else existingItem.Quantity += quantity; + return; + } + var existingItem = Items.FirstOrDefault(i => i.CatalogItemId == catalogItemId); + existingItem.Quantity += quantity; } } ``` diff --git a/docs/breadcrumb/toc.yml b/docs/breadcrumb/toc.yml index 2974de7fe29e0..88c15df9715b0 100644 --- a/docs/breadcrumb/toc.yml +++ b/docs/breadcrumb/toc.yml @@ -102,10 +102,6 @@ items: - name: Additional APIs tocHref: /dotnet/framework/additional-apis/ topicHref: /dotnet/framework/additional-apis/index - items: - - name: Point of Service for .NET - tocHref: /dotnet/framework/additional-apis/pos-for-net/ - topicHref: /dotnet/framework/additional-apis/pos-for-net/index - name: Application domains and assemblies tocHref: /dotnet/framework/app-domains/ topicHref: /dotnet/framework/app-domains/index diff --git a/docs/core/compatibility/7.0.md b/docs/core/compatibility/7.0.md index e9cd4ae896c18..ed196e8a95dfd 100644 --- a/docs/core/compatibility/7.0.md +++ b/docs/core/compatibility/7.0.md @@ -45,11 +45,9 @@ If you're migrating an app to .NET 7, the breaking changes listed here might aff | [Collectible Assembly in non-collectible AssemblyLoadContext](core-libraries/7.0/collectible-assemblies.md) | ❌ | ✔️ | Preview 5 | | [Equals method behavior change for NaN](core-libraries/7.0/equals-nan.md) | ❌ | ✔️ | Preview 5 | | [Generic type constraint on PatternContext\](core-libraries/7.0/patterncontext-generic-constraint.md) | ❌ | ❌ | Preview 3 | -| [Legacy FileStream strategy removed](core-libraries/7.0/filestream-compat-switch.md) | ❌ | ✔️ | Preview 1 | | [Library support for older frameworks](core-libraries/7.0/old-framework-support.md) | ❌ | ❌ | Preview 1 | | [Maximum precision for numeric format strings](core-libraries/7.0/max-precision-numeric-format-strings.md) | ❌ | ✔️ | RC 1 | | [SerializationFormat.Binary is obsolete](core-libraries/7.0/serializationformat-binary.md) | ❌ | ❌ | Preview 2 | -| [Time fields on symbolic links](core-libraries/7.0/symbolic-link-timestamps.md) | ❌ | ✔️ | Preview 1 | | [Tracking linked cache entries](core-libraries/7.0/memorycache-tracking.md) | ❌ | ✔️ | Preview 1 | | [Validate CompressionLevel for BrotliStream](core-libraries/7.0/compressionlevel-validation.md) | ❌ | ✔️ | Preview 1 | diff --git a/docs/core/compatibility/core-libraries/6.0/filestream-doesnt-sync-offset-with-os.md b/docs/core/compatibility/core-libraries/6.0/filestream-doesnt-sync-offset-with-os.md index bf939367b1e2d..0cae35e0af32f 100644 --- a/docs/core/compatibility/core-libraries/6.0/filestream-doesnt-sync-offset-with-os.md +++ b/docs/core/compatibility/core-libraries/6.0/filestream-doesnt-sync-offset-with-os.md @@ -1,7 +1,7 @@ --- title: ".NET 6 breaking change: FileStream doesn't synchronize file offset with OS" description: Learn about the .NET 6 breaking change in core .NET libraries where FileStream doesn't synchronize the file offset with the operating system. -ms.date: 10/04/2022 +ms.date: 05/05/2021 --- # FileStream no longer synchronizes file offset with OS @@ -65,9 +65,6 @@ With this change, operations are up to set DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM=1 ``` - > [!NOTE] - > This switch is only available in .NET 6. It was [removed in .NET 7](../7.0/filestream-compat-switch.md). - ## Affected APIs None. @@ -76,3 +73,15 @@ None. - [SetFilePointer function](/windows/win32/api/fileapi/nf-fileapi-setfilepointer) - [SetFilePointerEx function](/windows/win32/api/fileapi/nf-fileapi-setfilepointerex) + + diff --git a/docs/core/compatibility/core-libraries/6.0/filestream-position-updates-after-readasync-writeasync-completion.md b/docs/core/compatibility/core-libraries/6.0/filestream-position-updates-after-readasync-writeasync-completion.md index a6630ab3a1e1e..4436356552b68 100644 --- a/docs/core/compatibility/core-libraries/6.0/filestream-position-updates-after-readasync-writeasync-completion.md +++ b/docs/core/compatibility/core-libraries/6.0/filestream-position-updates-after-readasync-writeasync-completion.md @@ -1,7 +1,7 @@ --- title: ".NET 6 breaking change: FileStream.Position updated after ReadAsync or WriteAsync completion" description: Learn about the .NET 6 breaking change in core .NET libraries where FileStream.Position is updated after ReadAsync or WriteAsync completion. -ms.date: 10/04/2022 +ms.date: 05/05/2021 --- # FileStream.Position updates after ReadAsync or WriteAsync completes @@ -68,9 +68,18 @@ Now, when buffering is enabled (that is, the `bufferSize` argument that's passed set DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM=1 ``` - > [!NOTE] - > This switch is only available in .NET 6. It was [removed in .NET 7](../7.0/filestream-compat-switch.md). - ## Affected APIs - + + diff --git a/docs/core/compatibility/core-libraries/7.0/filestream-compat-switch.md b/docs/core/compatibility/core-libraries/7.0/filestream-compat-switch.md deleted file mode 100644 index 56bbd15416673..0000000000000 --- a/docs/core/compatibility/core-libraries/7.0/filestream-compat-switch.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: ".NET 7 breaking change: Legacy FileStream strategy removed" -description: Learn about the .NET 7 breaking change in core .NET libraries where the the ability to use the legacy `FileStream` implementation has been removed. -ms.date: 10/04/2022 ---- -# Legacy FileStream strategy removed - -The `AppContext` switch `System.IO.UseNet5CompatFileStream` and the ability to use the legacy implementation were removed. - -## Previous behavior - -The legacy `FileStream` implementation was available and you could opt into it by using the `UseNet5CompatFileStream` switch or the `DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM` environment variable. - -## New behavior - -Starting in .NET 7, you can no longer opt in to use the legacy `FileStream` implementation. - -## Version introduced - -.NET 7 Preview 1 - -## Type of breaking change - -This change can affect [binary compatibility](../../categories.md#binary-compatibility). - -## Reason for change - -The `UseNet5CompatFileStream` switch and `DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM` environment variable were included in .NET 6 in case the new implementation caused breaking changes. Any breaking changes have now been fixed. Since there are no more bugs introduced by the `FileStream` changes, the compatibility mode was removed and with it all the legacy code, which makes the codebase easier to maintain. - -## Recommended action - -If you're currently using the switch (or the `DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM` environment variable) to opt into legacy code and are upgrading to .NET 7, the switch will no longer have any effect and you should remove it. - -## Affected APIs - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -## See also - -- [FileStream no longer synchronizes file offset with OS (.NET 6)](../6.0/filestream-doesnt-sync-offset-with-os.md) -- [FileStream.Position updates after ReadAsync or WriteAsync completes (.NET 6)](../6.0/filestream-position-updates-after-readasync-writeasync-completion.md) diff --git a/docs/core/compatibility/core-libraries/7.0/symbolic-link-timestamps.md b/docs/core/compatibility/core-libraries/7.0/symbolic-link-timestamps.md deleted file mode 100644 index 525543f2d5fd7..0000000000000 --- a/docs/core/compatibility/core-libraries/7.0/symbolic-link-timestamps.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: ".NET 7 breaking change: Time fields on symbolic links" -description: Learn about the .NET 7 breaking change in core .NET libraries where updating CreationTime[Utc], LastAccessTime[Utc], and LastWriteTime[Utc] on a symbolic link no longer affects the target . -ms.date: 10/04/2022 ---- -# Time fields on symbolic links - -When changes are made to the following time-related fields on a symbolic link ("symlink"), the updates now affect the symlink itself and not the target: - -- -- -- -- -- -- - -## Previous behavior - -Previously, updating any of the time-related fields on a symlink affected the fields of the symlink's target. - -Consider the following program that prints the various time field values on a file and its symbolic link, updates the symlink's time field values to 1 day later, and then reprints the time field values on both the file and symlink. - -```csharp -string filename = "file"; -string linkname = "link"; - -// Create a file and symlink. -File.Create(filename).Dispose(); -File.CreateSymbolicLink(linkname, filename); - -Console.WriteLine("Before update:"); -PrintMetadata(filename); -PrintMetadata(linkname); - -UpdateMetadata(linkname); - -Console.WriteLine("\nAfter update:"); -PrintMetadata(filename); -PrintMetadata(linkname); - -static void UpdateMetadata(string filename) -{ - DateTime tomorrow = DateTime.Now.AddDays(1); - - File.SetCreationTime(filename, tomorrow); - File.SetLastAccessTime(filename, tomorrow); - File.SetLastWriteTime(filename, tomorrow); - File.SetAttributes(filename, File.GetAttributes(filename) | FileAttributes.Offline); -} - -static void PrintMetadata(string filename) -{ - Console.WriteLine($"---{filename}---"); - Console.WriteLine("Creation:\t" + File.GetCreationTime(filename)); - Console.WriteLine("Last access:\t" + File.GetLastAccessTime(filename)); - Console.WriteLine("Last write:\t" + File.GetLastWriteTime(filename)); - Console.WriteLine("Attributes:\t" + File.GetAttributes(filename)); -} -``` - -Previously, after updating the values on the symlink, only the target file's time fields were updated. The output of the preceding program was as follows: - -```output -Before update: ----file--- -Creation: 9/29/2022 10:35:40 AM -Last access: 9/29/2022 10:35:40 AM -Last write: 9/29/2022 10:35:40 AM -Attributes: Archive ----link--- -Creation: 9/29/2022 10:35:40 AM -Last access: 9/29/2022 10:35:40 AM -Last write: 9/29/2022 10:35:40 AM -Attributes: Archive, ReparsePoint - -After update: ----file--- -Creation: 9/30/2022 10:35:40 AM -Last access: 9/30/2022 10:35:40 AM -Last write: 9/30/2022 10:35:40 AM -Attributes: Archive ----link--- -Creation: 9/29/2022 10:35:40 AM -Last access: 9/29/2022 10:35:40 AM -Last write: 9/29/2022 10:35:40 AM -Attributes: Archive, ReparsePoint, Offline -``` - -## New behavior - -Starting in .NET 7, updating any of the time-related fields on a symlink affects the fields of the symlink itself and not the target file. - -The output of the program shown in the [Previous behavior](#previous-behavior) section is as follows: - -```output -Before update: ----file--- -Creation: 9/29/2022 10:33:39 AM -Last access: 9/29/2022 10:33:39 AM -Last write: 9/29/2022 10:33:39 AM -Attributes: Archive ----link--- -Creation: 9/29/2022 10:33:39 AM -Last access: 9/29/2022 10:33:39 AM -Last write: 9/29/2022 10:33:39 AM -Attributes: Archive, ReparsePoint - -After update: ----file--- -Creation: 9/29/2022 10:33:39 AM -Last access: 9/29/2022 10:33:39 AM -Last write: 9/29/2022 10:33:39 AM -Attributes: Archive ----link--- -Creation: 9/30/2022 10:33:39 AM -Last access: 9/30/2022 10:33:39 AM -Last write: 9/30/2022 10:33:39 AM -Attributes: Archive, ReparsePoint, Offline -``` - -## Version introduced - -.NET 7 Preview 1 - -## Type of breaking change - -This change can affect [binary compatibility](../../categories.md#binary-compatibility). - -## Reason for change - -The previous behavior was unexpected and undesirable in some cases: - -- It was inconsistent with the behavior of the properties and methods that get the same fields. -- It was also impossible to actually update the fields in the symlink itself using .NET APIs. - -## Recommended action - -If you were relying on this behavior to set values on the symlink's target, setting one of the `*Time` fields in a symlink will no longer affect the target. You can use the new symbolic link APIs to obtain the target of a symlink and then update that file system object instead. - -```csharp -FileSystemInfo? targetInfo = linkInfo.ResolveLinkTarget(returnFinalTarget: true); -if (targetInfo != null) -{ - // Update the properties accordingly. - targetInfo.LastWriteTime = DateTime.Now; -} -``` - -## Affected APIs - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 2c6a965f786ca..fb137b98744e3 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -69,8 +69,6 @@ items: href: core-libraries/7.0/equals-nan.md - name: Generic type constraint on PatternContext href: core-libraries/7.0/patterncontext-generic-constraint.md - - name: Legacy FileStream strategy removed - href: core-libraries/7.0/filestream-compat-switch.md - name: Library support for older frameworks href: core-libraries/7.0/old-framework-support.md - name: Maximum precision for numeric format strings @@ -79,8 +77,6 @@ items: href: core-libraries/7.0/reflection-invoke-exceptions.md - name: SerializationFormat.Binary is obsolete href: core-libraries/7.0/serializationformat-binary.md - - name: Time fields on symbolic links - href: core-libraries/7.0/symbolic-link-timestamps.md - name: Tracking linked cache entries href: core-libraries/7.0/memorycache-tracking.md - name: Validate CompressionLevel for BrotliStream @@ -853,8 +849,6 @@ items: href: core-libraries/7.0/equals-nan.md - name: Generic type constraint on PatternContext href: core-libraries/7.0/patterncontext-generic-constraint.md - - name: Legacy FileStream strategy removed - href: core-libraries/7.0/filestream-compat-switch.md - name: Library support for older frameworks href: core-libraries/7.0/old-framework-support.md - name: Maximum precision for numeric format strings @@ -863,8 +857,6 @@ items: href: core-libraries/7.0/reflection-invoke-exceptions.md - name: SerializationFormat.Binary is obsolete href: core-libraries/7.0/serializationformat-binary.md - - name: Time fields on symbolic links - href: core-libraries/7.0/symbolic-link-timestamps.md - name: Tracking linked cache entries href: core-libraries/7.0/memorycache-tracking.md - name: Validate CompressionLevel for BrotliStream diff --git a/docs/core/tools/dotnet-test.md b/docs/core/tools/dotnet-test.md index 9ec999309ab87..9306c81328a20 100644 --- a/docs/core/tools/dotnet-test.md +++ b/docs/core/tools/dotnet-test.md @@ -37,8 +37,8 @@ dotnet test [ | | | | ] [--no-restore] [-o|--output ] [--os ] - [--results-directory ] - [-r|--runtime ] + [-r|--results-directory ] + [--runtime ] [-s|--settings ] [-t|--list-tests] [-v|--verbosity ] @@ -181,13 +181,13 @@ Where `Microsoft.NET.Test.Sdk` is the test host, `xunit` is the test framework. [!INCLUDE [os](../../../includes/cli-os.md)] -- **`--results-directory `** +- **`-r|--results-directory `** - The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is `TestResults` in the directory that contains the project file. Short form `-r` available in .NET SDK versions earlier than 7. + The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is `TestResults` in the directory that contains the project file. -- **`-r|--runtime `** +- **`--runtime `** - The target runtime to test for. Short form `-r` available starting in .NET SDK 7. + The target runtime to test for. - **`-s|--settings `** diff --git a/docs/csharp/misc/cs0282.md b/docs/csharp/misc/cs0282.md index 29b5d92df6f9e..76a71935fda47 100644 --- a/docs/csharp/misc/cs0282.md +++ b/docs/csharp/misc/cs0282.md @@ -42,6 +42,3 @@ partial struct A int j; } ``` - -> [!NOTE] -> If the struct layout does not matter, decorating the struct with `[StructLayout(LayoutKind.Auto)]` will express it,and suppress the warning diff --git a/docs/csharp/programming-guide/classes-and-structs/using-properties.md b/docs/csharp/programming-guide/classes-and-structs/using-properties.md index 3c77c2112975b..88a22625e7e0e 100644 --- a/docs/csharp/programming-guide/classes-and-structs/using-properties.md +++ b/docs/csharp/programming-guide/classes-and-structs/using-properties.md @@ -9,7 +9,7 @@ helpviewer_keywords: --- # Using Properties (C# Programming Guide) -Properties combine aspects of both fields and methods. To the user of an object, a property appears to be a field, accessing the property requires the same syntax. To the implementer of a class, a property is one or two code blocks, representing a [get](../../language-reference/keywords/get.md) accessor and/or a [set](../../language-reference/keywords/set.md) accessor. The code block for the `get` accessor is executed when the property is read; the code block for the `set` accessor is executed when the property is assigned a value. A property without a `set` accessor is considered read-only. A property without a `get` accessor is considered write-only. A property that has both accessors is read-write. In C# 9 and later, you can use an `init` accessor instead of a `set` accessor to make the property read-only. +Properties combine aspects of both fields and methods. To the user of an object, a property appears to be a field, accessing the property requires the same syntax. To the implementer of a class, a property is one or two code blocks, representing a [get](../../language-reference/keywords/get.md) accessor and/or a [set](../../language-reference/keywords/set.md) accessor. The code block for the `get` accessor is executed when the property is read; the code block for the `set` accessor is executed when the property is assigned a new value. A property without a `set` accessor is considered read-only. A property without a `get` accessor is considered write-only. A property that has both accessors is read-write. In C# 9 and later, you can use an `init` accessor instead of a `set` accessor to make the property read-only. Unlike fields, properties aren't classified as variables. Therefore, you can't pass a property as a [ref](../../language-reference/keywords/ref.md) or [out](../../language-reference/keywords/out-parameter-modifier.md) parameter. diff --git a/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md b/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md index 40d08cd586654..0ded2fce60863 100644 --- a/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md +++ b/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md @@ -2,8 +2,6 @@ title: "Constraints on type parameters - C# Programming Guide" description: Learn about constraints on type parameters. Constraints tell the compiler what capabilities a type argument must have. ms.date: 07/08/2022 -f1_keywords: - - "defaultconstraint_CSharpKeyword" helpviewer_keywords: - "generics [C#], type constraints" - "type constraints [C#]" diff --git a/docs/framework/additional-apis/index.md b/docs/framework/additional-apis/index.md index c655ea740f440..115e82ffec625 100644 --- a/docs/framework/additional-apis/index.md +++ b/docs/framework/additional-apis/index.md @@ -32,7 +32,6 @@ Some libraries target specific platforms. For example, the | Extends the class to make code page encodings available to apps that target the Universal Windows Platform. | -| [Point of Service for .NET](pos-for-net/index.md) | Provides a set of classes that enable you to develop applications that interact with POS devices. | ## Private APIs diff --git a/docs/framework/additional-apis/pos-for-net/adding-plug-and-play-support.md b/docs/framework/additional-apis/pos-for-net/adding-plug-and-play-support.md deleted file mode 100644 index 6ab68178c0979..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/adding-plug-and-play-support.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Adding Plug and Play Support -description: Adding Plug and Play Support (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Adding Plug and Play Support (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) includes support for Plug and Play devices. By adding Plug and Play support to your Service Objects, applications can become more simple, reliable, and efficient. Service Objects should support it whenever possible. - -Implementing Plug and Play support at the Service Object level is very simple. Once you know the hardware ID of your device, simply add a single attribute to your class, . The **HardwareId** attribute is used by to intelligently filter out Service Objects from the list of available devices depending on the state of the device. If the Service Object has a **HardwareId** attribute that refers to an installed Plug and Play device, but that device is not connected, the Service Object will be excluded from the **PosExplorer** device list. This list is returned when applications call . - -Service Objects may also have more than one **HardwareId** attribute, in which case **PosExplorer** associates a union of all specified devices with the Service Object. It is possible to override the **HardwareId** attributes or add to the list of associated hardware on the Service Object without rebuilding the Service Object assembly. For information about overriding or adding the **HardwareId** attribute, see [Plug and Play XML Configuration](plug-and-play-xml-configuration.md). - -Only the application is responsible for catching and events and updating its status as appropriate based on the updated device list returned from **PosExplorer**. The Service Object does not need to detect these events. - -## To add a HardwareId attribute to your Service Object class - -1. Determine the range of hardware IDs for the device or devices that your Service Object supports. - -2. Add a **HardwareId** attribute before your class definition using the lowest hardware ID used by your device and the highest. Multiple **HardwareId** attributes may be used to identify multiple ranges of hardware IDs. - -## Example - -The following sample adds a **HardwareId** attribute to the basic template shown in the previous section. - -```csharp -using System; - -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; - -namespace SOTemplate -{ - - [HardwareId("HID\\Vid_05e0&Pid_038a", - "HID\\Vid_05e0&Pid_038a")] - - [ServiceObject( - DeviceType.Msr, - "ServiceObjectTemplate", - "Bare bones Service Object class", - 1, - 9)] - public class MyServiceObject : MsrBase - { - public MyServiceObject() - { - } - } -} - -``` - -## See Also - -#### Tasks - -- [Creating a Basic Service Object Code Template](creating-a-basic-service-object-code-template.md) -- [Creating a Service Object Sample](creating-a-service-object-sample.md) - -#### Concepts - -- [Attributes for Identifying Service Objects and Assigning Hardware](attributes-for-identifying-service-objects-and-assigning-hardware.md) -- [Plug and Play XML Configuration](plug-and-play-xml-configuration.md) - -#### Other Resources - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/asynchronous-output-sample.md b/docs/framework/additional-apis/pos-for-net/asynchronous-output-sample.md deleted file mode 100644 index c8e5b118ec145..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/asynchronous-output-sample.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: Asynchronous Output Sample -description: Asynchronous Output Sample (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Asynchronous Output Sample (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) supports asynchronous output in compliance with the Unified Point Of Service (UnifiedPOS) specification. In the asynchronous output model, the Service Object must queue output requests so that it can return control to the application as quickly as possible. A second thread must then dispatch output to the device and notify applications when the request has been fulfilled, either with an **OutputCompleteEvent** or an **ErrorEvent** event. - -The POS for .NET class library handles most of these functions for the Service Object developer so that there is little, if any, difference between an asynchronous output device and a synchronous output only device. - -## To create the project - -1. Create a Visual Studio class library project. - -2. Add the sample code below to your project. - -3. Add references to the **Microsoft.PointOfService** assemblies. - -4. Compile and copy the Service Object to one of the directories in your Service Object assembly load path. - -## To use the application sample with the Service Object - -- This Service Object can be used with the application sample presented in [Event Handler Sample](event-handler-sample.md). - -## Example - -To output to a **PosPrinter** device, an application will most commonly use the method. Notice that the **PosPrinter** Service Object code below does not provide an implementation for this method. Instead, is implemented. This method is called by the POS for .NET library for both synchronous and asynchronous output requests. - -When an application calls an output method, such as **PrintNormal**, the POS for .NET implementation checks the value of the property. If this value is **false**, then the POS for .NET library sends the request to **PrintNormalImpl** immediately and waits for it to return. If the value is **true**, however, then the POS for .NET implementation of **PrintNormal** adds the request to an internally managed queue. While there are items in the queue, a POS for .NET managed thread will send each request, in first-in-first-out (FIFO) order, to the device by calling **PrintNormalImpl**. When **PrintNormalImpl** returns, the library implementation will raise an in the application. In short, the same Service Object code can support both synchronous and asynchronous output without ever needing to know which output mode is being used. - -```csharp -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; - -[assembly: PosAssembly("Service Object Contractors, Inc.")] - -namespace SOSamples.AsyncOutput -{ - [ServiceObject( - DeviceType.PosPrinter, - "AsyncOutputPrinter", - "Sample Async Printer", - 1, - 9)] - - public class AsyncOutputSimulator : PosPrinterBase - { - public AsyncOutputSimulator() - { - DevicePath = "Sample Async Printer"; - - // Indicate that the Service Object supports - // the receipt printer. - Properties.CapRecPresent = true; - } - - // Note that this method will be called by the POS for .NET - // library code, regardless of whether the print request - // is synchronous or asynchronous. The print request - // queue is managed completely by POS for .NET so the - // Service Object should simply write data to the device - // here. - protected override PrintResults PrintNormalImpl( - PrinterStation station, - PrinterState printerState, - string data) - { - // Your code to print to the actual hardware would go - // here. - - // For demonstration, however, the code simulates - // that fulfilling this print request took 4 seconds. - Thread.Sleep(4000); - - PrintResults results = new PrintResults(); - return results; - } - - // This method must be implemented by the Service - // Object, and should validate the data to be printed, - // including any escape sequences. This method should throw - // a PosControlException to indicate failure. - protected override void ValidateDataImpl( - PrinterStation station, - string data) - { - // Insert your validation code here. - return; - } - - #region Implement Abstract PosCommon Members - private string MyHealthText = ""; - - // PosCommon.CheckHealthText. - public override string CheckHealthText - { - get - { - // VerifyState(mustBeClaimed, - // mustBeEnabled). - VerifyState(false, false); - return MyHealthText; - } - } - - // PosCommon.CheckHealth. - public override string CheckHealth( - HealthCheckLevel level) - { - // Verify that device is open, claimed, and enabled. - VerifyState(true, true); - - // Insert your code here: - // check the health of the device and return a - // descriptive string. - - // Cache result in the CheckHealthText property. - MyHealthText = "Ok"; - return MyHealthText; - } - - // PosCommon.DirectIOData. - public override DirectIOData DirectIO( - int command, - int data, - object obj) - { - // Verify that the device is open. - VerifyState(false, false); - - return new DirectIOData(data, obj); - } - #endregion Implement Abstract PosCommon Members - } -} -``` - -The application code in the [Event Handler Sample](event-handler-sample.md) can be compiled and run with this Service Object. - -## See Also - -#### Tasks - -- [Event Handler Sample](event-handler-sample.md) - -#### Concepts - -- [Event Management](event-management.md) -- [Device Output Models](device-output-models.md) - -#### Other Resources - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) diff --git a/docs/framework/additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md b/docs/framework/additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md deleted file mode 100644 index fea7f5975f92f..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Attributes for Identifying Service Objects and Assigning Hardware -description: Attributes for Identifying Service Objects and Assigning Hardware (POS for .NET v1.14 SDK Documentation) -ms.date: 02/27/2008 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Attributes for Identifying Service Objects and Assigning Hardware (POS for .NET v1.14 SDK Documentation) - -POS for .NET uses .NET reflection and .NET attributes to locate Service Object assemblies, identify Service Objects within those assemblies, and finally to associate a Plug and Play device with that Service Object. By leveraging these .NET features, can identify Service Objects within an assembly and quickly assess their Plug and Play requirements. The expensive process of loading a .NET assembly is delayed until needed by the application. - -In order to provide these features, POS for .NET depends on three different .NET attributes: - -- **PosAssembly** - This is a global, assembly-level attribute that tells **PosExplorer** that this is a POS for .NET assembly which contains one or more Service Objects. Generally, it should be set in your **AssemblyInfo.cs** source file. For an example, see [Setting up a Service Object Project](setting-up-a-service-object-project.md). -- **ServiceObject** - This attribute is applied to the Service Object class and specifies the type, name, and version information for the Service Object. See the [Creating a Basic Service Object Code Template](creating-a-basic-service-object-code-template.md) section for an example. -- **HardwareId** - This attribute is used to specify which hardware IDs will be used by this Service Object. This information is used by **PosExplorer** to filter out Service Objects that use Plug and Play hardware which is not currently plugged in. The **HardwareId** attribute allows multiples, so there may be several attached to a Server Object class. See the sample topic [Adding Plug and Play Support](adding-plug-and-play-support.md) for an example. For a more lengthy discussion of Plug and Play features, including how the **HardwareId** attribute is utilized, see the topics [Adding Plug and Play Support](adding-plug-and-play-support.md) and POS for .NET [POS for .NET Integration with Plug and Play](pos-for-net-integration-with-plug-and-play.md). - -## See Also - -#### Reference - -- -- -- - -#### Concepts - -- [Plug and Play Support](plug-and-play-support.md) -- [POS for .NET Registry Settings](pos-for-net-registry-settings.md) - -#### Other Resources - -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) -- [System Configuration](system-configuration.md) -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) diff --git a/docs/framework/additional-apis/pos-for-net/base-class-directio-method.md b/docs/framework/additional-apis/pos-for-net/base-class-directio-method.md deleted file mode 100644 index 68b53374f6222..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/base-class-directio-method.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Base Class DirectIO Method -description: Base Class DirectIO Method (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Base Class DirectIO Method (POS for .NET v1.14 SDK Documentation) - -The **DirectIO** method and the **DirectIOEvent** event are used to provide functionality to the application that is not otherwise supported by the standard Unified Point Of Service (UnifiedPOS) specification for a particular device type. - -## DirectIO Method - -If a device has features that are not supported by the standard UnifiedPOS specification, a Service Object may implement a **DirectIO** method to give the application access to those features. - -An example might be a **LineDisplay** device that supports multicolor output. Few, if any, **LineDisplay**-type devices support color output, but an independent hardware vendor (IHV) might produce such a device and want to have the new features available to applications. - -Use of this method will make the application nonportable, since the implementation of the **DirectIO** method is vendor-specific. An application that uses a **DirectIO** method on Vendor A's **LineDisplay** device cannot depend on using a Vendor B's device. - -### DirectIOEvent - -This event can be used to send vendor-specific information directly to the application. This event provides a means for a vendor-specific UnifiedPOS service to provide events to the application that are not otherwise supported by the UnifiedPOS control. - -Using this event will make an application incompatible with devices from other vendors. - -## See Also - -#### Other Resources - -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) diff --git a/docs/framework/additional-apis/pos-for-net/capability-properties.md b/docs/framework/additional-apis/pos-for-net/capability-properties.md deleted file mode 100644 index 6e47bf8b64525..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/capability-properties.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Capability Properties -description: Capability Properties (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Capability Properties (POS for .NET v1.14 SDK Documentation) - -Certain properties cannot be set directly within a Service Object. This comes up most often in the case of capability properties; those with the **Cap** prefix in their names. According to the Unified Point Of Service (UnifiedPOS) specification, these properties must be read-only; therefore, an implementation-specific mechanism is needed for the Service Object to change the value of these properties. - -## BaseClass Properties - -Microsoft Point of Service for .NET (POS for .NET) **Base** classes have a protected property, **Properties**, for this purpose. This property returns a helper class which has writable versions of the read-only properties implemented in the **Base** class. For example, has a property called that returns an object of type . And this object contains properties used to set various **PinPad**-specific capability properties, such as . - -## PosCommon Properties - -In addition to device-specific property classes, all POS for .NET **Base** and **Basic** classes also have a protected property called **CommonProperties** which returns an object of type **CommonProperties**. This helper class is used to modify capability and status properties found in **PosCommon**. - -## Setting Properties Using Helper Classes - -In general, a Service Object should always access the value of its common and class-specific properties using the helper classes. These properties may be written to by the Service Object and always contain the appropriate values. - -The Service Object developer should be aware of what the POS for .NET framework may do when a particular value is changed. For example, the Service Object should generally not change **CommonProperties.State** since this may interfere with the POS for .NET internal state. Similarly, the Service Object developer should be aware that changing **CommonProperties.PowerState** may send a **StatusUpdateEvent** event to the application. - -> [!NOTE] -> When deriving from the POS for .NET **Base** or **Basic** classes, the Service Object should generally not change the value of **CommonProperties.State** to **ControlState.Closed**. Doing so prevents cleanup of the event queue, and POS for .NET may later throw exceptions as it tries to process events already in the queue. - -## See Also - -#### Reference - -- -- diff --git a/docs/framework/additional-apis/pos-for-net/cashdrawer-implementation.md b/docs/framework/additional-apis/pos-for-net/cashdrawer-implementation.md deleted file mode 100644 index f0a9c09a70cb4..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/cashdrawer-implementation.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: CashDrawer Implementation -description: CashDrawer Implementation (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# CashDrawer Implementation (POS for .NET v1.14 SDK Documentation) - -Most point-of-sale applications will use a cash drawer for financial transactions. Service Object developers can use the Microsoft Point of Service for .NET (POS for .NET) class, , to easily implement a Unified Point Of Service (UnifiedPOS) compliant **CashDrawer** Service Object. - -## Capabilities - -All **CashDrawer** Service Objects must support, at a minimum, the ability to open the drawer. This is done by implementing the abstract method, **CashDrawerBase.OpenDrawerImpl**, in your Service Object class. - -The Service Object may also be able to determine if the cash drawer is open or not. If the Service Object does have this capability, it should set the **CapStatus** property to **true**. If **CapStatus** is **true**, then applications may examine the state of the device using the **DrawerOpened** property. If **CapStatus** is not set, then **DrawerOpened** will always be set to **false** and any attempt to set it to **true** will generate an exception. - -If **CapStatus** has been set to **true**, the Service Object needs to update the **DrawerOpened** property. You should do this in the Service Object's implementation of the **OpenDrawerImpl** method. A background thread monitoring the state of the device may also set the **DrawerOpened** property. - -## CashDrawer Events - -If the Service Object has set the **CapStatus** property to **true**, **CashDrawerBasic.DrawerOpened** sends a **StatusUpdateEvent** to the application. - -Depending on the cash drawer device and the Service Object implementation, the Service Object may need a separate thread to monitor the state of the hardware and report any changes asynchronously. This would be necessary, for example, if the cash drawer could be opened manually by the operator and the application needs to be notified. - -The **CashDrawer** Service Object may also send a **DirectIOEvent** to the application. The **DirectIOEvent** is used to send data to the application that is specific to the Service Object implementation and may therefore be incompatible with some applications. For more information, see [Device Input and Events](device-input-and-events.md). - -## Device Sharing - -A cash drawer is a shareable device. Multiple applications will be able to open, enable, and access all of its properties and methods. However, once an application has claimed the device, only that application may call **CashDrawerBase.OpenDrawer** or **CashDrawerBase.WaitForDrawerClose**. A **PosException** with **ErrorCode.Claimed** will be thrown if other applications attempt to call these methods. - -If more than one application has opened and enabled the device, then each application will receive all events sent by the Service Object. - -The code necessary to support this feature is implemented in the POS for .NET **CashDrawerBase** class. - -## Multiple Cash Drawers - -It is possible to have more than one cash drawer attached to the computer and using the same hardware port. In such situations, a **CashDrawer** Service Object may know to which cash drawer it is not specifically connected. If the Service Object can distinguish to which cash drawer device it is connected, it should set the **CapStatusMultiDrawerDetect** property to **true**. The value of this property will influence the behavior of the **DrawerOpened** property and the **WaitForDrawerClose** method. - -If **CapStatusMultiDrawerDetect** is set to **false**, then a **DrawerOpened** value of **true** indicates that at least one drawer is open. The application is not able to determine whether any drawer in particular is open. - -If **CapStatusMultiDrawerDetect** is set to **false**, the method **WaitForDrawerClose** waits for all open cash drawers to be closed before returning to the application. - -## See Also - -#### Other Resources - -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) diff --git a/docs/framework/additional-apis/pos-for-net/command-line-help-for-posdm.md b/docs/framework/additional-apis/pos-for-net/command-line-help-for-posdm.md deleted file mode 100644 index ab1a8e4299036..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/command-line-help-for-posdm.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Command-Line Help for POSDM -description: Command-Line Help for POSDM (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Command-Line Help for POSDM (POS for .NET v1.14 SDK Documentation) - -You can display information about the general usage and syntax for POSDM.EXE by typing the following on the command line: - -`posdm /?` - -To get more information about any POSDM command, type the following on the command line: - -`posdm help command` - -Example: - -`posdm help listdevices` - -## See Also - -#### Concepts - -- [POSDM Commands](posdm-commands.md) - -#### Other Resources - -- [Using the POS Device Manager Command-Line Tool](using-the-pos-device-manager-command-line-tool.md) diff --git a/docs/framework/additional-apis/pos-for-net/configure-a-device-for-remote-management.md b/docs/framework/additional-apis/pos-for-net/configure-a-device-for-remote-management.md deleted file mode 100644 index 2da843898a066..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/configure-a-device-for-remote-management.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Configure a device for remote management -description: Configure a device for remote management (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Configure a device for remote management (POS for .NET v1.14 SDK Documentation) - -Learn how to configure your Microsoft Point of Service for .NET (POS for .NET) v1.14 device to enable remote management. - -If you have trouble remotely connecting to your device, you may have to configure your device for remote management. If your device is joined to a domain, some or all of the following configurations may already be configured through Group Policy settings. - -## Configure a device for remote management - -## To enable remote management by using a local administrator account - -1. Sign in to the device with an administrator account. - -2. Set the following registry key to disable User Account Control remote restrictions: - - `[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system]"LocalAccountTokenFilterPolicy"=dword:00000001` - - For more information about how to change this registry key, see [Description of User Account Control and remote restrictions](https://go.microsoft.com/fwlink/p/?linkid=259744) and [How to change the Remote UAC LocalAccountTokenFilterPolicy registry setting](https://go.microsoft.com/fwlink/p/?linkid=259760). - -3. Restart your device. - -## To enable Windows Management Instrumentation (WMI) traffic through a firewall - -1. On the **Start** menu, right-click **Command Prompt** and then click **Run as administrator**. - -2. To establish a Windows Firewall exception for WMI traffic, type the following command: - - `netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable=yes` - - > [!IMPORTANT] - > When running ELM on an OS that uses a language other than English, use the localized group name. - -3. (Optional) If ELM displays an error message that WMI did not respond or failed to connect, you can use individual commands for DCOM, WMI service, callback sink, and outgoing connections to enable WMI traffic. - - - To establish a Windows Firewall exception for DCOM port 135, type the following command: - - `netsh advfirewall firewall add rule dir=in name="DCOM" program=%systemroot%\system32\svchost.exe service=rpcss action=allow protocol=TCP localport=135` - - - To establish a Windows Firewall exception for the WMI service, type the following command: - - `netsh advfirewall firewall add rule dir=in name ="WMI" program=%systemroot%\system32\svchost.exe service=winmgmt action = allow protocol=TCP localport=any` - - - To establish a Windows Firewall exception for the sink that receives callbacks from a remote computer, type the following command: - - `netsh advfirewall firewall add rule dir=in name ="UnsecApp" program=%systemroot%\system32\wbem\unsecapp.exe action=allow` - - - To establish a Windows Firewall exception for outgoing connections to a remote computer that the local computer is communicating with asynchronously, type the following command: - - `netsh advfirewall firewall add rule dir=out name ="WMI_OUT" program=%systemroot%\system32\svchost.exe service=winmgmt action=allow protocol=TCP localport=any` - -For more information about how to enable WMI traffic, see [Connecting to WMI Remotely](https://go.microsoft.com/fwlink/p/?linkid=248462) on MSDN. - -## See Also - -#### Other Resources - -- [POS Device Manager](pos-device-manager.md) diff --git a/docs/framework/additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md b/docs/framework/additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md deleted file mode 100644 index af04c16e39a43..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Copyright Information for POS for .NET v1.14.1 (Microsoft Point of Service for .NET) -description: Copyright Information for POS for .NET v1.14.1 (Microsoft Point of Service for .NET) (POS for .NET v1.14 SDK Documentation) -ms.date: 04/21/2017 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Copyright Information for POS for .NET v1.14.1 (Microsoft Point of Service for .NET) - -This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. - -This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. - -© 2017 Microsoft Corporation. All rights reserved. - -Microsoft, MS-DOS, JScript, MSDN, Visual Basic, Visual C\#, Visual Studio, Windows, Windows Server, Windows Vista, and Win32 are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners. diff --git a/docs/framework/additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md b/docs/framework/additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md deleted file mode 100644 index 0ce42ed69eafb..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: Creating a Basic Service Object Code Template -description: Creating a Basic Service Object Code Template (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Creating a Basic Service Object Code Template (POS for .NET v1.14 SDK Documentation) - -The previous section, [Setting up a Service Object Project](setting-up-a-service-object-project.md), explained how to create an empty project to begin writing your Service Object. This section continues by adding features to that sample project. The following procedures and the sample in this topic show the steps that you must follow to create a basic Service Object template. - -## To create a simple class template - -1. Add **using** directives for the and to the top of the source file. - -2. Choose the POS for .NET **Base** class your Service Object will be derived from. The **Base** class you choose is based on the type of POS device for which you are developing this Service Object. (See [POS for .NET Class Tree](pos-for-net-class-tree.md)) - -3. If you are building your class on top of Point of Service **Basic** classes, also add a **using** directive for **Microsoft.PointOfService.BasicServiceObjects**. - -4. Apply a **ServiceObject** attribute to your Service Object class. This includes the following elements: - - - Device Type - - Service Object name - - Description of the Service Object - - Major version - - Minor version - -5. Create a default public parameterless constructor. This is required for to create an instance of your class by using .NET reflection. - -## Example - -In this sample, notice the additional **using** directives, the **ServiceObject** attribute applied to the Service Object class, the **Base** class used for the Service Object class, and finally the public constructor without arguments. - -```csharp -using system; -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; - -namespace Samples.ServiceObjects.SOTemplate -{ - [ServiceObject( - DeviceType.Msr, - "ServiceObjectTemplate", - "Bare bones Service Object class", - 1, - 9)] - public class MyServiceObject : MsrBase - { - public MyServiceObject() - { - } - } -} -``` - -This sample does not compile as is. Its purpose is to demonstrate what elements are necessary for any Service Object class. However, for each **POS for .NET** Service Object **Base** class, the list of abstract methods which must be implemented is different. The following sections continue to add features to the sample until it becomes a complete, functional Service Object implementation. - -## See Also - -#### Tasks - -- [Setting up a Service Object Project](setting-up-a-service-object-project.md) -- [Adding Plug and Play Support](adding-plug-and-play-support.md) - -#### Concepts - -- [POS for .NET Class Tree](pos-for-net-class-tree.md) -- [Attributes for Identifying Service Objects and Assigning Hardware](attributes-for-identifying-service-objects-and-assigning-hardware.md) - -#### Other Resources - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/creating-a-service-object-sample.md b/docs/framework/additional-apis/pos-for-net/creating-a-service-object-sample.md deleted file mode 100644 index 089a59d8464b4..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/creating-a-service-object-sample.md +++ /dev/null @@ -1,162 +0,0 @@ ---- -title: Creating a Service Object Sample -description: Creating a Service Object Sample (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Creating a Service Object Sample (POS for .NET v1.14 SDK Documentation) - -Previous topics explained how to create a basic Service Object template with Plug and Play support. This section adds how to create a limited sample with the following new features: - -- Necessary abstract methods are implemented so that the sample will compile successfully. -- The Service Object will be recognized by applications using , for example, the **POS for .NET Test Application** included with the SDK. -- Applications may now invoke methods on the Service Object or access properties, although no useful results will be returned. - -## Requirements - -To compile this sample, your project has to have the correct references and global attributes. - -## Example - -```csharp -using System; -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; - -namespace Samples.ServiceObjects.MSR -{ - [HardwareId(@"HID\Vid_05e0&Pid_038a", @"HID\Vid_05e0&Pid_038a")] - - [ServiceObject(DeviceType.Msr, - "SampleMsr", - "Sample Msr Service Object", - 1, - 9)] - public class SampleMsr : MsrBase - { - // String returned from CheckHealth - private string MyHealthText; - - public SampleMsr() - { - // Initialize device capability properties. - Properties.CapIso = true; - Properties.CapTransmitSentinels = true; - Properties.DeviceDescription = "Sample MSR"; - - // Initialize other class variables. - MyHealthText = ""; - } - - ~SampleMsr() - { - Dispose(false); - } - - // Release any resources managed by this object. - protected override void Dispose(bool disposing) - { - try - { - // Your code here. - } - finally - { - // Must call base class Dispose. - base.Dispose(disposing); - } - } - - #region PosCommon overrides - // Returns the result of the last call to CheckHealth(). - public override string CheckHealthText - { - get - { - // MsrBasic.VerifyState(mustBeClaimed, - // mustBeEnabled). This may throw an exception. - VerifyState(false, false); - - return MyHealthText; - } - } - - public override string CheckHealth( - HealthCheckLevel level) - { - // Verify that device is open, claimed, and enabled. - VerifyState(true, true); - - // Your code here: - // check the health of the device and return a - // descriptive string. - - // Cache result in the CheckHealthText property. - MyHealthText = "Ok"; - return MyHealthText; - } - - public override DirectIOData DirectIO( - int command, - int data, - object obj) - { - // Verify that device is open. - VerifyState(false, false); - - return new DirectIOData(data, obj); - } - #endregion // PosCommon overrides - - #region MsrBasic Overrides - protected override MsrFieldData ParseMsrFieldData( - byte[] track1Data, - byte[] track2Data, - byte[] track3Data, - byte[] track4Data, - CardType cardType) - { - // Your code here: - // Implement this method to parse track data - // into fields which will be returned as - // properties to the application - // (for example, FirstName, - // AccountNumber, etc.) - return new MsrFieldData(); - } - - protected override MsrTrackData ParseMsrTrackData( - byte[] track1Data, - byte[] track2Data, - byte[] track3Data, - byte[] track4Data, - CardType cardType) - { - - // Your code here: - // Implement this method to convert raw track data. - return new MsrTrackData(); - } - #endregion - } -} -``` - -In order to simplify this sample, the code does not implement any globalization features. For example, the value for **Properties.DeviceDescription** would typically be read from a localized strings resource file. - -## See Also - -#### Tasks - -- [Adding Plug and Play Support](adding-plug-and-play-support.md) -- [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md) - -#### Concepts - -- [POS for .NET Class Tree](pos-for-net-class-tree.md) - -#### Other Resources - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) diff --git a/docs/framework/additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md b/docs/framework/additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md deleted file mode 100644 index 312ada25b3461..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md +++ /dev/null @@ -1,458 +0,0 @@ ---- -title: Creating a Working, Multithreaded Service Object -description: Creating a Working, Multithreaded Service Object (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Creating a Working, Multithreaded Service Object (POS for .NET v1.14 SDK Documentation) - -The previous sections provided samples and guides to start your project including: - -- Creating a simple template. -- Implementing a Service Object class that can be compiled and seen by the Point Of Service sample application via . -- Implementing a thread helper class. - -This sample combines all of these steps to create a working, multithreaded MSR Service Object class. This sample does not actually read from any hardware. It simply pushes test data through the system. It illustrates, however, how to add code that is specific to your Service Object. - -## To customize this code for your Service Object - -1. Modify the **PosAssembly** attribute in **AssemblyInfo.cs** so that it contains your organization's name. - -2. Be sure that the name of the namespace is appropriate for your organization and Service Object. - -3. Modify the **ServiceObject** attribute to contain the type, name, description, and version number of the Service Object that you are creating. - -4. Add a **HardwareId** attribute to associate this Service Object with a Plug and Play device, or a range of devices. - -5. Include the **ThreadHelper** class presented in [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md). You can do this by either pasting the code into your source file, or compiling it as a separate source file in your project. Be sure that the **ThreadHelper** class is in an accessible namespace. - -6. Implement the members necessary depending on the **Base** class used by the Service Object and the functionality that you want to support. This sample is a functioning MSR Service Object with very little functionality. - -## Requirements - -To compile this sample, your project has to have the correct references and global attributes. If you have not already created a working POS for .NET Service Object, review the [Service Object Samples: Getting Started](service-object-samples-getting-started.md) sections. - -In addition, you will also need to include the code from the previous section, [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md), into your project. - -## Demonstrates - -Most Service Objects need to use a second thread to monitor hardware and notify the application of various incoming data events. This sample shows one way to create a multithreaded Service Object. It relies on the **ServiceObjectThreadHelper** class discussed in [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md) to do this. - -To use the helper class, an application needs to define a new class that implements the **ServiceObjectThreadHelper** interface. This interface includes three methods: - -- **ServiceObjectThreadOpen** - This method is called during thread initialization and should be used to initialize any hardware-specific resources. -- **ServiceObjectThreadClose** - This method is called when the thread is terminated and should be used to release any hardware-specific resources. -- **ServiceObjectThreadProcedure** - This method will be called once the thread has been successfully started and should loop waiting on hardware events, and should not exit until the proper **ManualEvent** is triggered. - -This code builds on the sample presented in the topic [Creating a Service Object Sample](creating-a-service-object-sample.md) and adds the following features: - -- Creates a class derived from **ServiceObjectThreadHelper**. -- Creates an instance of an **MsrThreadingObject** class. The constructor for this class takes a single argument, a reference to the service object. -- Calls methods on the **MsrThreadingObject** object from the Service Object to start and stop the thread helper as appropriate. - -## Example - -```csharp -using System; -using System.Threading; -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; -using System.Text; - -namespace Samples.ServiceObjects.Advanced.MSR -{ - public class MsrThreadingObject : - ServiceObjectThreadHelper, IDisposable - { - // This is a helper class which will depend on - // being able to call back into the actual Service - // Object to pass along data. However, you cannot - // keep a strong reference to the Service Object, - // since that will prevent proper disposal, which - // may create a state in which all hardware resources - // are not properly released by the SO. Therefore, - // create a weak reference. From this reference, - // you can get a temporary strong reference, which - // you act on and then release. - WeakReference ServiceObjectReference; - - // The name of the Service Object. - string ObjectName; - - public MsrThreadingObject(AdvancedSampleMsr so) - { - ObjectName = GetType().Name; - ServiceObjectReference = new WeakReference(so); - } - - ~MsrThreadingObject() - { - Dispose(true); - } - - private bool IsDisposed = false; - protected virtual void Dispose(bool disposing) - { - if (!IsDisposed) - { - IsDisposed = true; - base.Dispose(disposing); - } - } - - public void Dispose() - { - Dispose(false); - } - - #region Methods of ServiceObjectThreadHelper - - // This will be called during initialization. - public override void ServiceObjectThreadOpen() - { - Logger.Info(ObjectName, "Msr Thread Open"); - } - - // This method will be called during shutdown. - public override void ServiceObjectThreadClose() - { - Logger.Info(ObjectName, "Msr Thread Open"); - } - - public override void ServiceObjectThreadProcedure( - AutoResetEvent ThreadStopEvent) - { - // Convert a C# string into a sample byte array. - UTF8Encoding encoder = new UTF8Encoding(); - - // Convert sample data to a byte array. - byte[] MsrData = encoder.GetBytes( - "This is MSR test data"); - - Logger.Info(ObjectName, "Msr Thread Procedure Entered"); - - while (true) - { - // When this method is called by the - // ServiceObjectThreadHelper, it is obligated to - // exit when the event ThreadStopEvent has been - // set. - - // Additionally, this method will also wait for - // hardware events or for a time-out. That should - // be done here. - - // This example waits for the event to be set - // or times out after several seconds. - - if (ThreadStopEvent.WaitOne(2000, false)) - { - break; - } - - Logger.Info(ObjectName, "Reader Thread cycling"); - - // Try to get a strong reference to the Service - // Object using the weak reference saved when - // this helper object was created. - AdvancedSampleMsr msr = - ServiceObjectReference.Target - as AdvancedSampleMsr; - - // If this fails, that means the Service - // Object has already been disposed of. Exit the - // thread. - if (msr == null) - { - break; - } - - // Using the strong reference, you can now make - // calls back into the Service Object. - msr.OnCardSwipe(MsrData); - msr = null; - } - #endregion Methods of ServiceObjectThreadHelper - } - - // Implementation of the Service Object class. This class - // implements all the methods needed for an MSR Service - // Object. - // - // A Service Object which supports a Plug and Play device - // should also have a HardwareId attribute here. - - [HardwareId( - @"HID\Vid_05e0&Pid_038a", - @"HID\Vid_05e0&Pid_038a")] - - [ServiceObject( - DeviceType.Msr, - "AdvancedSampleMsr", - "Advanced Sample Msr Service Object", - 1, - 9)] - public class AdvancedSampleMsr : MsrBase - { - // String returned for various health checks. - private string MyHealthText; - private const string PollingStatistic = - "Polling Interval"; - - // Create a class with interface methods called from the - // threading object. - MsrThreadingObject ReadThread; - public AdvancedSampleMsr() - { - // DevicePath must be set before Open() is called. - // In the case of Plug and Play hardware, the POS - // for .NET Base class will set this value. - DevicePath = "Sample Msr"; - - Properties.CapIso = true; - Properties.CapTransmitSentinels = true; - - Properties.DeviceDescription = - "Advanced Sample Msr"; - - // Initialize the string to be returned from - // CheckHealthText(). - MyHealthText = ""; - } - - ~AdvancedSampleMsr() - { - // Code added from previous sections to terminate - // the read thread started by the thread-helper - // object. - ReadThread.CloseThread(); - - Dispose(false); - } - - protected override void Dispose(bool disposing) - { - try - { - if (disposing) - { - if (ReadThread != null) - { - ReadThread.Dispose(); - ReadThread = null; - } - } - } - finally - { - // Must call base class Dispose. - base.Dispose(disposing); - } - } - - #region Internal Members - // This is a private method called from the task - // interface when a data event occurs in the reader - // thread. - internal void OnCardSwipe(byte[] CardData) - { - // Simple sample data. - UTF8Encoding utf8 = new UTF8Encoding(); - byte[] track1Data = utf8.GetBytes( - "this is test track 1"); - byte[] track2Data = utf8.GetBytes( - "this is test track 2"); - - // Call GoodRead(), UnreadableCard, or FailedRead - // from here. - GoodRead( - track1Data, - track2Data, - null, - null, - Microsoft.PointOfService.BaseServiceObjects.CardType.Iso); - } - #endregion Internal Members - - #region PosCommon overrides - // PosCommon.Open. - public override void Open() - { - // Call base class Open. - base.Open(); - - // Initialize statistic values. - - // Set values for common statistics. - SetStatisticValue(StatisticManufacturerName, - "Microsoft Corporation"); - SetStatisticValue( - StatisticManufactureDate, "2004-10-23"); - SetStatisticValue( - StatisticModelName, "Msr Simulator"); - SetStatisticValue( - StatisticMechanicalRevision, "1.0"); - SetStatisticValue( - StatisticInterface, "USB"); - - // Create a new manufacturer statistic. - CreateStatistic( - PollingStatistic, - false, - "milliseconds"); - - // Set handlers for statistics stored in hardware. - // Create a class with interface methods called - // from the threading object. - ReadThread = new MsrThreadingObject(this); - } - - // PosCommon.CheckHealthText. - public override string CheckHealthText - { - get - { - // MsrBasic.VerifyState(mustBeClaimed, - // mustBeEnabled). - VerifyState(false, false); - return MyHealthText; - } - } - - // PosCommon.CheckHealth. - public override string CheckHealth( - HealthCheckLevel - level) - { - // Verify that device is open, claimed, and enabled. - VerifyState(true, true); - - // Your code here checks the health of the device and - // returns a descriptive string. - - // Cache result in the CheckHealthText property. - MyHealthText = "Ok"; - return MyHealthText; - } - - // PosCommon.DirectIO. - public override DirectIOData DirectIO( - int command, - int data, - object obj) - { - return new DirectIOData(data, obj); - } - - public override bool DeviceEnabled - { - get - { - return base.DeviceEnabled; - } - set - { - if (value != base.DeviceEnabled) - { - base.DeviceEnabled = value; - - if (value == false) - { - // Stop the reader thread when the - // device is disabled. - ReadThread.CloseThread(); - } - else - { - try - { - // Enabling the device, start the - // reader thread. - ReadThread.OpenThread(); - } - catch (Exception e) - { - base.DeviceEnabled = false; - - if (e is PosControlException) - throw; - - throw new PosControlException( - "Unable to Enable Device", - ErrorCode.Failure, e); - } - } - } - } - } - #endregion PosCommon overrides. - - #region MsrBasic Overrides - - // MsrBasic.MsrFieldData - // Once the track data is retrieved, this method is - // called when the application accesses various data - // properties in the MsrBasic class. For example, - // FirstName and AccountNumber. - protected override MsrFieldData ParseMsrFieldData( - byte[] track1Data, - byte[] track2Data, - byte[] track3Data, - byte[] track4Data, - CardType cardType) - { - // MsrFieldData contains the data elements that - // MsrBasic will return as properties to the - // application, as they are requested. - MsrFieldData data = new MsrFieldData(); - - // Parse the raw track data and store in fields to - // be used by the app. - data.FirstName = "FirstName"; - data.Surname = "LastName"; - data.Title = "Mr."; - data.AccountNumber = "123412341234"; - - return data; - } - - // MsrBasic.MsrTrackData. - protected override MsrTrackData ParseMsrTrackData( - byte[] track1Data, - byte[] track2Data, - byte[] track3Data, - byte[] track4Data, - CardType cardType) - { - MsrTrackData data = new MsrTrackData(); - - // Modify the track data as appropriate for your SO. - // Remove the sentinal characters from the track data, - // for example. - data.Track1Data = (byte[])track1Data.Clone(); - data.Track2Data = (byte[])track2Data.Clone(); - - return data; - } - #endregion MsrBasic overrides - } - } -} -``` - -## See Also - -#### Tasks - -- [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md) -- [Adding Plug and Play Support](adding-plug-and-play-support.md) - -#### Other Resources - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/data-decoding.md b/docs/framework/additional-apis/pos-for-net/data-decoding.md deleted file mode 100644 index 3ee658e23348d..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/data-decoding.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: Data Decoding -description: Data Decoding (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Data Decoding (POS for .NET v1.14 SDK Documentation) - -The class provides two methods, **DecodeDataLabel** and **DecodeScanDataType** for decoding incoming date. These methods are called when the properties **ScanDataLabel** and **ScanDataType**, respectively, are accessed. The **ScannerBase** class defers data decoding until the application accesses the data properties and the decoded data will be cached for future reads. - -The **ScannerBase** class implements the **ScannerBase.DecodeData** attribute as required by the Unified Point Of Service (UnifiedPOS) specification. If **DecodeData** is not set to **true** when the application reads the **ScanDataLabel** property, an empty byte array will be returned. Similarly, **ScanDataType** returns **BarCodeSymbology.Unknown**. This functionality is implemented in the **ScannerBase** class and is transparent to both the application and the Service Object. - -## To implement DecodeScanDataLabel - -1. Override the protected, virtual **ScannerBasic** member **DecodeScanDataLable**. - -2. **DecodeScanData** takes an argument, ***scanData***, which contains the complete data buffer. There is no need to cache any additional data in the Service Object code. - -3. **DecodeScanData** should process the scanned data to remove header and type information at the start and end of the data buffer. The modified buffer will be returned in a byte array. - -## To implement DecodeScanDataType - -1. Override the protected, virtual **ScannerBasic** member **DecodeScanDataType**. - -2. Like **DecodeScanDataLabel**, **DecodeScanDataType** receives an argument containing the complete scanned buffer. - -3. **DecodeScanDataType** examines the buffer to find the data type of the scanned data and returns the appropriate **BarCodeSymbology** value. - -## Example - -The following code demonstrates a typical method the Service Object developer could implement in order to extract label and data values from a scanned buffer. Note that this code is demonstrative of a particular device. Different Service Objects will require device-specific decoding. - -```csharp -// Decode the incoming scanner data, removing header and -// type information. -override protected byte[] DecodeScanDataLabel( - byte[] scanData) -{ - int i; - int len = 0; - - // Get length of label data. - for (i = 5; i < (int)scanData[1] - && (int)scanData[i] > 31; i++) - { - len++; - } - - // Copy label data into buffer. - byte[] label = new byte[len]; - len = 0; - - for (i = 5; i < (int)scanData[1] - && (int)scanData[i] > 31; i++) - { - label[len++] = scanData[i]; - } - - return label; -} - -// Process the incoming scanner data to find the data type. -override protected BarCodeSymbology DecodeScanDataType( - byte[] scanData) -{ - int i; - - for (i = 5; i < (int)scanData[1] - && (int)scanData[i] > 31; i++) - { - } - - // last 3 (or 1) bytes indicate symbology. - if (i + 2 <= (int)ScanData[1]) - { - return GetSymbology( - ScanData[i], - ScanData[i + 1], - ScanData[i + 2]); - } - else - { - return GetSymbology(ScanData[i], 0, 0); - } -} - -// This method determines the data type by examining -// the end of the scanned data buffer. Either 1 byte -// or 3 byte is used to determine the type, depending on -// the incoming buffer. -static private BarCodeSymbology GetSymbology( - byte b1, - byte b2, - byte b3) -{ - if (b1 == 0 && b3 == 11) - { - // Use all 3 bytes to determine the date type. - switch (b2) - { - case 10: - return BarCodeSymbology.Code39; - case 13: - return BarCodeSymbology.Itf; - case 14: - return BarCodeSymbology.Codabar; - case 24: - return BarCodeSymbology.Code128; - case 25: - return BarCodeSymbology.Code93; - case 37: - return BarCodeSymbology.Ean128; - case 255: - return BarCodeSymbology.Rss14; - default: - break; - } - - } - else if (b2 == 0 && b3 == 0) - { - // Only use the first byte to determine the data type. - switch (b1) - { - case 13: - return BarCodeSymbology.Upca; - case 22: - return BarCodeSymbology.EanJan13; - case 12: - return BarCodeSymbology.EanJan8; - default: - break; - } - } - - return BarCodeSymbology.Other; -} -``` - -Additional details about how label and type data should be extracted from a scanned data buffer can be found in the UPOS specification. - -## Compiling the Code - -- For additional information about creating and compiling a Service Object project, see [Service Object Samples: Getting Started](service-object-samples-getting-started.md). - -## See Also - -#### Reference - -- -- - -#### Other Resources - -- [Scanner Implementation](scanner-implementation.md) diff --git a/docs/framework/additional-apis/pos-for-net/developing-a-custom-service-object.md b/docs/framework/additional-apis/pos-for-net/developing-a-custom-service-object.md deleted file mode 100644 index 9b642b885a2b1..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/developing-a-custom-service-object.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: Developing a Custom Service Object -description: Developing a Custom Service Object (POS for .NET v1.14 SDK Documentation) -ms.date: 02/27/2008 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Developing a Custom Service Object (POS for .NET v1.14 SDK Documentation) - -The POS for .NET SDK delivers support for developing UPOS-compliant applications. The POS for .NET class tree delivers support for both applications that use a specific UPOS device, and Service Objects which provide the link between the physical hardware and the application. - -Service Objects are typically implemented by independent hardware vendors (IHVs) to provide an interface between POS for .NET applications and the IHVs particular UPOS device. The POS for .NET SDK includes a set of .NET classes which you can use to create fully functional, UPOS-compliant Service Objects. By taking advantage of the POS for .NET SDK classes, you can write Service Objects quickly and with relatively little device-specific code. - -## In This Section - -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) - Presents an overview of the POS for .NET architecture used for building custom Service Objects. - -- [System Configuration](system-configuration.md) - Provides information about settings and configuration for POS for .NET installations. - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) - Provides a step-by-step guide to creating a functional, multithreaded Service Object. - -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) - POS for .NET includes a nearly complete Base class implementation for nine POS device types. This section explains how to use these classes as a foundation for device-specific Service Objects. - -- [Device Input and Events](device-input-and-events.md) - Explains how events are used to send input from the POS device to the application. - -- [Device Output Models](device-output-models.md) - Explains the difference between synchronous and asynchronous output to POS devices. - -- [Asynchronous Output Sample](asynchronous-output-sample.md) - Implements a simple Service Object in order to demonstrate how POS for .NET manages asynchronous output. - -- [Statistics Sample](statistics-sample.md) - Implements a sample Service Object that uses the POS for .NET statistics methods. - -- [Base Class DirectIO Method](base-class-directio-method.md) - Explains how Service Objects can implement the method **DirectIO** to provide access to manufacturer-specific data to the application. - -- [Capability Properties](capability-properties.md) - Demonstrates how certain properties, such as capability properties, are set by the Service Object. - -## Related Sections - -- [POS for .NET v1.14 Features](pos-for-net-v1141-features.md) - Provides a high-level overview of the POS for .NET system. - -- [Developing a POS Application](developing-a-pos-application.md) - Provides details for creating a POS application using POS for .NET. - -- [POS Device Manager](pos-device-manager.md) - Describes using POS Device Manager to configure a POS for .NET installation. diff --git a/docs/framework/additional-apis/pos-for-net/developing-a-pos-application.md b/docs/framework/additional-apis/pos-for-net/developing-a-pos-application.md deleted file mode 100644 index 754b1f616261d..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/developing-a-pos-application.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Developing a POS Application -description: Developing a POS Application (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Developing a POS Application (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) provides classes and tools that make writing robust POS applications simple and easy. - -Service Object classes represent POS peripheral devices, supplying the properties, methods, and events that are defined in the Unified Point Of Service (UnifiedPOS) Retail Peripheral Architecture specification. - -The class lets applications enumerate installed POS devices, instantiate Service Objects for them, and receive Plug and Play events when a POS peripheral device is connected or disconnected. - -## In This Section - -- [POS for .NET Application Compatibility with 32-bit OPOS Service Objects](pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md) - Describes how to use 32-bit OLE for Retail POS (OPOS) service objects with a 64-bit OS. - -- [Typical POS Application Architecture](typical-pos-application-architecture.md) - Describes the POS for .NET application architecture and organization. - -- [POS for .NET API Support](pos-for-net-api-support.md) - Provides an overview of POS for .NET API support and links to specific important API classes and conceptual topics. - -- [Event Handler Sample](event-handler-sample.md) - Demonstrates the use of POS for .NET events in an application. - -## Related Sections - -- [POS for .NET v1.14 Features](pos-for-net-v1141-features.md) - Provides a high-level overview of the POS for .NET system. - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) - Demonstrates how to create a POS for .NET application, which uses Service Objects to communicate with hardware devices. diff --git a/docs/framework/additional-apis/pos-for-net/developing-service-objects-using-base-classes.md b/docs/framework/additional-apis/pos-for-net/developing-service-objects-using-base-classes.md deleted file mode 100644 index 597dd1ac58726..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/developing-service-objects-using-base-classes.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Developing Service Objects Using Base Classes -description: Developing Service Objects Using Base Classes (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Developing Service Objects Using Base Classes (POS for .NET v1.14 SDK Documentation) - -The Unified Point of Service (UnifiedPOS) v1.14 specification defines 36 UnifiedPOS device types. Microsoft Point of Service for .NET (POS for .NET) provides **Base** class for nine of those. This section builds on the basics covered in the [Service Object Samples: Getting Started](service-object-samples-getting-started.md) and provides additional information specific to each device type. - -## In This Section - -- [Scanner Implementation](scanner-implementation.md) - Provides additional details about developing a **ScannerDrawer** Service Object. - -- [CashDrawer Implementation](cashdrawer-implementation.md) - Provides additional details about developing a **CashDrawer** Service Object. - -- [LineDisplay Implementation](linedisplay-implementation.md) - Provides additional details about developing a **LineDisplay** Service Object. - -- [PinPad Implementation](pinpad-implementation.md) - Provides additional details about developing a **PinPad** Service Object. - -- [PosKeyboard Implementation](poskeyboard-implementation.md) - Provides additional details about developing a **PosKeyboard** Service Object. - -- [Using Impl Methods for Synchronous or Asynchronous Output](using-impl-methods-for-synchronous-or-asynchronous-output.md) - Describes how these special helper methods allow for a single implementation of an output method that supports both synchronous and asynchronous operations. - -## Related Sections - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) - Provides a step-by-step guide to creating a functional, multithreaded Service Object. - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) - Discusses the procedures, issues, and conventions for developing a custom Service Object. diff --git a/docs/framework/additional-apis/pos-for-net/device-input-and-events.md b/docs/framework/additional-apis/pos-for-net/device-input-and-events.md deleted file mode 100644 index dfa3360f753f6..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/device-input-and-events.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Device Input and Events -description: Device Input and Events (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Device Input and Events (POS for .NET v1.14 SDK Documentation) - -All POS devices have the ability to generate events or change state independent of the application. For example, if an operator unplugs a **PinPad** device, the application has no direct way of detecting this change since it is not a state change requested by the application. A Service Object must have some way of alerting the application to these state changes. - -## Multithreading - -Since having the application continuously poll the Service Object for its current state would be far too expensive, another solution is needed. Typically, the solution is to create a background thread to monitor the device. - -As other examples have demonstrated, creating a reader thread is always necessary for input devices such scanners or magnetic strip readers. For output devices such as line displays and printers, however, a second thread is often necessary to watch for state changes, such as losing power or going offline, and then to send a **StatusUpdateEvent** event to the application. - -In this way, the Service Object can be responsive to requests from the application while asynchronously monitoring the hardware. - -### Defining Events - -Events are the mechanism by which the Service Object notifies the application of a state change in the device, or the arrival of new data. - -In general terms, an event is a notification between one thread or process and another that something has occurred. More specifically, Microsoft Point of Service for .NET (POS for .NET) uses the .NET delegates feature to deliver to the application. - -The Unified Point Of Service (UnifiedPOS) specification defines a set of five events: **DataEvent**, **DirectIOEvent**, **ErrorEvent**, **OutputCompleteEvent**, and **StatusUpdateEvent**. Each Service Object may be permitted to only support a subset of these. The exact contents of the data also depends on the Service Object type. - -### Event Queues - -When you create a Service Object class derived from one of the POS for .NET **Base** classes, events are not sent directly from the Service Object to the application. Instead, events are placed into a queue managed by the **Base** class. Since there are conditions that must be met before events may be delivered to an application, code in the **Base** class dispatches events only when it is appropriate to do so. The Service Object does not need be aware of the queue or of the requirements that must be met before an event can be fired. This greatly eases the burden on the Service Object developer. - -The event queue operates asynchronously by using its own thread. This means that the Service Object does not wait for the actual delivery of the event. - -### Adding Events to the Queue - -The POS for .NET **Base** classes provide a number of ways to add an event to the queue depending on the Service Object and the event type. - -Many **Base** classes have helper methods to simplify the queuing of certain events; most commonly, **DataEvent** events. For instance, the method **MsrBase.GoodRead** can be used to queue a **DataEvent** event after a successful card read. Likewise, **PosKeyboard.KeyDown** queues a **DataEvent** indicating that a key has been pressed. - -Events may also be queued automatically by the **Base** class when a certain state is changed. For example, if a Service Object has set its **Properties.CapPowerReporting** property, then a **StatusUpdateEvent** indicating a power change can be sent simply by setting the **Properties.PowerState** property in the Service Object. - -Finally, if needed a Service Object may specifically queue an event using any of the **QueueEvent** overrides. This may be used most often for sending a **DirectIOEvent**. Since **DirectIOEvent** events are vendor-specific and device-specific, no generic mechanism can be used to queue them. - -### Synchronous Input - -Although most device input is read asynchronously by the Service Object and then dispatched to the application in the form of events, there are instances, however, where the application may request data from the Service Object and not return until the data is ready or a time-out has been reached. For more information about event-driven input, see [Event Management](event-management.md). - -## See Also - -#### Tasks - -- [Event Handler Sample](event-handler-sample.md) - -#### Concepts - -- [Event Management](event-management.md) - -#### Other Resources - -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) diff --git a/docs/framework/additional-apis/pos-for-net/device-output-models.md b/docs/framework/additional-apis/pos-for-net/device-output-models.md deleted file mode 100644 index a2bba7a6bef0e..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/device-output-models.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: Device Output Models -description: Device Output Models (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Device Output Models (POS for .NET v1.14 SDK Documentation) - -The Unified Point Of Service (UnifiedPOS) output model consists of two output types; synchronous and asynchronous. A POS device type may support one or both types, or neither type. - -## Synchronous Output - -When an application uses a device type-specific synchronous method to write output, the write operation takes place on the same thread that called the method. The Service Object may not return until the write operation has either been completed or failed. - -Using synchronous output is simple, but can potentially impact application performance if the output cannot be completed relatively quickly. Service Object developers should take this into account. - -### Asynchronous Output - -Certain POS device types support asynchronous output. In the asynchronous output model, the application calls the Service Object to request that data be output to the device. Unlike the synchronous model, however, the Service Object must not wait for the write operation to complete; instead it should return control to the application as soon as possible. When a Service Object receives a request from the application, it should do the following: - -- If the physical device is not able to receive data, the Service Object should buffer it in memory until the device is ready. -- Set the **OutputId** property to an identifier for this request, to be used during future events that are sent to the application. -- Return as soon as possible. - -The Service Object must then wait for the device to complete the request. Typically, this is done with a separate thread, managed by the Service Object, which monitors the hardware. Once the request is completed successfully, an **OutputCompleteEvent** event, with **OutputEventArgs.OutputId** set to the previously specified identifier, is queued for delivery to the application. - -### Service Object Managed Queue - -The POS for .NET class library offers support for asynchronous output, which is sufficient for nearly all Service Object scenarios. - -There are, however, some scenarios where Service Object developers may need to implement their own asynchronous output handling. The primary scenario is to support devices that support hardware-based print queues. In this case, the Service Object sets **UseExternalPrintQueue** to **true**, overrides the **PreQueuePrintData** method, and implements their own queue mechanism. - -When **UseExternalPrintQueue** is set to **true**, the **Base** class no longer adds the print requests to its internal asynchronous queue, so it is up to the Service Object developers to queue data in any way they require. This is often done by using the device's hardware print queuing features. The **Base** class still prevalidates the same print requests but does not do any additional processing. - -In these cases, the Service Object will be responsible for the following: - -- Implementing its own queuing logic. -- Sending **StatusUpdateEvents** for successful operations. -- Sending **ErrorEvents** for failed asynchronous operations and handling the retry. -- Updating the state property. -- All other asynchronous operations defined in the UnifiedPOS specification. - -## See Also - -#### Tasks - -- [Event Handler Sample](event-handler-sample.md) -- [Asynchronous Output Sample](asynchronous-output-sample.md) -- [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md) - -#### Other Resources - -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) diff --git a/docs/framework/additional-apis/pos-for-net/deviceinfo-class.md b/docs/framework/additional-apis/pos-for-net/deviceinfo-class.md deleted file mode 100644 index 75bbf720e4837..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/deviceinfo-class.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: DeviceInfo Class -description: DeviceInfo Class (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# DeviceInfo Class (POS for .NET v1.14 SDK Documentation) - -The class supplies Microsoft Point of Service for .NET (POS for .NET) applications with information about POS devices and the Service Objects associated with them. The methods, and return instances of **DeviceInfo**. - -## DeviceInfo Properties - -The following table shows the **DeviceInfo** properties. - -| Property | Type | Description | -|----------------------|-----------------------|------------------------------------------------------------------------------------------------------------------------| -| Compatibility | DeviceCompatibilities | Lists the valid compatibility levels for a POS device (an OLE for Retail POS (OPOS) or .NET Service Object). | -| Description | string | Describes the Service Object. | -| HardwareDescription | string | Describes the physical device. | -| HardwareId | string | Provides the ID of the physical device. | -| HardwarePath | string | Provides the physical hardware path of the device. | -| IsDefault | bool | Returns true if the device is the default for its type. | -| LogicalNames | strings[] | Provides the alternative name(s) assigned to the device in the global configuration fileby POS Device Manager (POSDM). | -| ManufacturerName | string | Provides the physical device manufacturer name. | -| ServiceObjectName | string | Provides the name of the Service Object. | -| ServiceObjectVersion | Version | Provides the Service Object version. | -| DeviceType | string | Provides the physical device type. | -| UposVersion | Version | Provides the UPOS version number. | - -## DeviceInfo Methods - -The following table shows the **DeviceInfo** methods. - -| Method | Return Type | Description | -|----------------|-------------|------------------------------------------------------------------------------------| -| IsDeviceInfoOf | bool | Returns true if the Service Object corresponds to the DeviceInfo class properties. | -| ToString | string | Returns a string that describes the properties of the device. | - -## See Also - -#### Concepts - -- [PosExplorer Class](posexplorer-class.md) -- [Exception Classes](exception-classes.md) - -#### Other Resources - -- [Developing a POS Application](developing-a-pos-application.md) -- [POS for .NET API Support](pos-for-net-api-support.md) -- [POS Device Manager](pos-device-manager.md) diff --git a/docs/framework/additional-apis/pos-for-net/deviceproperty-class.md b/docs/framework/additional-apis/pos-for-net/deviceproperty-class.md deleted file mode 100644 index 1a1790818b192..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/deviceproperty-class.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: DeviceProperty Class -description: DeviceProperty Class (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# DeviceProperty Class (POS for .NET v1.14 SDK Documentation) - -The **DeviceProperty** class represents a name/value pair of a configuration property for a physical device. There may be multiple **DeviceProperty** classes associated with a **PosDevice**. - -## Properties - -| Name | Description | -|--------|------------------------------------------------------| -| Type | String representing the POS device category. | -| SoName | String representing the name of the Service Object. | -| Path | String representing the path of the physical device. | -| Name | String representing the name of this property. | -| Value | String representing the data of this property. | - -## See Also - -#### Tasks - -- [Using VBScript to Manage Devices](using-vbscript-to-manage-devices.md) - -#### Concepts - -- [PosDevice Class](posdevice-class.md) - -#### Other Resources - -- [Using the WMI API to Manage Devices](using-the-wmi-api-to-manage-devices.md) diff --git a/docs/framework/additional-apis/pos-for-net/event-handler-sample.md b/docs/framework/additional-apis/pos-for-net/event-handler-sample.md deleted file mode 100644 index dc4edd1d7c674..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/event-handler-sample.md +++ /dev/null @@ -1,444 +0,0 @@ ---- -title: Event Handler Sample -description: Event Handler Sample (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Event Handler Sample (POS for .NET v1.14 SDK Documentation) - -This sample demonstrates how applications can register handlers for any of the five event types supported by Microsoft Point of Service for .NET (POS for .NET): - -- DataEvent -- ErrorEvent -- StatusUpdateEvent -- OutputCompleteEvent -- DirectIOEvent - -It also shows how an application manages asynchronous output requests to a device. - -## To create the sample project - -1. Compile and install the Service Object sample code from [Asynchronous Output Sample](asynchronous-output-sample.md). - -2. Create a Windows Forms Application project in Microsoft Visual Studio 2013. - -3. The code section below includes two files, **AsyncApp.cs** and **AsyncApp.Designer.cs**. - -4. In the newly created project, replace **Form1.cs** with **AsyncApp.cs** and **Form1.Designer.cs** with **AsyncApp.Designer.cs**. - -5. If it doesn’t already exist, add an assembly reference to Microsoft.PointOfService.dll. In a standard install, you can find this file under **Program Files (x86)\\Microsoft Point Of Service\\SDK**. - -6. Compile and run. - -## To run the sample - -1. This sample displays a GUI user interface that allows the user to send asynchronous and synchronous print requests to the [Asynchronous Output Sample](asynchronous-output-sample.md) Service Object. - -2. The Service Object waits for several seconds before returning from a request, whether it is synchronous or asynchronous. - -3. The UI displays the status of each request in the text box. - -## Example - -This sample code demonstrates several key points: - -- Using an **OutputCompleteEvent** event to notify the application that the Service Object has completed an output request. -- Registering event handlers, including using reflection to do so. -- Using to search for specific Service Objects. - -To demonstrate how reflection can be used to discover which events are available on a given object, this code uses the object returned from without first casting it to a **PosPrinter**. In most cases, an application does not need to be generic in that way and so would cast the object as appropriate. - -```csharp -// ASYNCAPP.CS -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Threading; -using System.Windows.Forms; -using System.Reflection; -using Microsoft.PointOfService; - -namespace AsyncOutputApp -{ - public partial class AsyncApp : Form - { - PosCommon posCommon; - PosExplorer posExplorer; - - public AsyncApp() - { - InitializeComponent(); - - btnPrintAsync.Enabled = true; - btnPrintSync.Enabled = true; - - posExplorer = new PosExplorer(this); - posCommon = null; - - string SOName = "AsyncOutputPrinter"; - - try - { - OpenDevice(SOName); - SetupEvents(); - } - catch - { - MessageBox.Show("The Service Object '" + - SOName + "' failed to load", - "Service Object Error", - MessageBoxButtons.OK, - MessageBoxIcon.Exclamation); - - btnPrintAsync.Enabled = false; - btnPrintSync.Enabled = false; - } - } - - private void OpenDevice(string SOName) - { - string str = txtPrintResults.Text; - DeviceInfo device = null; - - txtPrintResults.Clear(); - - { - // Retrieve the list of PosPrinter Service Objects. - DeviceCollection devices = - posExplorer.GetDevices( - DeviceType.PosPrinter); - - // Iterate through the list looking for the one - // needed for this sample. - foreach(DeviceInfo d in devices) - { - if(d.ServiceObjectName == SOName) - { - device = d; - break; - } - } - - if (device == null) - { - throw new Exception("Service Object not found"); - } - - txtPrintResults.Text = "Opening device: " + - device.ServiceObjectName + ", type: " + - device.Type + "\r\n"; - - posCommon = - (PosCommon)posExplorer.CreateInstance(device); - - posCommon.Open(); - posCommon.Claim(0); - posCommon.DeviceEnabled = true; - } - } - - // When this button is pressed, AsyncMode is turned off, - // and the application waits for each print request - // to complete before regaining control. - private void btnPrintSync_Click(object sender, EventArgs e) - { - PosPrinter posPrinter = posCommon as PosPrinter; - posPrinter.AsyncMode = false; - - txtPrintResults.AppendText( - "Printing will take place " + - "synchronously.\r\n"); - - StartPrinting(); - } - - // When this button is pressed, AsyncMode is turned on. Print - // requests will be queued and delivered on a - // first-in-first-out basis. - private void btnPrintAsync_Click(object sender, EventArgs e) - { - PosPrinter posPrinter = posCommon as PosPrinter; - posPrinter.AsyncMode = true; - - txtPrintResults.AppendText( - "Printing will take place " + - "asynchronously.\r\n"); - - StartPrinting(); - } - - private void StartPrinting() - { - PosPrinter posPrinter = posCommon as PosPrinter; - - txtPrintResults.AppendText( - "Calling PrintNormal to start " + - "printing...\r\n"); - - // Notice that calling PrintNormal() here may not result - // in a print request being sent immediately to the - // printer. In asynchronous mode, the requested is - // placed in a first-in-first-out queue managed by - // POS for .NET. - try - { - posPrinter.PrintNormal( - PrinterStation.Receipt, - "This is do-nothing print data"); - } - catch (PosControlException e) - { - txtPrintResults.AppendText( - "PrintNormal threw a " + - "PosControlException! Description: " + - e.Message + "\r\n"); - - return; - } - - // When data is sent to an output device, POS for .NET - // updates the OutputId property in the target object. - // When an OutputCompleteEvent is sent to the app, - // the OutputCompleteEventArgs will contain this id. - Int32 id = posPrinter.OutputId; - - txtPrintResults.AppendText( - "PrintNormal has returned! OutputID = " + - id + "\r\n"); - } - - // Visual Studio-generated code. - private void AsyncApp_Load(object sender, EventArgs e) - { - } - - #region Event Registration - private void SetupEvents() - { - // All PosCommon objects support StatusUpdateEvent and - // DirectIOEvent events, so simply register a handler - // for those events. - posCommon.StatusUpdateEvent += - new StatusUpdateEventHandler( - co_OnStatusUpdateEvent); - - posCommon.DirectIOEvent += - new DirectIOEventHandler( - co_OnDirectIOEvent); - - // In addition to the events common to all devices - // (StatusUpdateEvent and DirectIOEvent), a device - // type may also support DataEvent, ErrorEvent, or - // OutputCompleteEvent events. - // - // In this example, the following code uses reflection - // to determine which events are supported by this - // object (posCommon). - // - // However, in the general case, an application will know - // what type of device was returned when PosExplorer - // CreateInstance() was called;therefore will not - // need to use reflection, but can instead register - // event handlers using the mechanism used for - // StatusUpdateEvent and DirectIOEvent events above. - EventInfo dataEvent = - posCommon.GetType().GetEvent( - "DataEvent"); - if (dataEvent != null) - { - dataEvent.AddEventHandler(posCommon, - new DataEventHandler( - co_OnDataEvent)); - - txtPrintResults.AppendText("Registering Event: " + - "DataEvent\r\n"); - } - - EventInfo errorEvent = - posCommon.GetType().GetEvent( - "ErrorEvent"); - if (errorEvent != null) - { - errorEvent.AddEventHandler(posCommon, - new DeviceErrorEventHandler( - co_OnErrorEvent)); - - txtPrintResults.AppendText("Registering Event: " + - "ErrorEvent\r\n"); - } - - EventInfo outputCompleteEvent = - posCommon.GetType().GetEvent( - "OutputCompleteEvent"); - if (outputCompleteEvent != null) - { - outputCompleteEvent.AddEventHandler( - posCommon, new OutputCompleteEventHandler( - co_OnOutputCompleteEvent)); - - txtPrintResults.AppendText("Registering Event: " + - "OutputCompleteEvent\r\n"); - } - } - #endregion Event Registration - - #region Event Handlers - private void co_OnDataEvent( - object obj, - DataEventArgs d) - { - txtPrintResults.AppendText(d.ToString() + "\r\n"); - } - - private void co_OnStatusUpdateEvent( - object source, - StatusUpdateEventArgs d) - { - txtPrintResults.AppendText(d.ToString() + "\r\n"); - } - - private void co_OnDirectIOEvent( - object source, - DirectIOEventArgs d) - { - txtPrintResults.AppendText(d.ToString() + "\r\n"); - } - - private void co_OnErrorEvent( - object source, - DeviceErrorEventArgs d) - { - string str = d.ToString(); - - MessageBox.Show(d.ToString(), - "OnErrorEvent called", - MessageBoxButtons.OK, - MessageBoxIcon.Error); - - txtPrintResults.AppendText(d.ToString() + "\r\n"); - } - - private void co_OnOutputCompleteEvent( - object source, - OutputCompleteEventArgs d) - { - txtPrintResults.AppendText(d.ToString() + "\r\n"); - } - #endregion Event Handlers - } -} - -// ASYNCAPP.DESIGNER.CS -namespace AsyncOutputApp -{ - partial class AsyncApp - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.txtPrintResults = new System.Windows.Forms.TextBox(); - this.btnPrintSync = new System.Windows.Forms.Button(); - this.btnPrintAsync = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // txtPrintResults - // - this.txtPrintResults.BackColor = System.Drawing.SystemColors.Window; - this.txtPrintResults.Location = new System.Drawing.Point(12, 119); - this.txtPrintResults.Multiline = true; - this.txtPrintResults.Name = "txtPrintResults"; - this.txtPrintResults.ReadOnly = true; - this.txtPrintResults.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtPrintResults.Size = new System.Drawing.Size(650, 200); - this.txtPrintResults.TabIndex = 3; - // - // btnPrintSync - // - this.btnPrintSync.Location = new System.Drawing.Point(12, 12); - this.btnPrintSync.Name = "btnPrintSync"; - this.btnPrintSync.Size = new System.Drawing.Size(132, 39); - this.btnPrintSync.TabIndex = 1; - this.btnPrintSync.Text = "Print Synchronous"; - this.btnPrintSync.UseVisualStyleBackColor = true; - this.btnPrintSync.Click += new System.EventHandler(this.btnPrintSync_Click); - // - // btnPrintAsync - // - this.btnPrintAsync.Location = new System.Drawing.Point(12, 57); - this.btnPrintAsync.Name = "btnPrintAsync"; - this.btnPrintAsync.Size = new System.Drawing.Size(132, 39); - this.btnPrintAsync.TabIndex = 2; - this.btnPrintAsync.Text = "Print Asynchronously"; - this.btnPrintAsync.UseVisualStyleBackColor = true; - this.btnPrintAsync.Click += new System.EventHandler(this.btnPrintAsync_Click); - // - // AsyncApp - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(685, 331); - this.Controls.Add(this.btnPrintAsync); - this.Controls.Add(this.btnPrintSync); - this.Controls.Add(this.txtPrintResults); - this.Name = "AsyncApp"; - this.Text = "Form1"; - this.Load += new System.EventHandler(this.AsyncApp_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox txtPrintResults; - private System.Windows.Forms.Button btnPrintSync; - private System.Windows.Forms.Button btnPrintAsync; - } -} -``` - -The program should display the following text if you first press the **Print Synchronous** and then the **Print Asynchronous** button. - -Opening device: AsyncOutputPrinter, type: PosPrinterRegistering Event: ErrorEventRegistering Event: OutputCompleteEventPrinting will take place synchronously.Calling PrintNormal to start printing...PrintNormal has returned\! OutputID = 0Printing will take place asynchronously.Calling PrintNormal to start printing...PrintNormal has returned\! OutputID = 1Microsoft.PointOfService.OutputCompleteEventArgs, TimeStamp: 11:35:39 AM, EventId: 1, OutputId: 1. - -## See Also - -#### Tasks - -- [Asynchronous Output Sample](asynchronous-output-sample.md) - -#### Concepts - -- [Event Management](event-management.md) - -#### Other Resources - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) diff --git a/docs/framework/additional-apis/pos-for-net/event-management.md b/docs/framework/additional-apis/pos-for-net/event-management.md deleted file mode 100644 index 630946448a8a4..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/event-management.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Event Management -description: Event Management (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Event Management (POS for .NET v1.14 SDK Documentation) - -Events management represents one of the key aspects of programming applications for Microsoft Point of Service for .NET (POS for .NET). All input in the POS for .NET system is event-driven, and each segment of the [POS for .NET Architecture](pos-for-net-architecture.md) uses events to communicate with the other applications and Service Objects. - -## Event-Driven Processing Model - -Event-driven input begins when an attached POS device receives data input. If that device is enabled (the property is set to **true**), then received data will be queued as a **DataEvent** event and sent to the application. Events are delivered in a first-in, first-out manner by an internal service thread. Just before this event is raised, a Service Object may use the **PreFireEvent** method to update properties before that event is sent off. - -After the event data is received, the device will automatically disable itself (setting the **DeviceEnabled** property to **false**) if the **AutoDisable** property is set to **true**. While disabled, the device cannot queue new input, and the physical device will be disabled, if possible. - -When the application is ready to receive input from the device, it sets the **DataEventEnabled** property to **true**. The application then starts to receive queued **DataEvent** events, even if those **DataEvent** events were queued before **DataEventEnabled** property was set to **true**. - -Additional data events may be disabled by setting the **DataEventEnabled** property or the property to **false**. This causes later input data to be queued while the application processes the current input and associated properties. When the application is ready for more data, it may re-enable events by setting the **DataEventEnabled** property to **true**. - -## Event-Driven Input and Device Sharing - -If the input device is an exclusive-use device, the application must both claim and enable the device before it uses it to read input. - -If the device is shareable, one or more applications must open and enable the device before it uses it to read input. An application must call the **Claim** method to request exclusive access to the device before the Service Object sends data to it by using **DataEvent**. If event-driven input is received but the device remains unclaimed, the input is buffered until an application claims the device and the **DataEventEnabled** property is set to **true**. This behavior promotes orderly sharing of the device between multiple applications, effectively passing the input focus between them. - -## Event-Driven Input and Error Handling - -The device enters an error state if an error is encountered while receiving event-driven input. Then it queues an **ErrorEvent** event (that contains **InputData** or **InputErrorEvent** loci). These events are not delivered until the **DataEventEnabled** property is set to **true** to guarantee orderly application sequencing. Each **ErrorEvent** indicates which one of two possible error loci is responsible: - -- **InputData** –Used if the error occurred while one or more **DataEvent** events are queued. The **ErrorEvent** jumps to the head of the event queue for immediate handling so that the application can immediately respond by clearing input or notifying the user of the error. Then finish processing the buffered input. -- **Input** – Used if an error has occurred and no data is available. If input data is already queued when the error occurs, an **ErrorEvent** with the **InputData** locus is queued and delivered first, then the remaining **DataEvents** in the queue are raised and handled. Finally, an **ErrorEvent** with the **Input** value is sent to indicate that the queue is empty and no data is available. It is significant to notice that if an **ErrorEvent** with the **InputData** value was delivered and the application event handler responded with a **Clear** value, this **InputDataErrorEvent** is not delivered. Typically, this error is entered at the end of the event queue. - -The device may exit the Error state when one of the following occurs: - -- The application returns from the **InputErrorEvent**. - The application returns from the **InputDataErrorEvent** with a **Clear** value for the **ErrorResponse** property. -- The application calls the **ClearInput** method. - -For some devices, the application must call a method to begin event-driven input. After the input is received by the Service Object, then typically no additional input will be received until the method is called again. Examples for devices that use this variation of event-driven input, also known as asynchronous input, include the magnetic ink character recognition (MICR) and Signature Capture devices. The **DataCount** property can be read to obtain the number of **DataEvent** events in the queue. - -All input in the queue can be deleted by calling the **ClearInput** method. **ClearInput** may be called after **Claim** for exclusive-use devices or **Open** for shareable devices. - -The general event-driven input model does not prevent the definition of device classes that contain methods or properties that return input data directly. An example of this variation of event-driven input, also known as synchronous input, is the **Keylock** device. - -## Event Types - -POS for .NET implements Unified Point Of Service (UnifiedPOS) events as standard .NET events with multicast delegates. The events inform an application of various activities or changes with a device, such as when a device is added or removed. The following table lists the event types. - -| Event | Description | -|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| DataEvent | An event raised by the Service Object to notify the application that input data is available. | -| ErrorEvent | An event raised by the Service Object to notify the application that a device error has occurred and that a suitable response by the application is necessary to process the error condition. | -| StatusUpdateEvent | An event raised by the Service Object to alert the application of a device status change. | -| OutputCompleteEvent | An event raised by the Service Object to notify the application that the queued output request has been completed successfully. | -| DirectIOEvent | An event raised by the Service Object to communicate information directly to the application. | - -The Service Object must stack these events on an internally created and managed queue. Events are delivered in a first-in, first-out manner and are delivered by an internal service thread. - -The following conditions cause event delivery to be delayed until the condition is corrected: - -- The application has set the **FreezeEvents** property to **true**. The **FreezeEvents** property allows events to be queued but prevents their delivery until **FreezeEvents** is set to **false**. -- The event is a **DataEvent** or an input **ErrorEvent** but the property **DataEventEnabled** is **false**. - -Rules for event queue management are as follows: - -- The device may only queue new events while the device is enabled. -- The device delivers queued events until the application calls the **Close** method or, for exclusive-use devices, the **Release** method. When these methods are called, any remaining events in the queue are deleted. -- The **ClearInput** method clears **DataEvents** and input **DeviceErrorEvents** (**ErrorLocus** = **Input** or **InputData**). -- The **ClearOutput** method clears output **DeviceErrorEvents** (**ErrorLocus** = **Output**). - -## See Also - -#### Reference - -- -- -- -- - -#### Concepts - -- [Device Output Models](device-output-models.md) -- [POS Exception Handling](pos-exception-handling.md) diff --git a/docs/framework/additional-apis/pos-for-net/exception-classes.md b/docs/framework/additional-apis/pos-for-net/exception-classes.md deleted file mode 100644 index 932d2be4f3383..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/exception-classes.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: Exception Classes -description: Exception Classes (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Exception Classes (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) error handling is implemented through the use of *exceptions*. The four POS for .NET exception classes are as follows: - -- -- -- -- - -Standard Unified Point Of Service (UnifiedPOS) error codes are represented by the enumeration. - -## PosException - -**PosException** is the **Base** exception class for **PosControlException**, **PosManagementException**, and **PosLibraryException**. **PosException** is derived from **System.Exception**. - -## PosControlException - -**PosControlException** is the standard exception thrown by Service Objects to POS for .NET applications. - -## PosManagementException - -**PosManagementException** is thrown by POS for .NET Device Management. Applications and Service Objects must not throw **PosManagementException**. - -## PosLibraryException - -**PosLibraryException** is thrown by . Applications and Service Objects must not throw **PosLibraryException**. - -## Error Codes - -The following table provides a mapping between the UnifiedPOS standard error codes and the **ErrorCode** values that POS for .NET provides. - -| POS ErrorCode Member | UnifiedPOS Error Code | Error Cause | -|----------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------| -| Busy | E_BUSY | The current Service Object state does not allow this request. | -| Claimed | E_CLAIMED | Another Service Object instance has already claimed the POS device. | -| Closed | E_CLOSED | The POS device is closed. | -| Deprecated | E_DEPRECATED | The method has been deprecated and is no longer available. | -| Disabled | E_DISABLED | The operation cannot be performed while the device is disabled. | -| Exists | E_EXISTS | The file name or other specified value already exists. | -| Extended | E_EXTENDED | A device-specific error condition occurred. | -| Failure | E_FAILURE | The POS device cannot perform the requested procedure, even though the device is connected to the system and active. | -| Illegal | E_ILLEGAL | The POS application attempted an illegal or unsupported operation with the device, or used an invalid parameter value. | -| NoExist | E_NOEXIST | The file name or other specified value does not exist. | -| NoHardware | E_NOHARDWARE | The POS device is not connected to the system or is not turned on. | -| NoService | E_NOSERVICE | The Service Object cannot communicate with the device, normally because of a setup or configuration error. | -| NotClaimed | E_NOTCLAIMED | The POS application attempted to access an exclusive-use device that must be claimed before the method or property set action can be used. | -| Offline | E_OFFLINE | The POS device is offline. | -| Timeout | E_TIMEOUT | The Service Object timed out waiting for a response from the POS device. | - -## Example - -The following code example demonstrates how MSR handles POS exceptions and uses the **ErrorCodes** contained in those exceptions to gather information about them. - -```csharp -// Create a new instance of the MSR and opens the device. -msr = (Msr)explorer.CreateInstance(msrinfo); -msr.Open(); - -// Try to enable the device without first claiming it. -// This will throw a PosControlException which, through -// its ErrorCode, will yield information about the exception. -try -{ - msr.DeviceEnabled = true; -} -catch (PosControlException e) -{ - - // Examine the ErrorCode to determine the cause of the error. - if (e.ErrorCode == ErrorCode.NoHardware) - { - Console.WriteLine("The POS device is not connected "); - Console.WriteLine("to the system or is not turned on."); - } - if (e.ErrorCode == ErrorCode.Timeout) - { - Console.WriteLine("The Service Object timed out - waiting for a response from the POS device."); - } - - // The example has not claimed the MSR, which is an - // exclusive-access device, before trying to enable - // it. This will throw the PosControlException - // and trigger the following conditional block. - // Once triggered, the MSR will be claimed and enabled. - if (e.ErrorCode == ErrorCode.NotClaimed) - { - Console.WriteLine("The POS application attempted to access "); - Console.WriteLine("an exclusive-use device that must be "); - Console.WriteLine("claimed before the method or property "); - Console.WriteLine("set action can be used.") - msr.Claim(1000); - msr.DeviceEnabled = true; - } -} -``` - -## See Also - -#### Reference - -- -- -- -- - -#### Concepts - -- [PosExplorer Class](posexplorer-class.md) -- [POS Exception Handling](pos-exception-handling.md) - -#### Other Resources - -- [POS for .NET API Support](pos-for-net-api-support.md) diff --git a/docs/framework/additional-apis/pos-for-net/general-posdm-switches.md b/docs/framework/additional-apis/pos-for-net/general-posdm-switches.md deleted file mode 100644 index 4346c039e33e5..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/general-posdm-switches.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: General POSDM Switches -description: General POSDM Switches (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# General POSDM Switches (POS for .NET v1.14 SDK Documentation) - -The following general switches may be used between POSDM and a command on the command line. - -| Switch | Description | -|--------------------|----------------------------------------------------------------------------------------------------------------------------| -| /? | Displays posdm Help information. | -| /output:file | Prints all output to file instead of to the console. | -| /machine:host | Uses host as the remote computer. Default is the local computer. | -| /user:username | Uses user name as the user account. Prefix with domain separated by a backslash if the user domain is not the current one. | -| /password:password | Uses password with the specified user name account. | - -## See Also - -#### Concepts - -- [POSDM Commands](posdm-commands.md) - -#### Other Resources - -- [Using the POS Device Manager Command-Line Tool](using-the-pos-device-manager-command-line-tool.md) diff --git a/docs/framework/additional-apis/pos-for-net/hydra-devices.md b/docs/framework/additional-apis/pos-for-net/hydra-devices.md deleted file mode 100644 index 45bb08011af49..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/hydra-devices.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Hydra Devices -description: Hydra Devices (POS for .NET v1.14 SDK Documentation) -ms.date: 02/27/2008 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Hydra Devices (POS for .NET v1.14 SDK Documentation) - -Some peripheral POS devices combine UPOS device types. These are referred to as Hydra devices, and their interface to the POS application requires more than one Service Object. - -For example, a magnetic ink character recognition (MICR) device may include a POS printer. In that case, the device is represented by both a MICR Service Object and a POS printer Service Object. Even though they interact with the same peripheral device, both Service Objects must be created and controlled separately. The MICR Service Object manages the MICR check scanning and character recognition function and the POS printer Service Object manages the receipt and validation printers. - -However, both MICR and POS printer Service Objects must work together in a single transaction. Check processing combines check insertion and removal operations in the MICR device with validation printing functions in the POS printer. - -## Considerations - -In the normal case, a Service Object would simply open a connection to the device and perform its read and write operations. With **Hydra** devices, however, the task is more complicated since IO ports are normally exclusive. Therefore, multiple Service Objects accessing the same device must synchronize with each other, typically with some variety of inter-process communication. - -POS for .NET offers no features to help multiple Service Objects synchronize with each other. The Service Object developer must write this code and tailor it to the specific system configuration. - -## See Also - -#### Concepts - -- [Service Object Overview](service-object-overview.md) - -#### Other Resources - -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/index.md b/docs/framework/additional-apis/pos-for-net/index.md deleted file mode 100644 index e8684cc109539..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/index.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: POS for .NET v1.14.1 SDK Documentation -description: POS for .NET v1.14.1 SDK Documentation (POS for .NET v1.14 SDK Documentation) -ms.date: 04/21/2017 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET v1.14.1 SDK Documentation - -Microsoft Point of Service for .NET (POS for .NET) v1.14.1 is a class library that enables POS developers to apply Microsoft .NET technologies in their products. - -POS for .NET v1.14.1 provides the following: - -- A simple and consistent interface for.NET Framework applications to interact with POS devices. -- A set of interfaces and classes created to help vendors write applications for common devices such as Cash Drawers or Line Displays. -- A fully compliant implementation of the Unified Point of Service (UnifiedPOS) v1.14 international standard. -- Support for Windows Plug and Play functionality. - -> [!NOTE] -> POS for .NET does not provide any support for the Windows Runtime (WinRT) API. For more information about POS device support in WinRT, see Windows.Devices.PointOfService namespace on MSDN. - -The following documentation can help you use POS for .NET to develop POS applications and Service Objects (SOs) more efficiently, learn more about the benefits of POS for .NET, and achieve better compatibility with POS devices. - -## In This Section - -- [Copyright Information for POS for .NET v1.14.1](copyright-information-for-pos-for-net-v1141.md) - Provides copyright information about POS for .NET v1.14.1. - -- [POS for .NET FAQ](pos-for-net-faq.md) - Provides answers to frequently asked questions for POS for .NET. - -- [What's New in POS for .NET v1.14 and v1.14.1](whats-new-in-pos-for-net-v114-and-v1141.md) - Describes the features introduced in the 1.14 and 1.14.1 versions of POS for .NET. - -- [POS for .NET v1.14.1 Features](pos-for-net-v1141-features.md) - Provides an in-depth view at POS for .NET, its architecture, and features in the following topics: - -- [POS for .NET Architecture](pos-for-net-architecture.md) -- [Service Object Overview](service-object-overview.md) -- [Supported Device Classes](supported-device-classes.md) -- [Event Management](event-management.md) -- [POS Exception Handling](pos-exception-handling.md) -- [POS for .NET Integration with Plug and Play](pos-for-net-integration-with-plug-and-play.md) -- [Log Files](log-files.md) -- [Integration of Legacy Service Objects](integration-of-legacy-service-objects.md) - -- [Developing a POS Application](developing-a-pos-application.md) - Describes the POS for .NET predefined interfaces and classes, how best to use them in your code, and demonstrates suitable procedures for developing POS for .NET code in the following topics: - -- [Typical POS Application Architecture](typical-pos-application-architecture.md) -- [POS for .NET API Support](pos-for-net-api-support.md) -- [Event Handler Sample](event-handler-sample.md) - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) - Discusses the procedures, issues, and conventions for developing custom service objects in the following topics: - -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) -- [System Configuration](system-configuration.md) -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) -- [Device Input and Events](device-input-and-events.md) -- [Device Output Models](device-output-models.md) -- [Asynchronous Output Sample](asynchronous-output-sample.md) -- [Statistics Sample](statistics-sample.md) -- [Base Class DirectIO Method](base-class-directio-method.md) -- [Capability Properties](capability-properties.md) - -- [Manually manage your POS for .NET devices](manually-manage-your-pos-for-net-devices.md) - Describes how to manually manage your POS for .NET devices by modifying the POS for .NET configuration xml file. - -- [POS Device Manager](pos-device-manager.md) - Describes how POS for .NET helps you manage your POS devices in the following topics: - -- [Configure a device for remote management](configure-a-device-for-remote-management.md) -- [Using the WMI API to Manage Devices](using-the-wmi-api-to-manage-devices.md) -- [Using Visual Studio .NET Management Extensions and the POS for .NET WMI Management Classes](using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md) -- [Using the POS Device Manager Command-Line Tool](using-the-pos-device-manager-command-line-tool.md) - -## See Also - -- [POS for .NET API Reference](/dotnet/api/?view=point-of-service-1.14&preserve-view=true) - -#### Reference - -- diff --git a/docs/framework/additional-apis/pos-for-net/integration-of-legacy-service-objects.md b/docs/framework/additional-apis/pos-for-net/integration-of-legacy-service-objects.md deleted file mode 100644 index b7ffca1253ac6..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/integration-of-legacy-service-objects.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Integration of Legacy Service Objects -description: Integration of Legacy Service Objects (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Integration of Legacy Service Objects (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) supports both .NET-based Service Objects and legacy OLE for Retail POS (OPOS), COM-based Service Objects. POS for .NET provides applications with the same interface to both generations of Service Objects. - -## See Also - -#### Concepts - -- [POS for .NET FAQ](pos-for-net-faq.md) -- [What's New in POS for .NET v1.14](whats-new-in-pos-for-net-v114-and-v1141.md) - -#### Other Resources - -- [POS for .NET v1.14 Features](pos-for-net-v1141-features.md) diff --git a/docs/framework/additional-apis/pos-for-net/introducing-service-object-reader-threads.md b/docs/framework/additional-apis/pos-for-net/introducing-service-object-reader-threads.md deleted file mode 100644 index d06389ea031ed..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/introducing-service-object-reader-threads.md +++ /dev/null @@ -1,283 +0,0 @@ ---- -title: Introducing Service Object Reader Threads -description: Introducing Service Object Reader Threads (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Introducing Service Object Reader Threads (POS for .NET v1.14 SDK Documentation) - -Most Service Objects need to be able to respond to hardware events asynchronously by starting a separate hardware reader thread. Service Objects are the link between the Point of Service application and the hardware. Therefore, Service Objects must read data from the associated hardware while still being available to the application. - -This section demonstrates one way to implement the code necessary for multithreaded Service Objects. - -## Requirements - -To compile this code, the application must include a reference to the **System.Threading** namespace. - -The sample below implements a threading helper class which may be used by Service Object implementations, but does not compile or run on its own. - -## Demonstrates - -This sample demonstrates how Service Objects may use threading to support monitoring hardware events asynchronously. The sample code implements a thread helper class which can be used to add basic threading support to a Service Object. - -To use the thread helper class provided in this section, you will need to create a class derived from **ServiceObjectThreadHelper**, which is included in the code below, and implement the following methods: - -- **ServiceObjectThreadOpen** - This method is called from the **OpenThread** method of the thread helper class after initialization has been completed. Implement any hardware-specific initialization code here. This method is virtual. The default implementation simply returns. - -- **ServiceObjectThreadClose** - This method is called when the thread helper object is terminating its thread or when calling the **Dispose** method and should be used to release any unmanaged handles or other resources related to the device. This method is virtual. The default implementation simply returns. - -- **ServiceObjectProcedure** - This method will be invoked once all initialization has taken place and the thread has been started successfully. This method is abstract and must be implemented in the class derived from the thread helper class. - The **ServiceObjectProcedure** method takes a single argument, a **ManualEvent** handle. Your thread procedure must exit when this handle is set. This is done by calling **ManualEvent.WaitOne** within a **while** loop. For example: - - ``` - - while (true) - { - // Wait for a hardware event or the thread stop event. - - // Test to see if the thread terminated event is set and - // exit the thread if so. - if (ThreadStopEvent.WaitOne(0, false)) - { - break; - } - - // The thread is not terminating, so it must be a - // a hardware event. - } - ``` - -## Example - -```csharp -using System; -using System.Threading; -using Microsoft.PointOfService; - -namespace Samples.ServiceObjects.Advanced -{ - // The following code implements a thread helper class. - // This class may be used by other Point Of Service - // samples which may require a separate thread for monitoring - // hardware. - public abstract class ServiceObjectThreadHelper : IDisposable - { - // The thread object which will wait for data from the POS - // device. - private Thread ReadThread; - - // These events signal that the thread is starting or stopping. - private AutoResetEvent ThreadTerminating; - private AutoResetEvent ThreadStarted; - - // Keeps track of whether or not a thread should - // be running. - bool ThreadWasStarted; - - public ServiceObjectThreadHelper() - { - // Create events to signal the reader thread. - ThreadTerminating = new AutoResetEvent(false); - ThreadStarted = new AutoResetEvent(false); - - ThreadWasStarted = false; - - // You need to handle the ApplicationExit event so - // that you can properly clean up the thread. - System.Windows.Forms.Application.ApplicationExit += - new EventHandler(Application_ApplicationExit); - } - - ~ServiceObjectThreadHelper() - { - Dispose(true); - } - - public virtual void ServiceObjectThreadOpen() - { - return; - } - - public virtual void ServiceObjectThreadClose() - { - return; - } - - // This is called when the thread starts successfully and - // will be run on the new thread. - public abstract void ServiceObjectThreadProcedure( - AutoResetEvent ThreadStopEvent); - - private bool IsDisposed = false; - protected virtual void Dispose(bool disposing) - { - if (!IsDisposed) - { - try - { - if (disposing == true) - { - CloseThread(); - } - } - finally - { - IsDisposed = true; - } - } - } - - public void Dispose() - { - Dispose(true); - - // This object has been disposed of, so no need for - // the GC to call the finalization code again. - GC.SuppressFinalize(this); - } - - public void OpenThread() - { - try - { - // Check to see if this object is still valid. - if (IsDisposed) - { - // Throw system exception to indicate that - // the object has already been disposed. - throw new ObjectDisposedException( - "ServiceObjectSampleThread"); - } - - // In case the application has called OpenThread - // before calling CloseThread, stop any previously - // started thread. - SignalThreadClose(); - - ServiceObjectThreadOpen(); - - // Reset event used to signal the thread to quit. - ThreadTerminating.Reset(); - - // Reset the event that used by the thread to signal - // that it has started. - ThreadStarted.Reset(); - - // Create the thread object and give it a name. The - // method used here, ThreadMethod, is a wrapper around - // the actual thread procedure, which will be run in - // the threading object provided by the Service - // Object. - ReadThread = new Thread( - new ThreadStart(ThreadMethod)); - - // Set the thread background mode. - ReadThread.IsBackground = false; - - // Finally, attempt to start the thread. - ReadThread.Start(); - - // Wait for the thread to start, or until the time-out - // is reached. - if (!ThreadStarted.WaitOne(3000, false)) - { - // If the time-out was reached before the event - // was set, then throw an exception. - throw new PosControlException( - "Unable to open the device for reading", - ErrorCode.Failure); - } - - // The thread has started succesfully. - ThreadWasStarted = true; - } - catch (Exception e) - { - // If an error occurred, be sure the new thread is - // stopped. - CloseThread(); - - // Re-throw to let the application handle the - // failure. - throw; - } - } - - private void SignalThreadClose() - { - if(ThreadTerminating != null && ThreadWasStarted) - { - // Tell the thread to terminate. - ThreadTerminating.Set(); - - // Give the thread a few seconds to end. - ThreadStarted.WaitOne(10000, false); - - // Mark the thread as being terminated. - ThreadWasStarted = false; - } - } - - public void CloseThread() - { - // Signal the thread that it should stop. - SignalThreadClose(); - - // Call back into the SO for any cleanup. - ServiceObjectThreadClose(); - } - - private void Application_ApplicationExit( - object sender, - EventArgs e) - { - SignalThreadClose(); - } - - // This is the method run on the new thread. First it signals - // the caller indicating that the thread has started - // correctly. Next, it calls the service object's thread - // method which will loop waiting for data or a signal - // to close. - private void ThreadMethod() - { - try - { - // Set the event to indicate that the thread has - // started successfully. - ThreadStarted.Set(); - - // Call into the thread procedure defined by the - // Service Object. - ServiceObjectThreadProcedure(ThreadTerminating); - - // Signal that the thread procedure is exiting. - ThreadStarted.Set(); - } - catch (Exception e) - { - Logger.Info("ServiceObjectThreadHelper", - "ThreadMethod Exception = " + e.ToString()); - throw; - } - } - } -} -``` - -## See Also - -#### Tasks - -- [Creating a Working, Multithreaded Service Object](creating-a-working-multithreaded-service-object.md) -- [Adding Plug and Play Support](adding-plug-and-play-support.md) - -#### Other Resources - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/linedisplay-capabilities.md b/docs/framework/additional-apis/pos-for-net/linedisplay-capabilities.md deleted file mode 100644 index 89cbc78eb1c9c..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/linedisplay-capabilities.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: LineDisplay Capabilities -description: LineDisplay Capabilities (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# LineDisplay Capabilities (POS for .NET v1.14 SDK Documentation) - -A **LineDisplay** Service Object supports, at a minimum, the ability to display characters on the output device. In addition, the device may also support additional features, which the Service Object exposes to the application by setting capability properties and implementing their corresponding methods and properties. - -For each additional feature, there is a capability property defined in the class. The capability properties may not be queried until the application has called **Open** on the Service Object. Thereafter, the capability properties will indicate which properties and methods may be set and called on the Service Object. - -This section lists the features that a **LineDisplay** Service Object may support. For each feature, there is a capability attribute that must be set by the Service Object as well a set of properties or methods which will be used by the application to access these features. In some cases, the feature is fully supported in **LineDisplayBase** and requires no additional code in the Service Object class. - -The capability properties are implemented as read-only in order to prevent the application from changing their values. This means, too, that they cannot be set directly by the Service Object. Instead, **LineDisplayBase** has a protected property, **Properties**, which returns a object. This class provides public equivalents for all capability properties. For example, in order to advertise that it supports blinking, a Service Object would write: - -`Properties.CapBlink = true;` - -And not: - -`CapBlink = true;` - -## Marquee-like Scrolling of the Window - -The Service Object may support either horizontal or vertical marquees. If horizontal scrolling is supported, the Service Object sets **Properties.CapHMarquee** to **true**. Likewise, if vertical scrolling is supported, **Properties.CapVMarquee** is set to **true**. - -Thereafter, applications and Service Objects may use the following to set or get the marquee type: - -`DisplayMarqueeType MaqueeType {get, set; }` - -## Inter-Character Wait - -A line display device may have the ability to wait for a specified period of time before displaying each character to create a teletype effect. If this feature is supported, the **Properties.CapICharWait** property is set to **true**. - -Thereafter, applications and Service Objects may use the following to set or get the inter-character wait time: - -`int InterCharacterWait { get; set; }` - -## Blinking Text - -A line display device may support character-level or device-level blinking at adjustable blink rates. If this feature is supported, the Service Object should set the **Properties.CapBlink** property to one of the following **Properties.DisplayBlink** enumeration values. - -| DisplayBlink Value | Corresponding UnifiedPOS Value | Description | -|--------------------|--------------------------------|-------------------------------------------------------------| -| None | DISP_CR_NOBLINK | The device does not support blinking. | -| All | DISP_CR_BLINKALL | The device supports blinking for the entire display. | -| Each | DISP_CR_BLINKEACH | The device supports blinking for each individual character. | - -Thereafter, applications and Service Objects may use the following to set or get the blink rate: - -`int BlinkRate {get; set; }` - -## Reverse Video - -A line display may support character-level or device-level reverse video. If this feature is supported, the Service Object should set the **Properties.CapReverse** to a value in the enumeration. - -| DisplayReverse Value | Corresponding UnifiedPOS Value | Description | -|----------------------|--------------------------------|-------------------------------------------------------------------------------------------------| -| None | DISP-CR_NONE | Reverse video is not supported. | -| All | DISP_CR_REVERSEALL | The entire contents of the display are either displayed in reserve video or displayed normally. | -| Each | DIS_CR_REVERSEEACH | Each character may be individually set to reverse video or normal. | - -The **CapReverse** property is used by the **DisplayText** method. - -## Device Descriptors - -Descriptors are small indicators with a fixed label, and are typically used to indicate transaction states such as item, total, and change. The Service Object should set **Properties.CapDescriptors** to **true** if descriptors are supported. - -Thereafter, applications and Service Objects may use the following to set, get, or clear the Descriptors: - -- `int DeviceDescriptors {get; set; }` -- `void ClearDescriptors();` -- `void SetDescriptor(int descriptor, DisplaySetDescriptor attribute);` - -## Brightness Control - -All **LineDisplay** Service Objects support two brightness levels, normal and blank, even if not supported by the physical device. If the device supports additional brightness levels, then **Properties.CapBrightness** should be set to **true**. - -Thereafter, applications and Service Objects may use the following to set or get the device brightness: - -`int DeviceBrightness {get; set; }` - -## Cursor Attributes - -A line display device may support a variety of different cursor types. The **Properties.CapCursorType** property defines which of these types are supported. The **CapCursorType** property is set using the enumeration and holds a bitwise indication of the supported cursor types, which can be any of the following types shown in the table. - -| CapCursorType enum | UnifiedPOS Value | Description | -|--------------------|--------------------|-------------------------------------------------| -| Blink | DISP_CCT_BLINK | A blinking cursor is supported. | -| Block | DISP_CCT_BLOCK | Cursor is displayable as a block. | -| Fixed | DISP_CCT_FIXED | Cursor is always displayed. | -| HalfBlock | DISP_CCT_HALFBLOCK | Cursor is displayable as a half block. | -| None | DISP_CCT_NONE | Cursor is not displayable. | -| Other | DISP_CCT_OTHER | Cursor is displayable, but the form is unknown. | -| Reverse | DISP_CCT_REVERSE | Cursor is displayable in reverse video. | -| Underline | DISP_CCT_UNDERLINE | Cursor is displayable as an underline. | - -Thereafter, applications and Service Objects may use the following to set or get the cursor type: - -**DisplayCursors**`CursorType { get; set; }` - -## Glyphs - -Glyphs are a pixel-level user definition of character cells. If glyphs are supported by the device, then **Properties.CapCustomGlyph** should be set to **true**. - -Thereafter, applications and Service Objects may use the following to set or get the glyph list and settings: - -- `[] CustomGlyphList { get; set; }` -- `int GlyphHeight { get; }` -- `int GlyphWidth { get; }` -- `void DefineGlyph(int glyphCode, byte[] glyph);` - -## Screen Modes - -A device may support changing the screen mode; that is, the number of rows and columns displayed. If this feature is supported by the device, the Service Object should set **Properties.CapScreenMode** to **true**. - -Thereafter, the application and Service Object may use the following to set or get the screen mode: - -- `int ScreenMode { get; set; }` -- `[] ScreenModeList { get; }` - -## Bitmaps - -The Service Object should set the **Properties.CapBitmap** property to **true** if the device supports displaying bitmaps. - -The Service Object may want to override the following methods if this capability is supported: - -- `void DisplayBitmap(string fileName, int alignmentX, int alignmentY);` -- `void DisplayBitmap(string fileName, int width, int alignmentX, int alignmentY);` - -## Character Sets - -A Service Object should set the **Properties.CapCharacterSet** property with the default character set capability of the line display device. This property can be set to a member of the enumeration as shown in the following table. - -| CharacterSetCapability Value | UnifiedPOS Value | Description | -|------------------------------|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Alpha | PTR_CCS_ALPHA | The default character set supports uppercase alphabetic plus numeric, space, minus, and period. | -| ANSI | N/A | This value is not used for LineDisplay devices. | -| ASCII | PTR_CCS_ASCII | The default character set supports 0x20 through 0x75. | -| Kana | PTR_CCS_KANA | The default character set supports partial code page 932, including ASCII characters 0x20 through 0x7F and the Japanese Kana characters 0xA1 through 0xDF, but excluding the Japanese Kanji characters. | -| Kanji | DISP_CCS_KANJI | The default character set supports code page 932 including the Shift-JIS Kanji characters, Levels 1 and 2. | -| Numeric | N/A | This value is not used for LineDisplay devices. | -| Unicode | DISP_CCS_UNICODE | The default character set supports UNICODE. | -| Windows | N/A | This value is not used for LineDisplay devices. | - -Thereafter, applications and Service Objects may use the following to set or get the character set: - -`int CharacterSet { get; set; }` - -## See Also - -#### Tasks - -- [LineDisplay Sample](linedisplay-sample.md) - -#### Other Resources - -- [LineDisplay Implementation](linedisplay-implementation.md) diff --git a/docs/framework/additional-apis/pos-for-net/linedisplay-implementation.md b/docs/framework/additional-apis/pos-for-net/linedisplay-implementation.md deleted file mode 100644 index 412d4eecb2ac9..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/linedisplay-implementation.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: LineDisplay Implementation -description: LineDisplay Implementation (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# LineDisplay Implementation (POS for .NET v1.14 SDK Documentation) - -A **LineDisplay** Service Object is used to display text, bitmaps, and glyphs to a **LineDisplay** Point of Service device. This section provides information needed to implement **LineDisplay** Service Objects derived from the class. - -## In This Section - -- [LineDisplay Capabilities](linedisplay-capabilities.md) - Lists the capability attributes and their related methods. - -- [LineDisplay Sample](linedisplay-sample.md) - Contains a sample framework for a **LineDisplay** Service Object. - -## Reference - -[Service Object Samples: Getting Started](service-object-samples-getting-started.md) - - diff --git a/docs/framework/additional-apis/pos-for-net/linedisplay-sample.md b/docs/framework/additional-apis/pos-for-net/linedisplay-sample.md deleted file mode 100644 index 869e743070fc1..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/linedisplay-sample.md +++ /dev/null @@ -1,171 +0,0 @@ ---- -title: LineDisplay Sample -description: LineDisplay Sample (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# LineDisplay Sample (POS for .NET v1.14 SDK Documentation) - -The class is a relatively thin abstraction layer when compared to other Service Object **Base** classes—there is little code needed between the application and the physical device. The Service Object simply needs to advertise which features the physical device supports and modify its output according to the display properties the application has set. - -A **LineDisplay** Service Object may also monitor the device and report power or other status changes back to the application using a **StatusUpdateEvent**. This can be done by using the **Queue** methods or, for example, by using the power reporting features in **PosCommon**. Monitoring the device this way will generally require starting a new thread to wait for hardware events and queue the appropriate **StatusUpdateEvent**. A **LineDisplay** Service Object may also send **DirectIOEvents** to the application. - -## To implement the LineDisplay class and attributes - -1. Add **using** directives for the **Microsoft.PointOfService** and **Microsoft.PointOfService.BaseServiceObject** namespaces. - -2. Add the global attribute so that **PosExplorer** recognizes this as a Microsoft Point of Service for .NET (POS for .NET) assembly. - -3. Create a new class which is derived from **LineDisplayBase**. - -4. Add the class-level attribute to your new class so that **PosExplorer** recognizes it as a Service Object. - -## To implement abstract LineDisplayBase members - -1. All **LineDisplay** Service Objects must support at least one screen mode. To provide the application with specifics about the supported screen modes, implement the abstract property . - -2. At a minimum, all **LineDisplay** Service Objects must implement to display characters on the output device. - -## Additional Capabilities - -Set capability properties in your Service Object to advertise support for the features of your device. This sample demonstrates how to implement the **LineDisplay** blink feature. - -## To implement the blink feature - -1. In the constructor, set the property to either **DisplayBlink.All** or **DisplayBlink.Each** to indicate which blinking mode this Service Object supports. - -2. Set the **CapBlink** property to **true**indicating that the blink rate may be set by the application by calling . - -3. Take these and other settings into account when implementing **DisplayData**. - -## Example - -```csharp -using System; -using System.Collections.Generic; -using System.Text; - -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; - -[assembly: PosAssembly("Service Object Contractors, Inc.")] - -namespace SOSample.LineDisplay -{ - [ServiceObject( - DeviceType.LineDisplay, - "SampleLineDisplay", - "Sample LineDiplay Service Object", - 1, - 9)] - - public class SampleLineDisplay : LineDisplayBase - { - SampleLineDisplay() - { - // The CapBlink property is initially set to - // DisplayBlink.None in LineDisplayBase. This property - // will be set here to indicate what mode of blinking - // text our Service Object can support. - Properties.CapBlink = DisplayBlink.All; - - // Set the CapBlinkRate property to true to indicate - // that this device has the ability to change the - // rate at which it blinks by setting the property - // BlinkRate. - Properties.CapBlinkRate = true; - } - - #region Implement Abstract LineDisplayBase Members - // LineDisplayScreenMode must be implemented to - // allow the application to find out which screen modes - // are supported by this device. - protected override LineDisplayScreenMode[] - LineDisplayScreenModes - { - get - { - LineDisplayScreenMode[] SupportedModes; - - // Create a LineDisplayScreenMode object; this SO - // has a screen mode 10 columns wide and 2 rows deep. - LineDisplayScreenMode mode = - new LineDisplayScreenMode(10, 2, 0, 0); - - // Allocate space for our screen mode array and - // initialize it to hold our supported screen - // mode(s). - SupportedModes = - new LineDisplayScreenMode[] { mode }; - - return SupportedModes; - } - } - - // DisplayData is the method called from the application - // specifying what data should be displayed on the - // device. - protected override void DisplayData(Cell[] cells) - { - // Your code here: - // Send the data to your device. Take settings such - // as blink and blink rate into account here. - return; - } - #endregion Implement Abstract LineDisplayBase Members - - #region Implement Abstract PosCommon Members - private string MyHealthText = ""; - - // PosCommon.CheckHealthText. - public override string CheckHealthText - { - get - { - // VerifyState(mustBeClaimed, - // mustBeEnabled). - VerifyState(false, false); - return MyHealthText; - } - } - - // PosCommon.CheckHealth. - public override string CheckHealth( - HealthCheckLevel level) - { - // Verify that the device is open, claimed and enabled. - VerifyState(true, true); - - // Your code here: - // check the health of the device and return a - // descriptive string. - - // Cache result in the CheckHealthText property. - MyHealthText = "Ok"; - return MyHealthText; - } - - // PosCommon.DirectIOData. - public override DirectIOData DirectIO( - int command, - int data, - object obj) - { - // Verify that the device is open. - VerifyState(false, false); - - return new DirectIOData(data, obj); - } - #endregion Abstract PosCommon Members - } -} -``` - -## See Also - -#### Other Resources - -- [LineDisplay Implementation](linedisplay-implementation.md) -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) diff --git a/docs/framework/additional-apis/pos-for-net/log-files.md b/docs/framework/additional-apis/pos-for-net/log-files.md deleted file mode 100644 index fc36f7b099f5b..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/log-files.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Log Files -description: Log Files (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Log Files (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) includes a logging feature for recording POS for .NET, Service Objects, and application events. Logging parameters are read from the POS for .NET registry key, **\\HKLM\\SOFTWARE\\POSfor.NET\\Logging**, and entries are written using the class. - -## Enabling Logging - -Logging is enabled when the registry key **\\HKLM\\SOFTWARE\\POSfor.NET\\Logging\\Enabled** is set to any non-zero value. - -## Log File Size - -The maximum log file size is specified in the registry key **\\HKLM\\SOFTWARE\\POSfor.NET\\Logging\\MaxLogFileSizeMB**. If this file size is exceeded while logging is enabled, logging will stop. There will be no exception or error returned to the application. - -By default, the maximum log file size is 10 megabyte (MB). - -## Log File Location - -The registry key **\\HKLM\\SOFTWARE\\POSfor.NET\\Logging\\location** is used to determine where log files will be written. - -By default, this location is set to the environment variable **%TEMP%** which, in Windows, defaults to the directory **C:\\Documents and Settings\\(username)\\Local Settings\\temp**. This is a per-user directory. - -## Log File Names - -Log file names are composed of three elements: - -- The base file name contained in the registry key **\\HKLM\\SOFTWARE\\POSfor.NET\\Logging\\Name**. The default for this value is **PosFor.Net**. -- A timestamp in this format: **(yyyy-mm-dd hh-mm-ssZ)** -- The file extension **.txt**. - -This is an example of a typical log file name: - -**PosFor.Net(2006-08-10 18-33-29Z).txt** - -## Log File Header - -A header containing information such as the user, OS, calling thread, and process is written to each log file when it is created. This header includes the following fields: - -- **Current user:** The name of the current user. -- **Computer name:** The name of the computer creating the log. -- **OS version:** The version of Windows that is being run, including service packs. -- **.Net runtime:** The version of the .NET runtime. -- **Process Id:** The PID of the process that created the log file. -- **Thread Id:** The thread that created the log. -- **Max log file size:** The maximum file size to be used for this log file. -- **File:** The name of the executable that created the log file. -- **InternalName:** The internal name of the executable. -- **OriginalFilename:** The original name of the executable. -- **FileVersion:** The version information stored in the executable. -- **FileDescription:** The description stored in the executable. -- **Product:** The product description stored in the executable. -- **ProductVersion:** The file version stored in the executable. -- **Debug:** Debug flag. -- **Patched:** Patched file. -- **PreRelease:** Pre-release flag. -- **PrivateBuild:** Private build flag. -- **SpecialBuild:** Special build flag. -- **Language:** The language used to create the log file. - -## Log File Entries - -Log entries can be created by POS for .NET or by either the application or the Service Object. Entries are created by calling the appropriate method on an instance of the **Logger** class. - -Each entry contains the following fields: - -- Timestamp. - -- Thread ID that created the entry. - -- Importance level. Each log entry is marked with its level of importance which is determined by which **Logger** method is involved. - - | Importance Tag in Log Entries | Corresponding Logger Method | - |-------------------------------|-----------------------------| - | INFO | Logger.Info | - | WARNING | Logger.Warning | - | ERROR | Logger.Error | - -- Name string specified by the code that called the **Logger** method. This string is specified when the **Logger** method is invoked and may not necessarily contain the name of the executable. - -- For example, a typical entry in the log file would look like this: - **\[8/10/2006 6:12:14 PM 2936 INFO PosExplorer\] Entering LoadExplorer()** - -### Comments - -If there is a log file open, and the application calls the method, the file is closed and a new one created with the updated time stamp. - -## See Also - -#### Reference - -- - -#### Concepts - -- [POS for .NET Registry Settings](pos-for-net-registry-settings.md) -- [Plug and Play Support](plug-and-play-support.md) - -#### Other Resources - -- [System Configuration](system-configuration.md) diff --git a/docs/framework/additional-apis/pos-for-net/logicaldevice-class.md b/docs/framework/additional-apis/pos-for-net/logicaldevice-class.md deleted file mode 100644 index bf685a65171fb..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/logicaldevice-class.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: LogicalDevice Class -description: LogicalDevice Class (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# LogicalDevice Class (POS for .NET v1.14 SDK Documentation) - -The **LogicalDevice** class represents a logical device associated with a **PosDevice**. It provides a naming mechanism so that applications can be developed independently and refers to the same device without conflict. - -## Properties - -| Name | Description | -|--------|---------------------------------------------------------------------------------| -| Type | String representing the POS device category that the logical device belongs to. | -| SoName | String representing the name of the Service Object. | -| Path | String representing the path of the physical device. | -| Name | String representing the name for the logical device. | - -## See Also - -#### Tasks - -- [Using VBScript to Manage Devices](using-vbscript-to-manage-devices.md) - -#### Other Resources - -- [Using the WMI API to Manage Devices](using-the-wmi-api-to-manage-devices.md) diff --git a/docs/framework/additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md b/docs/framework/additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md deleted file mode 100644 index 339e4f8d1f331..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md +++ /dev/null @@ -1,219 +0,0 @@ ---- -title: Manually manage your POS for .NET devices (POS for .NET v1.14 SDK Documentation) -description: Manually manage your POS for .NET devices (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Manually manage your POS for .NET devices (POS for .NET v1.14 SDK Documentation) - -You can manually perform most Microsoft Point of Service for .NET (POS for .NET) device management tasks without using the POS device manager (posdm.exe). - -## Manually managing POS for .NET devices - -You can manually edit the POS for .NET configuration XML file to replicate most of the functionality available with posdm.exe. - -You can find the location of the POS for .NET configuration XML file in the **Configuration** value under the registry key **HKEY\_LOCAL\_MACHINE\\SOFTWARE\\Wow6432Node\\POSfor.NET**. - -The default location for the configuration file is *%ProgramData%\\*Microsoft\\Point Of Service\\Configuration\\Configuration.xml - -The following table lists posdm.exe commands and the equivalent XML that you must add to the configuration xml file. - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Posdm.exe command

Description

Configuration.xml

Example

ADDDEVICE

Add a physical non-Plug and Play device.

<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
-    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no">
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

Posdm.exe command:

-

Posdm ADDDEVICE COM1 /SONAME:"Microsoft Msr Simulator" /Type:msr

-

Configuration.xml:

-
<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
-    <Device HardwarePath="COM1" Enabled="yes" PnP="no">
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

ADDNAME

Add a name to a device's list of names.

<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
-    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no">
-      <LogicalName Name="[Device Name]" />
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

Posdm.exe command:

-

Posdm ADDNAME MyName /SONAME:"Microsoft Msr Simulator" /Path:COM1

-

Configuration.xml:

-
<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
-    <Device HardwarePath="COM1" Enabled="yes" PnP="no">
-     <LogicalName Name="MyName" />
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

ADDPROPERTY

Add a property to a device.

<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
-    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no">
-      <Property Name="[Property Name]" Value="[Property Value]" />
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

Posdm.exe command:

-

Posdm addproperty MyProperty MyValue /Name:MyName

-

Configuration.xml:

-
<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
-    <Device HardwarePath="COM1" Enabled="yes" PnP="no">
-     <LogicalName Name="MyName" />
-     <Property Name="MyProperty" Value="MyValue" />
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

DELETEDEVICE

Delete a physical non-Plug and Play device.

Remove the <Device> node.

DELETENAME

Delete a name from a device's list of names

Remove the <LogicalName> node.

DELETEPROPERTY

Delete a property from a device.

Remove the <Property> node.

DISABLE

Disable an SO on a POS device.

Set Enabled="no" and Default="no" on the <Device> node.

-
<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
-    <Device HardwarePath="[Hardware Path]" Enabled="no" PnP="no" Default="no">
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

Posdm.exe command:

-

Posdm disable /Path:COM1

-

Configuration.xml:

-
<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
-    <Device HardwarePath="COM1" Enabled="no" PnP="no" Default="no">
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

ENABLE

Enable an SO on a POS device.

Set Enabled="yes" on the <Device> node.

INFO

Displays the device properties.

N/A

LISTDEVICES

List the POS devices on the target <host>.

N/A

LISTNAMES

List the names associated with POS devices.

N/A

LISTPROPS

List the properties associated with a device.

N/A

LISTSOS

List the POS service objects on the target <host>.

The service object search paths are all of the values under the registry key:

-

HKLM\Software\Wow6432Node\Posfor.NET\ControlAssemblies

-

The default search path is:

-

%CommonProgramFiles(x86)%\Microsoft Shared\Point Of Service\Control Assemblies\

-

POS for .NET will attempt to load all service object DLL's found in these paths.

SETDEFAULT

Set one device as the default of its <type>.

Set Default="yes" on the <Device> node.

-
<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
-    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no" Default="yes">
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

Posdm.exe command:

-

Posdm SETDEFAULT ON /Path:COM1

-

Configuration.xml:

-
<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
-    <Device HardwarePath="COM1" Enabled="yes" PnP="no"  Default="yes">
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

SETPATH

Sets the non-Plug and Play POS device <path>.

<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="[Service Object Name]" Type="[Device Type]">
-    <Device HardwarePath="[Hardware Path]" Enabled="yes" PnP="no">
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>

Posdm.exe command:

-

Posdm SETPATH COM2 /SONAME:"Microsoft Msr Simulator" /Type:msr

-

Configuration.xml:

-
<PointOfServiceConfig Version="1.0">
-  <ServiceObject Name="Microsoft Msr Simulator" Type="Msr">
-    <Device HardwarePath="COM2" Enabled="yes" PnP="no">
-    </Device>
-  </ServiceObject>
-</PointOfServiceConfig>
- diff --git a/docs/framework/additional-apis/pos-for-net/media/pos-architecture.png b/docs/framework/additional-apis/pos-for-net/media/pos-architecture.png deleted file mode 100644 index 3cf24f537b55a5960a7fdbee9f0c0ecedc9ae445..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16664 zcmd_ScT`l*vo8uFf*?5z5)~8yVQ@qci7Giu1{u--A~^?%k|Yd4MY4coP|~2lkR=R3 zavm}a$stP4@b=*M{N6q1y?fU>_nmd#dh7k++D`AT>gww1>grF`Cj5n}92p5C2_7CE znS#8u1|A;%7#`jgF!2?j#pmUs74X1!(U5zNSKPyl1%6z$e5UdY4-XMTdTL4t{J!oe zukV6~N8XJ4hu`LqZ;prev`9hvnU<%~dMY-7b~Gu^+smsbDJ_lvdukHDz>dW+TVjl_ zs=s56oeiNvMYY|S*#XABay<=kS4sXgg8u!>cys(Ri%#k*!NI|VVJr%3xANmsuUKb{ z@N!w_jdT@GF4Y~#O1CD{RcTK$9UO@E&Y4@tPRe_(`mS^v$c(VjQeJ)bKA!-@K^!Q} z77Eua(7N*M{qKjOk1bs}GW8?CJs^_Zg3@{U)#|BbJUpddxzL`9a*xHG!kbi6Fl6Gd z^v>lIBI@1iTk9UhczE$?!xQ|_>XD?5rGlFUcd3eC)yNm^OWSp41db3q^=IIE#~gvG z_gSxkBi!JEpk+|mQJMsj;cfdZP`b@(qKZYqO$ftkJcgApuAv45zIN+jFg!1|36&{G zWq1WdaEo*S^W70q9013EPl(i8{)xhCzXC0EnT6q*8bIMH`}gxzj)5zj8Pt7%!DUuGIg%E*x_v0e1g2 zP6+Z^rRqJ~%gL=a_Ye8#F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framework/additional-apis/pos-for-net/pinpad-capabilities.md deleted file mode 100644 index 550bece1c9c3b..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pinpad-capabilities.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: PinPad Capabilities -description: PinPad Capabilities (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# PinPad Capabilities (POS for .NET v1.14 SDK Documentation) - -A PIN Pad performs encryption functions under control of a PIN Pad Management System. Some **PinPad** Service Objects support multiple PIN Pad Management Systems and some PIN Pad Management Systems support multiple key sets for different Electronic Funds Transfer (EFT) Transaction Hosts. Thus, for each EFT transaction, the application needs to select the PIN Pad Management System and EFT Transaction Host to be used. - -## Programming model - -Depending on the PIN Pad Management System, one or more EFT transaction parameters need to be provided to the PIN Pad for use in the encryption functions. The application should set the value of ALL EFT Transaction parameter properties to enable easier migration to EFT Transaction Hosts that require a different PIN Pad Management System. - -- After opening, claiming, and enabling the PIN Pad Control, an application should use the following general scenario for each EFT Transaction. -- Set the EFT transaction parameters (**AccountNumber**, **Amount**, **MerchantID**, **TerminalID**, **Track1Data**, **Track2Data**, **Track3Data**, **Track4Data**, and **TransactionType** properties) and then call the method. This will initialize the device to perform the encryption functions for the EFT transaction. - -If PIN Entry is **OnFailure**, call the method. Then set the **DataEventEnabled** property and wait for the **DataEvent** event. - -- If Message Authentication Codes are required, use the and methods as needed. -- Call the method to notify the device that all operations for the EFT transaction have been completed. This specification supports two models of usage of the display. The **CapDisplay** property indicates one of the following models: - - An application has complete control of the text that is to be displayed. For this model, there is an associated **LineDisplay** control that is used by the application to interact with the display. - - An application cannot supply the text to be displayed. Instead, it can only select from a list of predefined messages to be displayed. For this model, there is a set of PIN Pad properties that are used to control the display. - -### Device sharing - -The PIN Pad is an exclusive-use device, therefore: - -- The application must claim the device before enabling it. -- The application must claim and enable the device before the device begins reading input, or before calling methods that manipulate the device. - -### Microsoft Point of Service for .NET (POS for .NET) ~Impl methods - -The protected abstract methods that end with the suffix, "Impl" are called from their POS for .NET public counterparts. This allows the **Base** class implementation to perform appropriate status and error checking before and after the **~Impl** method is called. These methods must be implemented in the Service Object code, but the public, nonabstract counterparts should be overridden only in special cases, such as when the Service Object code needs to remove or change the standard validation tests. - -### POS for .NET events - -A **PinPad** Service Object may send the following events to the application: - -- DataEvent -- DirectIOEvent -- StatusUpdateEvent -- ErrorEvent - -## See Also - -#### Other Resources - -- [PinPad Implementation](pinpad-implementation.md) diff --git a/docs/framework/additional-apis/pos-for-net/pinpad-implementation.md b/docs/framework/additional-apis/pos-for-net/pinpad-implementation.md deleted file mode 100644 index 03eae1461c199..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pinpad-implementation.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: PinPad Implementation -description: PinPad Implementation (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# PinPad Implementation (POS for .NET v1.14 SDK Documentation) - -A **PinPad** device provides a mechanism for customers to perform PIN entry and acts as a cryptographic engine for communicating with an EFT Transaction Host. To perform these tasks, a **PinPad** Service Object may implement one or more PIN Pad Management Systems. A **PinPad** Management System defines the manner in which the **PinPad** performs functions such as PIN Encryption, Message Authentication Code calculations, and Key Updating. Examples of **PinPad** management systems include Master-Session, DUKPT, APACS40, HGEP02, AS2805, and JDEBIT2, along with many others. - -A **PinPad** Service Object must have the following minimum capability: - -- Accepts a PIN Entry at its keyboard and provides an Encrypted PIN to the application. - -A **PinPad** Service Object may also have the following additional capabilities: - -- Computes Message Authentication Codes. -- Performs Key Updating in accordance with the selected PIN Pad Management System. -- Allows use of the PIN Pad Keyboard, Display, and Tone Generator for application usage. If one or more of these features are available, then the application opens and uses the associated POS Keyboard, Line Display, or Tone Indicator Device Objects. - -## In This Section - -- [PinPad Capabilities](pinpad-capabilities.md) - Outlines the programming model and capabilities for **PinPad** Service Objects. - -- [PinPad Sample](pinpad-sample.md) - Provides the **PinPad** sample code. - -## Reference - -- - Provides the Microsoft Point of Service for .NET (POS for .NET) reference for the **PinPadBase** class. - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) - Describes the POS for .NET Service Object development. diff --git a/docs/framework/additional-apis/pos-for-net/pinpad-sample.md b/docs/framework/additional-apis/pos-for-net/pinpad-sample.md deleted file mode 100644 index ad9742e0682e2..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pinpad-sample.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: PinPad Sample -description: PinPad Sample (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# PinPad Sample (POS for .NET v1.14 SDK Documentation) - -This sample demonstrates which methods must be implemented in a **PinPad** Service Object. - -## To implement a PinPad Service Object framework - -1. Add **using** directives for **Microsoft.PointofService**, **Microsoft.PointOfService.BaseServiceObjects**. - -2. Add the global attribute **PosAssembly**. - -3. Choose an appropriate namespace name for your project. - -4. Create a Service Object class derived from . - -5. Add the **ServiceObject** attribute to your Service Object class, using the **DeviceType.PinPad** value as your device type. - -## Example - -```csharp -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -using Microsoft.PointOfService.BaseServiceObjects; -using Microsoft.PointOfService; - -[assembly: PosAssembly("Service Object Contractors, Inc")] - -namespace SOSamples.PinPad -{ - [ServiceObject( - DeviceType.PinPad, - "SamplePinPad", - "Sample PinPad Service Object", - 1, - 9)] - public class SamplePinPad : PinPadBase - { - PinPadSystem pinPadSystemSupported = PinPadSystem.Dukpt; - - public SamplePinPad() - { - } - - #region Implement Abstract PinPadBase Members - - // These abstract protected methods are called from their - // public, counterpart methods after error and state - // validation checks are performed. - - protected override void BeginEftTransactionImpl( - PinPadSystem pinpadSystem, - int transactionHost) - { - // If pinpadSystem is not supported by this device, - // throw a PosControlException. - if (pinpadSystem != pinPadSystemSupported) - { - throw new PosControlException( - "PinPadSystem not supported", - ErrorCode.Illegal); - } - - // Your code here. Perform any device-specific - // initialization, such as computing session keys. - } - - protected override string ComputeMacImpl( - string inMsg) - { - // Your code here. Depending on the selected PIN Pad - // Management system, the PinPad Service Object may - // insert additional fields into the message (inMsg). - return inMsg; - } - - protected override void EnablePinEntryImpl() - { - // PinPadBase sets PINEntryEnabled if this method - // succeeds. After that, the Service Object may - // send a DataEvent to the application. - } - - protected override void EndEftTransactionImpl( - EftTransactionCompletion completionCode) - { - // Your code here. Perform any device or Service - // Object cleanup such as computing the next - // transaction keys. - } - - protected override void UpdateKeyImpl( - int keyNumber, - string key) - { - // Your code here. Update the specified key - // on your device. - } - - protected override void VerifyMacImpl( - string message) - { - // Your code here. Verify the MAC value in a message - // received from the EFT Transaction host. - } - #endregion Implement Abstract PinPadBase Members - - #region Implement Abstract PosCommon Members - private string MyHealthText = ""; - - // PosCommon.CheckHealthText. - public override string CheckHealthText - { - get - { - // VerifyState(mustBeClaimed, - // mustBeEnabled). - VerifyState(false, false); - return MyHealthText; - } - } - - // PosCommon.CheckHealth. - public override string CheckHealth( - HealthCheckLevel level) - { - // Verify that the device is open, claimed, and enabled. - VerifyState(true, true); - - // Your code here: - // check the health of the device and return a - // descriptive string. - - // Cache result in the CheckHealthText property. - MyHealthText = "Ok"; - return MyHealthText; - } - - // PosCommon.DirectIOData. - public override DirectIOData DirectIO( - int command, - int data, - object obj) - { - // Verify that the device is open. - VerifyState(false, false); - - return new DirectIOData(data, obj); - } - #endregion Implement Abstract PosCommon Members - } -} -``` - -## See Also - -#### Other Resources - -- [PinPad Implementation](pinpad-implementation.md) diff --git a/docs/framework/additional-apis/pos-for-net/plug-and-play-support.md b/docs/framework/additional-apis/pos-for-net/plug-and-play-support.md deleted file mode 100644 index 50df54d026142..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/plug-and-play-support.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Plug and Play Support -description: Plug and Play Support (POS for .NET v1.14 SDK Documentation) -ms.date: 02/27/2008 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Plug and Play Support (POS for .NET v1.14 SDK Documentation) - -POS for .NET fully supports Windows Embedded Plug and Play technology. To utilize this feature, Service Object developers can simply add one or more attributes to their code, or include the hardware reference in a [Plug and Play XML Configuration](plug-and-play-xml-configuration.md) file. - -Adding this attribute to a Service Object helps application developers, who will now know that when they use to get a list of Service Objects, any Service Object in that list will be associated with a functioning POS device. The application benefits directly from this association by greater reliability and ease of use. We recommend that Service Objects support the Plug and Play feature whenever possible. - -## Plug and Play Behavior - -Once the Service Object has been associated with the POS device's hardware ID, POS for .NET uses the Windows Plug and Play Manager to determine what POS devices are connected to the computer. No additional code is required by the application or Service Object. - -When an application invokes the method **PosExplorer.GetDevices**, **PosExplorer** finds the device that is associated with each Plug and Play Service Object and then queries the Windows Plug and Play Manager to determine the device's status. If the device is not available, it will not be added to the device list that is returned to the application from **PosExplorer.GetDevices**. - -## PosExplorer Service Object Filtering - -**PosExplorer** is able to effectively filter the list of Plug and Play Service Objects when the application calls **PosExplorer.GetDevices**. The filtering process works as follows: - -1. Searches for all assemblies in the specified POS for .NET directories. -2. If the assembly is not marked with the **PosAssembly** global attribute, discards it. -3. Searches for classes marked with the **ServiceObject** attribute. For each such class: - 1. Looks for a hardware ID associated with this class, as either a **HardwareId** attribute or within the [Plug and Play XML Configuration](plug-and-play-xml-configuration.md) file. If there is no hardware ID, leaves the Service Object in the **PosExplorer** list. - 2. If there is a hardware ID, then queries Windows to retrieve the device's status. If the device is attached to the computer, leaves it in the **PosExplorer** list. - 3. If the device is not attached to the computer, removes it from the **PosExplorer** list. - -## Example - -The following code example demonstrates a simple method of handling Plug and Play events. Information generated by **PosExplorer** is used to instantiate the correct device, in this case a Magnetic Stripe Reader (MSR). - -```csharp -// Connect the Plug and Play events to detect the removal or -// connection of a new device. - explorer.DeviceAddedEvent += new - DeviceChangedEventHandler(explorer_DeviceAddedEvent); - explorer.DeviceRemovedEvent += new - DeviceChangedEventHandler(explorer_DeviceRemovedEvent); - -// This event handler extends Plug and Play functionality to the MSR -// device type. A message is printed to the console if the connection -// is successful. -void explorer_DeviceAddedEvent(object sender, DeviceChangedEventArgs e) -{ - - // Checks if the newly added device is an MSR. - if (e.Device.Type == DeviceType.Msr) - { - - // Checks if an MSR instance has already been created and, - // if not,creates one. If a new MSR instance is created, its - // name is recorded in a string and written to the console. - // Once the printing is finished, the MSR is closed. - if (msr == null) - { - CreateMsr(e.Device); - strMsrConfig = e.Device.ServiceObjectName; - Console.WriteLine(strMsrConfig); - // It is important that applications close all open - // Service Objects before terminating. - msr.Close(); - } - } -} -``` - -## See Also - -#### Tasks - -- [Adding Plug and Play Support](adding-plug-and-play-support.md) - -#### Reference - -- -- -- -- - -#### Concepts - -- [Attributes for Identifying Service Objects and Assigning Hardware](attributes-for-identifying-service-objects-and-assigning-hardware.md) -- [POS for .NET Registry Settings](pos-for-net-registry-settings.md) -- [Plug and Play XML Configuration](plug-and-play-xml-configuration.md) - -#### Other Resources - -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/plug-and-play-xml-configuration.md b/docs/framework/additional-apis/pos-for-net/plug-and-play-xml-configuration.md deleted file mode 100644 index 906a93ed3e7e2..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/plug-and-play-xml-configuration.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Plug and Play XML Configuration -description: Plug and Play XML Configuration (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Plug and Play XML Configuration (POS for .NET v1.14 SDK Documentation) - -Although the Plug and Play hardware ID should generally be specified using the property within the Service Object source code, there may be times when Service Object vendors require more flexibility. For example, the hardware ID needs to be changed without redistributing the entire Service Object assembly. - -To support these cases, Microsoft Point of Service for .NET (POS for .NET) specifies hardware associations in an XML file. These XML files are read from the directory that is specified in the registry key **HKEY\_LOCAL\_MACHINE/SOFTWARE/POSfor.NET/ControlConfigs**. When constructing the list of available Service Objects and devices, processes each file in that directory and associates the device where possible. No additional action is required by either the Service Object or the application. - -## Schema - -A Plug and Play configuration file must begin with a top-level node named **PointOfServiceConfig** and have the attribute **Version** to indicate the XML version of the file. - -Following that, there may be any number of **ServiceObject** subnodes. Each service object node must include **Type** and **Name** attributes to indicate the POS device type and name of the Service Object. These two fields will be matched against available Service Objects to determine which, if any, should be associated with devices specified in the subnode **HardwareId**. There is also an optional attribute on the **ServiceObject** node, **Override**. If this attribute is set, then the device associations in the XML file overrides those contained in the assembly. - -The **ServiceObject** node contains subnodes with the name **HardwareId**, which have **From** and **To** attributes. The contents of these attributes are the same as would be found in the **HardwareId** attribute in a Service Object assembly and specify the range of hardware IDs to associate with the Service Object. - -## Example - -The example shows a typical XML Plug and Play configuration file. - -```xml - - - - - -``` - -## Hardeware ID Precedence - -If the **Override** attribute on the **ServiceObject** node is set, then the device association specified in the XML takes precedence, and any **HardwareId** attribute on the Service Object will be discarded. - -If the **Override** attribute is not set, then neither the XML nor the **HardwareId** has precedence. Instead, **PosExplorer** associates the union of all specified devices with the Service Object. - -## See Also - -#### Tasks - -- [Adding Plug and Play Support](adding-plug-and-play-support.md) - -#### Concepts - -- [Plug and Play Support](plug-and-play-support.md) -- [POS for .NET Registry Settings](pos-for-net-registry-settings.md) diff --git a/docs/framework/additional-apis/pos-for-net/point-of-service-performance-counters.md b/docs/framework/additional-apis/pos-for-net/point-of-service-performance-counters.md deleted file mode 100644 index ecb995e0d9d6b..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/point-of-service-performance-counters.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Point of Service Performance Counters -description: Point of Service Performance Counters (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Point of Service Performance Counters (POS for .NET v1.14 SDK Documentation) - -The Point of Service Performance Counters service application helps applications and management tools to monitor device statistics. It is included in the standard Microsoft Point of Service for .NET (POS for .NET) Package Installer. However, it is disabled by default. - -Device statistics are supported by POS for .NET **Basic** classes. They contain the code used by Service Object developers to implement statistics. Device statistic values are periodically saved to an XML file where they can be persisted across sessions. The POS for .NET statistics service uses this XML file to expose the statistics as performance counters that can be monitored by management tools and do not require direct interaction with a Service Object. Even if the Service Object is claimed by another POS application, the counters can still be monitored by other tools. - -The service application creates a counter for any statistic that is represented by a value that may be cast to an integer. - -## To enable Point of Service performance counters - -1. On the taskbar, choose **Start**, choose **Control Panel**, and then double-click **Administrative Tools**. - -2. Choose **Services** to open the **Services** window. - -3. Right-click the **Point of Service Performance Counters** service and choose **Properties**. - -4. In the **Point of Service Performance Counters Properties** window, open the **Startup Type** drop-down menu and select when to enable Point of Service Performance Counters. There are three options: - - - **Disabled**. This is the default option. When Performance Counters are disabled, the service cannot run. - - **Manual**. When Performance Counters are set to **Manual**, the service may be run, but does not automatically do so. - - **Automatic**. When Performance Counters are set to **Automatic**, the service automatically runs every time that your computer starts or restarts. - -5. If you have selected **Manual** or **Automatic** in the **Startup Type** drop-down menu, start the service by choosing **Start the Service**. - -## To monitor Point of Service performance counters - -1. On the taskbar, choose **Start**, choose **Control Panel**, and then choose **Administrative Tools**. - -2. Choose **Performance** to open the **Performance Monitor**. - -3. Right-click the **Performance** window and choose **Add Counters**. - -4. In the **Add Counters** window, open the **Performance Object** drop-down list and select the POS for .NET device class whose statistics you want to display. - -5. Select the counters associated with the device class that you have chosen to monitor. Then choose **Add**. - -6. Choose **Close** to return to the **Performance** window. - -## See Also - -#### Tasks - -- [Statistics Sample](statistics-sample.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-device-manager-output.md b/docs/framework/additional-apis/pos-for-net/pos-device-manager-output.md deleted file mode 100644 index 94274d8bc1104..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-device-manager-output.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: POS Device Manager Output -description: POS Device Manager Output (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS Device Manager Output (POS for .NET v1.14 SDK Documentation) - -The [POS Device Manager](pos-device-manager.md) is used to set up the device configuration for a given system. The output from the **POS Device Manager** is written to an XML file. The name of this file is the value of the registry key **\\HKLM\\SOFTWARE\\POSfor.NET\\Configuration**. - -## Configuration Migration - -You should not modify this file directly. Doing so may lead to unexpected behavior. You can, however, migrate the file from one system to another, making it possible to build a configuration on one system, and propagate that same setup to others. - -## API Support - -You may also access configuration properties with the following methods in : - -- -- -- - -## See Also - -#### Other Resources - -- [POS Device Manager](pos-device-manager.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-device-manager.md b/docs/framework/additional-apis/pos-for-net/pos-device-manager.md deleted file mode 100644 index 89e826ac7a0fc..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-device-manager.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: POS Device Manager -description: POS Device Manager (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS Device Manager (POS for .NET v1.14 SDK Documentation) - -With Microsoft Point of Service for .NET (POS for .NET), you can manage your POS devices in various ways, including: - -- Adding and deleting POS devices from computers (non-Plug and Play devices only). -- Listing POS devices and/or Service Objects for particular computers. -- Configuring a POS for .NET Service Object (SO) to run for a particular device port (non-Plug and Play devices only). -- Setting a default device for a POS device class. -- Preventing a Service Object from running for a device. -- Assigning a logical name by which a POS application can access the Service Object for a device. - -POS devices are managed via a Windows Management Instrumentation (WMI) provider installed on the POS device host as part of the POS for .NET installation. Instructions in this Guide assume that you have already installed POS for .NET. - -You can access this WMI provider through the WMI API or by using the command-line tool included in POS for .NET, POSDM.EXE. - -## In This Section - -- [Configure a device for remote management](configure-a-device-for-remote-management.md) - Describes how you can configure devices to enable remote management. - -- [Using the WMI API to Manage Devices](using-the-wmi-api-to-manage-devices.md) - Describes how to use WMI tools to manage your POS devices. - -- [Using Visual Studio .NET Management Extensions and the POS for .NET WMI Management Classes](using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md) - Describes how to use Microsoft Visual Studio 2013 and the POS for .NET WMI management classes with your POS devices. - -- [Using the POS Device Manager Command-Line Tool](using-the-pos-device-manager-command-line-tool.md) - Demonstrates how to use the POSDM command line to enable remote device management. - -## Related Sections - -- [POS for .NET v1.14 Features](pos-for-net-v1141-features.md) - Provides a high-level overview of the Microsoft Point of Service for .NET (POS for .NET) architecture. - -- [Developing a POS Application](developing-a-pos-application.md) - Outlines POS for .NET key concepts and features that are useful to programmers developing POS applications. - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) - Demonstrates how to create POS for .NET applications which use Service Objects to communicate with hardware devices. diff --git a/docs/framework/additional-apis/pos-for-net/pos-exception-handling.md b/docs/framework/additional-apis/pos-for-net/pos-exception-handling.md deleted file mode 100644 index aa0309acc0189..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-exception-handling.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: POS Exception Handling -description: POS Exception Handling (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS Exception Handling (POS for .NET v1.14 SDK Documentation) - -Error handling in Microsoft Point of Service for .NET (POS for .NET) is built on the object-oriented model of throwing and catching exceptions. Different exceptions are thrown in response to run-time errors, and each exception contains information about the error that triggered it in the form of an . - -The **ErrorCode** property of a thrown exception holds information about the cause of the error. Possible values for this property represent the full set of standard Unified Point Of Service (UnifiedPOS) error codes. For more information about the mapping between UnifiedPOS error codes and the POS for .NET **ErrorCode** values, see POS for .NET [Exception Classes](exception-classes.md). - -POS for .NET provides four exception classes to help applications better handle errors. These are , , , and : - -- **PosException** is an abstract class that holds general exception data. **PosException** fulfills a role similar to that of the **System.Exception** class in the .NET Framework, and is the POS for .NET implementation of the **UposException** class in the UnifiedPOS specification. All other POS for .NET exception classes are derived from **PosException**. -- **PosControlException** is the standard exception thrown by POS for .NET Service Objects. **PosControlException** contains a property which holds information about the cause of the exception. -- **PosLibraryException** holds the exception data generated by **PosExplorer** during class operations. **PosLibraryException** does not contain an **ErrorCode** property. -- **PosManagementException** holds the exception data generated by POS for .NET management APIs. **PosManagementException** does not contain an **ErrorCode** property. - -## Error Handling in POS for .NET - -Error handling in POS for .NET is compliant with UnifiedPOS specification guidelines. Error handling is event-driven, uses error codes to store exception information, and is largely implementation-specific. - -Handling errors in POS for .NET follows this general procedure: - -1. An error is thrown by event-driven input. - -2. The device changes its property to indicate that it has encountered an error. - -3. An **ErrorEvent** event is queued to alert the application that an error has occurred. The **ErrorEvent** is added to the end of the queue. - -4. If one or more **DataEvent** events are queued in front of the **ErrorEvent** event, another **ErrorEvent** is queued and added at the head of queue. This warns the application about the error quickly so it can respond in an implementation-specific manner prior to processing any queued **DataEvents**. - -5. If the applications properties are configured to accept events (**DataEventEnabled** is **true** and is **false**), it responds to the **ErrorEvent** event in a manner determined by the property, as indicated in the following table. - - | Value | Meaning of Response | - |---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| - | Clear | Clears any buffered DataEvent events and ErrorEvent events, exits the Error state, and changes the device State to Idle. | - | ContinueInput | Acknowledges the error and directs the device to continue processing. The device remains in the Error state and will deliver additional data events as directed by the DataEventEnabled property. When all input has been delivered, and the DataEventEnabled property is again set to true, another ErrorEvent is delivered with the locus Input. | - | Retry | Directs the device to retry the input. The Error state is exited, and State is changed to Idle. This response is only selected when the device chapter specifically allows it and when the locus is Input. | - - The application may also take implementation-specific steps to respond to the error at this time. - -## See Also - -#### Reference - -- -- -- -- -- -- - -#### Concepts - -- [PosExplorer Class](posexplorer-class.md) -- [Exception Classes](exception-classes.md) -- [Event Management](event-management.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-api-support.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-api-support.md deleted file mode 100644 index b39d1ad4b2725..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-api-support.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: POS for .NET API Support (POS for .NET v1.14 SDK Documentation) -description: POS for .NET API Support (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET API Support (POS for .NET v1.14 SDK Documentation) - -The Microsoft Point of Service for .NET (POS for .NET) class library supports the development of POS applications with **Base** classes that support POS devices, exceptions, and events. The POS for .NET class library also provides applications with the ability to discover and load Service Objects using the and classes. - -## In This Section - -- [PosExplorer Class](posexplorer-class.md) - Describes the **PosExplorer** class, a key component of POS for .NET functionality. - -- [DeviceInfo Class](deviceinfo-class.md) - Describes the **DeviceInfo** class and implementation. - -- [Exception Classes](exception-classes.md) - Describes the POS exception classes and their associated **ErrorCode** properties. - -- [PosCommon Class](poscommon-class.md) - Describes the **PosCommon** class, the **Base** class upon which each Service Object class or interface is built. - -## Related Sections - -- [Typical POS Application Architecture](typical-pos-application-architecture.md) - Illustrates the architecture model of a POS application. - -- [Developing a POS Application](developing-a-pos-application.md) - Provides an overview of POS for .NET API support and supplies links to important POS for .NET device classes and conceptual Help topics. - -- - Contains the POS for .NET API topics, including the **PosExplorer** and **PosCommon** classes, as well as interfaces for specific POS devices. diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md deleted file mode 100644 index d454a8909bde1..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: POS for .NET Application Compatibility with 32-bit OPOS Service Objects (POS for .NET v1.14 SDK Documentation) -description: POS for .NET Application Compatibility with 32-bit OPOS Service Objects (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET Application Compatibility with 32-bit OPOS Service Objects (POS for .NET v1.14 SDK Documentation) - -Because OLE for Retail POS (OPOS) service objects only exist as 32-bit objects, under certain circumstances 64-bit applications that reference Microsoft Point of Service for .NET (POS for .NET) assemblies may fail to load OPOS service objects. If your application meets certain requirements, you can use one of the two procedures discussed in this topic to interoperate with 32-bit OPOS service objects. - -POS for .NET applications that are compiled as 32-bit should work with all OPOS service objects, and do not require any of the procedures described in this topic. - -## Requirements - -Your application must meet all of the following conditions in order to use the procedures described in this topic: - -- Your application runs on 64-bit Windows. -- Your application uses OPOS service objects. -- The executable that references POS for .NET is compiled as Microsoft intermediate language (MSIL) ('anycpu' platform). -- All managed assemblies referenced by the application are also compiled as MSIL. - -Under these conditions, the Common Library Runtime (CLR) will see that all managed assemblies are MSIL so it will choose to run the managed application as a 64-bit process. When POS for .NET attempts to load a 32-bit OPOS service object as an in-process COM server, it will fail to load and the device will not be visible to your application. This is because a 64-bit process cannot load a 32-bit COM server into its process space. - -You can work around this by using one of the following two solutions: - -## Compile the managed process as a 32-bit process - -You can force your process to run as a 32-bit process by compiling your main executable to target the **x86** or **anycpu32bitpreferred** platform. This causes the managed app to run as 32-bit and load the OPOS object as an in-process COM server. - -## To compile your application as 32-bit at the command prompt - -1. Add the `/platform:x86` compiler option to your C\# compiler command, as in the following example: - - `csc /platform:x86 .cs` - - For more information, see [/platform (C\# Compiler Options)](https://go.microsoft.com/fwlink/p/?linkid=389441) on MSDN. - -## To compile your application as 32-bit in Visual Studio 2013 - -1. In Microsoft Visual Studio 2013, open your project. - -2. Open the **BUILD** menu and select **Configuration Manager**. - -3. In the **Configuration Manager** dialog box, in the **Platform** column, click on the cell to expand the drop down menu and select **x86**. If **x86** is not available, select **\**, and then select **x86** as the new platform and click **OK**. - -4. Rebuild the project. - -## Compile the managed process as a 64-bit process and modify the COM registry of the OPOS object - -You can modify the COM registration of the OPOS service object to use a 32-bit host process. This causes Windows to handle inter-process communication (IPC) and marshalling of data between the 64-bit managed process and the 32-bit COM surrogate host process. - -## To modify the COM registry of the OPOS service object - -1. In the registry, locate your COM object GUID key under **HKEY\_CLASSES\_ROOT/Wow6432Node/CLSID**. - -2. Once you locate the COM object GUID key, add a new string value (REG\_SZ). Set the name to **AppID** and set the data to the COM object GUID, including the curly braces. - -3. Add a new key under **HKEY\_CLASSES\_ROOT/Wow6432Node/AppID** with the same name as the COM object GUID key. - -4. Under the new key you just added, add a new string value (REG\_SZ). Set the name to **DllSurrogate**. Leave the value empty. - -5. Create a new key under **HKEY\_LOCAL\_MACHINE/Software/Classes/AppID** with the same name as the COM object’s GUID, if it doesn't already exist. You do not need to add any values to this key. - -Alternatively, you can use the following Windows PowerShell script to modify the COM registry for all of the OPOS Common Control Objects (CCO) to use out of process COM servers. You can run this script to ensure that all OPOS service objects will be able to interoperate with 64-bit applications. You must run the script from an administrator Windows PowerShell prompt. - -```csharp -# This Windows PowerShell script modifies the COM registry for all OPOS -# Common Control Objects (CCO) so that they use out of process COM servers. -# This enables OPOS service objects to work with both 32-bit and 64-bit -# POS for .NET applications. - -# .Synopsis -# Create-Regkey: This function creates a new key in the registry -function Create-Regkey { - param( - [string] $Key - ) - - if (!(test-path -path $Key -pathType container)) { - New-Item -path $Key -type container | Out-Null - } -} - -# .Synopsis -# Set-RegEntry: This function creates a new registry key in the registry and -# creates a new value in the key. -function Set-RegEntry { - param( - [string] $Key, - [string] $Name, - [string] $PropertyType, - $Value - ) - - Create-RegKey -Key $Key - Remove-ItemProperty -Path $Key -Name $Name -ErrorAction SilentlyContinue - New-ItemProperty -Path $Key -Name $Name -PropertyType $PropertyType -Value $Value | Out-Null -} - -# Iterate through all of the OPOS Common Control Objects, setting registry -# entries and values for each object. - -for ($i = 2; $i -lt 38; $i++) { - $clsid = '{{CCB90{0:D2}2-B81E-11D2-AB74-0040054C3719}}' -f $i - - Set-RegEntry -Key "hklm:\SOFTWARE\Classes\Wow6432Node\CLSID\$clsid" -Name 'AppID' -PropertyType String -Value $clsid - Set-RegEntry -Key "hklm:\SOFTWARE\Classes\Wow6432Node\AppID\$clsid" -Name 'DllSurrogate' -PropertyType String - Create-RegKey -Key "hklm:\SOFTWARE\Classes\AppID\$clsid" -} - -If you need to revert the COM registry after running the previous script, you can run the following Windows PowerShell script to remove the new COM registry entries: - -# This Windows PowerShell script restores the COM registry for all OPOS -# Common Control Objects (CCO) to their original values. - -for ($i = 2; $i -lt 38; $i++) { - $clsid = '{{CCB90{0:D2}2-B81E-11D2-AB74-0040054C3719}}' -f $i - - Remove-ItemProperty -Path "hklm:\SOFTWARE\Classes\Wow6432Node\CLSID\$clsid" -Name 'AppID' - Remove-Item -Path "hklm:\SOFTWARE\Classes\Wow6432Node\AppID\$clsid" - Remove-Item -Path "hklm:\SOFTWARE\Classes\AppID\$clsid" -} -``` - -## See Also - -#### Other Resources - -- [Developing a POS Application](developing-a-pos-application.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-architecture.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-architecture.md deleted file mode 100644 index b30d241486ac5..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-architecture.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: POS for .NET Architecture (POS for .NET v1.14 SDK Documentation) -description: POS for .NET Architecture (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET Architecture (POS for .NET v1.14 SDK Documentation) - -The Microsoft Point of Service for .NET (POS for .NET) architecture supports both developers writing POS applications and peripheral device hardware vendors writing .NET-based Service Objects. The following illustration shows the POS for .NET architecture. - -![Architecture diagram for POS for .NET](media/pos-architecture.png) - -Devices use service objects to communicate with your application by using the POS for .NET interfaces. - -You can use the [PosExplorer Class](posexplorer-class.md) to discover and instantiate service objects. Once you have an instance of a service object, you can use that service object to interact with the POS device. - -Plug and Play devices automatically notify PosExplorer when those devices are connected or disconnected. For non-Plug and Play devices, you can use the [POS Device Manager](pos-device-manager.md) to manage how PosExplorer discovers those devices. - -## Support for POS Applications - -The POS for .NET public API provides POS applications with information about connected POS devices. The public API also creates instances of the Service Object (SO) classes for interacting with the devices. - -POS for .NET uses Plug and Play for Windows Embedded to detect POS device connection and disconnection. The public API conveys Plug and Play events to the application. - -For older applications, the POS for .NET legacy interoperability system exposes legacy OLE for Retail POS (OPOS) controls as .NET Service Objects. - -For more information, see [POS for .NET API Support](pos-for-net-api-support.md). - -## Support for Service Objects - -Hardware vendors write device-specific Service Objects that interact with peripheral hardware. The Service Objects also implement interfaces as specified in the Unified Point of Service (UnifiedPOS) v1.14 standard. With POS for .NET device classes, hardware vendors can concentrate their efforts on implementing the device-specific details. - -POS for .NET offers abstract **Basic** device classes for every device type defined in the UnifiedPOS specification. The enhanced **Basic** classes, called **Base** classes, supply functionality common to all POS devices. POS for .NET provides abstract **Base** device classes for nine devices. The **Base** classes further implement core POS functionality specific to the particular device class. - -POS for .NET supplies **Base** classes for the following devices: - -- Cash Drawer -- Check Scanner -- Keyboard -- Line Display -- Magnetic Stripe Reader -- Pin Pad -- Printer -- Scanner -- RFID Scanner - -## See Also - -#### Concepts - -- [Typical POS Application Architecture](typical-pos-application-architecture.md) -- [POS for .NET Integration with Plug and Play](pos-for-net-integration-with-plug-and-play.md) -- [Supported Device Classes](supported-device-classes.md) - -#### Other Resources - -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) -- [POS for .NET v1.14 Features](pos-for-net-v1141-features.md) -- [POS for .NET API Support](pos-for-net-api-support.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-class-tree.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-class-tree.md deleted file mode 100644 index 0e2ff52ece78b..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-class-tree.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: POS for .NET Class Tree -description: POS for .NET Class Tree (POS for .NET v1.14 SDK Documentation) -ms.date: 02/27/2008 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET Class Tree (POS for .NET v1.14 SDK Documentation) - -The POS for .NET SDK contains a set of classes which provide the Service Object with much of the functionality needed to meet the UPOS specification. There are three levels of base classes, referred to as **Interface**, **Basic**, and **Base** classes. - -At the base of the class tree is [PosCommon Class](poscommon-class.md)**. Interface** classes are derived from **PosCommon**, **Basic** classes are derived from **Interface** classes, and **Base** classes are derived from **Basic** classes. For each POS device type, there are separate **Interface**, **Basic**, and **Base** classes. - -The POS for .NET base classes follow a specific naming convention. **Interface** classes are represented by just the short name of the device type (for example, **Scanner** or **Msr**). **Basic** classes append the suffix **Basic** after the name used for the **Interface** class (for example, **MsrBasic** or **ScannerBasic**). And finally, **Base** classes use the suffix **Base** (for example, **MsrBase** or **ScannerBase**). For the complete list of class names, see [Supported Device Classes](supported-device-classes.md). - -## Interface Classes - -The **Interface** classes are the most fundamental base classes provided by POS for .NET. There is an **Interface** class for each of the 36 device types in the UPOS specification, and they contain methods and properties that correspond to those required by the specification. They provide no device-specific functionality so deriving from these classes requires the Service Object developer to provide the greatest amount of additional code and therefore should rarely be used directly. - -## Basic Classes - -**Basic** classes are derived from their corresponding **Interface** class. There is a **Basic** class for all 36 devices supported by the UPOS specification. These classes provide some functionality and are the best choice if no **Base** class exists for your device type. **Basic** classes, however, implement only the UPOS common members. - -## Base Classes - -The **Base** classes, each of which is derived from its corresponding **Basic** class, offer the greatest level of functionality. The **Base** classes provide nearly complete Service Object implementations. By deriving from these classes, the Service Object developer only needs to implement code to control the specific hardware device. Since **Base** classes provide so much functionality, Service Object developers should use them whenever possible. POS for .NET provides **Base**-level support for only nine **primary** device types. - -| UPOS Device | Corresponding POS for .NET Base Class | -|---------------------------|---------------------------------------| -| Cash Drawer | CashDrawerBase | -| Check Scanner | CheckScannerBase | -| Line Displays | LineDisplayBase | -| Magnetic Stripe Reader | MsrBase | -| Pin Pad | PinPadBase | -| POS Keyboards | PosKeyboardBase | -| POS Printers | PosPrinterBase | -| RFIDScanner | RFIDScanner | -| Scanner (Bar Code Reader) | ScannerBase | - -## See Also - -#### Concepts - -- [Supported Device Classes](supported-device-classes.md) - -#### Other Resources - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-device-basic-classes.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-device-basic-classes.md deleted file mode 100644 index 26fb64d6722eb..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-device-basic-classes.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: POS for .NET Device Basic Classes -description: POS for .NET Device Basic Classes (POS for .NET v1.14 SDK Documentation) -ms.date: 02/27/2008 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET Device Basic Classes (POS for .NET v1.14 SDK Documentation) - -Each hardware device in POS for .NET is represented by both an abstract interface, such as class, and a **Basic** class, such as **CashDrawerBasic**. **Basic** classes derive from the underlying interface and contain basic functional support for the device. POS for .NET provides generic support for opening, claiming, and enabling the device, device statistics, and for managing delivery of events to the application. In addition, each **Basic** class contains a set of inherited and protected methods that can be implemented by the Service Object. This topic provides summary information about **Basic** classes that can be used by Service Objects that derive from the device’s **Basic** class, rather than taking advantage of the more fully implemented device **Base** class. - -## Constructor - -Each **Basic** class includes a constructor that creates an instance of the class and initializes statistics for the UPOS version, the device category, and the installation date. - -## Common Properties and Methods - -Each **Basic** class provides overridden property and method definitions. For each of these properties and methods, the **Basic** class handles state validation—that is, verification that the application has opened, claimed, or enabled the device—and then calls the POS for .NET implementation of that property or method. For more information about the **PosCommon** class, see **PosCommon**. - -The Service Object can use the **CommonProperties** class to update **PosCommon** properties that are designated read-only for the application, or to update those properties without worrying about state validation. - -## Dispose Methods - -Each **Basic** class includes two implemented **Dispose** methods for use by the Service Object. For information about how these work, see the .NET Framework documentation for the **IDisposable** class. - -## Opening, Claiming, and Enabling Devices - -Each **Basic** class provides the core functionality for opening, claiming, and enabling devices. Typically, though, Service Objects want to override these methods to add their own custom processing. - -## Protected Methods and Events for Service Object Developers - -Each **Basic** class contains a group of methods and events for the Service Object developer. - -The following protected properties are defined as follows: - -- **CommonProperties** property, which returns an instance of **CommonProperties** with get and set values for all **PosCommon** properties. The Service Object can use **CommonProperties** to update properties without worrying about state validation or whether the property is designated read-only for the application. -- **ExternallyClaimed** property, which Service Objects can retrieve to determine if another instance of the device has been claimed (in which case, the property is set to **true**). -- **ErrorCount** property. When the Service Object queries for the value of **ErrorCount**, the basic class checks the event queue and tallies the number of **ErrorEvent** events found, and then returns that tally as the value of **ErrorCount**. -- **DataCount** property. POS for .NET verifies that the device has been opened, and then returns the number of **DataEvent** events currently queued for the device. - -The following protected methods are defined: - -- **StateChangedEvent** and delegate **StateChangedEventHandler** (**EventArgs** class). The Service Object can implement these to receive notification when the device’s **State** property has changed. -- **PreFireEvent** protected methods for each type of event supported by the device. Each basic class provides a default, generic implementation of **PreFireEvent** that returns immediately. If the Service Object needs to update its internal state prior to an event being sent to the application, the Service Object can override the default implementation of **PreFireEvent** and provide its own implementation for the event type in question. -- **QueueEvent** protected methods for each type of event supported by the device. The Service Object calls **QueueEvent** to add an event to the event queue. The **Basic** class verifies that the device is enabled, and then adds the event to the event queue to be delivered to the application. Immediately before delivery, the **Basic** class calls the appropriate **PreFireEvent** to give the Service Object an opportunity to update its internal state. When **PreFireEvent** returns, the **Basic** class delivers the event to the application. -- **QueueEventAndWait** protected methods. The Service Object calls **QueueEventAndWait** to add an **ErrorEvent** event or **DirectIOEvent** event to the event queue, from which the Service Object expects a response from the application. The **Basic** class verifies that the device is enabled, and then adds the event to the event queue, to be delivered to the application when conditions are correct. Immediately before delivery, the **Basic** class calls **PreFireEvent** to give the Service Object an opportunity to update its internal state. When **PreFireEvent** returns, the **Basic** class delivers the event to the application. -- **VerifyState** method, which takes two Boolean values, *mustBeClaimed* and *mustBeEnabled*. The Service Object can call the POS for .NET implementation of this method to perform the necessary state validation for the device, prior to a method or property call. -- **CreateStatistic** method. The Service Object should use these methods to create custom (that is, manufacturer-specific) statistics. POS for .NET handles the creation and management of all UPOS-defined statistics. -- **SetStatisticValue** and **IncrementStatistic** methods allow the Service Object to update a specified statistic even if it is not defined as resettable (that is, these methods bypass the rules enforced by the **PosCommon** and methods). -- method, which allows Service Objects to provide external callback functions for the retrieval and setting of hardware-based statistics. If a get property is not defined, the **Basic** class assumes that the statistic is software-based, and its value is maintained in the statistics XML file. If both get and set properties are defined, the **Basic** class calls these functions whenever the statistic needs to be updated or reset. It is up to the Service Object to provide code to update the statistic in the hardware. -- **ClearInput** method. POS for .NET clears the event queues for the device and then calls the Service Object’s implementation of **ClearInputImpl**. -- **ClearInputImpl** method. The Service Object should implement this method to clear any hardware buffers for the device. - -## See Also - -#### Other Resources - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-faq.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-faq.md deleted file mode 100644 index 68f247a9cdf33..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-faq.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -title: POS for .NET FAQ (POS for .NET v1.14 SDK Documentation) -description: POS for .NET FAQ (POS for .NET v1.14 SDK Documentation) -ms.date: 04/01/2017 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET FAQ (POS for .NET v1.14 SDK Documentation) - -Microsoft Corporation - -## Contents - -Installation - -- How do I install POS for .NET 1.14 on my device? -- How do I install POS for .NET with my product? -- What platforms are supported for POS for .NET 1.14? - -Device Types - -- Which device types or categories does POS for .NET support? -- Which OPOS device types or categories does POS for .NET support? -- Which device simulators does POS for .NET include? - -Service Objects - -- How do I write a .NET service object? How do I get started? -- Where can I find the service object that I need for a specific device? - -## Installation - -### How do I install POS for .NET 1.14 on my device? - -You can install Microsoft Point of Service for .NET (POS for .NET) v1.14 on your device by double clicking on the **POSforDotNet-1.14.msi** installer and following the installer wizard. - -### How do I install POS for .NET with my product? - -You can silently run the POS for .NET v1.14 installer from within your own product installer by using the following commands: - -## To install the POS for .NET 1.14 runtime only - -- Add the following command to your product installer: - - `msiexec /i POSforDotNet-1.14.msi /passive` - -## To install the complete POS for .NET 1.14 including the SDK - -1. Add the following command to your product installer: - - `msiexec /i POSforDotNet-1.14.msi INSTALLLEVEL=1000 /passive` - -### What platforms are supported for POS for .NET 1.14? - -POS for .NET v1.14 can be installed on the following platforms: - -- Windows 11 -- Windows 11 IoT Enterprise -- Windows 10 -- Windows 10 IoT Enterprise -- Windows 10 IoT Enterprise LTSC 2021 -- Windows 10 IoT Enterprise LTSC 2019 - -## Device Types - -### Which device types or categories does POS for .NET support? - -POS for .NET v1.14 supports all the point of service (POS) peripheral device categories defined in the Unified Point of Service (UnifiedPOS) v1.14 international standard. Therefore, POS for .NET supports the following device categories: - -- Belt -- Bill Acceptor -- Bill Dispenser -- Biometrics -- Bump Bar -- Cash Changer -- Cash Drawer -- Check Scanner -- Coin Acceptor -- Coin Dispenser -- Credit Authorization Terminal (CAT) -- Electronic Journal -- Electronic Value Reader/Writer -- Fiscal Printer -- Gate -- Hard Totals -- Image Scanner -- Item Dispenser -- Keylock -- Lights -- Line Display -- Magnetic Ink Character Recognition Reader (MICR) -- Magnetic Stripe Reader (MSR) -- Motion Sensor -- PIN Pad -- Point Card Reader/Writer -- POS Keyboard -- POS Power -- POS Printer -- Radio Frequency Identification (RFID) Scanner -- Remote Order Display -- Scale -- Scanner (Barcode Reader) -- Signature Capture -- Smart Card Reader/Writer -- Tone Indicator - -### Which OPOS device types or categories POS for .NET support? - -POS for .NET fully supports any previously created OLE for Retail POS (OPOS) service objects for the following device categories: - -- Bar Code Scanner -- Bump Bar -- Cash Changer -- Cash Drawer -- Check Scanner -- Coin Dispenser -- Credit Authorization Terminal (CAT) -- Fiscal Printer -- Hard Totals -- Keylock -- Line Display -- Magnetic Ink Character Recognition Reader (MICR) -- Magnetic Stripe Reader (MSR) -- Motion Sensor -- PIN Pad -- Point Card Reader/Writer -- POS Keyboard -- POS Power -- POS Printer -- Remote Order Display -- Scale -- Signature Capture -- Smart Card Reader/Writer -- Tone Indicator - -### Which device simulators does POS for .NET include? - -When you install the POS for .NET Software Development Kit (SDK), it includes several device simulators. The simulators provide a simple means of simulating a device when no physical device is available. The simulators are helpful during the early stages of development, during prototyping, and for testing configurations before deployment. POS for .NET includes simulators for the following device categories: - -- Bar Code Scanner -- Cash Drawer -- Check Scanner -- Keylock -- Line Display -- Magnetic Stripe Reader (MSR) -- PIN Pad -- POS Keyboard -- POS Printer - -## Service Objects - -### How do I write a .NET service object? How do I get started? - -It depends on the type of device that you want to support: - -- For some devices, we offer base classes that implement most of the UnifiedPOS-specific functionality; therefore, you can focus on only the communications between the service object and the device. -- For other device categories, you can take advantage of our basic class for much of the functionally but implement certain aspects of the UnifiedPOS-specific functionally yourself. -- Finally, you can choose to do everything yourself. In this case, you implement the whole class based on a provided interface. To help you get started, POS for .NET SDK includes documentation and code for sample service objects. - -### Where can I find the service object that I need for a specific device? - -You should contact the device manufacturer or your vendor to see whether they offer a .NET Service Object or a legacy OPOS service object for one of the supported legacy devices. Anyone can develop a .NET service object, and there are no requirements to register the service object with Microsoft. Therefore, we do not have a list available that identifies which devices are compatible with POS for .NET or OPOS. diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md deleted file mode 100644 index 9439dfe2f671f..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: POS for .NET Integration with Plug and Play -description: POS for .NET Integration with Plug and Play (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET Integration with Plug and Play (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) leverages Windows Embedded Plug and Play technology specifications to detect peripheral POS devices that are enabled for Plug and Play. Plug and Play support simplifies the installation and maintenance of POS devices. - -## PosExplorer - -The POS for .NET class serves as the interface between Plug and Play notifications and POS applications. **PosExplorer** translates the relevant Plug and Play notifications into POS for .NET events, which it then sends to the POS application. - -## Plug and Play Events - -The **PosExplorer** class exposes two Plug and Play events for use by POS applications: - -- - The **DeviceAddedEvent** triggers when a POS device is connected to the system. -- - The **DeviceRemovedEvent** triggers when a POS device is disconnected from the system. - -## See Also - -#### Reference - -- -- - -#### Concepts - -- [PosExplorer Class](posexplorer-class.md) -- [Supported Device Classes](supported-device-classes.md) -- [Plug and Play Support](plug-and-play-support.md) - -#### Other Resources - -- [POS for .NET v1.14 Features](pos-for-net-v1141-features.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-registry-settings.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-registry-settings.md deleted file mode 100644 index 0df50396ecb85..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-registry-settings.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: POS for .NET Registry Settings -description: POS for .NET Registry Settings (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET Registry Settings (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) stores certain configuration information in the system registry. During installation, default values are written to the registry. The POS for .NET values are stored under the key **\\HKLM\\SOFTWARE\\POSfor.NET**. Below is a list of registry keys and their values that POS for .NET uses. - -## POSfor.NET Key - -This key contains the following values. - -| Name | Description | Data Type | Default value | -|----------------|-------------------------------------------------------------------|-----------|--------------------------------------------------------------------------------------------------------------------| -| Configuration | Name of the configuration file written by the POS Device Manager. | REG_SZ | C:\Documents and Settings\All Users\Application Data\Microsoft\Point Of Service\Configuration\Configuration.xml | -| StatisticsFile | Name of the file used to record POS for .NET statistics. | REG_SZ | C:\Documents and Settings\All Users\Application Data\Microsoft\Point Of Service\Statistics\PosDeviceStatistics.xml | - -The **POSfor.NET** registry key has three subkeys: - -- ControlAssemblies -- ControlConfigs -- Logging - -## POSfor.NET\\ControlAssemblies Key - -This key may contain any number of values of type REG\_SZ, each of which contains the name of a directory. will iterate through the entire list of values, searching each directory. Therefore, the names of the values are not important. - -These values will need to be modified during system configuration so that they point to the locations appropriate for the specific requirements of the installation. - -The following table shows the default values that are written during the POS for .NET SDK setup process. - -| Name | Default Values | -|------------|-------------------------------------------------------------------------------------| -| (Default) | C:\Program Files\Common Files\Microsoft Shared\Point Of Service\Control Assemblies\ | -| ExampleSOs | C:\Program Files\Microsoft Point Of Service\SDK\Samples\Example Service Objects\ | -| Simulators | C:\Program Files\Microsoft Point Of Service\SDK\Samples\Simulator Service Objects\ | - -## POSfor.NET\\ControlConfigs Key - -In most cases, POS devices are paired with specific Service Objects using the attribute, but in some rare situations, a Service Object provider may need the ability to assign a different device to a Service Object without redistributing the entire assembly. - -To accommodate these situations, POS for .NET supports the ability to associate the device to a Service Object in a [Plug and Play XML Configuration](plug-and-play-xml-configuration.md) file. - -This key contains a value which points to the location of these Plug and Play configuration files. - -| Name | Default Value | -|-----------|-----------------------------------------------------------------------------------------| -| (Default) | C:\Program Files\Common Files\Microsoft Shared\Point Of Service\Control Configurations\ | - -## POSfor.NET\\Logging Key - -This key contains values which dictate how POS for .NET handles log files. Both POS for .NET and applications, using the object, may write to the log file. - -The following table shows the values of this key. - -| Name | Description | Data Type | Default | -|------------------|-----------------------------------------------------------------------------------------------------------------|-----------|-----------------| -| Enabled | Set to true if logging is enabled. | REG_DWORD | 0 (not enabled) | -| Location | The location where the log files will be written. | REG_SZ | %TEMP% | -| MaxLogFileSizeMB | The maximum allowed log size, in megabytes. | REG_DWORD | 10 | -| Name | The Base name of the log file. Date and time information follows the file name. The .txt extension is appended. | REG_SZ | CCL | - -## See Also - -#### Reference - -- - -#### Concepts - -- [Log Files](log-files.md) -- [Plug and Play XML Configuration](plug-and-play-xml-configuration.md) -- [Plug and Play Support](plug-and-play-support.md) - -#### Other Resources - -- [System Configuration](system-configuration.md) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-service-object-architecture.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-service-object-architecture.md deleted file mode 100644 index 7709fd0bc1e23..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-service-object-architecture.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: POS for .NET Service Object Architecture -description: POS for .NET Service Object Architecture (POS for .NET v1.14 SDK Documentation) -ms.date: 02/27/2008 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET Service Object Architecture (POS for .NET v1.14 SDK Documentation) - -There are features and design elements in POS for .NET that must be taken into account by Service Object developers. This section includes topics discussing several of these important concepts. - -## In This Section - -- [POS for .NET Class Tree](pos-for-net-class-tree.md) - Provides an overview of the POS for .NET class structure. POS for .NET Service Object classes are derived from an appropriate class in this tree. - -- [Attributes for Identifying Service Objects and Assigning Hardware](attributes-for-identifying-service-objects-and-assigning-hardware.md) - Explains how POS for .NET uses reflection and .NET attributes to locate POS for .NET assemblies and identify valid Service Objects within those assemblies. - -- [Hydra Devices](hydra-devices.md) - Provides a broad overview of the problems involved when developing for hardware that may be in use by several Service Objects simultaneously. - -- [Plug and Play Support](plug-and-play-support.md) - Provides an overview of Plug and Play support available to Service Object developers. - -- [PosCommon Information for Service Object Developers](poscommon-information-for-service-object-developers.md) - Describes methods and properties of that are useful to Service Object developers. - -- [POS for .NET Device Basic Classes](pos-for-net-device-basic-classes.md) - Provides information about using the POS for .NET **Basic** classes as the starting point for Service Objects. - -## Related Sections - -- [POS for .NET Architecture](pos-for-net-architecture.md) - Describes the components that support developers writing POS applications as well as peripheral device hardware vendors writing .NET-based Service Objects. - -- [Typical POS Application Architecture](typical-pos-application-architecture.md) - Describes event handlers and the public interface to Service Objects and the [PosExplorer Class](posexplorer-class.md) as the principal elements of POS application architecture. - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) - Includes a step-by-step guide to creating a functioning Service Object and demonstrates how the features discussed above are utilized. - -- [Developing a POS Application](developing-a-pos-application.md) - Explains how to create POS for .NET applications, the ultimate consumers of POS for .NET Service Objects. - -- [System Configuration](system-configuration.md) - Describes how to configure POS for .NET to meet the requirements of your installation. diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-v1141-features.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-v1141-features.md deleted file mode 100644 index 27ceabad37280..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-v1141-features.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: POS for .NET v1.14.1 Features -description: POS for .NET v1.14.1 Features (POS for .NET v1.14 SDK Documentation) -ms.date: 04/21/2017 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POS for .NET v1.14.1 Features (Microsoft Point of Service for .NET) - -Microsoft Point of Service for .NET (POS for .NET) v1.14.1 applies the power of .NET technology to provide a flexible, easy-to-use platform that supports retail POS applications and device peripherals. - -POS for .NET implements the Unified Point of Service (UnifiedPOS) v1.14.1 international standard so that retailers, hospitality organizations, and industry partner companies can quickly and reliably configure .NET-based POS applications and device peripherals for interoperability. - -POS for .NET tools and classes facilitate developing POS applications and device Service Objects. - -## In This Section - -- [POS for .NET Architecture](pos-for-net-architecture.md) - Describes the POS for .NET architecture and the relationship between POS for .NET, POS devices, and applications. - -- [Service Object Overview](service-object-overview.md) - Describes how Service Objects facilitate communication between the device and the application. - -- [Supported Device Classes](supported-device-classes.md) - Describes the POS devices that are recognized by POS for .NET and the level of support they receive. - -- [Event Management](event-management.md) - Describes how event management is implemented in POS for .NET. - -- [POS Exception Handling](pos-exception-handling.md) - Discusses the exception classes used by POS for .NET and POS for .NET error handling model. - -- [POS for .NET Integration with Plug and Play](pos-for-net-integration-with-plug-and-play.md) - Describes how to integrate your POS device with Plug and Play functionality for Microsoft Windows. - -- [Log Files](log-files.md) - Describes the logging feature for recording POS for .NET, Service Object, and application events and debug log size limit. - -- [Integration of Legacy Service Objects](integration-of-legacy-service-objects.md) - Describes how POS for .NET supports legacy Service Objects. - -## Related Sections - -- [Developing a POS Application](developing-a-pos-application.md) - Outlines key POS for .NET concepts and features for developing POS applications. - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) - Demonstrates how to create POS for .NET applications that use Service Objects to communicate with hardware devices. - -## See Also - -#### Concepts - -- [What's New in POS for .NET v1.14.1](whats-new-in-pos-for-net-v114-and-v1141.md) diff --git a/docs/framework/additional-apis/pos-for-net/poscommon-class.md b/docs/framework/additional-apis/pos-for-net/poscommon-class.md deleted file mode 100644 index 5d4b929cad103..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/poscommon-class.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: PosCommon Class (POS for .NET v1.14 SDK Documentation) -description: PosCommon Class (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# PosCommon Class (POS for .NET v1.14 SDK Documentation) - - is the **Base** class for all specific **Interface** classes, and all Service Objects indirectly derive from it. **PosCommon** defines the common properties, methods, and events that the Unified Point Of Service (UnifiedPOS) specification requires in all device classes. - -## PosCommon Properties - -The following table describes the properties of the **PosCommon** class available to POS applications. - -| Property | Type | Description | -|---------------------------|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| CapCompareFirmwareVersion | bool | Indicates whether the Service Object and device supports comparing the firmware version in the physical device against that of a firmware file. | -| CapPowerReporting | PowerReporting enum | Indicates the power reporting capabilities of the device. | -| CapStatisticsReporting | bool | Indicates whether the device can accumulate and can provide various statistics regarding usage. | -| CapUpdateStatistics | bool | If set to true, some or all of the device statistics can be reset to 0 (zero) using the ResetStatistic method for one update and ResetStatistics method for a list of updates, or updated using the UpdateStatistic method for one update and the UpdateStatistics method for a list of updates with the corresponding specified values. | -| CapUpdateFirmware | bool | Indicates whether the device's firmware can be updated via the UpdateFirmware method. | -| CheckHealthText | string | Indicates the health of the device. | -| Claimed | bool | Indicates whether the device is claimed for exclusive access. | -| DeviceDescription | string | Holds a string identifying the device and the company that manufactured it. | -| DeviceEnabled | bool | Indicates whether the device is in an operational state. | -| DeviceName | string | UnifiedPOS calls it PhysicalDeviceName; OLE for Retail POS (OPOS) calls it DeviceName. | -| DevicePath | string | Set by POS for .NET for Plug and Play devices. For non-Plug and Play devices, DevicePath can be assigned using a configuration file. | -| FreezeEvents | bool | When set to true, the application has requested that the Service Object not deliver events. | -| PowerNotify | PowerNotification enum | Holds the type of power notification selection made by the application. | -| PowerState | PowerState enum | Holds the current power condition. | -| ServiceObjectDescription | string | Identifies the Service Object supporting the device and the company that produced it. This property is listed as DeviceServiceDescription in the UnifiedPOS specification. | -| ServiceObjectVersion | System.Version | Holds the Service Object version number. This property is listed as DeviceServiceVersion in the UnifiedPOS specification. | -| State | ControlState enum | Holds the current state of the device. | -| SynchronizingObject | ISynchronizeInvoke | Gets or sets the marshalling object for event handler calls from a POS event. | - -## PosCommon Methods - -The following table describes the methods of the **PosCommon** class available to applications. - -| Method | Return Type | Description | -|------------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| CheckHealth | string | Performs a health check on the device. The type of check to be performed is indicated by the HealthCheckLevel parameter. The method also updates the CheckHealthText property. | -| Claim | void | Requests exclusive access to the device. -Service Object writers are advised to only throw exceptions in unexpected conditions; for example, OutOfMemory. Otherwise, Service Objects should return True if the device was claimed and False if a time-out occurred. | -| Close | void | Releases the device and its resources. | -| CompareFirmwareVersion | CompareFirmwareResult | Determines whether the version of the specified firmware is newer than, older than, or the same as the version of firmware in the physical device. | -| DirectIO | DirectIOData | Used to communicate directly with the Service Object. -In the UnifiedPOS specification, it has two in/out parameters. As used by POS for .NET, this method returns a structure and no in/out parameters. | -| Open | void | Opens a device for subsequent input/output processing. | -| Release | void | Releases exclusive access to the device. | -| ResetStatistic | void | Resets the specified statistic to zero. -Used in POS for .NET for operations on a single statistic. | -| ResetStatistics | void | Resets all statistics for a specified category to 0 (zero). | -| ResetStatistics | void | Resets the specified statistics to 0 (zero). | -| ResetStatistics | void | Resets all statistics associated with a device to 0 (zero). | -| RetrieveStatistic | string | Retrieves the specified device statistic. -Used in POS for .NET for operations on a single statistic. | -| RetrieveStatistics | string | Retrieves all device statistics. | -| RetrieveStatistics | void | Retrieves the statistics for the specified category. | -| RetrieveStatistics | void | Retrieves the specified statistics. | -| UpdateFirmware | void | Updates the firmware of a device with the version of the firmware contained in the specified filename. | -| UpdateStatistic | void | Updates a statistic. -Added to POS for .NET for operations on a single statistic. | -| UpdateStatistics | void | Updates a list of statistics with the corresponding specified values. | -| UpdateStatistics | void | Updates the specified category of statistics with the specified value. | - -## PosCommon Events - -The following table describes the **PosCommon** class events. - -| Method | Description | -|-------------------|--------------------------------------------------------------------------------------| -| DirectIOEvent | Raised by the Service Object to communicate information directly to the application. | -| StatusUpdateEvent | Raised by the Service Object to alert the application of a device status change. | - -## Example - -The following code example demonstrates how to use the properties and methods common to all Service Objects to display information about a connected device. - -```csharp -// Create a dervied class of PosCommon -public class PosCommonSample: PosCommon -{ - // Implement all base methods and properties. - // ... -} - -// Create instances for the example. -PosExplorer explorer = new PosExplorer(); -PosCommonSample pcs = new PosCommonSample(); -DeviceInfo device = explorer.GetDevice("MSR"); -pcs = (PosCommonSample)explorer.CreateInstance(device); - -// Open and claim the device, then print information -// about the device to the console. -pcs.Open(); -pcs.Claim(1000); -Console.WriteLine("Name: {0}", pcs.DeviceName); -Console.WriteLine("Description: {0}", pcs.DeviceDescription); -Console.WriteLine("Path: {0}", pcs.DevicePath); -Console.WriteLine("Enabled: {0}", pcs.DeviceEnabled); - -pcs.Close(); -``` - -## See Also - -#### Concepts - -- [POS for .NET Class Tree](pos-for-net-class-tree.md) diff --git a/docs/framework/additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md b/docs/framework/additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md deleted file mode 100644 index b6df1f2fb7fb8..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: PosCommon Information for Service Object Developers -description: PosCommon Information for Service Object Developers (POS for .NET v1.14 SDK Documentation) -ms.date: 02/27/2008 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# PosCommon Information for Service Object Developers (POS for .NET v1.14 SDK Documentation) - -At the base of the POS for .NET Server Object class tree (**Interface**, **Basic**, **Base**) is . This class is a direct implementation of the "Common Properties, Methods, and Events" chapter in the UPOS specification. - -Each POS for .NET **Basic** class overrides or implements **PosCommon** properties and methods which are of particular importance to a Service Object developer. This topic provides information about these methods and properties. - -## CapPowerReporting Property - -Once POS for .NET has successfully opened a device, it tries to retrieve the current value of the property. The class is initialized to **None**, indicating that the Service Object is not able to provide power reporting. If, however, the Service Object's device does support power reporting, the Service Object may set **PowerReporting** to **Standard** or **Advanced** in the Service Object's method. - -## CapStatisticsReporting Property - -POS for .NET verifies that the device has been opened and then retrieves the current value of the property. - -When statistics are created for the device, POS for .NET sets **CapStatisticsReporting** to **true**. - -## CapUpdateStatistics Property - -POS for .NET verifies that the device has been opened and then retrieves the current value of the property. - -When statistics are created for the device, and if those statistics can be reset or updated, then POS for .NET sets **CapUpdateStatistics** to **true**. - -## Claimed Property - -POS for .NET verifies that the device has been opened, and then retrieves the current value of the property. - -**Claimed** is initialized to **false**. **Claimed** should be set to **true** when the application calls the method, then set back to **false** when the application calls the method. - -## DeviceDescription Property - -POS for .NET verifies that the device has been opened, and then retrieves the current value of the property. - -## DeviceEnabled Property - - is a read/write property. - -It can be used to return the object's current state; enabled or disabled. If this object has not been previously opened and enabled, this property returns **false**. - -This property is also used to enable or disable the device by setting the property of the value to **true** or **false**. It is common for Service Objects to override this property and perform its hardware initialization and release here. - -## DeviceName Property - -POS for .NET verifies that the device has been opened, and then retrieves the current value of the property. - -Within **Base** class implementations, this value is set automatically based on the contents of the **ServiceObject** attribute. - -If you are not deriving from a POS for .NET **Base** class, and are instead deriving from an **Interface**-level or **Basic**-level class, then **DeviceName** should be set by the Service Subject during the method. - -## FreezeEvents Property - - is a read/write property. - -POS for .NET verifies that the device has been opened and claimed, then retrieves or sets the current value of the **FreezeEvents** property. When this property is set to **true**, POS for .NET queues events until this property is set to **false**, not that the queuing mechanism can vary from one device type to another. - -The **FreezeEvents** property is initialized to **false**. - -## PowerNotify Property - - is a read/write property. - -POS for .NET verifies that the device has been opened, then retrieves or sets the current value of **PowerNotify**. If **PowerNotify** is set, then power state notifications will be sent to the application. - -**PowerNotify** is initialized to **Disabled**. - -Attempting to set **PowerNotify** can cause the following exceptions to be thrown. - - - ---- - - - - - - - - - - - - -
ValueMeaning

Illegal

One of the following conditions has occurred:

-
    -
  • The device is enabled.
    -
  • -
  • P:Microsoft.PointOfService.PosCommon.CapPowerReporting is set to None, indicating that the device does not support power notification.
    -
  • -
  • The specified value is not a valid T:Microsoft.PointOfService.PowerNotification enumeration value.
    -
  • -
- - -## PowerState Property - -POS for .NET verifies that the device has been opened, and then retrieves the current value of the property. If **CapPowerReporting** is set to **None**, **PowerNotify** is set to **Disabled**, or **DeviceEnabled** set to **false**, **PowerState** is returned as **Unknown**. - -**PowerState** is initialized to **Unknown**. When **PowerNotify** is set to **Enabled** and **DeviceEnabled** is **true**, **PowerState** should be updated as the Service Object detects power condition changes. POS for .NET detects the state change when the Service Object sets **PowerState** and—if **PowerNotify** is set to **Enabled**—queues a event, notifying the application. - -Setting can cause the following exceptions to be thrown. - - - ---- - - - - - - - - - - - - -
ValueMeaning

Illegal

One of the following conditions has occurred:

-
    -
  • CapPowerReporting = Standard and PowerNotify is set to Online, Off, or Offline.
    -
  • -
  • CapPowerReporting = Advanced and PowerState is set to Online, Off, or Offline.
    -
  • -
- - -## ServiceObjectDescription Property - -POS for .NET verifies that the device has been opened, and then retrieves the current value of the property. The Service Object developer should not have to set this value, since it is set by the POS for .NET **Basic** class using the description information provided in the **ServiceObject** attribute. - -## ServiceObjectVersion Property - -POS for .NET verifies that the device has been opened, and then retrieves the current value of the property. The Service Object developer should not have to set this value, since it is set by the POS for .NET **Basic** class using the version information provided in the **ServiceObject** attribute. - -## State Property - -No device state verification is required—the application can retrieve the current value of the property.at any time. - -**State** is initialized to **Closed**. If the Service Object sets **State** to an invalid value, POS for .NET throws an Illegal exception. Changes in **State** cause POS for .NET to queue a **StateChangedEvent** event. - -## Claim Method - -POS for .NET verifies that the application has the device opened. - -If the *timeout* parameter is set to a value less than -1, POS for .NET throws an exception. If *the timeout* value is set to -1, the **Claim** method will wait forever. - -If the device is already claimed by the application, POS for .NET simply returns. - -If the device is in use by another application, *timeout* is reached; POS for .NET throws a time-out exception. - -If **Claim** is successful, POS for .NET loads the statistics for the device and sets the **Claimed** property to **true**. - -## Close Method - -If the application calls the method when **State** is set to **Closed**, POS for .NET throws a **Closed** exception. If **State** is set to **Busy**, POS for .NET throws a **Busy** exception. - -If the **DeviceEnabled** method when **Claimed** is set to **false**, POS for .NET throws an Illegal exception. If **State** is set to **Busy**, POS for .NET calls the **ClearOutput** method. If the device is enabled, POS for .NET sets **DeviceEnabled** to **false**. POS for .NET clears the event queue, and then sets **Claimed** to **false**. - -## ResetStatistic Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## ResetStatistics() Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## ResetStatistics(categories parameter) Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## ResetStatistics(string parameter) Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## RetrieveStatistic Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## RetrieveStatistics() Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## RetrieveStatistics(categories parameter) Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## RetrieveStatistics(string parameter) Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## UpdateStatistic Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## UpdateStatistics(categories parameter) Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## UpdateStatistics(statistic array parameter) Method - -POS for .NET verifies that the application has opened, claimed, and enabled the device, then calls the method. - -## See Also - -#### Reference - -- - -#### Concepts - -- [POS for .NET Class Tree](pos-for-net-class-tree.md) - -#### Other Resources - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) diff --git a/docs/framework/additional-apis/pos-for-net/posdevice-class.md b/docs/framework/additional-apis/pos-for-net/posdevice-class.md deleted file mode 100644 index b5c79868a84ac..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/posdevice-class.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: PosDevice Class -description: PosDevice Class (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# PosDevice Class (POS for .NET v1.14 SDK Documentation) - -The **PosDevice** class represents a single physical POS device. The class provides properties and methods that are needed to manage that physical device. - -## Properties - -| Name | Description | -|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Type | String representation of the POS device type or category. | -| SoName | The name of the Service Object for this physical device, in string format. | -| Path | The hardware path of a device, in string format. For Plug and Play devices, this path comes from the Plug and Play engine. For non-Plug and Play devices, it is provided via the AddDevice method of ServiceObject. For devices using legacy (OPOS) Service Objects, this may be blank. | -| HardwareDescription | The device description of the logical device, returned from the registry in string format and used by the Plug and Play engine. This may be blank for devices using legacy (OPOS) Service Objects. | -| IsPlugNPlay | A Boolean indicator of whether the device supports Plug and Play. | -| IsLegacy | A Boolean indicator of whether the device is using a legacy (OPOS) Service Object. | -| Enabled | A Boolean representation of whether the device is enabled or not. This property allows write access. | -| Default | A Boolean representation of whether the device is the default device in a POS device category. This property allows write access. | - -## Methods - - - ---- - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription

AddName

Adds a logical name for the device.

-

Accepts one string parameter, Name, which is the name of the logical device to add. The name must be unique within a device class (type). There is no returned value.

-

Logical names are represented by the LogicalDevice class.

Deletename

Deletes the logical name from the device.

-

Accepts one string parameter, Name, which is the name of the logical device to delete. There is no returned value.

-

Logical names are represented by the LogicalDevice class.

AddProperty

Adds a property (a name/value pair) to this device.

-

Accepts two string parameters, Name, which is the name of the property, and Value, which is the value of the property. There is no returned value.

-

Device properties are represented by the Property class.

DeleteProperty

Deletes a property from this device.

-

Accepts one string parameter, Name, which is the name of the property to be deleted. There is no return value.

-

Device properties are represented by the Property class.

- - -## See Also - -#### Tasks - -- [Using VBScript to Manage Devices](using-vbscript-to-manage-devices.md) - -#### Other Resources - -- [Using the WMI API to Manage Devices](using-the-wmi-api-to-manage-devices.md) diff --git a/docs/framework/additional-apis/pos-for-net/posdm-command-arguments.md b/docs/framework/additional-apis/pos-for-net/posdm-command-arguments.md deleted file mode 100644 index 3c263588a9ac5..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/posdm-command-arguments.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: POSDM Command Arguments -description: POSDM Command Arguments (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POSDM Command Arguments (POS for .NET v1.14 SDK Documentation) - -The following switches can be used as arguments for POSDM commands. - - - ---- - - - - - - - - - - - - - - - - - - - - - - -

Command Switch

Description

/type:devicetype

The device type as determined by the Service Object supplier.

-

Example: /type:msr specifies a magnetic strip reader.

/soname:soname

The Service Object name from the Service Object supplier. Names containing spaces must be enclosed in double quotation marks (").

-

Example: /soname:"Super MSR" specifies a Service Object named Super MSR.

/path:hardware_path

The hardware path for the device.

-

Example: /path:COM2 specifies a location of COM2.

/name:devicename

The logical name for the device. This is useful when there are multiple instances of the Service Object, and also provides a way for an application to refer to a Service Object without hard coding. This name must be unique within devicetype. If a name contains a space, it must be contained within double quotation marks (" ").

-

Examples: /name:msr4 refers to a device with the logical name msr4, /name:"Main MSR" refers to a device with the logical name of Main MSR.

- - -## See Also - -#### Concepts - -- [POSDM Commands](posdm-commands.md) - -#### Other Resources - -- [Using the POS Device Manager Command-Line Tool](using-the-pos-device-manager-command-line-tool.md) diff --git a/docs/framework/additional-apis/pos-for-net/posdm-commands.md b/docs/framework/additional-apis/pos-for-net/posdm-commands.md deleted file mode 100644 index de78e04e3b177..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/posdm-commands.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: POSDM Commands -description: POSDM Commands (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# POSDM Commands (POS for .NET v1.14 SDK Documentation) - -POSDM uses the following commands. - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Command

Description

Syntax and Examples

adddevice

Adds a physical non-Plug and Play device.

posdm [general switches] adddevicepath filter[/info]

-

where path is a hardware path of the physical device,

-

filter is one or more of the following:

-

/type:devicetype

-

/soname:soname

-

and

-

/info is a switch that displays all device properties.

-

Example:

-

posdm adddevice COM3 /soname:MsrSimulator

-

This adds a device with the hardware path COM3 to the MsrSimulator Service Object.

addname

Adds a logical name to a device.

posdm [general switches] addnamedevicenamefilter

-

where devicename is the logical name to give to the device, and filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

Example:

-

posdm addname MainMSR /type:MSR /path:COM3

-

This adds the logical name MainMSR for the MSR device on the COM3 hardware path.

-

posdm addname BackupMSR /name:MainMSR

-

This adds the logical name BackupMSR for the device named MainMSR.

addproperty

Adds a configuration property to a device.

posdm [general switches] addpropertypropertyname value filter[/info]

-

where propertyname is the name of the property and value is the initial value for that property, and filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

/info is a switch that displays all device properties.

-

Example:

-

posdm addproperty PrintSpecialGreeting "Happy New Year!" /name:MainMSR

-

This adds the PrintSpecialGreeting property with the value of "Happy New Year!" to the device named MainMSR.

deletedevice

Deletes a physical non-Plug and Play device.

posdm [general switches] deletedevice[path] filter

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

Example:

-

posdm deletedevice COM3 /type:Msr

-

This deletes the MSR device on COM3.

-

Only devices previously added by the adddevice command can be deleted.

deletename

Deletes a logical name from a device's list of names.

posdm [general switches] deletename devicenamefilter [/info]

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

and

-

/info is a switch that displays all device properties.

-

Example:

-

posdm deletename "Main Scanner" /type:Scanner /path:COM3

-

This deletes the logical name Main Scanner for the scanner device on the COM3 path.

-

Only logical names previously added by the addname command can be deleted.

deleteproperty

Deletes a configuration property from a device.

posdm [general switches] deletepropertypropertyname filter [/info]

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

and

-

/info is a switch that displays all device properties.

-

posdm deleteproperty PrintSpecialGreeting /name:MainMSR

-

This deletes the PrintSpecialGreeting property from the device named MainMSR.

-

Only configuration properties previously added by the addproperty command can be deleted.

disable

Prevents a Service Object from running for a physical POS device.

posdm [general switches] disablefilter

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

Example:

-

posdm disable /name:ReceiptPrn

-

This prevents a Service Object from running for a device named ReceiptPrn. As a result, applications will not see the device in the list of available POS devices.

enable

Permits a Service Object to run for a physical POS device.

posdm [general switches] enablefilter

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

Example:

-

posdm enable /type:MSR

-

This permits a Service Object to run for all MSR devices.

info

Displays information about the device, including its configuration properties.

posdm [general switches] infofilter

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

Example:

-

posdm info /name:MSR1

-

This command displays information about a device with the logical name "MSR1."

listdevices

Lists the physical POS devices.

posdm [general switches] listdevices [/type:devicetype]

-

where the /type:devicetype switch narrows the list to a particular type of device.

-

Examples:

-

posdm listdevices

-

This displays a list of all physical POS devices installed on the local computer.

-

posdm listdevices /type:MSR

-

This displays a list of all MSR devices installed on the local computer.

-

posdm /machine:Center10 /username:JohnDoe3 /password:B$tg59ce listdevices

-

This lists all physical POS devices installed on the computer named Center10, after logging on with username and password credentials.

listnames

Lists the logical names associated with POS devices.

posdm [general switches] listnames filter

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

Example:

-

posdm listnames /type:MSR /path:COM3

-

This displays a list of names associated with the MSR device on COM3.

listprops

Lists the configuration properties associated with a POS device and their values.

posdm [general switches] listpropsfilter

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

Example:

-

posdm listprops /type:MSR /path:COM3

-

This displays a list of property names and values associated with the MSR device on COM3.

listsos

Lists the POS Service Objects on the target machine.

posdm [general switches] listsos [/type:devicetype]

-

where the /type:devicetype switch narrows the list to a particular type of device.

-

Examples:

-

posdm /output:a:\solist.txt listsos

-

This writes a list of all Service Objects installed on the local computer to a file named solist.txt on drive A.

-

posdm listsos /type:MSR

-

This displays a list of all Service Objects associated with MSR devices on the local computer.

-

posdm /machine:Center10 /username:JohnDoe3 /password:B$tg59ce listsos

-

This lists all Service Objects on the computer named Center10, after logging on with username and password credentials.

setdefault

Sets one device as the default of its type.

-

The default flag directs the PosExplorer.GetDevice(type) method to return this device even if there is more than one device of the type available.

posdm [general switches] setdefault ON|OFF filter [/info]

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

The /info switch causes all device properties to be displayed.

-

Example:

-

posdm setdefault ON /name:FirstScanner

-

This example designates FirstScanner as the one the CCL device enumeration will find.

setpath

Sets the POS device path for non-Plug and Play devices.

posdm [general switches] setpath hardware_path filter

-

where filter is one or more of the following needed to uniquely identify a device:

-

/type:devicetype

-

/soname:soname

-

/path:hardware_path

-

/name:devicename

-

Example:

-

posdm setpath COM2 /type:MSR

-

This sets the hardware path for MSR devices to COM2.

-

The setpath command works only for non-Plug and Play devices previously added with the adddevice command.

- - -## See Also - -#### Concepts - -- [POSDM Command Arguments](posdm-command-arguments.md) -- [Command-Line Help for POSDM](command-line-help-for-posdm.md) - -#### Other Resources - -- [Using the POS Device Manager Command-Line Tool](using-the-pos-device-manager-command-line-tool.md) diff --git a/docs/framework/additional-apis/pos-for-net/posexplorer-class.md b/docs/framework/additional-apis/pos-for-net/posexplorer-class.md deleted file mode 100644 index 3c5df0ce03cec..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/posexplorer-class.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: PosExplorer Class (POS for .NET v1.14 SDK Documentation) -description: PosExplorer Class (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# PosExplorer Class (POS for .NET v1.14 SDK Documentation) - - provides Point of Service (POS) applications with a single entry point to Microsoft Point of Service for .NET (POS for .NET) services. **PosExplorer** supports applications by: - -- Enumerating installed POS devices. -- Instantiating Service Objects. -- Receiving Plug and Play events when a POS peripheral device is connected or disconnected. - -## PosExplorer Properties - -The following table describes **PosExplorer** properties. - -| Property | Type | Description | -|---------------------|--------------------|--------------------------------------------------------------------------------------| -| PosRegistryKey | string | Returns POS for .NET configuration root registry key relative to HKEY_LOCAL_MACHINE. | -| StatisticsFile | string | Returns a path to the file where device statistics are contained. | -| SynchronizingObject | ISynchronizeInvoke | Holds the ISynchronizeInvoke object. | - -## PosExplorer Methods - -The following table describes **PosExplorer** methods. - -| Method | Return Type | Description | -|----------------|------------------|---------------------------------------------------------------------------------------| -| CreateInstance | PosDevice | Instantiates a Service Object for the device. | -| GetDevice | DeviceInfo | Returns a device of the specified type (must be only one in the system). | -| GetDevice | DeviceInfo | Returns a device of the type with the specified logical name or alias. | -| GetDevices | DeviceCollection | Returns all POS devices. | -| GetDevices | DeviceCollection | Returns all POS devices with the specified compatibility level. | -| GetDevices | DeviceCollection | Returns POS devices of the type. | -| GetDevices | DeviceCollection | Returns POS devices of the type and compatibility level. | -| Refresh | None | Re-enumerates the list of attached POS devices and rebuilds internal data structures. | - -## PosExplorer Events - -The following table describes **PosExplorer** events. - -| Event | Description | -|--------------------|----------------------------------------------------------------------| -| DeviceAddedEvent | Received when a Plug and Play-compatible POS device is connected. | -| DeviceRemovedEvent | Received when a Plug and Play-compatible POS device is disconnected. | - -## Example - -The following code example demonstrates how to create an instance of **PosExplorer**, connect to Plug and Play events, and use it to identify all connected Magnetic Stripe Reader (MSR) devices. The code example prints information about the MSR to the console and closes the device after it has finished. - -```csharp -// Creates a new instance of an MSR. -void CreateMsr(DeviceInfo msrinfo) -{ - msr = (Msr)explorer.CreateInstance(msrinfo); - msr.Open(); - msr.Claim(1000); - msr.DeviceEnabled = true; -} - -static void Main(string[] args) -{ - - // Create a new instance of PosExplorer and use it to - // collect device information. - PosExplorer explorer = new PosExplorer(); - DeviceCollection devices = explorer.GetDevices(); - - // Search all connected devices for an MSR, print its service - // object name to the console, and close it when finished. - foreach (DeviceInfo device in devices) - { - if (device.Type == DeviceType.Msr) - { - if (device.ServiceObjectName == currentMsr) - { - CreateMsr(device); - Console.WriteLine(device.ServiceObjectName); - - // It is important that applications close all open - // Service Objects before terminating. - msr.Close(); - msr = null; - } - } - } -} -``` - -## See Also - -#### Concepts - -- [POS for .NET Integration with Plug and Play](pos-for-net-integration-with-plug-and-play.md) - -#### Other Resources - -- [POS for .NET API Support](pos-for-net-api-support.md) -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) diff --git a/docs/framework/additional-apis/pos-for-net/poskeyboard-implementation.md b/docs/framework/additional-apis/pos-for-net/poskeyboard-implementation.md deleted file mode 100644 index 2b153eb04507c..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/poskeyboard-implementation.md +++ /dev/null @@ -1,368 +0,0 @@ ---- -title: PosKeyboard Implementation -description: PosKeyboard Implementation (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# PosKeyboard Implementation (POS for .NET v1.14 SDK Documentation) - -A **PosKeyboard** Service Object reads keys from a POS keyboard. A POS keyboard may be an auxiliary keyboard, or it may be a virtual keyboard consisting of some or all of the keys on the system keyboard. In Microsoft Point of Service for .NET (POS for .NET), the POS keyboard **Base** class is . - -A **PosKeyboard** Service Object follows the general input device model: - -- When input is received from the POS keyboard, a **DataEvent** is queued. -- If the **AutoDisable** property is **true**, then the device automatically disables itself when a **DataEvent** event is queued. This is done automatically by the **PosKeyboardBase** class. -- A queued **DataEvent** event will be delivered to the application when the **DataEventEnabled** property is **true** and other event delivery requirements are met. The **PosKeyboardBase** class will manage event delivery automatically. -- An **ErrorEvent** event is queued if an error while gathering or processing input, and is delivered to the application when **DataEventEnabled** is **true** and other event delivery requirements are met. -- The **DataCount** property, which is maintained by the **PosKeyboardBase** class, may be read to obtain the number of queued events. -- All queued input may be deleted by calling . - -The POS keyboard is an exclusive-use device: - -- The application must claim the device before enabling it. -- The application must claim and enable the device before the device begins reading input. - -This section contains a sample **PosKeyboard** Service Object that generates simulated keystrokes which are sent to the application by using **DataEvents**. This sample depends on the thread-helper object presented in [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md). To compile this sample, you need to include the code from that topic. - -## To write a Service Object - -1. Add **using** directives for **Microsoft.PointofService**, **Microsoft.PointOfService.BaseServiceObjects**, and **System.Threading**. - -2. Add the global attribute **PosAssembly**. - -3. Choose an appropriate namespace name for your project. - -4. Create a Service Object class derived from **PosKeyboardBase**. - -5. Add the **ServiceObject** attribute to your Service Object class, using the **DeviceType.PosKeyboard** value as your device type. - -## To add features to the sample keyboard Service Object - -1. Create a thread helper class, **KeyboardThreadingObject**, derived from **ServiceObjectThreadHelper** from the **Service Object Read Threads** section. - -2. Implement the **ServiceObjectThreadProcedure** method in the **KeyboardThreadingObject** class. This is the procedure that will be run on a separate thread. In the sample code below, this method simulates keyboard input. - -3. This sample class implements a method called **SendKey** and another called **ChangePowerState**. These methods are wrappers around protected members. Because they are protected, they cannot be invoked directly from the threading object. - -4. Override the **PosCommon.Open** method to specify capabilities supported by this Service Object and create a new thread-helper object. - -5. Override the **PosCommon.DeviceEnable** specifically to **Open** and **Close** the thread-helper. - -6. Implement the abstract virtual methods from **PosCommon**, providing minimum functionality. - -## Running the Application - -This sample Service Object can be run in conjunction with the test application provided with the POS for .NET Software Development Kit (SDK). - -## To test the Service Object - -1. Start the test application and select **SamplePosKeyboard** from the **Keyboard** drop-down list. - -2. **Open** and **Claim** the device, and then select the device with the **DeviceEnabled** check box to enable it. - -3. Checking the **DataEventEnabled** box will allow the Service Object to send a single simulated key to the application. The **DataEvent** is queued automatically by the **PosKeyboardBase** class when **KeyDown** is called. - -4. Selecting the **Automatically enable data events** box allows the Service Object to continue delivering characters, two seconds apart. - -5. The Service Object will send simulated key strokes for characters 'a' through 'z'. After that, a **StatusUpdateEvent** event will be sent indicating the device is now offline. This event is sent automatically by the **PosKeyboardBase** class when **Properties.PowerState** is changed. - -## Example - -This sample demonstrates how to develop a simple **PosKeyboard** Service Object. It supports a separate reader thread to send **DataEvents** asynchronously to the application. Once compiled, you can execute the Service Object in conjunction with the test application included with the POS for .NET SDK. - -```csharp -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; - -[assembly: PosAssembly("Service Object Contractors, Inc.")] - -namespace SOSamples.Keyboard -{ - [ServiceObject( - DeviceType.PosKeyboard, - "SamplePosKeyboard", - "Sample PosKeyboard Service Object", - 1, - 9)] - - public class SampleKeyboard : PosKeyboardBase - { - KeyboardThreadingObject ReadThread = null; - - public SampleKeyboard() - { - // DevicePath must be set before Open() is called. - // In the case of Play and Plug hardware, the - // POS for .NET Base class will set this value. - DevicePath = "Sample Keyboard"; - - // NOTE: You can test the power notification events - // sent from this Service Object by selecting the - // "Power Notify" check box. - - // Let the application know advanced power - // reporting is supported. - Properties.CapPowerReporting = PowerReporting.Advanced; - Properties.CapKeyUp = false; - } - - ~SampleKeyboard() - { - // Code added from previous sections to terminate - // the read thread started by the thread-helper - // object. - if (ReadThread != null) - { - ReadThread.CloseThread(); - } - - Dispose(false); - } - - // Expose the protected KeyDown() method so that it can be - // called from our threading helper. - public void SendKey(int key) - { - KeyDown(key); - } - - // Expose the protected PowerState property so it can be - // changed from the threading helper. - public void ChangePowerState(PowerState state) - { - Properties.PowerState = state; - } - - #region Override Virtual PosCommon Members - public override void Open() - { - base.Open(); - - // Create the reader-thread object. - ReadThread = new KeyboardThreadingObject(this); - } - - public override bool DeviceEnabled - { - get - { - return base.DeviceEnabled; - } - set - { - if (value != base.DeviceEnabled) - { - base.DeviceEnabled = value; - - if (value == false) - { - // Stop the reader thread when the device - // is disabled. - ReadThread.CloseThread(); - } - else - { - try - { - // By enabling the device, start the - // reader thread. - ReadThread.OpenThread(); - } - catch (Exception e) - { - base.DeviceEnabled = false; - - if (e is PosControlException) - throw; - - throw new PosControlException( - "Unable to Enable Device", - ErrorCode.Failure, e); - } - } - } - } - } - #endregion Override Virtual PosCommon Members - - #region Implement Abstract PosCommon Members - private string MyHealthText = ""; - - // PosCommon.CheckHealthText. - public override string CheckHealthText - { - get - { - // VerifyState(mustBeClaimed, - // mustBeEnabled). - VerifyState(false, false); - return MyHealthText; - } - } - - // PosCommon.CheckHealth. - public override string CheckHealth( - HealthCheckLevel level) - { - // Verify that device is open, claimed and enabled. - VerifyState(true, true); - - // Your code here: - // Check the health of the device and return a - // descriptive string. - - // Cache result in the CheckHealthText property. - MyHealthText = "Ok"; - return MyHealthText; - } - - // PosCommon.DirectIOData. - public override DirectIOData DirectIO( - int command, - int data, - object obj) - { - // Verify that the device is open. - VerifyState(false, false); - - return new DirectIOData(data, obj); - } - #endregion Implement Abstract PosCommon Members - } - - #region Thread Helper Class - public class KeyboardThreadingObject : - ServiceObjectThreadHelper, IDisposable - { - // This is a helper class which will depend on - // being able to call back into the actual Service - // Object to pass along data. However, you cannot - // keep a strong reference to the Service Object, - // since that may prevent clean disposal, leaving - // hardware resources unavailable to other processes. - // Therefore, you create a weak reference. From this - // reference, you can get a temporary strong reference, - // which you can act on and then release. - WeakReference ServiceObjectReference; - - // The name of the Service Object. - string ObjectName; - - public KeyboardThreadingObject(SampleKeyboard so) - { - ObjectName = GetType().Name; - ServiceObjectReference = new WeakReference(so); - } - - // This method will be called during initialization. - public override void ServiceObjectThreadOpen() - { - Logger.Info(ObjectName, "Keyboard Thread Open"); - } - - // This method will be called curing shutdown. - public override void ServiceObjectThreadClose() - { - Logger.Info(ObjectName, "Keyboard Thread Open"); - } - - // Your code used to monitor your device for input should - // go here. The implementation below generates simulated - // input as an example. - public override void ServiceObjectThreadProcedure( - AutoResetEvent ThreadStopEvent) - { - Logger.Info(ObjectName, - "Keyboard Thread Procedure Entered"); - int KeyValue = (int)'a'; - - while (true) - { - // When this method is called by the - // ServiceObjectThreadHelper, it is obligated to - // exit when the event ThreadStopEvent has been - // set. - if (ThreadStopEvent.WaitOne(2000, false)) - { - break; - } - - if (KeyValue <= (int) 'z') - { - Logger.Info(ObjectName, "Reader Thread cycling"); - - // Try to get a strong reference to the Service - // Object using the weak reference saved when - // this helper object was created. - SampleKeyboard Keyboard = - ServiceObjectReference.Target - as SampleKeyboard; - - // If this fails, that means the Service Object - // has already been disposed of - exit the thread. - if (Keyboard == null) - { - break; - } - - if (Keyboard.DataEventEnabled == true) - { - // Call a method implemented in our Keyboard - // class to queue the key stroke. - Keyboard.SendKey(KeyValue); - - // Simulate input by moving through the - // alphabet, sending one character at a time. - KeyValue++; - if (KeyValue >= (int)'z') - { - // Once you run out of input, simulate a - // power state change. Setting the SO's - // PowerState property to - // PowerState.Offline will cause a - // StatusUpdateEvent to be sent to the - // application. - Keyboard.ChangePowerState( - PowerState.Offline); - - // Release the strong reference. - Keyboard = null; - - // There is no more work, so exit the - // loop. - break; - } - } - - // Release the strong reference. - Keyboard = null; - } - } - } - } - #endregion Thread Helper Class -} -``` - -## Compiling the Code - -- This sample requires that the code from the [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md) section be included. -- The assemblies **Microsoft.PointOfService** and **Microsoft.PointOfService.BaseServiceObjects** must be referenced. - -## See Also - -#### Tasks - -- [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md) - -#### Other Resources - -- [Developing Service Objects Using Base Classes](developing-service-objects-using-base-classes.md) -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) diff --git a/docs/framework/additional-apis/pos-for-net/scanner-events.md b/docs/framework/additional-apis/pos-for-net/scanner-events.md deleted file mode 100644 index 8eefbd7086b35..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/scanner-events.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Scanner Events -description: Scanner Events (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Scanner Events (POS for .NET v1.14 SDK Documentation) - -Bar code scanners operate asynchronously and therefore have to notify applications when data is available, or the device state has changed. You perform this task by using .NET delegates to raise events to the application. - -As discussed in the [Device Input and Events](device-input-and-events.md) topic, events are queued before they are delivered to the application. The Microsoft Point of Service for .NET (POS for .NET) **Base** classes provide a means for Service Object code to queue events so that their delivery to the application can be deferred until the application can process them. Meanwhile, the Service Object can continue waiting for additional incoming hardware events. - -The Scanner device can send four events to the application. For two of these events, **DataEvent** and **ErrorEvent**, the POS for .NET class provides a protected helper method to simplify the code that is required to raise these events: - -| Event | Method That Queues the Event | -|------------|-----------------------------------------| -| DataEvent | Protected method ScannerBase.GoodRead | -| ErrorEvent | Protected method ScannerBase.FailedRead | - -The two other events, **DirectIOEvent** and **StatusUpdateEvent**, must be raised by using members of the lower-level **ScannerBasic** class. For more information, see [Device Input and Events](device-input-and-events.md). - -Because a Scanner device can deliver data to the system at any time, a Scanner Service Object must wait for data asynchronously by starting a separate reader thread. Events should be queued from this thread as data arrives from the device. - -## To raise events based on device input - -1. Start a reader thread to wait for input from the device. - -2. Wait for input on the reader thread, most frequently by using Win32 direct functions to read data from the USB bus. - -3. After you receive data, verify that the data is valid, for example, that there are enough bytes in the packet for the header and the data type. - -4. If the data is not valid, call the **ScannerBase.FailedScan** method to queue an **ErrorEvent** event that will be raised in the application. - -5. If the data is valid, call the **ScannerBase.GoodScan** method to queue a **DataEvent** event that will eventually be raised in the application. - -## Example - -As soon as input is received from the device, the Service Object queues the appropriate event. You can do this by writing a method, such as the one in the sample in this topic that would be called from the reader thread of the Service Object. - -```csharp -// A Service Object may implement a method such as this one to -// be called from the reader thread of the Service Object. -void OnDataScanned(byte[] data) -{ - // Ignore input if process in the Error state. There is no - // need to send an ErrorEvent to the application, because it has - // already been notified by this point. - if (State == ControlState.Error) - { - return; - } - - // Make sure that the incoming buffer is large enough to contain - // at least the header and type data. - if ((int)data[1] < 5) - { - // By calling FailedRead, you are queueing an - // ErrorEvent for eventual delivery to the application. - FailedScan(); - } - else - { - // The buffer received from the device will be longer - // than we need. Therefore, trim it down. Allocate space for - // the number of bytes contained in data[1], plus one - // more for the first byte in the buffer. - byte[] b = new byte[(int)data[1] + 1]; - - // Copy the data into a new buffer. - for (int i = 0; i <= (int)data[1]; i++) - { - b[i] = data[i]; - } - - // By calling GoodScan, you are queueing a DataEvent - // which will delivered to the application when it is suitable. - GoodScan(b); - } -} -``` - -This sample cannot be compiled on its own, but may be inserted into a complete scanner Service Object implementation. - -## See Also - -#### Tasks - -- [Creating a Basic Service Object Code Template](creating-a-basic-service-object-code-template.md) - -#### Concepts - -- [Base Class DirectIO Method](base-class-directio-method.md) -- [Device Input and Events](device-input-and-events.md) - -#### Other Resources - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) diff --git a/docs/framework/additional-apis/pos-for-net/scanner-implementation.md b/docs/framework/additional-apis/pos-for-net/scanner-implementation.md deleted file mode 100644 index e4049d839a182..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/scanner-implementation.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Scanner Implementation -description: Scanner Implementation (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Scanner Implementation (POS for .NET v1.14 SDK Documentation) - -A scanner device is used to read bar code data. - -The scanner is an exclusive-use device, as follows: - -- The application must claim the device before enabling it. -- The application must claim and enable the device before the device begins reading input. - -The scanner object follows the general model for event-drive input: - -- When input is received from the device, a **DataEvent** event is queued using the Microsoft helper method, **ScannerBase.GoodRead**. If the device receives bad data, the Service Object may also queue an **ErrorEvent** event by calling **ScannerBase.FailedRead**. -- If the **PosCommon.AutoDisable** property is set to **true**, the **ScannerBase** class will set the **PosCommon.EnableDevice** property to **false**. If your Service Object has implemented this method, it will need to disable the device as appropriate. - -A queued **DataEvent** event will only be delivered to the application when the property **ScannerBase.DataEventEnabled** is set to **true**. - -- The Unified Point Of Service (UnifiedPOS) specification requires that data from the incoming **DataEvent** must be copied into the corresponding properties before being delivered to the application. The method **ScannerBase.PreFireEvent**, which is called just before delivering the **DataEvent** to the application, meets this requirement by calling **ScannerBase.DecodeScanDataLabel** and **ScannerBase.DecodeScanDataType** if the **DecodeData** property is set to **true**. Usually you have to implement these methods in your Service Object. -- Scanned data is placed into the **Scanner.BaseScanData** property. If the application has set the **ScannerBase.DecodeData** property to **true**, then data is decoded into the **ScannerBase.ScanDataLabel** and **ScanDataType** properties. -- Before the **DataEvent** is delivered to the application, the property **ScannerBase.DataEventEnabled** is set to **false**. This prevents further **DataEvents** from being delivered to the application until it has finished processing the current one. The application sets **ScannerBase.DataEventEnabled** to **true** when it is ready to process incoming events. -- The **ScannerBasic.DataCount** property may be read to obtain the total number of queued events. -- All queued events may be deleted by calling the **ScannerBasic.ClearInput** method. - -## In This Section - -- [Data Decoding](data-decoding.md) - Describes the code necessary to decode device-specific data. - -- [Scanner Events](scanner-events.md) - Demonstrates how a scanner Service Object uses POS for .NET queuing to raise events to applications. diff --git a/docs/framework/additional-apis/pos-for-net/service-object-overview.md b/docs/framework/additional-apis/pos-for-net/service-object-overview.md deleted file mode 100644 index 9386384929c8f..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/service-object-overview.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Service Object Overview -description: Service Object Overview (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Service Object Overview (POS for .NET v1.14 SDK Documentation) - -Service Objects function as the interface between an application and a POS device. Each Service Object facilitates communication between the application and its associated device by implementing one device interface. The device interfaces provide the properties, methods, and events required by unique POS devices. This enables the application to manage and read data from them. - -Not all devices receive the same level of support in POS for .NET. Each POS device that POS for .NET recognizes is provided with up to three levels of **Interface** classes that provide some level of functional support. The three levels of **Interface** classes are **Interface** classes, **Basic** classes, and **Base** classes. For more information about POS for .NET **Interface** classes, see [POS for .NET Class Tree](pos-for-net-class-tree.md). For more information about the default level of support provided by Service Objects, see the individual entries for each Service Object in and [Supported Device Classes](supported-device-classes.md). - -Because each Service Object facilitates communications with a specific device, a different Service Object instance must be created for each connected peripheral device. - -## See Also - -#### Reference - -- -- - -#### Concepts - -- [POS for .NET Architecture](pos-for-net-architecture.md) -- [Supported Device Classes](supported-device-classes.md) -- [POS for .NET Device Basic Classes](pos-for-net-device-basic-classes.md) - -#### Other Resources - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) diff --git a/docs/framework/additional-apis/pos-for-net/service-object-samples-getting-started.md b/docs/framework/additional-apis/pos-for-net/service-object-samples-getting-started.md deleted file mode 100644 index b2c09ab4f9c6b..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/service-object-samples-getting-started.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "Service Object Samples: Getting Started" -description: "Service Object Samples: Getting Started (POS for .NET v1.14 SDK Documentation)" -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Service Object Samples: Getting Started (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) provides a class tree which implements most of the functionality required by the Unified Point Of Service (UnifiedPOS) specification. In many cases, the Service Object developer only needs to implement the methods and properties required to operate the specific piece of hardware, for which the Service Object is being written. - -This section provides a step-by-step guide to creating a simple, but functional sample Service Object for a Magnetic Strip Reader (MSR) device. - -## In This Section - -- [Setting up a Service Object Project](setting-up-a-service-object-project.md) - Explains how to use Visual Studio to create a class library project with references to the appropriate POS for .NET assemblies. - -- [Creating a Basic Service Object Code Template](creating-a-basic-service-object-code-template.md) - Continues adding to the sample by modifying the code to create the necessary references, attributes, and methods to create a fundamental Service Object template. - -- [Adding Plug and Play Support](adding-plug-and-play-support.md) - Adds to the sample template by integrating Plug and Play support. - -- [Creating a Service Object Sample](creating-a-service-object-sample.md) - Describes how the sample code implements the methods needed to compile the sample. The Service Object will now be recognized by POS for .NET applications, but has no functionality. - -- [Introducing Service Object Reader Threads](introducing-service-object-reader-threads.md) - Introduces the concept of multithreaded programming in Service Objects. A sample thread helper class is included upon which other multithreaded Service Object samples are built. - -- [Creating a Working, Multithreaded Service Object](creating-a-working-multithreaded-service-object.md) - Implements a complete Magnetic Strip Reader (MSR) Service Object. It expands the appropriate methods from the earlier sample so that it returns data to the application. In addition, it uses the thread helper class from the previous section to start and stop a separate read thread. - -## Related Sections - -- [System Configuration](system-configuration.md) - Describes how to configure POS for .NET to meet the needs of your installation. - -- [Developing a POS Application](developing-a-pos-application.md) - Explains how to create POS for .NET applications, the ultimate consumers of POS for .NET Service Objects. diff --git a/docs/framework/additional-apis/pos-for-net/serviceobject-class.md b/docs/framework/additional-apis/pos-for-net/serviceobject-class.md deleted file mode 100644 index 2d5bd1326d6d7..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/serviceobject-class.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: ServiceObject Class -description: ServiceObject Class (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# ServiceObject Class (POS for .NET v1.14 SDK Documentation) - -The **ServiceObject** class represents the management view of a Service Object. - -## Properties - -| Name | Description | -|---------------|---------------------------------------------------------------------------------------------------| -| Name | Represents the name of the Service Object in string format. | -| Type | Represents the type of the POS device class that is implemented by the Service Object. | -| UposVersion | Represents version of the UPOS standard that the Service Object is implementing in string format. | -| Path | Represents the path of the Service Object’s assembly as a string. | -| Version | The version number of the Service Object’s assembly in string format. | -| Compatibility | The major version of POS for .NET with which the Service Object is compatible. | -| Description | A short string describing the Service Object. | -| IsPlugNPlay | A Boolean indicator of whether the Service Object supports Plug and Play. | -| IsLegacy | A Boolean indicator of whether the device is using a legacy (OPOS) Service Object. | - -## Methods - - - ---- - - - - - - - - - - - - - - - - -
NameDescription

AddDevice

Adds a non-Plug and Play device for this Service Object.

-

Accepts one string parameter, Path, which is the hardware path of the non-Plug and Play device to add. There is no return value.

DeleteDevice

Deletes a non-Plug and Play device associated with this Service Object.

-

Accepts one string parameter, Path, which is the hardware path of the non-Plug and Play device to delete. There is no return value.

- - -## See Also - -#### Tasks - -- [Using VBScript to Manage Devices](using-vbscript-to-manage-devices.md) - -#### Other Resources - -- [Using the WMI API to Manage Devices](using-the-wmi-api-to-manage-devices.md) diff --git a/docs/framework/additional-apis/pos-for-net/setting-up-a-service-object-project.md b/docs/framework/additional-apis/pos-for-net/setting-up-a-service-object-project.md deleted file mode 100644 index db0bf1c981669..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/setting-up-a-service-object-project.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Setting up a Service Object Project -description: Setting up a Service Object Project (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Setting up a Service Object Project (POS for .NET v1.14 SDK Documentation) - -To begin programming your Service Object, you first need to create a new **Class Library** project and add the appropriate resources to your project. To create your basic project, perform the following steps. - -## To create a new class library project for your Service Object - -1. Open **Visual Studio**. On the **File** menu, choose **New** and then choose **Project** to create a new project. - -2. In the **New Project** dialog box, select **Class Library** from the **Visual Studio Installed Templates** list. - -3. Choose an appropriate name for your Service Object. Note that **Visual Studio** creates a namespace for your project based on the name that you enter here. - -## To add references to Point of Service assemblies - -1. Be sure that you have installed the **Microsoft Point of Service** product. - -2. From the **Solution Explorer** window, right-click the **References** drop-down and then select **Add References**. - -3. On the **Browse** tab, locate the **Microsoft.PointOfService** and **Microsoft.PointOfService.ControlBase** assemblies in the **Program Files\\Microsoft Point of Service\\SDK** directory. - -4. Select both assemblies and add them to your reference list. - -## To add the PosAssembly global attribute to your assembly - -1. The requires that Service Object assemblies contain the global attribute. - -2. From the Solution Explorer window, open and edit the file **AssemblyInfo.cs**. - -3. At the top of the file, add a **using** directive for **Microsoft.PointOfService**, for example: - - **using Microsoft.PointOfService;** - -4. Insert the global attribute, **PosAssembly**, into the file. This attribute takes a single argument for the name of your organization. For example: - - **\[assembly: PosAssembly("Your Company Name, Inc")\]** - -## See Also - -#### Concepts - -- [Attributes for Identifying Service Objects and Assigning Hardware](attributes-for-identifying-service-objects-and-assigning-hardware.md) - -#### Other Resources - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) diff --git a/docs/framework/additional-apis/pos-for-net/statistics-sample.md b/docs/framework/additional-apis/pos-for-net/statistics-sample.md deleted file mode 100644 index 74b5db2350f73..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/statistics-sample.md +++ /dev/null @@ -1,700 +0,0 @@ ---- -title: Statistics Sample -description: Statistics Sample (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Statistics Sample (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) Service Objects continually track and update a number of device statistics for each connected device. The statistic tracking is accomplished using the class, which contains methods for resetting, retrieving, and updating statistics, as well as helper methods for creating statistics, incrementing statistics, and loading or saving statistics to or from XML file storage. - -Statistics reporting in POS for .NET supports statistics stored in either hardware or software. Software-based statistics are stored in an XML statistics file, \\Program Files\\Common Files\\Microsoft Shared\\Point of Service\\Statistics\\PosDeviceStatistics.xml, and updated at a globally defined flush interval which is determined at the time of system installation and setup. By default, this flush interval is 1 second. When the application claims a device, POS for .NET loads the appropriate statistics from the XML file. - -Device specific statistics management is supported by the **Base** or **Basic** device class interface. Service Objects inheriting from a **Base** or **Basic** class are typically only required to call **IncrementStatistic**, which increments the value of a specified statistic, or **SetStatistic**, which sets one statistic to a specified value. All other statistics implementation is provided by the **Base** or **Basic** class interface. - -The key members of the **DeviceStatistics** class are detailed below: - -- **CapStatisticsReporting** identifies the statistics reporting capabilities of the device. When **CapStatisticsReporting** is set to **false**, no statistical data regarding the device is available. If **CapStatisticsReporting** is **true**, some statistical data is available, and the device may begin accumulating various statistics regarding usage. The information accumulated and reported is device-specific, and is retrieved using the **RetrieveStatistics** method. - -- **CapUpdateStatistics** defines whether the gathered statistics can be reset or updated by an application employing the **UpdateStatistics** and **ResetStatistics** methods. This property is only valid if **CapStatisticsReporting** is **true**. If **CapStatisticsReporting** is **false**, the **CapUpdateStatistics** property is always **false**. - -- **ResetStatistics** can only be called if both **CapStatisticsReporting** and **CapUpdateStatistics** are **true**. This method resets one, some, or all of the resettable device statistics to zero. It resets the defined resettable statistics in a device to zero. All the requested statistics must be successfully reset in order for this method to complete successfully. Otherwise, an error is thrown with the Extended **ErrorCode** method. This method is always executed synchronously. - -- **UpdateStatistics** sets one, some, or all of the resettable device statistics to the specified values. All the requested statistics must be successfully updated in order for this method to complete successfully. If some cannot be updated for any reason, an **ErrorCode** event is returned. Both **CapStatisticsReporting** and **CapUpdateStatistics** must be set to **true** to call this method. The **UpdateStatistics** method is always executed synchronously. - -- **RetrieveStatistics** retrieves the requested statistics from a device. **CapStatisticsReporting** must be **true** in order to successfully use this method. All calls to **RetrieveStatistics** will return the following XML as a minimum. - - ```xml - - - - - RequestedStatistic - 1234 - - - - 1.10 - - Cashdrawers R Us - CD-123 - 12345 - 1.0 Rev. B - RS232 - 2000-03-01 - - - ``` - - If the application requests a statistic name that the device does not support, the `` entry will be returned with an empty ``. For example: - - ```xml - - RequestedStatistic - - - ``` - - All statistics that the device collects that are manufacturer specific and not defined in the schema will be returned in a `` tag instead of a `` tag. For example: - - ```xml - - TheAnswer - 42 - - ``` - - When an application requests all statistics from the device, the device returns a `` entry for every defined statistic in the device category. The device category is defined by the version of the XML schema specified by the **version** attribute in the `` tag. If the device does not record any statistics, the `` tag will be empty. - -POS for .NET uses handlers to perform the reading and writing of statistics in a manner similar to the way events are handled. When one of these statistic handlers is created, it is assigned to a particular device statistic. When this statistic is read or updated, the handler calls a delegate that is able to read from or write to the device as necessary. - -Statistic handlers use different types of delegates to perform different statistics operations. delegates are used to retrieve statistic values, while delegates assign statistic values. **GetStatistics** delegates take the name of the statistic to be retrieved as a parameter and return a string representing the value of that statistic. **SetStatistic** delegates take the name of the statistic to be changed and the value which is to be assigned to that statistic as parameters. **SetStatistic** delegates do not return any values. - -Statistics handlers may be assigned to any of the standard statistics defined by the Unified Point Of Service (UnifiedPOS) specification, but custom handlers for any statistics that are created using **CreateStatistic** by Service Object code are also supported. - -## Example - -The following code example demonstrates how to enable, handle, and retrieve statistics data from an MSR device. - -```csharp -// File FORM1.CS -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using System.Xml; -using System.IO; - -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; - -namespace Statistics -{ - public partial class SampleStatistics : Form - { - // Indicates whether or not the Service Object has - // been started. - bool ServiceObjectStarted = false; - - // The Service Object. - PosCommon so = null; - - public SampleStatistics() - { - InitializeComponent(); - - // Disable the buttons until the SO is loaded successfully. - UpdateControls(); - } - - public void UpdateControls() - { - btnGenerateStatistics.Enabled = ServiceObjectStarted; - btnRetrieveStatistics.Enabled = ServiceObjectStarted ; - txtStatisticName.Enabled = ServiceObjectStarted; - - // The statistic name text box is disabled until the - // Service Object is loaded. - if (ServiceObjectStarted) - { - btnStartSO.Text = "Close SO"; - } - else - { - txtStatisticName.Clear(); - txtRetrievedStatistics.Clear(); - btnStartSO.Text = "Start SO"; - } - - // The retrieve one statistic button is disabled until - // the user has entered a statistic name. - if (txtStatisticName.TextLength > 0) - { - btnRetreiveStatistic.Enabled = true; - } - else - { - btnRetreiveStatistic.Enabled = false; - } - } - - private void StartServiceObject(object sender, EventArgs e) - { - PosExplorer explorer = new PosExplorer(this); - string SOName = "SampleStatistics"; - - if (ServiceObjectStarted) - { - so.DeviceEnabled = false; - so.Close(); - so = null; - ServiceObjectStarted = false; - UpdateControls(); - } - else - { - foreach (DeviceInfo d in explorer.GetDevices()) - { - if (d.ServiceObjectName == SOName) - { - try - { - // Standard Service Object startup. - so = explorer.CreateInstance(d) - as PosCommon; - - so.Open(); - so.Claim(0); - so.DeviceEnabled = true; - - // Application-specific setup. - ServiceObjectStarted = true; - UpdateControls(); - } - catch - { - // Something went wrong starting the SO - MessageBox.Show("The Service Object '" + - SOName + "' failed to load", - "Service Object Error", - MessageBoxButtons.OK, - MessageBoxIcon.Exclamation); - return; - } - - break; - } - } - - if (so == null) - { - // No Service Object with the - // specified name could be found. - MessageBox.Show("The Service Object '" + - SOName + "' could not be found", - "Service Object Error", - MessageBoxButtons.OK, - MessageBoxIcon.Exclamation); - } - } - } - - private void GenerateStatistics(object sender, EventArgs e) - { - // In this example case, you use this - // property to tell the Service Object to change statistic - // values. - so.DeviceEnabled = true; - - // Report status. - txtRetrievedStatistics.Text = "DeviceEnabled called to" + - " to modify statistic values."; - } - - private void RetrieveStatistics(object sender, EventArgs e) - { - string statistics; - bool IsXml = true; - - try - { - statistics = so.RetrieveStatistics(); - } - catch - { - statistics = "No statistics found"; - IsXml = false; - } - - DisplayStatistics(statistics, IsXml); - } - - private void RetrieveOneStatistic(object sender, EventArgs e) - { - string statistics; - bool IsXml = true; - - try - { - statistics = so.RetrieveStatistic( - txtStatisticName.Text); - } - catch - { - statistics = "Statistic not found: " + - txtStatisticName.Text; - - IsXml = false; - } - - DisplayStatistics(statistics, IsXml); - txtStatisticName.Clear(); - btnRetreiveStatistic.Enabled = false; - } - - private void StatisticSizeChanged(object sender, EventArgs e) - { - if (txtStatisticName.TextLength > 0) - { - btnRetreiveStatistic.Enabled = true; - } - else - { - btnRetreiveStatistic.Enabled = false; - } - } - - // When retrieving statistics, POS for .NET returns a block - // of XML (as specified in the UPOS specification). This - // method will make it look readable with white space - // and indenting and then display it in the text box. - private void DisplayStatistics(string inputString, bool isXml) - { - string s = null; - - // In case of an exception, you do not have an XML - // string, so just display the error description. Otherwise, - // load the XML string into an XmlDocument object and - // make it look readable. - if (!isXml) - { - s = inputString; - } - if(isXml) - { - // Create new XML document and load the statistics - // XML string. - XmlDocument doc = new XmlDocument(); - doc.LoadXml(inputString); - - // Create a XmlTextWriter using a MemoryStream and - // tell it to indent the XML output (so that it is - // readable.) - MemoryStream m = new MemoryStream(); - XmlTextWriter writer = new XmlTextWriter(m, null); - writer.Formatting = Formatting.Indented; - writer.Indentation = 4; - - // Save the document to the memory stream using the - // XmlWriter. - doc.Save(writer); - - // The stream will be encoded as UTF8, so convert the - // buffer into a string. - UTF8Encoding u = new UTF8Encoding(); - s = u.GetString(m.GetBuffer()); - } - - // Write the string to the text box. - txtRetrievedStatistics.Text = s; - } - } -} -``` - -```csharp -// File FORM1.DESIGNER.CS -namespace Statistics -{ - partial class SampleStatistics - { - ///

- /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.btnStartSO = new System.Windows.Forms.Button(); - this.btnGenerateStatistics = new System.Windows.Forms.Button(); - this.btnRetrieveStatistics = new System.Windows.Forms.Button(); - this.txtStatisticName = new System.Windows.Forms.TextBox(); - this.txtRetrievedStatistics = new System.Windows.Forms.TextBox(); - this.btnRetreiveStatistic = new System.Windows.Forms.Button(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.groupBox1.SuspendLayout(); - this.SuspendLayout(); - // - // btnStartSO - // - this.btnStartSO.Location = new System.Drawing.Point(45, 35); - this.btnStartSO.Name = "btnStartSO"; - this.btnStartSO.Size = new System.Drawing.Size(133, 23); - this.btnStartSO.TabIndex = 0; - this.btnStartSO.Text = "Start SO"; - this.btnStartSO.UseVisualStyleBackColor = true; - this.btnStartSO.Click += new System.EventHandler(this.StartServiceObject); - // - // btnGenerateStatistics - // - this.btnGenerateStatistics.Location = new System.Drawing.Point(45, 75); - this.btnGenerateStatistics.Name = "btnGenerateStatistics"; - this.btnGenerateStatistics.Size = new System.Drawing.Size(133, 23); - this.btnGenerateStatistics.TabIndex = 1; - this.btnGenerateStatistics.Text = "GenerateStatistics"; - this.btnGenerateStatistics.UseVisualStyleBackColor = true; - this.btnGenerateStatistics.Click += new System.EventHandler(this.GenerateStatistics); - // - // btnRetrieveStatistics - // - this.btnRetrieveStatistics.Location = new System.Drawing.Point(45, 117); - this.btnRetrieveStatistics.Name = "btnRetrieveStatistics"; - this.btnRetrieveStatistics.Size = new System.Drawing.Size(133, 23); - this.btnRetrieveStatistics.TabIndex = 2; - this.btnRetrieveStatistics.Text = "Retrieve Statistics"; - this.btnRetrieveStatistics.UseVisualStyleBackColor = true; - this.btnRetrieveStatistics.Click += new System.EventHandler(this.RetrieveStatistics); - // - // txtStatisticName - // - this.txtStatisticName.Location = new System.Drawing.Point(16, 68); - this.txtStatisticName.Name = "txtStatisticName"; - this.txtStatisticName.Size = new System.Drawing.Size(205, 20); - this.txtStatisticName.TabIndex = 4; - this.txtStatisticName.TextChanged += new System.EventHandler(this.StatisticSizeChanged); - // - // txtRetrievedStatistics - // - this.txtRetrievedStatistics.BackColor = System.Drawing.Color.White; - this.txtRetrievedStatistics.Location = new System.Drawing.Point(45, 157); - this.txtRetrievedStatistics.Multiline = true; - this.txtRetrievedStatistics.Name = "txtRetrievedStatistics"; - this.txtRetrievedStatistics.ReadOnly = true; - this.txtRetrievedStatistics.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtRetrievedStatistics.Size = new System.Drawing.Size(476, 247); - this.txtRetrievedStatistics.TabIndex = 5; - // - // btnRetreiveStatistic - // - this.btnRetreiveStatistic.Location = new System.Drawing.Point(16, 30); - this.btnRetreiveStatistic.Name = "btnRetreiveStatistic"; - this.btnRetreiveStatistic.Size = new System.Drawing.Size(133, 23); - this.btnRetreiveStatistic.TabIndex = 6; - this.btnRetreiveStatistic.Text = "Retrieve Statistic"; - this.btnRetreiveStatistic.UseVisualStyleBackColor = true; - this.btnRetreiveStatistic.Click += new System.EventHandler(this.RetrieveOneStatistic); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.btnRetreiveStatistic); - this.groupBox1.Controls.Add(this.txtStatisticName); - this.groupBox1.Location = new System.Drawing.Point(219, 35); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(302, 105); - this.groupBox1.TabIndex = 7; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Single Statistic"; - // - // SampleStatistics - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.MenuBar; - this.ClientSize = new System.Drawing.Size(565, 439); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.txtRetrievedStatistics); - this.Controls.Add(this.btnRetrieveStatistics); - this.Controls.Add(this.btnGenerateStatistics); - this.Controls.Add(this.btnStartSO); - this.Name = "SampleStatistics"; - this.Text = "Form1"; - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button btnStartSO; - private System.Windows.Forms.Button btnGenerateStatistics; - private System.Windows.Forms.Button btnRetrieveStatistics; - private System.Windows.Forms.TextBox txtStatisticName; - private System.Windows.Forms.TextBox txtRetrievedStatistics; - private System.Windows.Forms.Button btnRetreiveStatistic; - private System.Windows.Forms.GroupBox groupBox1; - } -} -``` - -```csharp -// File STATISTICSSO.CS -using System; -using System.Collections.Generic; -using System.Text; - -using Microsoft.PointOfService; -using Microsoft.PointOfService.BaseServiceObjects; - -[assembly: PosAssembly("Service Object Contractors, Inc.")] - -namespace SOSamples.Statistics -{ - [ServiceObject(DeviceType.Msr, - "SampleStatistics", - "Sample Statistics Service Object", - 1, - 9)] - - public class StatisticsTest : MsrBase - { - // This will be incremented every time DeviceEnabled - // is set so that different sets of demonstration - // statistics can be generated. - int enableCount = 0; - - // The name of a custom created statistic used to demonstrate - // custom Statistic handlers. - private const string PollingStatistic = "Polling Interval"; - - // Statistic used to demonstrate IncrementStatistic. - private const string TestIncrement = "MyIncrementableStat"; - - // String returned from CheckHealth - private string MyHealthText; - - public StatisticsTest() - { - DevicePath = "Sample Statistics"; - } - - // This is the delegate which will be called for each - // statistic that we have associated with this delegate by - // calling SetStatisticHandler(). - // - // Delegates like this should most commonly be used - // to get and set statistics in hardware. The delegate - // allows the POS for .NET statistic subsystem to query - // the value of a statistic in real time, before it is - // returned to the application. - private string GetHardwareInfo(string name) - { - // Add your code to query values from hardware here. - - // Very simple demonstration: just return the name - // of the statistic as its value; - return name; - } - - // In a typical Service Object implementation, statistics - // will be modified throughout the Service Object code. This - // method demonstrates the methods used to modify statistic - // values. - public void SetDemonstrationStatistics() - { - // IncrementStatistic can be used to easily - // increment a numeric statistic. - IncrementStatistic(TestIncrement); - - switch(enableCount) - { - case 0: - SetStatisticValue(StatisticManufacturerName, - "Microsoft Corporation"); - break; - case 1: - SetStatisticValue(StatisticManufacturerName, - "Service Control Contractors, Inc."); - break; - case 2: - SetStatisticValue(StatisticManufacturerName, - "Point of Service Controls .com"); - break; - } - - if (++enableCount == 3 ) - { - enableCount = 0; - } - } - - #region PosCommon overrides - // Returns the result of the last call to CheckHealth() - - public override void Open() - { - base.Open(); - - // In your implementation of Open(), your Service Object - // code should: - // 1. Initialize statistics. - // 2. Create custom statistics. - // 3. Set statistic handlers for hardware Statistics. - - // 1. Initialize statistics - SetStatisticValue(StatisticManufacturerName, - "Microsoft Corporation"); - SetStatisticValue(StatisticManufactureDate, - "2004-10-23"); - SetStatisticValue(StatisticModelName, - "Statistic Sample"); - SetStatisticValue(StatisticMechanicalRevision, - "1.0"); - SetStatisticValue(StatisticInterface, - "USB"); - - // 2a. Create a new new statistic to test Increment - // method. No custom handler needed. - CreateStatistic(TestIncrement, false, "blobs"); - - // 2b. Create a new manufacturer statistic to demonstrate - // custom attributes with StatisticHandlers. - CreateStatistic(PollingStatistic, false, - "milliseconds"); - - // 3. Set handlers for statistics stored in hardware. - SetStatisticHandlers(PollingStatistic, - new GetStatistic(GetHardwareInfo), null); - SetStatisticHandlers(StatisticSerialNumber, - new GetStatistic(GetHardwareInfo), null); - } - - public override bool DeviceEnabled - { - get - { - return base.DeviceEnabled; - } - set - { - // This method will set various statistics to - // demonstrate the statistic APIs. We are going - // to change statistic values every time the device - // is enabled. This operation is just for - // demonstration and would not be found in live code. - SetDemonstrationStatistics(); - - base.DeviceEnabled = value; - } - } - - public override string CheckHealthText - { - get - { - // MsrBasic.VerifyState(musBeClaimed, - // mustBeEnabled). This may throw an exception - VerifyState(false, false); - - return MyHealthText; - } - } - - public override string CheckHealth( - HealthCheckLevel level) - { - // Verify that device is open, claimed, and enabled. - VerifyState(true, true); - - // Your code here: - // check the health of the device and return a - // descriptive string. - - // Cache result in the CheckHealthText property. - MyHealthText = "Ok"; - return MyHealthText; - } - - public override DirectIOData DirectIO( - int command, - int data, - object obj) - { - // Verify that the device is open. - VerifyState(false, false); - - return new DirectIOData(data, obj); - } - #endregion PosCommon overrides - - #region MsrBasic Overrides - protected override MsrFieldData ParseMsrFieldData( - byte[] track1Data, - byte[] track2Data, - byte[] track3Data, - byte[] track4Data, - CardType cardType) - { - // Your code here: - // Implement this method to parse track data - // into fields which will be returned as - // properties to the application (e.g.,FirstName, - // AccountNumber, etc.) - return new MsrFieldData(); - } - - protected override MsrTrackData ParseMsrTrackData( - byte[] track1Data, - byte[] track2Data, - byte[] track3Data, - byte[] track4Data, - CardType cardType) - { - // Your code here: - // Implement this method to convert raw track data. - return new MsrTrackData(); - } - #endregion MsrBasic Overrides - } -} -``` - -## Compiling the Code - -- For additional information about creating and compiling a Service Object project, see [Service Object Samples: Getting Started](service-object-samples-getting-started.md). - -## See Also - -#### Other Resources - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) -- [System Configuration](system-configuration.md) diff --git a/docs/framework/additional-apis/pos-for-net/supported-device-classes.md b/docs/framework/additional-apis/pos-for-net/supported-device-classes.md deleted file mode 100644 index 0163ff01dfac5..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/supported-device-classes.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Supported Device Classes (POS for .NET v1.14 SDK Documentation) -description: Supported Device Classes (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Supported Device Classes (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) v1.14 represents the 36 peripheral devices identified in the Unified Point of Service (UnifiedPOS) v1.14 specification by abstract **Interface** and **Basic** device classes. POS for .NET also provides nine abstract **Base** device classes that further implement core POS functionality specific to those particular device types. - -Hardware vendors use the device classes to create Service Objects that link their peripheral devices to the applications. - -## Interface Classes - -POS for .NET supplies **Interface** classes for all 36 UnifiedPOS devices. The **Interface** classes provide the entry points as specified in the UnifiedPOS specification, but offer minimal functionality. - -## Basic Classes - -POS for .NET **Basic** classes contain basic functional support for all 36 devices. **Basic** classes provide generic support for opening, claiming, and enabling the device, device statistics, and management of delivering events to the application. In addition, each **Basic** class contains a set of inherited and protected methods that can be implemented by the Service Object. - -## Base Classes - -For the nine primary UnifiedPOS device types, POS for .NET supplies fully functional **Base** classes that extend their corresponding **Basic** classes with device-specific members. You could think of these classes as enhanced or extended **Basic** classes. Because **Base** classes provide a nearly complete implementation, Service Object developers should derive from these classes whenever possible. - -## UnifiedPOS Devices and POS for .NET Device Classes - -The following table lists the UnifiedPOS devices with their equivalent POS for .NET **Basic** and **Base** device classes (where applicable). - -| UnifiedPOS Device | Interface Class | Basic Class | Base Class | -|-------------------------------------------|--------------------|-------------------------|------------------| -| Belt | Belt | BeltBasic | -| Biometrics | Biometrics | BiometricsBasic | -| Bill Acceptor | BillAcceptor | BillAcceptorBasic | -| Bill Dispenser | BillDispenser | BillDispenserBasic | -| Bump Bar | BumpBar | BumpBarBasic | -| Cash Changer | CashChanger | CashChangerBasic | -| Cash Drawer | CashDrawer | CashDrawerBasic | CashDrawerBase | -| CAT - Credit Authorization Terminal | Cat | CatBasic | -| Check Scanner | CheckScanner | CheckScannerBasic | CheckScannerBase | -| Coin Acceptor | CoinAcceptor | CoinAcceptorBasic | -| Coin Dispenser | CoinDispenser | CoinDispenserBasic | -| Electronic Journal | ElectronicJournal | ElectronicJournalBasic | -| Electronic Value Reader / Writer | ElectronicValueRW | ElectronicValueRWBasic | -| Fiscal Printer | FiscalPrinter | FiscalPrinterBasic | -| Gate | Gate | GateBasic | -| Hard Totals | HardTotals | HardTotalsBasic | -| Image Scanner | ImageScanner | ImageScannerBasic | -| Item Dispenser | ItemDispenser | ItemDispenserBasic | -| Keylock | Keylock | KeylockBasic | -| Lights | Lights | LightsBasic | -| Line Display | LineDisplay | LineDisplayBasic | LineDisplayBase | -| MICR - Magnetic Ink Character Recognition | Micr | MicrBasic | -| Motion Sensor | MotionSensor | MotionSensorBasic | -| MSR - Magnetic Stripe Reader | Msr | MsrBasic | MsrBase | -| PIN Pad | PinPad | PinPadBasic | PinPadBase | -| Point Card Reader / Writer | PointCardRW | PointCardRWBasic | -| POS Keyboard | PosKeyboard | PosKeyboardBasic | PosKeyboardBase | -| POS Power | PosPower | PosPowerBasic | -| POS Printer | PosPrinter | PosPrinterBasic | PosPrinterBase | -| Remote Order Display | RemoteOrderDisplay | RemoteOrderDisplayBasic | -| RFID Scanner | RFIDScanner | RFIDScannerBasic | RFIDScannerBase | -| Scale | Scale | ScaleBasic | -| Scanner (Bar Code Reader) | Scanner | ScannerBasic | ScannerBase | -| Signature Capture | SignatureCapture | SignatureCaptureBasic | -| Smart Card Reader / Writer | SmartCardRW | SmartCardRWBasic | -| Tone Indicator | ToneIndicator | ToneIndicatorBasic | - -## See Also - -#### Reference - -- -- - -#### Concepts - -- [What's New in POS for .NET v1.14](whats-new-in-pos-for-net-v114-and-v1141.md) - -#### Other Resources - -- [POS for .NET v1.14 Features](pos-for-net-v1141-features.md) diff --git a/docs/framework/additional-apis/pos-for-net/system-configuration.md b/docs/framework/additional-apis/pos-for-net/system-configuration.md deleted file mode 100644 index fc807e633c184..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/system-configuration.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: System Configuration -description: System Configuration (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# System Configuration (POS for .NET v1.14 SDK Documentation) - -Microsoft Point of Service for .NET (POS for .NET) has several configurable settings which can be adapted to meet the needs of a particular installation. This section explains how to modify the various POS for .NET settings. - -## In This Section - -- [POS for .NET Registry Settings](pos-for-net-registry-settings.md) - Shows which keys and values are used by POS for .NET and how they can be modified. Basic POS for .NET settings are stored in the Windows Registry. - -- [POS Device Manager Output](pos-device-manager-output.md) - Contains details about how to use the configuration file created by the POS Device Manager (POSDM.EXE). - -- [Point of Service Performance Counters](point-of-service-performance-counters.md) - Explains how to use POS for .NET performance counters to monitor your system. - -- [Plug and Play XML Configuration](plug-and-play-xml-configuration.md) - Demonstrates how POS devices can be associated with a specific Service Object using an XML file instead of assembly attributes. - -## Related Sections - -- [Service Object Samples: Getting Started](service-object-samples-getting-started.md) - Includes a step-by-step guide to creating a functioning Service Object and demonstrates how the features discussed above are utilized. - -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) - Outlines the general concepts of the POS for .NET architecture. diff --git a/docs/framework/additional-apis/pos-for-net/typical-pos-application-architecture.md b/docs/framework/additional-apis/pos-for-net/typical-pos-application-architecture.md deleted file mode 100644 index 472f203d33f4d..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/typical-pos-application-architecture.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Typical POS Application Architecture -description: Typical POS Application Architecture (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Typical POS Application Architecture (POS for .NET v1.14 SDK Documentation) - -The principal elements of POS application architecture are event handlers and the public interface to Service Objects and the Microsoft Point of Service for .NET (POS for .NET) [PosExplorer Class](posexplorer-class.md), as shown in the following illustration. - -![Diagram of event handlers and the public interface to Service Objects and POS for .NET](media/typical-pos-architecture.gif).gif) - -## Event Handlers - -POS for .NET uses five Service Object events to inform POS applications of POS device activities or changes, as specified in the Unified Point Of Service (UnifiedPOS) standard. - -The [PosExplorer Class](posexplorer-class.md) translates Plug and Play notifications into events that it sends to applications. - -Applications implement event handlers to manage these events. - -## Public Interface to Service Objects - -Service Objects expose public methods and properties to POS applications, including those defined in the UnifiedPOS standard. - -POS applications use those methods and properties to get device status and to transfer data to and from devices. - -## Public Interface to PosExplorer - -The **PosExplorer** class exposes public methods to POS applications that create Service Objects and provide information about Service Objects and devices. - -## See Also - -#### Concepts - -- [POS for .NET Architecture](pos-for-net-architecture.md) -- [PosExplorer Class](posexplorer-class.md) - -#### Other Resources - -- [POS for .NET Service Object Architecture](pos-for-net-service-object-architecture.md) -- [Developing a POS Application](developing-a-pos-application.md) diff --git a/docs/framework/additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md b/docs/framework/additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md deleted file mode 100644 index 17d05db3f1059..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: Using Impl Methods for Synchronous or Asynchronous Output -description: Using Impl Methods for Synchronous or Asynchronous Output (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Using Impl Methods for Synchronous or Asynchronous Output (POS for .NET v1.14 SDK Documentation) - -Some POS device types support printed or displayed output, for example, the **PosPrinter** or **LineDisplay**. Service Objects written for output-enabled devices should provide support for both asynchronous and synchronous output. - -An application that performs an operation asynchronously will set the **AsyncMode** property of the Service Object to **true** before calling the desired output method. The Service Object may throw an exception if it is unable to process the request asynchronously, but this is not ideal since it limits the scope of applications that may use that particular Service Object. - -Supporting asynchronous output may, however, require additional and potentially complicated code. This code would manage a queue of incoming requests, maintain a thread to monitor the queue and dispatch requests in the proper order, and raise events back to the application. - -The Microsoft Point of Service for .NET (POS for .NET) **Base** classes can manage all of these tasks for the developer. For each output method, the **Base** class has a helper method associated with each output method. These methods, which end with the **Impl** suffix, are written as if they were simply the synchronous implementation of their parent method. The **Base** class transparently manages a queue, dispatches requests to the **Impl** functions at the right time in the right order, and raises the appropriate events back to the application. This same method is called for both synchronous and asynchronous operations. - -By deriving from a POS for .NET **Base** class, the Service Object gets asynchronous functionality without implementing additional code. - -## Base Class Implementation - -POS for .NET provides **Base** classes for a subset of POS device types. For each output method in these classes, there is a corresponding method with an **Impl** suffix. The Service Object derived from a **Base** class should override only the **Impl** method and not the corresponding parent method. For example, in a class derived from the POS for .NET **Base** class , the Service Object would provide an implementation for **PrintNormalImpl** and would not override **PrintNormal**. - -The POS for .NET **Base** classes implement all output methods and perform the following tasks in order to support the **Impl** method implemented by the Service Object: - -- Validate arguments. -- If the **AsyncMode** property is **false**, the corresponding **Impl** method is called immediately. -- If the **AsyncMode** property is set to **true**: - 1. The request is placed in a queue. This queue is owned by POS for .NET and is managed by its own thread. - 2. Requests on the queue are examined by the queue's thread and the corresponding **Impl** method is called. This call could be delayed if the device is already processing an output request or if a request of higher priority on the queue exists. -- When the **Impl** method returns, the POS for .NET **Base** class code handles all results. For a synchronous call, the method may either return a value or throw an exception. For an asynchronous call, the method may raise **OutputCompleteEvent** or **ErrorEvent** events back to the application. -- **Impl** methods may also return an object which contains not only error information, but also statistics values. - -### Service Object Impl Methods - -Since most processing is handled by the **Base** class code, the Service Object's **Impl** method can be relatively simple. - -In many cases, the state of the device at the time of the original call is required by the **Impl** method. In these situations, the **Base** class code saves the current device state along with the output request. The device state is later sent as an argument to the **Impl** method. For example, the definition for **PrintNormalImpl** is: - -```csharp -protected override PrintResults PrintNormalImpl( - PrinterStation station, - PrinterState printerState, - string data); -``` - -The argument *printerState* above is specific to the **Impl** method and does not exist in the definition. - -The return value of **Impl** functions also differs from their calling methods. For example, note that the **PrintNormalImpl** method returns a class of type . In addition to **ErrorCode**, **ErrorCodeExtended**, **ErrorLevel**, and **ErrorString**, there are a number of additional properties which will be used by the calling method to update statistic counts. - -### Example - -The following example demonstrates how these methods are implemented in Service Object code. - -```csharp -protected override PrintResults PrintNormalImpl( - PrinterStation station, - PrinterState printerState, - string data) -{ - // First, create a PrintResults object to hold return values. - PrintResults pr = new PrintResults(); - - // Now print, depending on the station. - if (station == PrinterStation.Receipt) - { - // Your code goes here. - - // Update statistics to be returned to the caller. - pr.ReceiptLinePrintedCount = 1; - pr.ReceiptCharacterPrintedCount = data.Length; - } - else if (station == PrinterStation.Slip) - { - // Your code goes here. - - // Update statistics to be returned to the caller. - pr.SlipLinePrintedCount = 1; - pr.SlipCharacterPrintedCount = data.Length; - } - - return pr; -} -``` - -## See Also - -#### Tasks - -- [Asynchronous Output Sample](asynchronous-output-sample.md) - -#### Reference - -- - -#### Concepts - -- [Device Output Models](device-output-models.md) - -#### Other Resources - -- [Developing a Custom Service Object](developing-a-custom-service-object.md) diff --git a/docs/framework/additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md b/docs/framework/additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md deleted file mode 100644 index b1749316c9a0f..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Using the POS Device Manager Command-Line Tool -description: Using the POS Device Manager Command-Line Tool (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Using the POS Device Manager Command-Line Tool (POS for .NET v1.14 SDK Documentation) - -You can use the POS Device Manager Command-Line Tool after Microsoft Point of Service for .NET (POS for .NET) is installed on your computer and after your devices are configured for remote management as described in [Configure a device for remote management](configure-a-device-for-remote-management.md). - -On the command line, type **posdm** followed by a space and then any of the commands and switches listed below. - -The general syntax is: - -**posdm \[general switches\] command \[command arguments\]** - -## In This Section - -- [Command-Line Help for POSDM](command-line-help-for-posdm.md) - Demonstrates how to access Help about POSDM syntax, usage, and commands. - -- [General POSDM Switches](general-posdm-switches.md) - Describes several commonly used POSDM command-line switches. - -- [POSDM Commands](posdm-commands.md) - Provides a comprehensive list of the commands that you can use in POSDM. - -- [POSDM Command Arguments](posdm-command-arguments.md) - Describes several switches that can be used as arguments in POSDM. - -## See Also - -#### Other Resources - -- [POS Device Manager](pos-device-manager.md) diff --git a/docs/framework/additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md b/docs/framework/additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md deleted file mode 100644 index ac067e7395446..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Using the WMI API to Manage Devices -description: Using the WMI API to Manage Devices (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Using the WMI API to Manage Devices (POS for .NET v1.14 SDK Documentation) - -The WMI provider serves a WMI namespace called /root/MicrosoftPointOfService. This namespace defines four classes: - -- [ServiceObject Class](serviceobject-class.md) -- [PosDevice Class](posdevice-class.md) -- [LogicalDevice Class](logicaldevice-class.md) -- [DeviceProperty Class](deviceproperty-class.md) - -**ServiceObject** represents a POS for .NET Service Object from a management perspective. **PosDevice** represents the physical device serviced by the Service Object. **LogicalDevice** represents a logical name assigned to a **PosDevice**, providing third-party applications with the ability to access a Service Object without conflicting with other applications that may also be accessing the same Service Object. **DeviceProperty** instances are name/value pairs that can be associated with a **PosDevice** to store optional configuration data for Service Objects. - -## In This Section - -- [ServiceObject Class](serviceobject-class.md) - Lists the properties and methods of the **ServiceObject** Class. - -- [PosDevice Class](posdevice-class.md) - Lists the properties and methods of the **PosDevice** Class. - -- [LogicalDevice Class](logicaldevice-class.md) - Lists the properties and methods of the **LogicalDevice** Class. - -- [DeviceProperty Class](deviceproperty-class.md) - Lists the properties and methods of the **DeviceProperty** Class. - -- [Using VBScript to Manage Devices](using-vbscript-to-manage-devices.md) - Demonstrates how to programmatically manage devices using the WMI API. - -## See Also - -#### Other Resources - -- [POS Device Manager](pos-device-manager.md) diff --git a/docs/framework/additional-apis/pos-for-net/using-vbscript-to-manage-devices.md b/docs/framework/additional-apis/pos-for-net/using-vbscript-to-manage-devices.md deleted file mode 100644 index 106f2b93e88ea..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/using-vbscript-to-manage-devices.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -title: Using VBScript to Manage Devices -description: Using VBScript to Manage Devices (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Using VBScript to Manage Devices (POS for .NET v1.14 SDK Documentation) - -Using the WMI API documented in this section, it is possible to manage devices using managed code or scripting. **POSDM.EXE** is a command-line interface to this API. This VBScript sample does the following: - -- It uses the WMI method **ExecQuery** to retrieve a list of installed **PosDevice** objects. With this list of Service Objects, the script displays their type, name, corresponding path, and their enabled or disabled status. This is analogous to running the following command: - - `PosDM.exe LISTDEVICES` - -- It then attempts to assign the path **COM1** to the installed Service Object, **Microsoft Msr Simulator** using the **AddDevice** method. This is equivalent to running: - - `PosDM.exe ADDDEVICE COM1 /SONAME:Microsoft Msr Simulator` - -- If the **AddDevice** method fails, the script catches the error and assumes that **COM1** may have already been added to the device and therefore attempts to delete it by calling **DeleteDevice**. This is equivalent to running: - - `PosDM.exe DELETEDEVICE COM1` - -- If the **AddDevice** method had previously failed, the script then attempts to call **AddDevice** again. The program exits if the method fails. - -- Finally, the sample attempts to add the logical name **MSRSim** to this Service Object by calling **AddName**. This is equivalent to running: - - `PosDM.exe ADDNAME MSRSim /SONAME:"Microsoft Msr Simulator"` - -It is possible to see the results of this sample by running: - - `PosDM.exe LISTDEVICES` - -And - - `PosDM.exe LISTNAMES` - -## To run the sample - -1. The Service Object **Microsoft Msr Simulator** was installed with the SDK. Be sure that it is installed on the computer which you will be using to run the sample. - -2. Copy this script to a file **PosDMSample.vbs** - -3. Execute the script with the following command line: - - `CScript //U PosDMSample.vbs` - -## Example - -```vbscript -'Get a handle to the POS namespace service into 'objServices'. -Set objLocator = CreateObject("WbemScripting.SWbemLocator") -Set objServices = objLocator.ConnectServer(, "/root/MicrosoftPointOfService") - -'List the POS devices. -EnumeratePosDevice - -'Add a name: MSRSim for Msr Simulator by retrieving the SO and invoking AddDevice() then AddName() -WScript.Echo "Add Device on COM1 and add name 'MSRSim' for MsrSimulator ..." -Set objSO = objServices.Get("ServiceObject.Type='Msr',Name='Microsoft Msr Simulator'") - -On Error Resume Next -objSO.AddDevice "COM1" -if Err.number <> 0 Then - WScript.Echo "AddDevice failed - it already is in use." - WScript.Echo "Try to delete the device..." - - On Error Resume Next - objSO.DeleteDevice "COM1" - if Err.number <> 0 Then - WScript.Echo "DeleteDevice failed" - WScript.Quit 1 - end if - - WScript.Echo "DeleteDevice succeeded! Attempting AddDevice again..." - - On Error Resume Next - objSO.AddDevice "COM1" - if Err.number <> 0 Then - WScript.Echo "AddDevice failed a second time - exiting" - WScript.Quit 2 - end if -end if - -Set objDevice = objServices.Get("PosDevice.SoName='Microsoft Msr Simulator',Type='Msr',Path='COM1'") -objDevice.AddName "MSRSim" -Set objDevice = GetDevice("Msr", "MSRSim") -WScript.Echo "Added 'MSRSim' to: " & objDevice.Type & vbTab & objDevice.SoName & vbTab & objDevice.Path - -'Enumerate the sClass by name -Sub EnumeratePosDevice( ) - sClass = "PosDevice" - WScript.Echo "Enumerating " & sClass & "..." & vbCrLf - - Set collection = objServices.ExecQuery("SELECT * From " & sClass) - For Each obj In collection - Enabled = "DISABLED" - if obj.Enabled = true Then - Enabled = "ENABLED" - end If - WScript.Echo obj.Type & Space(15-len(obj.type)) & obj.SoName & Space(35-len(obj.SoName)) & Enabled & vbTab & obj.Path - Next - WScript.Echo vbCrLf -End Sub - -'Return a PosDevice matching DeviceType and Name. -Function GetDevice( DeviceType, Name ) - Set Logical = GetLogicalDevice( DeviceType, Name ) - objectPath = "PosDevice.SoName='" & Logical.SoName & "',Type='" & DeviceType & "',Path='" & Logical.Path & "'" - Set GetDevice = objServices.Get(objectPath) -End Function - -'Return a LogicalDevice matching DeviceType and Name. -Function GetLogicalDevice( DeviceType, Name ) - Query = "SELECT * From LogicalDevice WHERE Type = '" & DeviceType & "' AND Name='" & Name & "'" - Set collection = objServices.ExecQuery( Query ) - For Each obj In collection - Set GetLogicalDevice = obj - exit For - Next -End Function -``` - -If the path COM1 has not been assigned to a device, the sample produces output similar to this code. - -```console -Microsoft (R) Windows Script Host Version 5.6 -Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. - -Enumerating PosDevice... - -Msr Microsoft Msr Simulator ENABLED -Msr Microsoft Msr Simulator ENABLED COM1 -Keylock Microsoft Keylock Simulator ENABLED -Scanner Microsoft Scanner Simulator ENABLED -CashDrawer Microsoft CashDrawer Simulator ENABLED -CheckScanner Microsoft CheckScanner Simulator ENABLED -LineDisplay Microsoft LineDisplay Simulator ENABLED -PinPad Microsoft PinPad Simulator ENABLED -PosPrinter Microsoft PosPrinter Simulator ENABLED -PosKeyboard Microsoft PosKeyboard Simulator ENABLED - -Add Device on COM1 and add name 'MSRSim' for MsrSimulator ... -AddDevice failed - it already be in use. -Try to delete the device... -DeleteDevice succeeded! Attempting AddDevice again... -Added 'MSRSim' to: Msr Microsoft Msr Simulator -``` - -If the path COM1 is already in use and no other error occurs, the script produces output that looks like this code. - -```console -Microsoft (R) Windows Script Host Version 5.6 -Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. - -Enumerating PosDevice... - -Msr Microsoft Msr Simulator ENABLED -Msr Microsoft Msr Simulator ENABLED COM1 -Keylock Microsoft Keylock Simulator ENABLED -Scanner Microsoft Scanner Simulator ENABLED -CashDrawer Microsoft CashDrawer Simulator ENABLED -CheckScanner Microsoft CheckScanner Simulator ENABLED -LineDisplay Microsoft LineDisplay Simulator ENABLED -PinPad Microsoft PinPad Simulator ENABLED -PosPrinter Microsoft PosPrinter Simulator ENABLED -PosKeyboard Microsoft PosKeyboard Simulator ENABLED - -Add Device on COM1 and add name 'MSRSim' for MsrSimulator ... -AddDevice failed - it already be in use. -Try to delete the device... -DeleteDevice succeeded! Attempting AddDevice again... -Added 'MSRSim' to: Msr Microsoft Msr Simulator -``` - -## See Also - -#### Other Resources - -- [Using the WMI API to Manage Devices](using-the-wmi-api-to-manage-devices.md) -- [POS Device Manager](pos-device-manager.md) diff --git a/docs/framework/additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md b/docs/framework/additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md deleted file mode 100644 index 950502dacd107..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Using Visual Studio .NET Management Extensions and the POS for .NET WMI Management Classes -description: Using Visual Studio .NET Management Extensions and the POS for .NET WMI Management Classes (POS for .NET v1.14 SDK Documentation) -ms.date: 03/03/2014 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# Using Visual Studio .NET Management Extensions and the POS for .NET WMI Management Classes (POS for .NET v1.14 SDK Documentation) - -You can use Server Explorer in Microsoft Visual Studio 2013 to navigate the **Microsoft.PointOfService** namespace and drag the instances of the classes into your project’s Class Designer. - -This feature requires that Visual Studio 2013 and POS for .NET are installed on the local development computer. - -## To use the extension - -1. Launch Visual Studio 2013 and, from the **VIEW** menu, open the **Server Explorer** window. - -2. Expand the **Servers** node, and then expand the **Machine** node. - -3. Right-click the **Management Classes** node and then click **Add Classes** on the shortcut menu. - -4. In the **Add Classes** dialog box, expand the **root\\MicrosoftPointOfService** node in the **Available Classes** tree view. - -5. Select the **DeviceProperty** class, and then click **Add** to add the class to the Server Explorer. Repeat this step for the **LogicalDevice**, **PosDevice**, and **ServiceObject** classes. - -## To use the management classes - -1. Create a .NET project. - -2. Open the Server Explorer. - -3. Right-click the **DeviceProperty** node, and then click **Generate Managed Class** on the shortcut menu to add the generated class to the project. Repeat this step for the **LogicalDevice**, **PosDevice**, and **ServiceObject** classes to generate managed classes. - -## To use an instance of a management class - -1. In the Server Explorer, expand the desired class to list the available class objects. - -2. Drag the instances onto the projects class designer. - -## Example - -The following code example demonstrates the use of the **PosDevice** class **GetInstances** method to enumerate Point of Service devices. It creates a collection of the devices within a scope. It then lists the type, name and path for each device in the collection and indicates whether the device is enabled or disabled. - -```csharp -using System; -using System.Management; -using ROOT.MICROSOFTPOINTOFSERVICE; - -namespace Management -{ - public class Test - { - public Test() - { - ManagementScope scope = new ManagementScope("root\\microsoftpointofservice"); - scope.Connect(); - PosDevice.PosDeviceCollection devices = PosDevice.GetInstances(scope, ""); - string format = "{0,10}\t{1,25}\t{2}\t{3,50}"; - if( devices.Count > 0 ) - Console.WriteLine(format, "Type", "Name", "Enabled", "Path"); - foreach( PosDevice d in devices ) - { - Console.WriteLine(format, d.Type, d.SoName, d.Enabled ? 'Y' : 'N', d.Path); - } - } - - static int Main() - { - Test t = new Test(); - return 0; - } - } -} -``` - -## See Also - -#### Other Resources - -- [POS Device Manager](pos-device-manager.md) -- [Using the POS Device Manager Command-Line Tool](using-the-pos-device-manager-command-line-tool.md) -- [Using the WMI API to Manage Devices](using-the-wmi-api-to-manage-devices.md) diff --git a/docs/framework/additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md b/docs/framework/additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md deleted file mode 100644 index 4485e3735e6bb..0000000000000 --- a/docs/framework/additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md +++ /dev/null @@ -1,401 +0,0 @@ ---- -title: What's New in POS for .NET v1.14 and v1.14.1 -description: What's New in POS for .NET v1.14 and v1.14.1 (POS for .NET v1.14 SDK Documentation) -ms.date: 04/12/2017 -ms.topic: how-to -ms.custom: pos-restored-from-archive ---- - -# What's New in POS for .NET v1.14 and v1.14.1 (Microsoft Point of Service for .NET) - -Microsoft Point of Service for .NET (POS for .NET) v1.14.1 has been updated to reflect that latest Unified Point of Service (UnifiedPOS) v1.14.1 international standard. In addition, POS for .NET v1.14 (and later) has been updated to work with .NET 4.0. POS for .NET v1.14.1 inherits all changes from v1.14. - -## Support for OLE for Retail POS (OPOS) - -POS for .NET v1.14 (and later) provides support for the following additional OPOS service objects: - -| POS peripheral | Enumeration value | -|--------------------------|--------------------| -| Fiscal printer | FISCALPRINTER | -| Smart card reader/writer | SMARTCARDRW | -| Bump bar | BUMPBAR | -| Point card reader/writer | POINTCARDRW | -| Remote order display | REMOTEORDERDISPLAY | -| Cash changer | CASHCHANGER | -| Hard totals | HARDTOTALS | -| Motion sensor | MOTIONSENSOR | - -## Changes in the POS for .NET 1.14.1 Release - - POS for .NET 1.14.1 adds new methods and properties to the ElectronicValue Reader/Writer class, as well as updating some old members. - - - ---- - - - - - - - - - - - - -
Updated ClassAdded/Updated Members

ElectronicValueRW

Methods:

-
    -
  • AccessData (new)
    -
  • -
  • AccessLog (updated)
    -
  • -
  • ActivateEVService (new)
    -
  • -
  • CheckServiceRegistrationToMedium (new)
    -
  • -
  • CloseDailyEVService (new)
    -
  • -
  • DeactivateEVService (new)
    -
  • -
  • LockTerminal (updated)
    -
  • -
  • OpenDailyEVService (new)
    -
  • -
  • RegisterServiceToMedium (new)
    -
  • -
  • UnlockTerminal (updated)
    -
  • -
  • UnregisterServiceToMedium (new)
    -
  • -
  • UpdateData (new)
    -
  • -
  • UpdateKey (updated)
    -
  • -
-

Properties:

-
    -
  • CapMembershipCertificate (new)
    -
  • -
  • CardServiceList (updated)
    -
  • -
  • CurrentService (updated)
    -
  • -
  • ReaderWriterServiceList (updated)
    -
  • -
  • ServiceType (new)
    -
  • -
-

Enumerations:

-
    -
  • AccessDataType (new)
    -
  • -
  • ServiceType (new)
    -
  • -
-

Transition events:

-
    -
  • TransitionNotifyProgress1To100 (new)
    -
  • -
  • TransitionConfirmDeviceData (new)
    -
  • -
- - -## Changes in the POS for .NET 1.14 Release - - POS for .NET 1.14 updates the following device classes with new and updated members. - - - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Updated ClassAdded Members

Biometrics

Added the following events:

-
    -
  • StatusSensorFailedRead
    -
  • -
  • StatusSensorReady
    -
  • -
  • StatusSensorComplete
    -
  • -

ElectronicValueRW

Added the following methods:

-
    -
  • ClearParameterInformation
    -
  • -
  • QueryLastSuccessfulTransactionResult
    -
  • -
  • RetrieveResultInformation
    -
  • -
  • SetParameterInformation
    -
  • -
-

Added the following properties:

-
    -
  • CapPINDevice
    -
  • -
  • CapTrainingMode
    -
  • -
  • PINEntry
    -
  • -
  • TrainingModeState
    -
  • -
-

Added the following enumerations:

-
    -
  • PinEntryType
    -
  • -
  • TrainingModeState
    -
  • -
-

Added the following transition events:

-
    -
  • TransitionTouchRetry
    -
  • -
  • TransitionTouchRetryCancelable
    -
  • -
  • TransitionConfirmTouchRetry
    -
  • -
  • TransitionConfirmCancel
    -
  • -
  • TransitionNotifyInvalidOperation
    -
  • -
  • TransitionConfirmInvalidOperation
    -
  • -
  • TransitionConfirmRemainderSubtraction
    -
  • -
  • TransitionConfirmCenterCheck
    -
  • -
  • TransitionConfirmTouchTimeout
    -
  • -
  • TransitionConfirmAutoCharge
    -
  • -
  • TransitionNotifyCaptureCard
    -
  • -
  • TransitionNotifyPin
    -
  • -
  • TransitionCenterCheck
    -
  • -
  • TransitionNotifyComplete
    -
  • -
  • TransitionNotifyTouch
    -
  • -
  • TransitionNotifyBusy
    -
  • -
  • TransitionConfirmCenterCheckComplete
    -
  • -
  • TransitionConfirmSelect
    -
  • -
  • TransitionNotifyLock
    -
  • -
  • TransitionNotifyCenterCheckComplete
    -
  • -
  • TransitionConfirmPinEntryByOuterPinpad
    -
  • -

Micr (Magnetic ink character recognition)

Added support for the following country codes:

-
    -
  • CheckCountryCode.CMC7
    -
  • -
  • CheckCountryCode.OTHER
    -
  • -

PosPrinter

Added the following methods:

-
    -
  • CapRecRuledLine
    -
  • -
  • CapSlpRuledLine
    -
  • -
  • DrawRuledLine
    -
  • -
-

Added the following enumerations:

-
    -
  • LineDirection
    -
  • -
  • LineStyle
    -
  • -

Scale

Added the following methods:

-
    -
  • DoPriceCalculating
    -
  • -
  • FreezeValue
    -
  • -
  • ReadLiveWeightWithTare
    -
  • -
  • SetPriceCalculationMode
    -
  • -
  • SetSpecialTare
    -
  • -
  • SetTarePriority
    -
  • -
  • SetUnitPriceWithWeightUnit
    -
  • -
-

Added the following properties:

-
    -
  • CapFreezeValue
    -
  • -
  • CapReadLiveWeightWithTare
    -
  • -
  • CapSetPriceCalculationMode
    -
  • -
  • CapSetUnitPriceWithWeightUnit
    -
  • -
  • CapSpecialTare
    -
  • -
  • CapTarePriority
    -
  • -
  • MinimumWeight
    -
  • -
  • ZeroValid
    -
  • -
-

Added the following enumerations:

-
    -
  • FreezeValueType
    -
  • -
  • PriceCalculationMode
    -
  • -
  • SpecialTare
    -
  • -
  • TarePriority
    -
  • -

ToneIndicator

Added the following properties:

-
    -
  • CapMelody
    -
  • -
  • MelodyType
    -
  • -
  • MelodyVolume
    -
  • -
-

Added the following enumeration:

-
    -
  • MelodyType
    -
  • -

BarCodeSymbology

Added the following one dimensional symbologies:

-
    -
  • BarCodeSymbology.ItfCK
    -
  • -
  • BarCodeSymbology.Gs1DataBar_Type2
    -
  • -
  • BarCodeSymbology.Ames
    -
  • -
  • BarCodeSymbology.TFMAT
    -
  • -
  • BarCodeSymbology.Code39Ck
    -
  • -
  • BarCodeSymbology.Code32
    -
  • -
  • BarCodeSymbology.CodeCIP
    -
  • -
  • BarCodeSymbology.TriOptic39
    -
  • -
  • BarCodeSymbology.ISBT128
    -
  • -
  • BarCodeSymbology.Code11
    -
  • -
  • BarCodeSymbology.MSI
    -
  • -
  • BarCodeSymbology.Plessey
    -
  • -
  • BarCodeSymbology.Telepen
    -
  • -
-

Added the following composite symbology:

-
    -
  • BarCodeSymbology.Tlc39
    -
  • -
-

Added the following two dimensional symbologies:

-
    -
  • BarCodeSymbology.Gs1DataMatrix
    -
  • -
  • BarCodeSymbology.Gs1QRCode
    -
  • -
  • BarCodeSymbology.Code49
    -
  • -
  • BarCodeSymbology.Code16k
    -
  • -
  • BarCodeSymbology.CodablockA
    -
  • -
  • BarCodeSymbology.CodablockF
    -
  • -
  • BarCodeSymbology.Codablock256
    -
  • -
  • BarCodeSymbology.HANXIN
    -
  • -
-

Added the following postal code symbologies:

-
    -
  • BarCodeSymbology.AusPost
    -
  • -
  • BarCodeSymbology.CanPost
    -
  • -
  • BarCodeSymbology.ChinaPost
    -
  • -
  • BarCodeSymbology.DutchKix
    -
  • -
  • BarCodeSymbology.InfoMail
    -
  • -
  • BarCodeSymbology.JapanPost
    -
  • -
  • BarCodeSymbology.KoreanPost
    -
  • -
  • BarCodeSymbology.SwedenPost
    -
  • -
  • BarCodeSymbology.UkPost
    -
  • -
  • BarCodeSymbology.UsIntelligent
    -
  • -
  • BarCodeSymbology.UsPlanet
    -
  • -
  • BarCodeSymbology.PostNet
    -
  • -
- - -## See Also - -#### Concepts - -- [POS for .NET v1.14.1 SDK Documentation](index.md) diff --git a/docs/framework/toc.yml b/docs/framework/toc.yml index 5188c23bd4ab6..2c6e583e2104c 100644 --- a/docs/framework/toc.yml +++ b/docs/framework/toc.yml @@ -700,175 +700,6 @@ items: href: additional-apis/stdole.stdfont.md - name: StdPicture interface href: additional-apis/stdole.stdpicture.md - - name: Point of Service for .NET v1.14.1 - href: additional-apis/pos-for-net/index.md - items: - - name: Copyright Information - href: additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md - - name: POS for .NET FAQ - href: additional-apis/pos-for-net/pos-for-net-faq.md - - name: What's New - href: additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md - - name: POS for .NET v1.14.1 Features - href: additional-apis/pos-for-net/pos-for-net-v1141-features.md - items: - - name: POS for .NET Architecture - href: additional-apis/pos-for-net/pos-for-net-architecture.md - - name: Service Object Overview - href: additional-apis/pos-for-net/service-object-overview.md - - name: Supported Device Classes - href: additional-apis/pos-for-net/supported-device-classes.md - - name: Event Management - href: additional-apis/pos-for-net/event-management.md - - name: POS Exception Handling - href: additional-apis/pos-for-net/pos-exception-handling.md - - name: POS for .NET Integration with Plug and Play - href: additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md - - name: Log Files - href: additional-apis/pos-for-net/log-files.md - - name: Integration of Legacy Service Objects - href: additional-apis/pos-for-net/integration-of-legacy-service-objects.md - - name: Developing a POS Application - href: additional-apis/pos-for-net/developing-a-pos-application.md - items: - - name: Application Compatibility with 32-bit OPOS Service Objects - href: additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md - - name: Typical POS Application Architecture - href: additional-apis/pos-for-net/typical-pos-application-architecture.md - - name: API Support - href: additional-apis/pos-for-net/pos-for-net-api-support.md - items: - - name: PosCommon Class - href: additional-apis/pos-for-net/poscommon-class.md - - name: PosExplorer Class - href: additional-apis/pos-for-net/posexplorer-class.md - - name: DeviceInfo Class - href: additional-apis/pos-for-net/deviceinfo-class.md - - name: Exception Classes - href: additional-apis/pos-for-net/exception-classes.md - - name: Event Handler Sample - href: additional-apis/pos-for-net/event-handler-sample.md - - name: Developing a Custom Service Object - href: additional-apis/pos-for-net/developing-a-custom-service-object.md - items: - - name: POS for .NET Service Object Architecture - href: additional-apis/pos-for-net/pos-for-net-service-object-architecture.md - items: - - name: POS for .NET Class Tree - href: additional-apis/pos-for-net/pos-for-net-class-tree.md - - name: Attributes for Identifying Service Objects and Assigning Hardware - href: additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md - - name: Hydra Devices - href: additional-apis/pos-for-net/hydra-devices.md - - name: Plug and Play Support - href: additional-apis/pos-for-net/plug-and-play-support.md - - name: PosCommon Information for Service Object Developers - href: additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md - - name: POS for .NET Device Basic Classes - href: additional-apis/pos-for-net/pos-for-net-device-basic-classes.md - - name: System Configuration - href: additional-apis/pos-for-net/system-configuration.md - items: - - name: POS for .NET Registry Settings - href: additional-apis/pos-for-net/pos-for-net-registry-settings.md - - name: POS Device Manager Output - href: additional-apis/pos-for-net/pos-device-manager-output.md - - name: Point of Service Performance Counters - href: additional-apis/pos-for-net/point-of-service-performance-counters.md - - name: Plug and Play XML Configuration - href: additional-apis/pos-for-net/plug-and-play-xml-configuration.md - - name: 'Service Object Samples: Getting Started' - href: additional-apis/pos-for-net/service-object-samples-getting-started.md - items: - - name: Setting up a Service Object Project - href: additional-apis/pos-for-net/setting-up-a-service-object-project.md - - name: Creating a Basic Service Object Code Template - href: additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md - - name: Adding Plug and Play Support - href: additional-apis/pos-for-net/adding-plug-and-play-support.md - - name: Creating a Service Object Sample - href: additional-apis/pos-for-net/creating-a-service-object-sample.md - - name: Introducing Service Object Reader Threads - href: additional-apis/pos-for-net/introducing-service-object-reader-threads.md - - name: Creating a Working, Multithreaded Service Object - href: additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md - - name: Developing Service Objects Using Base Classes - href: additional-apis/pos-for-net/developing-service-objects-using-base-classes.md - items: - - name: Scanner Implementation - href: additional-apis/pos-for-net/scanner-implementation.md - items: - - name: Data Decoding - href: additional-apis/pos-for-net/data-decoding.md - - name: Scanner Events - href: additional-apis/pos-for-net/scanner-events.md - - name: CashDrawer Implementation - href: additional-apis/pos-for-net/cashdrawer-implementation.md - - name: LineDisplay Implementation - href: additional-apis/pos-for-net/linedisplay-implementation.md - items: - - name: LineDisplay Capabilities - href: additional-apis/pos-for-net/linedisplay-capabilities.md - - name: LineDisplay Sample - href: additional-apis/pos-for-net/linedisplay-sample.md - - name: PinPad Implementation - href: additional-apis/pos-for-net/pinpad-implementation.md - items: - - name: PinPad Capabilities - href: additional-apis/pos-for-net/pinpad-capabilities.md - - name: PinPad Sample - href: additional-apis/pos-for-net/pinpad-sample.md - - name: PosKeyboard Implementation - href: additional-apis/pos-for-net/poskeyboard-implementation.md - - name: Using Impl Methods for Synchronous or Asynchronous Output - href: additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md - - name: Device Input and Events - href: additional-apis/pos-for-net/device-input-and-events.md - - name: Device Output Models - href: additional-apis/pos-for-net/device-output-models.md - - name: Asynchronous Output Sample - href: additional-apis/pos-for-net/asynchronous-output-sample.md - - name: Statistics Sample - href: additional-apis/pos-for-net/statistics-sample.md - - name: Base Class DirectIO Method - href: additional-apis/pos-for-net/base-class-directio-method.md - - name: Capability Properties - href: additional-apis/pos-for-net/capability-properties.md - - name: Manually manage your POS for .NET devices - href: additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md - - name: POS Device Manager - href: additional-apis/pos-for-net/pos-device-manager.md - items: - - name: Configure a device for remote management - href: additional-apis/pos-for-net/configure-a-device-for-remote-management.md - - name: Using the WMI API to Manage Devices - href: additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md - items: - - name: ServiceObject Class - href: additional-apis/pos-for-net/serviceobject-class.md - - name: PosDevice Class - href: additional-apis/pos-for-net/posdevice-class.md - - name: LogicalDevice Class - href: additional-apis/pos-for-net/logicaldevice-class.md - - name: DeviceProperty Class - href: additional-apis/pos-for-net/deviceproperty-class.md - - name: Using VBScript to Manage Devices - href: additional-apis/pos-for-net/using-vbscript-to-manage-devices.md - - name: Using Visual Studio .NET Management Extensions and the POS for .NET WMI Management Classes - href: additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md - - name: Using the POS Device Manager Command-Line Tool - href: additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md - items: - - name: Command-Line Help for POSDM - href: additional-apis/pos-for-net/command-line-help-for-posdm.md - - name: General POSDM Switches - href: additional-apis/pos-for-net/general-posdm-switches.md - - name: POSDM Commands - href: additional-apis/pos-for-net/posdm-commands.md - - name: POSDM Command Arguments - href: additional-apis/pos-for-net/posdm-command-arguments.md - - name: POS for .NET Reference - href: /dotnet/api/?view=point-of-service-1.14&preserve-view=true - name: What's new and obsolete items: - name: What's new