Using a modified version of jmcilhinney's TCP Client / Server system example, I have successfully sent bytes from the server to the client [on localhost]. However, when I try it with a friend, the file sizes become random [usually < 500kb of 1.9mb] , and the file also becomes corrupt. My friend also constantly receives the error "Object reference not set to reference of an object", and my localhost client also sometimes receives that error.
Why is the error occurring.
Also, here are some parts of the code I've modified that seem significant / important.
I've been trying to create my own backup system by sending specific files to a server running on my desktop, and then having those files copied to an external. So far, I'm trying to send files using a tcp network. Unfortunately, for soem reason, tcp cannot send more than 9kb at a time, so when i tried to send a 30kb image, it recreated 1/3 of it. My fix to this problem was to send data by chunks of 8kb, then reconstruct the file chunk by chunk. For some reason, when I run the server and client, the client says it sends all the data, however the server seems to be stuck. Here is my code;
I need to transfer a block of pixel values as quickly as possible to a picturebox control. The data will be in a byte array representing 512 pixels by 4 lines. The data is greyscale values from 0 to 255 but I could easily store each value three times to represent R, G and B if that made it easier/quicker to write the values to the picturebox.I've used fastpix (by Vic Joseph "Boops Boops") in the past but this seems more geared towards fast plotting of individual pixels and as I have a pre-formatted block of pixel data I was wondering about alternatives. I've done a bit of research and BitBlt seems interesting, but can this be used with a byte array as the "source"? All the examples I've seen are for transferring/merging between bitmaps/pictureboxes. How about Direct Memory Access? I just need a simple "brute force" method of getting my pre-formatted data into the picturebox. Oh, when I say "fast" I mean I'd like to plot my 512 x 4 pixels in less than 10mS.
I will use the Background Intelligent Transfer Service (BITS) to transfer files from a client (laptop) to a shared folder on a server within our local network.The problem is a very slow network bandwith, if we transfer a file, the other clients can´t work, all requests to other clients (application) or viewing internet pages needs a long time.My idea is to use BITS in my tool to copy/transfer a file from client to server, also I hope to get more performance for the internet requests.
I create my algorthm and its finished but there is a problem, it encrypte all text and all text in a file but after decryption when i open my file (a video file)the player show all information about file(duration,size and ect) currectly but it dont play that my program encrypt and decrypt byte by byte and place a asci code in bytes(0 to 255)
I just converted the following code from c# to vb.net. It is functional and works correctly with my company's firmware/devices. My next challenge. Previous serialport code used much more readable structs which where then converted (after building a packet) into byte() automatically as part of the serialport encoding. (this is my understanding)How could I
1. morph byte arrays 'ToSocket' and 'ToMTP' below into structs and
2. convert into byte array for Socket.BeginSend(byte(),.....) to stream out to remote devices?
Is it possible in VB to truncate a larger data type ( an int with a value greater than 255) to a smaller one, say a Byte (which only goes up to 255) in a way such that the 8LSBs of the integer are copied to the newly created byte. I have tried this using CType with the following code, however it does not work.
Dim TestByte As Byte = CType(Test, Byte) Where the variable "Test" is an integer with a value of 419. This code always results in the Overflow exception.
I'm using server.transfer to transfer execution of a URL to a dummy page which fetches information from the database. The trouble is that the master page interacts with the session.
global.asax: Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) ' Fires at the beginning of each request If Not (System.IO.File.Exists(Server.MapPath(Request.Url.LocalPath))) And Request.Url.LocalPath.ToLower
[CODE]...
Master page: If String.IsNullOrEmpty(CStr(Session("SessionId"))) Then
I'm getting an error : Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration.
I should also mention that this same master page works elsewhere in the site. Session is used throughout the site as well (not just in the master page).
I have 2 byte arrays. I want to merge these two byte array into 1 byte array.Usually, I just create a new byte array with length = byte array #1 + byte array #2. Then copy byte array #1 and #2 to the new byte array.do I have more efficient way to merge 2 byte array using VB.NET and .Net 4?
I would like to create a function so that I can pass a string and it will return me the binary value, I will use this later in other parts of the script but I am getting an error that I don't understand.
Private Function ConvertToMD5(ByVal OldPassword As String) As Byte Dim NewPassword As String = "" 'The string we wish to encrypt
[code]....
On the "Return hashedDataBytes I get "Value of type '1-dimensional array of Byte' cannot be converted to 'Byte'"
im gonna create a form with 1 textbox, a button and a richtext thing.in the textbox you write something like "bla bla bla" and press on the button and it apear on the richtext thing.then i write "yahoo" and press on the button. then it should post it on the richtext thing but on another line, like its pressed enter and then do ctrl+v.
I have 4 DatagridView's. I want to take the data from 1,2,3.. and then place it on 4. (I am adding some images). The Names in 1,2,3.. Should correspond with that is 4. SO ,,that means i want to accumulate the totals of each player and place it in the final DataGridView.
I have a byte array that I convert into a string like so Dim byt As Byte() = New Byte(255) {} s = New String(Encoding.ASCII.GetChars(byte))My question is when I look at the string in a debuger its clearly a normal string but when I compare it to what I know its supposed to be it doesnt equal. So i did a quick check and for some reason its return a string thats the length of 256 characters. So i did a s.trim and it still is 256 characters long.
I would like to know how to convert a unisgned byte to signed byte
Atm I got this
a Function readSignedByte() As SByte '-128/127 Dim b As SByte
[Code]....
it doesn't work one that well works for numbers positive over 127 if lets say ReadByte() has 128 it would give overflow error which I don't want it to give I would like it to overflow the number to negivate value aka its signed value.
given my code below, I'm trying to figure out how to create an array of 1 byte containing 7 bits. So the byte in the array would contain 0111111 to correspond to mData_Out's boolean values. How would I change the following code? [Code]
I am trying to write some code to get a kinect for windows sample running, which is originally written in C#. I get stuck with translating the following C# code to VB.NET:
byte intensity = (byte)(~(realDepth >> 4));
What is the VB.NET equivalent for the code above? how to translate the "~" code sign.
Transfer Public Sub DownloadFileBinary(ByVal localFile As String, ByVal downloadUrl As String) Dim req As HttpWebRequest = DirectCast(WebRequest.Create(downloadUrl), HttpWebRequest) req.Method = "GET" Dim resp As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse) ' Retrieve response stream [Code] ..... 1. How can I create a progress bar that will indicate the status of the transfer? 2. If the remote path is not available, how can i easily alert the user that it is unavailable. Currently it returns an exception but it took a lot of time to return this message..
The form1 has a listbox which contains a list of student names.If i select any one of the student name in the listbox and i click the button,the form3 should be open & listbox in form3 should be loaded with the corresponding scores of the student name that is being selected in listbox of form1.The condition i used here is if the value of textbox in form1 is 1 then the dr(4) value alone should added to the listbox in the form3 and ;likewise it depends on the value in textbox of form1. ...FOR THIS I USED THE BELOW CODE
[Code].....
When i tried to run this code it is showing an error "Index was outside the bounds of the array" on the line that i highlighted in the above code.
I'm starting on a new project: multiple desktops I want to accomplish this by making a folder browser system like the desktop.I do not want to have all the file transfer actions invisible So: I want to have the normal file transfer dialogs displayed, with the progressbar, file information, just like windows.What code should I use to display windows dialogs?
To the point: I need to transfer a custom object's event through a generic collection object containing these items so that any class using the collection can see that changes were made to one of the items in the collection.
I.E. An item event that triggers a collection event
[Code].....
Due to the application requirements, I need the Collection and Items to send immediate notice of various changes that occur to the Collection Class and its items. I've already got my events set-up regarding for the Collection Class, but I'm struggling with coming up with a workable solution for raising events for the items.
I've got an event for the DeviceLayer item set-up, but how do you transfer that event through the CollectionClass so that any other class using it will see that there was a change to one of the items in the collection?
i try to transfer packets from the PC to the Mobile phone~ my PC is act as a Server and Mobile as a Client. My Mobile is successfully connect to my PC, but when i try to pass a packets from Mobile, it went failed without any error. The Server didn't receive any packets from Mobile. i had test my code on PC to PC and it's work fine. Anyone have this kind of experience?
I'm wondering if there is another way of comparing two byte arrays, that isn't going through each index of the array.[code]But that would give me false negatives. If I wanted the real results then I would have to add a Not.