2015-03-12 23:34:48 +03:00
|
|
|
|
|
|
|
#include <winpr/crt.h>
|
|
|
|
#include <winpr/collections.h>
|
|
|
|
|
|
|
|
int TestBipBuffer(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
BYTE* data;
|
2017-11-14 15:54:26 +03:00
|
|
|
int rc = -1;
|
2015-03-12 23:34:48 +03:00
|
|
|
wBipBuffer* bb;
|
|
|
|
bb = BipBuffer_New(1024);
|
|
|
|
|
|
|
|
if (!bb)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-14 01:37:48 +03:00
|
|
|
data = BipBuffer_WriteReserve(bb, 1024 * 2);
|
2015-03-12 23:34:48 +03:00
|
|
|
|
2017-11-14 15:54:26 +03:00
|
|
|
if (data)
|
|
|
|
rc = 0;
|
2015-03-12 23:34:48 +03:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
fprintf(stderr, "BipBuffer_BufferSize: %" PRIuz "\n", BipBuffer_BufferSize(bb));
|
2015-03-12 23:34:48 +03:00
|
|
|
BipBuffer_Free(bb);
|
2017-11-14 15:54:26 +03:00
|
|
|
return rc;
|
2015-03-12 23:34:48 +03:00
|
|
|
}
|