VS 2010 - Generate A CRC16-X25 Checksum In The Form HiByte And LowByte

Apr 12, 2012

I've wanting to generate a CRC16-X25 checksum in the form HiByte and LowByte. All the examples I've found by searching are either VB6 which uses functions and data types that are no longer supported or C, C++ etc. Does anyone have a simple VB.Net version? Speed is not an issue.

View 10 Replies


ADVERTISEMENT

Generate Main App And Dll Checksum Eachother?

Mar 24, 2010

Is there any way to generate checksum for a dll from the main app (compiled) and the main app from the dll when I run the main app or something of this kind?

View 3 Replies

VS 2010 (One App): 24-bit Word - Creating UDP Datagram - Calculating Checksum

Sep 22, 2011

I'm trying to create an app that controls a BSS BLU-80 (DSP) through Ethernet. I've written a few basic programs in the past, but nothing that used sockets or even required calculating a checksum. One of the values I need to send has to be 24 bits. This one really has me scratching my head. From the manufacturer's docs:

[Code]...

View 5 Replies

VS 2010 Signed And Unsigned Integer NOT: For Hex File Checksum Computation?

Feb 22, 2012

I have been trying to compute the checksum for a line of hex code. This is to create a hex file which will be loaded onto an embedded micro.Some of you guys may not know how this is done so very briefly:

a line of hex bytes:

: 10 01 00 00 21 46 01 36 01 21 47 01 36 00 7E FE 09 D2 19 01 40

The underlined bytes are taken and summed. (in this case the decimal 960). and the bold is the checksum Only the 8LSB (or single least significant byte) is needed to compute the checksum... which in this case, 960 = 03C0 in hex, so only C0 is needed.Two's complement is then taken:

step 1) logical not of C0 which is
step 2) add one (integer)
BIN...........DEC...HEX

[code]....

So here is the code I have been using: (quick mention that in the string passed, the hex bytes are all grouped together, there are no space characters)

Public Sub CreateLine(ByVal Data As String)
'Dim BDataArray(DataLength) As Byte
Dim IDataArray(Data.Length) As Integer

[code]....

where i get into trouble is where i commented 'i get into trouble'. My code works, but it's rather crude Now, in that line i first convert the hex value (string) "SChecksum" into an integer. I want to NOT this, so I get my step 2 from my explanation. However, the results appears to be a signed logical NOT. which gives me the wrong answer. My hashed togther version simply subtracts 256 before the not, in order to give me the correct answer.

Basically, I would love for someone to chime in and point out the flaws in my function, and push me towards figuring out the 'proper' way of doing this. Also I can't quite wrap my head around what would happen in the case a string were passed to my function that is over 16 bits, but I imagine I would have to subtract a larger value than 256, before doing the NOT in this case?(whilst we're on the subject of functions, I've used a 'sub', in which case should I used a sub, and which case should I use a function?).

View 4 Replies

Change Code Crc32 To Crc16?

Dec 18, 2011

I need change this code to calculate crc16 form file, I found on net only this example. My actualy knowledge in programming is totaly green.

Public Shared Function GetCRC32(ByVal sFileName As String) As String
Try
Dim FS As FileStream = New FileStream(sFileName, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)

[Code].....

View 5 Replies

Calculate The CRC16 Of Array Of Bytes?

Dec 20, 2011

I need some code to calculate the CRC16 of array of bytes.

Example: 00 or 0x0.

The problem I run into is that the CRC I get with a calculator I use is: 78F0.

So 00 = 78F0.

Problem is I dont know what type of CRC16 they are using or anything else. But I would like to make the same calculator in Visual Basic.

Although I think for the Polynum they are using: 0x8408 and I believe the initial value is: 0xFFFF

Here is some code that supposibly is the calculation:

// this function calculates a CRC16 over a unsigned char Array with, LSB first
// @Param1 (DataBuf): An Array, which contains the Data for Calculation
// @Param2 (SizeOfDataBuf): length of the Data Buffer (DataBuf)

[Code].....

View 7 Replies

How To Calculate A Textbox String To Be A CRC16 Value

Aug 4, 2010

does anyone know how to calculate a textbox string to be a CRC16 value?

View 7 Replies

Accelerate The Generation Of The MD5 Checksum?

Mar 17, 2010

