PowerBASIC Page
Back to Home Page
The programs on this page has been developed for both the PowerBASIC
PBDLL50 compiler
and the PowerBASIC CONSOLE
compiler. Code specific to either will be commented as such.
Dbldr.exe
Dialog Builder 1.2 is a small code
generator that uses the standard PBDLL60
files to build working EXE files in minutes. It is based on the Microsoft
Dialog Editor that comes with PowerBASIC. It is easy to install and easy
to use and it builds files that start at about 7.5k
in size. It builds one of the simplest API styles of code available which
is easy to modify and extend yet it pays no price in terms of performance.
This second version will generate additional code for text and checkbox
processing and will generate subclass functions for list and combo boxes
if needed.
Prostart 1.1
This is a port of the older version of Prostart.Exe into PBDLL60.
It has had the code design changed to suit the later PB compiler and it
delivers the same size code as the original version. It writes operating
system based API style code with the option of adding a toolbar, status
bar and an editable menu. It comes with an accessory to generate subclass
functions for windows controls.
l2pb.exe
This is a specialised utility written in PBCC version 2. It is designed
to create PowerBASIC compatible include files from the Microsoft import
libraries included in the platformsdk. Run in a directory by itself it
will produce an exhaustive set of function declarations in the form of
one file for each Microsoft library, KERNEL32.INC,
USER32.INC etc... The current size
set of include files created this way is about 940k.
It auto generates the parameters in each function declaration as "ByVal
p# as LONG" where p# is
the number of the parameter.
The only problem in running them so far is that some API functions
have the same name as PowerBASIC key words, SLEEP & BEEP and the API
name need to be changed or deleted so that they will run properly.
Using a generic data type allows the programmer to approach function
call parameters as either VALUES or ADDRESSES obtained by either VarPtr
or StrPtr as in the following example,
DECLARE FUNCTION lstrlen LIB "KERNEL32.DLL" ALIAS "lstrlenA"(BYVAL
p1 as LONG) as LONG
DECLARE FUNCTION lstrcat LIB "KERNEL32.DLL" ALIAS "lstrcatA"(BYVAL
p1 as LONG,BYVAL p2 as LONG) as LONG
'#########################################################################
FUNCTION PbMain()
LOCAL buffer1 as ASCIIZ * 128
LOCAL buffer2 as ASCIIZ * 128
LOCAL sl as
LONG
buffer1 = "This is a test of the API lstrcat"+chr$(13,10)
buffer2 = "and the API lstrlen. Str len =>
"
lstrcat VarPtr(buffer1),VarPtr(Buffer2)
sl = lstrlen(VarPtr(buffer1))
StdOut buffer1 + str$(sl)
FUNCTION = 0
END FUNCTION
' #########################################################################
prostart.zip Version
1.0 NEW VERSION
PROSTART.EXE
is a project starting code generator for the PBDLL50 compiler. It writes
SDK style code for window applications rather than dialog box style applications.
It is a code style suited to programmers who are familiar with API programming.
It has name replacement options for function and other related code components,
options for properties and optional status bar and toolbar code.
It is easy to set up and fires the FIRST
time with standard PowerBASIC supplied files. It will generate at the minimum,
a functional window at 8192
bytes. It comes with another utility for generating control subclass functions
called SUBCLASS.EXE
You can compile the project directly from
PROSTART.EXE, from a batch file "makepb.bat"
or from the supplied IDE.
file2asm.exe convert a binary
file into a complete working PowerBASIC function for imbedding binary files
into code. Call this function in your code and you will have a string returned
that is the exact size of the original binary file that can then be written
to disk. The generated function is written in inline assembler for speed.
generic.zip is a commented
working template for PowerBASIC programmers who have written software in
DOS but run into the differences when programming in Windows. It assumes
programming experience at low level in DOS basic compilers and it is aimed
as a roadmap for basic programmers who are migrating to 32 bit windows.
PowerBASIC
in Australia is supplied by Softerm
Australia
Voice : (02) 9956-8011
Fax : (02) 9956-2850
Email
Enquiries
PowerBASIC
Home Site USA