In the current version (1.4.5.7) of NCryptoki you should marshall the parameter as byte[]
by yourself.
In your case you should prepare a byte[]
containing in sequence the values of your struct.
For example if you have:
typedef struct CK_MY_PARAMS {
CK_ULONG vSrc;
CK_BYTE vDst [8];
} CK_MY_PARAMS;
with
vSrc = 0x10
vDst = {1,2,3,4,5,6,7,8}
you should create a byte[]
as follows:
byte[] param = new byte[] {0x10, 0x00, 0x00, 0x00, 1,2,3,4,5,6,7,8}
Currently I'm working on the new version 1.4.6.x that should make this work for you. but I need some days more to finish development and testing.