Binary FunctionsWIL contains a number of functions designed to allow direct access to areas - buffers - of computer memory. By managing and working with these buffers using the assorted Binary functions provided, you can implement a number of operations that otherwise would be tedious and time consuming. For more detail see Binary Operations.
|
Function list
|
BinaryAlloc( buffsize )
Allocates a memory buffer of the desired size.
BinaryAllocArray( array )
Allocates a memory buffer and copies the contents of an array.
BinaryAnd( target-handle, target-offset, source-handle, source-offset, count )
Performs a bitwise AND on portions of two binary buffers.
BinaryBufInfo( handle, request )
Returns information about the binary buffer.
BinaryCheckSum( handle, request )
Returns the MD5 digest (fingerprint) or simple CRC of a binary buffer.
BinaryClipGet( handle, format )
Reads the contents of the Windows clipboard into a binary buffer.
BinaryClipPut( handle, format )
Writes a binary buffer to the Windows clipboard.
BinaryCompare( handle1, offset1, handle2, offset2, count )
Compares portions of two binary buffers.
BinaryConvert( handle, source-type, target-type, code-page, flags )
Converts a binary buffer.
BinaryCopy( handle-targ, offset-targ, handle src, offset src, bytecount )
Copies bytes of data from one binary buffer to another.
BinaryEodGet( handle )
Returns the offset of the free byte just after the last byte of stored data.
BinaryEodSet( handle, offset )
Sets the EOD value of a buffer.
BinaryFree( handle )
Frees a buffer previously allocated with BinaryAlloc.
BinaryHashRec( handle, recsize, key offset, key size, key value )
Returns a pointer to a record in a binary buffer.
BinaryIncr( handle, offset )
Peeks at a value, increments the value by 1 then pokes the value back into the buffer.
BinaryIndex( handle, offset, search string, direction )
Searches a buffer for a string.
BinaryIndexBin( handle, offset, item, direction, match-case)
Searches a buffer for an item. (includes nulls)
BinaryIndexEx( handle, offset, string, direction, match-case)
Searches a buffer for a string. This function is very similar to BinaryIndex and BinaryIndexNc, except this function will return -1, if the specified string was not found.
BinaryIndexNC( handle, offset, string, direction )
Searches a buffer for a string. (case insensitive)
BinaryOleType( handle, type,reserved- 1, reserved-2, reserved-3 )
Specifies how a binary buffer will be used by COM/OLE functions.
BinaryOr( target-handle, target-offset, source-handle, source-offset, count )
Performs a bitwise OR on portions of two binary buffers.
BinaryPeek( handle, offset )
Returns the value of a byte from a binary buffer. Peeks an 8 bit value.
BinaryPeek2( handle, offset )
Returns the value of a byte from a binary buffer. Peeks a 16 bit value.
BinaryPeek4( handle, offset )
Returns the value of a byte from a binary buffer. Peeks a 32 bit value.
BinaryPeek8( handle, offset )
Returns the value of a byte from a binary buffer. Peeks a 64 bit value.
BinaryPeekFlt( handle, offset )
Returns a value from a binary buffer. Peeks a 64 bit floating point number.
BinaryPeekHex( handle, offset, count )
Extracts data from a binary buffer as a hex string.
BinaryPeekStr( handle, offset, maxsize )
Extracts a string from a binary buffer.
BinaryPeekStrW( handle, offset, maxsize [,reverse-bytes] )
Extracts a Unicode string from a binary buffer.
BinaryPoke( handle, offset, value )
Pokes a new value into a binary buffer at offset.
Pokes an 8 bit value.
BinaryPoke2( handle, offset, value )
Pokes a new value into a binary buffer at offset.
Pokes an 16-bit value.
BinaryPoke4( handle, offset, value )
Pokes a new value into a binary buffer at offset.
Pokes an 32-bit value.
BinaryPoke8( handle, offset, value )
Pokes a new value into a binary buffer at offset.
Pokes a huge number representing a 64-bit value.
BinaryPokeFlt( handle, offset, value )
Pokes a new value into a binary buffer at offset.
Pokes a 64 bit floating point number.
BinaryPokeHex( handle, offset, hex-string )
Writes data in a hex string form into a binary buffer.
BinaryPokeStr( handle, offset, string )
Writes a string into a binary buffer.
BinaryPokeStrW( handle, offset, string [, reverse-bytes] )
Writes a Unicode string into a binary buffer.
BinaryRead( handle, filename )
Reads a file into a binary buffer.
BinaryReadEx( handle, binary-offset, filename, file-offset, count )
Reads a portion of a file into a binary buffer.
BinaryReplace( bin-handle, search-string, replacement-string, match-case )
Replaces strings in a binary buffer.
BinarySort( handle, recsize, key offset, key size, flags )
Sorts records in a binary buffer.
BinaryStrCnt( handle, start-offset, end-offset, string )
Counts the occurrences of a string in some or all of a binary buffer.
BinaryTagExtr( tag-struct, flags )
Returns the text between the last-returned pair of binary tags.
BinaryTagFind( tag-struct )
Finds the next binary tag.
BinaryTagIndex( tag-struct, mode )
Returns the offset of a binary tag in a buffer.
BinaryTagInit( buffer, start-tag, end-tag )
Initializes a binary tag operation.
BinaryTagLen( tag-struct, mode )
Returns the length of a binary tag.
BinaryTagRepl( tag-struct, new-string )
Replaces a binary tag with text.
BinaryWrite( handle, filename )
Writes a binary buffer to a file.
BinaryWriteEx( handle, binary-offset, filename, file-offset, count )
Writes a portion of a binary buffer to a file.
BinaryXlate( data-buffer, table-buffer, mode )
Converts a binary buffer using a translation table.
BinaryXor( target-handle,target-offset,source-handle,source-offset,count)
Performs a bitwise XOR (exclusive OR) on portions of two binary buffers.