Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

vb.net latiency w/Variables byVal

Posted on 2014-03-18
6
Medium Priority
?
201 Views
Last Modified: 2014-04-02
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
0
Comment
Question by:sidwelle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 52

Assisted Solution

by:Carl Tawn
Carl Tawn earned 1000 total points
ID: 39939162
Can you post the code, and sample inputs, you are using to demonstrate your problem?
0
 

Author Comment

by:sidwelle
ID: 39941278
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.
0
 

Accepted Solution

by:
sidwelle earned 0 total points
ID: 39945003
Changed all the ByVal statements to ByRef, but I think I found the problem where I had the value I wanted passing through two Delegate statements.

Thought it did not matter how many Delegate functions the values had to pass thought, but apparently it does.

Seems to be working now.
0
 
LVL 1

Assisted Solution

by:mastiSoft
mastiSoft earned 1000 total points
ID: 39945249
did you check the buffer size?  maybe you have to make it's bigger or send string in smaller packages
0
 

Author Closing Comment

by:sidwelle
ID: 39971714
Problem was definitely multiple Delegate statements.

Things are working correctly now.

Thanks to everyone who took a look.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question