I am converting a C/C++ SDK to PowerBASIC. This will be released to others
wishing to use PB to develop add-ons for the latest version of Visual Cadd.
For stand-alone applications, they are now recommending explicit linking be
used for this and future versions, to insure that their DLLs get loaded in the
correct order and properly initialized. This requires writing a procedure for
each of the 1490 calls in the Visual Cadd API similar to:

'------------------------------------------------------------------------------
FUNCTION VCGethWnd ALIAS "VCGethWnd" (BYVAL hW AS LONG) EXPORT AS LONG
'------------------------------------------------------------------------------
LOCAL fp AS DWORD
LOCAL lReturn AS LONG

IF hInstVCMAIN32 THEN
fp = GetProcAddress (hInstVCMAIN32, "VCGethWnd")
IF fp THEN
CALL DWORD fp USING VCGethWnd (hW) TO lReturn
END IF
END IF
FUNCTION = lReturn

END FUNCTION

Is it correct to drop the BYVAL in the CALL DWORD parameter list as shown here?

The C/C++ version of this VCLink32.dll is 184,410 bytes
The PB/DLL version is 266, 240 bytes (272,384 bytes if #REGISTER NONE is used)

I have been promoting PB based on 'smaller' DLLs for almost two years. Now that
they want to include a PB version in this latest release of the SDK, I am sure that
I will be asked why the 44% - 48% increase over the C/C++ equivalent!

What answer can I give? Is it due in part to the ALIAS requirements to maintain the
proper case?

With approx. 1500 procedures, the source code exceeds the maximum lines allowed
by PB in one file, but I understand the reason for this....

TIA


------------------