I need create one pointer to a null-terminated array of pointers to key detail structures..
Struct: WFS_RESULT
typedef struct _wfs_result
{
REQUESTID RequestID;
HSERVICE hService;
SYSTEMTIME tsTimestamp;
HRESULT hResult;
union {
DWORD dwCommandCode;
DWORD dwEventID;
} u;
LPVOID lpBuffer;
} WFSRESULT, *LPWFSRESULT;
Struct: PINKEY
typedef struct _wfs_pin_key_detail_ex
{
LPSTR lpsKeyName;
DWORD dwUse;
BYTE bGeneration;
BYTE bVersion;
BYTE bActivatingDate[4];
BYTE bExpiryDate[4];
BOOL bLoaded;
} WFSPINKEYDETAILEX, * LPWFSPINKEYDETAILEX;
Program: How am i trying to do
LPWFSPINKEYDETAILEX* array[7];
LPWFSPINKEYDETAILEX Test;
WFSPINKEYDETAILEX Obj;
Test = &Obj;
Test->lpsKeyName = NULL;
array[0] = &Test;
array[1] = &Test;
array[2] = &Test;
array[3] = &Test;
array[4] = &Test;
array[5] = &Test;
array[6] = NULL;
LPWFSPINKEYDETAILEX** val = array;
lpWFSResult->lpBuffer = val;
The question is, is what I did above a pointer to an array of pointers? Because, I need to pass this Pointer Array Pointer to this parameter lpWFSResult-> lpBuffer = val;
and in the final program (Bank Application) it gives error -15 (WFS_ERR_INTERNAL_ERROR
).