PA_ReturnPictureHandle

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_ReturnPictureHandle (params; hPicture; info)

ParameterTypeDescription
paramsPA_PluginparametersParameters received in PluginMain
hPictureHandle of the picture to be returned
infoPA_PictureInfoPicture information (background)

Description

The routine PA_ReturnPictureHandle sets the returned value of a plug-in function to hPicture, received by the calling the 4D method. It adds the regular background information passed in info.

This is useful in memory optimization. PA_ReturnPicture returns a copy of the original picture. This can be a problem if the picture is a large one. With PA_ReturnPictureHandle, simply return a handle to the BLOB.

WARNING

After the call the handle belongs to 4D; never dispose of it.

See Create a new plug-in for a description of returned values accessors.

Example

MacOS to Windows+Altura. Set a returned picture to a picture loaded from a resource.

The 4D developer uses the syntax:

   $aPicture:=plug-in_GetAPicture

   Handle   h = GetResource('PICT', 15000);
   DetachResource(h);
   PA_ReturnPictureHandle(params, h);
   // h is no more mine.

See Also

Create a new plugin, PA_ReturnPicture.

Error Handling

None.


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next