Home > Back-end >  Type for LPBYTE * function parameters how to initialize
Type for LPBYTE * function parameters how to initialize

Time:03-19

If have a function func1, it contains a parameter LPBYTE * p__ListData, eventually to get is a byte array
According to my understanding should only use LPBYTE can, but this function is the supplier provide
The question now is how do before I call the general p__ListData initializing the parameters, the size of the return according to the actual situation is different, have different results

CodePudding user response:

This type of parameter need argument is
LPBYTE array name
Or
Address of the variables of LPBYTE
Or
And its type of pointer variable, pointing at the malloc to a piece of memory space

CodePudding user response:

To its top

CodePudding user response:

How LPBYTE definition??????

CodePudding user response:

Suppliers, understand first is the function of memory release internal release or external applications or static memory need not apply for release,

CodePudding user response:

This type of parameter need argument is
LPBYTE array name

I now to write, compile without problem, also can run smoothly, just can't return the correct results,
BYTE p__Arr_Byte [9024].
LPBYTE * lpListData;
P__lpByte=(LPBYTE) (p__Arr_Byte);
lpListData=https://bbs.csdn.net/topics/&p__lpByte;
Here is a problem is p__Arr_Byte fixed size, but actually should demand is dynamic size

CodePudding user response:

BYTE p__Arr_Byte [9024].
LPBYTE * lpListData=https://bbs.csdn.net/topics/(LPBYTE *) (p__Arr_Byte);
Dynamic size is how old, who's in charge?

CodePudding user response:

It is unsigned char * * p__ListData

CodePudding user response:

Individual is the most likely way
This parameter as long as the initial for nullptr can

CodePudding user response:

reference 5 floor jxwangjm reply:
this type of parameter need argument is
LPBYTE array name

I now to write, compile without problem, also can run smoothly, just can't return the correct results,
BYTE p__Arr_Byte [9024].
LPBYTE * lpListData;
P__lpByte=(LPBYTE) (p__Arr_Byte);
lpListData=https://bbs.csdn.net/topics/&p__lpByte;
Here is a problem is p__Arr_Byte fixed size, but actually should require dynamic size

Why do you plug in a snake variables?
BYTE p__Arr_Byte [9024].
LPBYTE * lpListData;
lpListData=https://bbs.csdn.net/topics/(LPBYTE) (p__Arr_Byte);

CodePudding user response:

Oh, still lack of a star

CodePudding user response:

Arguments with the meaning of the array name is
Func1 (p__Arr_Byte);
This, there is no need to beat around the bush,
Of course, your function may also need to other parameters, also don't call the name, and so on,

CodePudding user response:

refer to the eighth floor truth is right or wrong response:
personal is the most likely way
This parameter as long as the initial for nullptr can

Of the SDK should do indeed (for example, our company, haha), but that have to be a secondary pointer to just go, don't think LPBYTE like a pointer, so it might be a pit

CodePudding user response:

Through the typedef LPXXX should be a pointer, come over
  • Related