diff options
| author | J M Rossy <[email protected]> | 2015-07-29 15:40:09 -0700 |
|---|---|---|
| committer | J M Rossy <[email protected]> | 2015-07-29 16:34:40 -0700 |
| commit | 5d61a4a79a1e96dc5d9af1e5e712c84507307544 (patch) | |
| tree | 49ed270893578cd18758b74ffcca16dc7ab948d6 /pos/drivers/MagneticStripeReader/Driver.cpp | |
| parent | 5d41613e26e147d2300c786bb2b34cb4b4067a25 (diff) | |
Samples update for public Windows 10 release
Fix #2 Enabling WPP Recorder in Sensors Samples causes errors
Fix #4 Add back fixed KMDOD sample
Add new BarcodeScanner sample in pos folder
Add new MagneticStripeReader sample in pos folder
Add new SynpaticsTouch sample in input folder
Add new Power Engine Plugin sample in pofx folder
Add new DeviceMft sample in avstream folder
Add new AvsCamera sample in root
Add new SimBatt sample in root
Add other pre-existing samples not yet released for Win10
Diffstat (limited to 'pos/drivers/MagneticStripeReader/Driver.cpp')
| -rw-r--r-- | pos/drivers/MagneticStripeReader/Driver.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pos/drivers/MagneticStripeReader/Driver.cpp b/pos/drivers/MagneticStripeReader/Driver.cpp new file mode 100644 index 00000000..5bcf2f33 --- /dev/null +++ b/pos/drivers/MagneticStripeReader/Driver.cpp @@ -0,0 +1,54 @@ +#include <pch.h> + +#include "Device.h" + +// Forward declaration +VOID EvtDriverCleanup(_In_ WDFOBJECT DriverObject); + +/* +** Driver TODO: +** +** This is the main entry point of the driver. POS APIs require that the driver sets up additional data in device add. +** +** Note that your driver may have additional configuration to do in this function, and it should not be assumed that this sample is complete. +*/ +NTSTATUS DriverEntry( + PDRIVER_OBJECT DriverObject, + PUNICODE_STRING RegistryPath + ) +{ + WDF_DRIVER_CONFIG config; + NTSTATUS status = STATUS_SUCCESS; + WDF_OBJECT_ATTRIBUTES attributes; + + WDF_OBJECT_ATTRIBUTES_INIT(&attributes); + attributes.EvtCleanupCallback = EvtDriverCleanup; + + WDF_DRIVER_CONFIG_INIT( + &config, + EvtDriverDeviceAdd + ); + + status = WdfDriverCreate( + DriverObject, + RegistryPath, + &attributes, + &config, + WDF_NO_HANDLE + ); + + return status; +} + +/* +** Driver TODO: +** +** This is the cleanup callback for the driver (as set above in DriverEntry). +** PosCx requires no cleanup at this point. +*/ +_Use_decl_annotations_ +VOID EvtDriverCleanup(WDFOBJECT /* UnusedDriverObject */) +{ + // Do any cleanup needed here + return; +} |
