![]() |
URLGetProperty |
||||
Header: | URLAccess.h | Carbon status: | Supported | |
Obtains the value of a URL property.
OSStatus URLGetProperty ( URLReference urlRef, const char *property, void *propertyBuffer, Size bufferSize );
A reference to the URL whose property value you want to determine.
A pointer to a C string representing the name of the property value you want to determine. For a description of property name constants and their corresponding data types, see
A pointer to a buffer containing the property value you want to obtain. You must also pass the correct data type of the property value you wish to obtain. Before calling URLGetProperty, allocate enough memory in this buffer to contain the property value you wish to obtain. On return, a pointer to a buffer containing the property value. If you do not allocate enough memory for the buffer, URLGetProperty does not pass back the property value in this parameter and returns the result code kURLPropertyBufferTooSmallError.
The size (in bytes) of the buffer pointed to by propertyBuffer. To determine the buffer size, call the function URLGetPropertySize. If the buffer size is too small, URLGetProperty returns the result code kURLPropertyBufferTooSmallError and does not pass back the property value in the propertyBuffer parameter.
A result code. The result code kURLPropertyBufferTooSmallError indicates that you did not allocate enough memory for the buffer in the propertyBuffer parameter. The result code kURLPropertyNotYetKnownError indicates that the value of the property is not yet available.
The URLGetProperty function obtains the value of a URL property identified by the property name constant specified in the property parameter. Note that you must also pass the correct data type of the property value in the propertyBuffer parameter so you know how to display it.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)