PBNotes  10/01/1999
===================

The declarations in this PowerBASIC PB/DLL version were converted from the approriate C/C++ header files using the following conversions:

C/C++            PowerBASIC
---------        ----------
char             ASCIIZ
short            INTEGER (%)
long             LONG (&)
unsigned char    BYTE (?)
unsigned short   WORD (??)
unsigned long    DWORD (???)
float            SINGLE (!)
double           DOUBLE (#)
long double      EXT (##)
int              LONG (&)
unsigned int     DWORD (???)
BYTE             BYTE (?)
SHORT            INTEGER (%)
LONG             LONG (&)
WORD             WORD (??)
DWORD            DWORD (???)
CHAR             ASCIIZ
FLOAT            SINGLE (!)
UCHAR            BYTE (?)
DOUBLE           DOUBLE (#)
INT              LONG (&)
UINT             LONG (&)
BOOL             LONG (&)
USHORT           WORD (??)
ULONG            DWORD (???)
LRESULT          LONG (&)
HRESULT          LONG (&)
LPARAM           LONG (&)
WPARAM           LONG (&)
HWND             LONG (&)
HMENU            LONG (&)
HCURSOR          LONG (&)

vbool            LONG (&)      C/C++ VCType32.h
UID              DWORD (???)   C/C++ VCType32.h
ENTITYHANDLE     LONG (&)      C/C++ VCType32.h
WORLDHANDLE      LONG (&)      C/C++ VCType32.h
GRAPHICHANDLE    LONG (&)      C/C++ VCType32.h

Handles, LParam, WParam, LResult, HResult and UINT are defined as LONG to match typical Win32 calls as defined in Win32API.inc.  Note that some Visual Cadd API calls require Wparam AS WORD for some calls, to maintain compatibility with 16-bit Windows.


PowerBASIC PB/DLL is a 16-bit application and requires source files to be 16-bit convention (short names).  Long file names can be used within your applications, however.


PB/DLL is NOT case sensitive, but C/C++ IS case sensitive.  This requires the ALIAS option to create the proper case for C/C++ DLLs.


SDECL and it's synonym STDCALL specifies that the declared procedure uses the "Standard Calling Convention".  With an SDECL procedure, parameters are passed on the stack right to left.  This is the default for PB/DLL and needs not to be specified in the declarations.


The #REGISTER DEFAULT metastatement has been known to possibly cause problems when calling certain C/C++ procedures.  It is recommended to use a #REGISTER NONE metastatement.  It must precede all executable code and must not be located within a Sub or Function.  #REGISTER NONE disables the automatic assignment of register variables.  You can still use the REGISTER statment to explicitly define register variables on an individual basis.  See PB/DLL documentation for details.


The pre-defined string equates are not documented in the HELP file:

Equate  Value        Meaning
-------------------------------------------------
$NUL    CHR$(0)      NUL
$BEL    CHR$(7)      Bell
$BS     CHR$(8)      Backspace
$TAB    CHR$(9)      Horizontal Tab
$LF     CHR$(10)     Line Feed
$VT     CHR$(11)     Vertical Tab
$FF     CHR$(12)     Form Feed
$CR     CHR$(13)     Carriage Return
$CRLF   CHR$(13,10)  Carriage Return & Line Feed
$EOF    CHR$(26)     End of File
$ESC    CHR$(27)     Escape
$DQ     CHR$(34)     Quotation mark


It has been found that the RESET statment in the initial release of PB/DLL 6.0 does NOT reset a scalar variable when used as:

RESET variable

Test before using, or contact PowerBASIC concerning an update.




