Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
PeekData Method
See Also Example Applies To
Similar to GetData except PeekData does not remove data from the input queue. This method works only for TCP connections.
Syntax
object.PeekData data, [type,] [maxLen]
The PeekData method syntax has these parts
| Part | Description |
| object | An object expression that evaluates to an object in the Applies To list. |
| data | Stores retrieved data after the method returns successfully. If there is not enough data available for requested type, data will be set to Empty. |
| type | Optional. Type of data to be retrieved, as described in Settings. Default Value: vbArray + vbByte. |
| maxLen | Optional. Length specifies the desired size when receiving a byte array or a string. If this argument is missing for byte array or string, all available data will be retrieved. If provided for data types other than byte array and string, this argument is ignored. |
Settings
The settings for type are:
| Type | Constant |
| Byte | vbByte |
| Integer | vbInteger |
| Long | vbLong |
| Single | vbSingle |
| Double | vbDouble |
| Currency | vbCurrency |
| Date | vbDate |
| Boolean | vbBoolean |
| SCODE | vbError |
| String | vbString |
| Byte Array | vbArray + vbByte |
Return Value
Void
Remarks
If the type is specified as vbString, string data is converted to UNICODE before returning to the user.