Create Virtual Smart Card using TpmVirtualSmartCardManager class

Hello
I wish to create a Virtual Smart Card from code in the easiest way possible, with the standard c++ libraries I believe.

SO I found this:
https://msdn.microsoft.com/en-us/library/windows/desktop/hh707164(v=vs.85).aspx

If I understand right I should just have to add:
#include "Tpmvscmgr.h" in my c++ project and then I can use this.

However I can't figure out how to call this method.
I cant find any examples of it being used anywhere either.

Maybe I got everything wrong but what I would like if possible is something looking like this:

#include "Tpmvscmgr.h"
#include "stdafx.h"


int main()
{


ITpmVirtualSmartCardManager *pObj = NULL;
LPWSTR friendly = L"Friendly";
BYTE admin = 1;
DWORD adminsize = 1;

HRESULT hr = pObj->CreateVirtualSmartCard(friendly, admin, &admin, adminsize, &admin, adminsize, &admin, adminsize, &admin, adminsize, adminsize, NULL, &friendly, false);

return 0;
}

Obviously this code wont work but it is just to show what I hope is possible.

So do you think something like this can be done? Or am I just way off?
Topic archived. No new replies allowed.