|
![]() |
![]() |
version 2003
PA_ReturnBlob (params; blob; len)
Parameter | Type | Description | |
params | PA_PluginParameters | → | Parameters received in PluginMain |
blob | void* | → | Pointer to the BLOB data to be returned |
len | long | → | BLOB size in bytes |
Description
The routine
PA_ReturnBlob
sets the returned value of the plug-in routine to the data pointed to by the handle
blob
. After the call,
blob
still belongs to the plug-in and you can dispose of it.
Be sure that the BLOB is duplicated to the result value with this call. You can dispose of it once you have finished working with it. If you simply want to return the handle itself without duplicating the BLOB data, use
PA_ReturnBlobHandle
.
See
Create a new plug-in
for a description of returned values accessors.
Example
Create, fill (with "1"), and return a BLOB.
void ReturnBasicBlob(PluginParameters params)
{
char *buffer;
long size;
buffer = malloc(1024);
if(buffer)
{
for(i = 0; i < 1024;i++)
*buffer++ = (char)1;
// Return the blob
PA_ReturnBlob(params, buffer, size);
// We can (and should once finished with it) free the BLOB here
free (buffer);
}
}
See Also
Create a new plugin , PA_ReturnBlobHandle .
Error Handling
None.