请教一个PB调用API的问题 200
我要调用的函数返回值类型是枚举类型,函数的参数有几个是结构体,像这样的情况该如何声明呀?typedefenumSKYETEK_STATUS{SKYETEK_FAILURE...
我要调用的函数返回值类型是枚举类型,函数的参数有几个是结构体,像这样的情况该如何声明呀?
typedef enum SKYETEK_STATUS
{
SKYETEK_FAILURE = 0,
SKYETEK_SUCCESS = 1,
SKYETEK_INVALID_READER,
} SKYETEK_STATUS;
typedef struct STPV3_REQUEST
{
unsigned int flags; /* 2 bytes */
unsigned int cmd; /* 2 bytes */
unsigned char rid[4]; /* 4 bytes */
unsigned int tagType; /* 2 bytes */
unsigned short tidLength; /* 1 byte */
unsigned char tid[16]; /* 16 bytes maximum */
unsigned short afi; /* 1 byte */
unsigned short session; /* 1 byte */
unsigned char address[2]; /* 2 bytes */
unsigned int numBlocks; /* 2 bytes */
unsigned int dataLength; /* 2 bytes */
unsigned char data[2048]; /* 2048 bytes maximum */
unsigned char msg[STPV3_MAX_ASCII_REQUEST_SIZE];
unsigned int msgLength;
unsigned char isASCII;
unsigned char anyResponse;
} STPV3_REQUEST, *LPSTPV3_REQUEST;
SKYETEK_STATUS STPV3_BuildRequest( LPSTPV3_REQUEST req)
例如,像上面的函数,SKYETEK_STATUS 是枚举类型,LPSTPV3_REQUEST是结构,在POWERBUILDER该如何声明呀?
API函数是用C语言写的读卡器协议里的函数 展开
typedef enum SKYETEK_STATUS
{
SKYETEK_FAILURE = 0,
SKYETEK_SUCCESS = 1,
SKYETEK_INVALID_READER,
} SKYETEK_STATUS;
typedef struct STPV3_REQUEST
{
unsigned int flags; /* 2 bytes */
unsigned int cmd; /* 2 bytes */
unsigned char rid[4]; /* 4 bytes */
unsigned int tagType; /* 2 bytes */
unsigned short tidLength; /* 1 byte */
unsigned char tid[16]; /* 16 bytes maximum */
unsigned short afi; /* 1 byte */
unsigned short session; /* 1 byte */
unsigned char address[2]; /* 2 bytes */
unsigned int numBlocks; /* 2 bytes */
unsigned int dataLength; /* 2 bytes */
unsigned char data[2048]; /* 2048 bytes maximum */
unsigned char msg[STPV3_MAX_ASCII_REQUEST_SIZE];
unsigned int msgLength;
unsigned char isASCII;
unsigned char anyResponse;
} STPV3_REQUEST, *LPSTPV3_REQUEST;
SKYETEK_STATUS STPV3_BuildRequest( LPSTPV3_REQUEST req)
例如,像上面的函数,SKYETEK_STATUS 是枚举类型,LPSTPV3_REQUEST是结构,在POWERBUILDER该如何声明呀?
API函数是用C语言写的读卡器协议里的函数 展开
展开全部
BrowseInfoA
是个 win32 Api 需要的结 构,在 pb 里面要自己申明
type browseinfo from structure
long hwndowner
long pidlroot
string pszdisplayname
string lpsztitle
unsignedlong ulflags
unsignedlong lpfn
unsignedlong lparam
long iimage
end type
type shfileopstruct from structure
long hwnd
unsignedlong wfunc
long pfrom
string pto
unsignedlong fflags
boolean fanyoperationsaborted
long hnamemappings
string lpszprogresstitle
end type
建立一个结构:BrowseInfo
unsignedlong hwndowner
unsignedlong pidlroot
string pszdisplayname
string lpsztitle
unsignedlong ulflags
unsignedlong lpfn
unsignedlong lparam
unsignedlong iimage
就可以了,再不清楚的话,你就查一下MSDN里相同函数的参数的意思.
是个 win32 Api 需要的结 构,在 pb 里面要自己申明
type browseinfo from structure
long hwndowner
long pidlroot
string pszdisplayname
string lpsztitle
unsignedlong ulflags
unsignedlong lpfn
unsignedlong lparam
long iimage
end type
type shfileopstruct from structure
long hwnd
unsignedlong wfunc
long pfrom
string pto
unsignedlong fflags
boolean fanyoperationsaborted
long hnamemappings
string lpszprogresstitle
end type
建立一个结构:BrowseInfo
unsignedlong hwndowner
unsignedlong pidlroot
string pszdisplayname
string lpsztitle
unsignedlong ulflags
unsignedlong lpfn
unsignedlong lparam
unsignedlong iimage
就可以了,再不清楚的话,你就查一下MSDN里相同函数的参数的意思.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询