I'm working with some very large files residing on P2 (Panasonic) cards. Part of the process we employ is to first generate a checksum of the file we are going to copy, then copy the file, then run a checksum on the file to confirm that it copied OK. The problem is, is that files are large (70 GB+) and take a long time to complete. It's an issue since we will eventually be dealing with thousands of these files.

I would like to find a faster way to generate the checksum other than using the System.Security.Cryptography.MD5CryptoServiceProvider I don't care if this means using a specialized hardware card, provided it works and is not to ungodly expensive. I would prefer to have a method of encoding that provided some feedback as to how far the process has gone along so I can display it like I do now.

The application is written in vb.net. I would prefer to be able to use it as component, library, reference within my application, but I'm willing to call an outside application if there is enough improvement in the speed of generating the checksum.

Needless to say, the checksum must be consistent and correct.

View 2 Replies

Calculated Checksum Different Than C# Equivalent?

Feb 23, 2010

This comparison shows the different values of the known good checksum calculation (c#) as used by my client and what I 'hoped' was the vb.net equivalent. How can I get 405 rather than 513 as I currently do?

For i = 0 To length - 2 Step 1
cksum += sendFrameData(i + 5)
Next i

[Code]....

View 3 Replies

Convert A String To Get A Checksum?

Nov 30, 2011

I need to convert a string to get a checksum as follows;

Checksum

The checksum is the 8 LSB (least significant bits) of a simple addition of all octets (note that a message type '30' is two octets with the values 33 hex and 30 hex) following the STX character and until the checksum field. Note that all separators will be included in the checksum, but the STX, checksum and the ETX will not be included.

Dim str as string = "01/00064/O/30/12345678/87654321////////48656C6C6F20576F726C64/"

This should result in checksum = "C2" What type of checksum is this? what should I Google for? CRC, MD5, hash ?

View 1 Replies

Adding Bytes For Checksum From Array

Sep 14, 2009

Dim sum As Byte
Dim Trans_Array(_64K, 2) As Byte
Const _64K As Integer = 65536
sum = 0
For i = 0 To 15
BinaryStream.Write(Trans_Array(Address + i, RIGHT_FILE))
sum = (Convert.ToByte(sum + Trans_Array(Address + i, RIGHT_FILE)))
Next
I can't figure out how to calculate the checksum of the bytes from array.

View 10 Replies

Calculate A Checksum Value To Add To The String As The Last Byte To Be Sent?

Oct 4, 2011

I have the following hex string 40 50 4C 41 59 0D I am transmitting to a piece of equipment, I need to calculate a checksum value to add to the string as the last byte to be sent. The checksum byte is generated in such a manner that the result of addition of all bytes of a message will become 11111111(255). the code that you see here does not work can anyone tell/show me why? Whats important is the checksum calculation.

[Code]...

View 1 Replies

Checksum Integrity Checking Against Patching?

Sep 17, 2011

Is it possible for my application to check if its been modified?

e.g. Could i compile the app and use a 3rd party tool to calculate the MD5 checksum of the compiled exe - and inside the app, code it so that if the MD5 checksum doesnt match then run the deactivation process?

I know its not foolproof but if it makes it slightly more hassle to crack my app i'd rather have it

View 1 Replies

VS 2005 - Generate Form Code - Put The Buttons On The Form

Oct 30, 2009

I'm making a game maker, and I just need to know how to put the buttons on the form. where to add the button code in the Form1.Designer.vb file? I just need to know what the syntax of InitializeComponent is.

View 7 Replies

Change This Checksum Function To Accept An Integer Input Instead Of A String?

Dec 31, 2009

This function doesn't work if I change the input argument 'pdu' from a string to an int.Would someone please help me figure out what to do here so that the checksum does not add the ascii value of the int argument but rather the actual integer value?I took out a few lines of the actual function but it adds the input argument to a packet sent out via TCP protocol.This function shows the integer value just fine in the string that gets encoded as a byte array. the checksum is wrong.!

''Public Function buildpacket(pdu As Integer) is what I want.
Public Function buildpacket(pdu As String)
Dim packet As String

[code]....

View 1 Replies

Generate A New Checkbox In A Different Form

Jun 7, 2011

I am trying to generate a new checkbox in a different form. [code] While this is great for things like those added, it may make things a bit difficult removing items down the road. Is there an easier way to name things generated?

View 11 Replies

Generate Unique Ref No In Form?

Sep 20, 2011

I have no idea about this. Actually i have create one form like personnel requisition form.hen user open the form, ref no will appear at the top of the form. ref no is used to search any personnel requisition later.

View 5 Replies

VS 2010 How To Generate Signals

Apr 16, 2012

I need to make a program that whatever user enters in bits, then corresponding Return-to-zero signal would generate.. how to generate signals.. so would it be possible to make it in VB.NET?

View 8 Replies

VS 2010 : First Generate Random Numbers?

Oct 6, 2010

I have code to save records to my mysql database.But first I want to read what is the last number of record and add 1000 on that? What is the proper way to query that first. I want to make the result at unique ID of my clients. Here is my chunks of codes.

Private Sub addClient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim conn As MySqlConnection
conn = New MySqlConnection
With conn

[code]....

View 10 Replies

VS 2010 Generate Primes Over 100 Million?

Jun 27, 2010

I salvaged the following piece of code from:[URL]...This code works fine, but the problem comes when I need to get all the primes above 100 million. I am familar (at least a little bit) with the BigInteger class in .NET 4.0, but when I replace all the instances of "Integer" with "BigInteger" in the following code I get this error: Value of type 'System.Collections.Generic.List(Of System.Numerics.BigInteger)' cannot be converted to 'System.Collections.Generic.List(Of Integer)'.

(The reason I need primes above 100 million is that I'm trying to work through some projects on www.projecteuler.net)Anyone have some ideas on how to modify the code to work with BigIntegers,

[Code]...

View 2 Replies

VS 2010 Generate Sound Sweep?

Feb 24, 2011

I am trying to create a sub that plays a sound sweep from the provided values.The code im using works but it sounds horrbile, hacky crap.... I could go on.

Sub PlaySweep(ByVal min As Integer, ByVal max As Integer, ByVal Duration As Integer)
Dim playtime As Long = Duration / (max - min) 'The Play Time for each frequncy
For i = min To max

[code].....

View 3 Replies

VS 2010 Use The Password To Generate Key Bytes

Jun 4, 2012

[Code]...

I have found the above code on generating passwords but when I converted the whole project it displays 2 warnings that the code was obsolete but when I search google I didnt found any fix for that warning.

View 3 Replies

Auto-generate Serial No In Vb.net Windows Form?

Aug 20, 2011

I want to auto generate serial number during my form load.

View 7 Replies

Generate A Php File Depending On Selection On A Win Form

Feb 19, 2011

I want to know if it is possible to generate a php file depending on selection on a win form in vb.net 2010. If so, does anyone has a link to a sample.

View 3 Replies

Can't Generate Reports In Visual Studio 2010

Jun 4, 2011

After downloading crystal reports for VS 2010, the code i used in VS 2008 generates a database login error

[code]...

View 2 Replies

VS 2010 - Generate Random Number Not Working?

Nov 19, 2010

I am trying to create a few random numbers, but cant seem to get it to fire off.
Public Function GetRandom(ByVal Min As Integer, ByVal Max As Integer) As Integer
Static Generator As System.Random = New System.Random()
Return Generator.Next(Min, Max)
End Function
When I call the GetRandom(0,500) and display it out on the page, I don't get anything?

View 5 Replies

Close The Form Without Entering Any Input And Not Generate An Error?

May 8, 2011

i am using validated function and i would like to close the form without entering any input and not generate an error. is there a method that changes the exit command to allow this?Sometimes the answer is so blindingly obvious i fail to see it.

View 1 Replies

Create A Form With A TrackBar Control : Generate A Frequency?

Feb 17, 2010

create a form with a TrackBar control so that when you Scroll the TrackBar it generates a frequency based on the value of the TrackBar. Beep() isn't really what I'm after. I was wanting it to smoothly transition through the frequencies. Basically, I want to create something that sounds something like a Theremin.

I've been looking online, and I can't seem to find anything. I don't even know how this would be accomplished. Is there a simple command to say "play this frequency until I tell you otherwise", or do I need to generate a .wav on the fly and have the system play that?

View 6 Replies

Generate Random Number In VB Express 2008,2010?

Apr 20, 2011

How to generate random number in VB express 2008,2010...I want to generate number between 1 and 10.

View 14 Replies

Auto-generate Unique Number On The Form When An Application Starts Up?

Jul 19, 2007

Is there a way to auto generate unique number on the form when an application starts up and it should incremente in the dataadapter and database too. How can i set it up?

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved