我需要创建一个指向以空结尾的指向关键详细结构的指针数组的指针。
结构: WFS_RESULT
typedef struct _wfs_result
{
REQUESTID RequestID;
HSERVICE hService;
SYSTEMTIME tsTimestamp;
HRESULT hResult;
union {
DWORD dwCommandCode;
DWORD dwEventID;
} u;
LPVOID lpBuffer;
} WFSRESULT, *LPWFSRESULT;
结构: 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;
程序:我要怎么做
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;
问题是,我在指向指针数组的指针上方做了什么?因为,我需要将此指针数组指针传递给此参数lpWFSResult-> lpBuffer = val;
,并在最终程序(银行应用程序)中给出错误-15(WFS_ERR_INTERNAL_ERROR
)。