README.md

December 4, 2022 · View on GitHub

UDT Calculator

Description

Calculates the length of a UDT (User Defined Type) required to store it in a String using CopyMemory, MoveMemory or any simular API. (So you can easily save it or transfer it over Internet.) NEVER use Len() or LenB() for this, they both return the incorrect length. (Len often returns less bytes, LenB often returns way more)

 

The code of this application is not impressive at all. The thing is, no-one ever seemed to have found a way to get the exact string length to store a UDT in, until now :D

Usage: Just add the types with their sizes to the list in the same order as your UDT is and the length is displayed below in a textbox.

Note: I will work on a UDT Calculator that can analyze your code pasted in a textbox later.

You vote would be nice, but never mind if you're short on time :P

More Info

UDT User Defined Type String Len LenB Length CopyMemory MoveMemory

Know how to use CopyMemory/MoveMemory and UDT's.

UDT String Len LenB Length

It may not be correct for VB4 and older, or .NET. Only tested for VB5 and VB6.

Submitted On2002-03-12 18:22:22
ByPascal vd Heiden
LevelIntermediate
User Rating5.0 (30 globes from 6 users)
CompatibilityVB 5.0, VB 6.0
CategoryData Structures
WorldVisual Basic
Archive FileUDT_Calcul616193122002.zip