Link to home
Start Free TrialLog in
Avatar of sidwelle
sidwelleFlag for United States of America

asked on

vb.net latiency w/Variables byVal

I have an app that I am writing to accept messages, and I parse the messages by passing them to a function.  What I am finding is that when I pass large string variables that not all the variable that is passed is totally populated when I start to process the msg in the function.  

Is this behavior normal ?  I thought the dev environment made sure that that all var's were totally populated before launching the function ?

Thanks
SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sidwelle

ASKER

My app is already about 1000 lines, don't want to try and post it here.  What I am having problems with is that it receives msgs via tcp-ip on a second thread that are about 500 chrs and pass these strings back to the main thread to be processed (via delegate).  What I am noticing is that as the strings are passed from function to function to be processed when they get to the different functions, it appears that the string vars are not totally populated.

Today I was working changing all the string var specification from default ByVal to ByRef to see if that makes a difference.

I will post back tomorrow.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Problem was definitely multiple Delegate statements.

Things are working correctly now.

Thanks to everyone who took a look.