Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

An UMDF Driver for a Virtual Smart Card Reader

, 30 Jan 2014 CPOL
A simple implementation of a driver for a virtual smart card reader, based on UMDF
BixVReader.zip
exports.def
Win7_x64
WinXP_x86
Win7_x86
Win7
WinXP
BixVReader.inx
makefile
sources
BixVReader.inx
makefile
sources
BixVReader.dll
BixVReader.inf
BixVReader.dll
BixVReader.inf
BixVReader.dll
BixVReader.inf
#include "internal.h"
#include "VirtualSCReader.h"
#include "driver.h"
#include "device.h"
#include <stdio.h>
#include "SectionLocker.h"

CMyDriver::CMyDriver()
{
	inFunc
}

/////////////////////////////////////////////////////////////////////////
//
// CMyDriver::OnDeviceAdd
//
// The framework call this function when device is detected. This driver
// creates a device callback object
//
// Parameters:
//      pDriver     - pointer to an IWDFDriver object
//      pDeviceInit - pointer to a device initialization object
//
// Return Values:
//      S_OK: device initialized successfully
//
/////////////////////////////////////////////////////////////////////////
HRESULT CMyDriver::OnDeviceAdd(
    __in IWDFDriver* pDriver,
    __in IWDFDeviceInitialize* pDeviceInit
    )
{
	inFunc
	SectionLogger a(__FUNCTION__);
    HRESULT hr = CMyDevice::CreateInstance(pDriver, pDeviceInit);

    return hr;
}
/////////////////////////////////////////////////////////////////////////
//
// CMyDriver::OnInitialize
//
//  The framework calls this function just after loading the driver. The driver
//  can perform any global, device independent intialization in this routine.
//
/////////////////////////////////////////////////////////////////////////
HRESULT CMyDriver::OnInitialize(
    __in IWDFDriver* pDriver
    )
{
	inFunc
	SectionLogger a(__FUNCTION__);
    UNREFERENCED_PARAMETER(pDriver);
    return S_OK;
}

/////////////////////////////////////////////////////////////////////////
//
// CMyDriver::OnDeinitialize
//
//  The framework calls this function just before de-initializing itself. All
//  WDF framework resources should be released by driver before returning
//  from this call.
//
/////////////////////////////////////////////////////////////////////////
void CMyDriver::OnDeinitialize(
    __in IWDFDriver* pDriver
    )
{
	inFunc
 	SectionLogger a(__FUNCTION__);
   UNREFERENCED_PARAMETER(pDriver);
    return;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Fabio Ottavi
Engineer
Italy Italy
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.1411028.1 | Last Updated 30 Jan 2014
Article Copyright 2010 by Fabio Ottavi
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid