Well, I wrote this DLL it some time ago as practice, and no-one on DBDN has told me of any bugs, so I'm releasing to all of you guys.
You will need patch 3+ to use it (sorry you guys that are using the demo of dbpro).
Here is the readme from the download:
Copyright © 2002 Ian Mold (Matrix1 software)
Permission to copy, use, modify, sell and distribute this software is
granted provided this copyright notice appears in all copies.
This software is provided “as-is” without express or implied warranty,
and with no claim as to its suitability for any purpose.
This software contains several 'small' packages of commands for general use.
None of this is rocket science - just a few simple things that I thought were
missing from DBPro (and for practicing DLLs).
Just drop the dll into your compiler\plugins-user folder in the DBPro programs folder.
Strings
INSTR - Search for a string within a string.
Pos=INSTR(Source$, Search$, StartPos)
Pos=INSTR(Source$, Search$)
LTRIM$ - Remove leading spaces from the source string
New$=LTRIM$(Source$)
RTRIM$ - Remove trailing spaces from the source string
New$=RTRIM$(Source$)
TRIM$ - Remove both leading and trailing spaces from the source string
New$=TRIM$(Source$)
MID$ - Extract a string from another string
New$=MID$(Source$, StartPos, Length)
PADLEFT$ - Expand a string by adding leading spaces
New$=PADLEFT$(Source$, FinalSize)
PADRIGHT$ - Expand a string by adding trailing spaces
New$=PADRIGHT$(Source$, FinalSize)
Utility
MIN/MIN$ - Returns the minimum of two values provided
MAX/MAX$ - Returns the maximum of two values provided
A version is included for each type
Memory
Note, QWORD means Quad-word (ie 8 bytes)
POKE - Set memory addresses
POKE BYTE Addr, Value
POKE WORD Addr, Value
POKE DWORD Addr, Value
POKE QWORD Addr, Value
POKE FLOAT Addr, Value
POKE DOUBLE Addr, Value
POKE STRING Addr, Value$
PEEK - Read a value from a memory address
Value=PEEK BYTE(Addr)
Value=PEEK WORD(Addr)
Value=PEEK DWORD(Addr)
Value=PEEK QWORD(Addr)
Value=PEEK FLOAT(Addr)
Value=PEEK DOUBLE(Addr)
Value$=PEEK STRING(Addr)
Other - Get the address of a string
Addr=GET STRING PTR(Source$)
Zones
SET ZONE - Create a 2D or 3D zone
SET ZONE zoneNo, X1, Y1, Z1, X2, Y2, Z2
SET ZONE zoneNo, X1, Y1, X2, Y2
ZONE - Check for a coordinate within a zone
ZoneNo=ZONE(X, Y)
ZoneNo=ZONE(X, Y, Z)
CLEAR ZONE - Clear zones
CLEAR ZONE zoneNo
CLEAR ALL ZONES
Changes:
05/12/2002 Added peek/poke for float and double floats.
Just download it from here
http://www.matrix1.demon.co.uk/DBPro/Matrix1Utility.zip
Included is the DLL, and source for it, with project files for both VisualC++6 or .NET
Oh, I haven't actually tried compiling it under VC++6, but there is nothing there that should cause a problem.