oi10:presentation_server:getudp_method_common_methods

GETUDP Method (Common)

Retrieves a user-defined string of binary data that has been stored with the SETUDP method using a custom property name. The property name is defined by the developer and must be prefixed with an '@' symbol. This string can be used for any purpose, and stays with the specified object until replaced by another string or the object is destroyed.

PropValue = Exec_Method( CtrlEntID, "GETUDP", PropName )

NameRequiredDescription
PropNameYesName of the user-defined property to retrieve. This must begin with an "@" symbol.

The stored property data.

The normal property API (i.e. the Get_Property and Set_Property functions) do not allow binary data to be stored, because any data will be truncated at the first char(0) character encountered (normal property values are usually processed as null-terminated strings). In this case the GETUDP and SETUDP methods can be used to store binary values instead, as they treat the passed value as a length-encoded block.

Note that a user-defined property value set with Set_Property can only be retrieved with Get_Property, and likewise the GETUDP method can only be used to retrieve a property set with the SETUDP method. The two interfaces are not interchangeable.

 
// Store some binary data in a UDP and retrieve it

   

   OSRead BinData From "c:\temp\mydata.dat" Else

      // Handle error

   End

   

   // Store the data

   Call Exec_Method( @Window, "SETUDP", "@_MYDATA", BinData )

      

   // ... processing etc ...

      

   // Get the data
 
 
 

'@' (User-defined) property, UDPLIST property, SETUDP method.

  • oi10/presentation_server/getudp_method_common_methods.txt
  • Last modified: 2023/10/25 10:49
  • by 127.0.0.1