Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 1675
Number of posts: 4764

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
WINSOCK BLANK DATA Posted by scott84 on 18 Jun 2012 at 3:14 PM
Hi

i'm using the control OCX winsock in VBA, but when i receive data from the sub DataArrival, i always receive a blank string. If i try to use VB6, everything works as it should. I have to use VBA because i'm programming with IFIX and i can't switch to VB6. Anybody could help me please to fix this problem, or at least proposing an alternative to Winsock?

Davide
Report
Re: WINSOCK BLANK DATA Posted by scott84 on 19 Jun 2012 at 4:49 AM
Don't know if the following can be useful to someone able to help me....

I've just realized that the problem is not DataArrival, but the sub GetData. I receive 32 bytes from DataArrival, but after that GetData set the data to empty string, as it is referred in the MSDN online documentation, even if i can't figure out why.

The GetData method syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.

data Where retrieved data will be stored 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 shown in Settings.

maxLen Optional. Specifies the desired size when receiving a byte array or a string. If this parameter 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 parameter is ignored.


Report
Re: WINSOCK BLANK DATA Posted by scott84 on 19 Jun 2012 at 4:51 AM
Don't know if the following can be useful to someone able to help me....

I've just realized that the problem is not DataArrival, but the sub GetData. I receive 32 bytes from DataArrival, but after that GetData set the data to empty string, as it is referred in the MSDN online documentation, even if i can't figure out why.

The GetData method syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.

data Where retrieved data will be stored 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 shown in Settings.

maxLen Optional. Specifies the desired size when receiving a byte array or a string. If this parameter 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 parameter is ignored.


Report
Re: WINSOCK BLANK DATA Posted by scott84 on 19 Jun 2012 at 5:50 AM
Don't know if the following can be useful to someone able to help me....

I've just realized that the problem is not DataArrival, but the sub GetData. I receive 32 bytes from DataArrival, but after that GetData set the data to empty string, as it is referred in the MSDN online documentation, even if i can't figure out why.

The GetData method syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.

data Where retrieved data will be stored 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 shown in Settings.

maxLen Optional. Specifies the desired size when receiving a byte array or a string. If this parameter 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 parameter is ignored.


Report
Re: WINSOCK BLANK DATA Posted by scott84 on 19 Jun 2012 at 5:52 AM
Don't know if the following can be useful to someone able to help me....

I've just realized that the problem is not DataArrival, but the sub GetData. I receive 32 bytes from DataArrival, but after that GetData set the data to empty string, as it is referred in the MSDN online documentation, even if i can't figure out why.

The GetData method syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.

data Where retrieved data will be stored 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 shown in Settings.

maxLen Optional. Specifies the desired size when receiving a byte array or a string. If this parameter 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 parameter is ignored.





 

Recent Jobs