Hi folks,
Is there a way in PBDLL/PBCC to "override" a parameter
type for a Declared function?
Here's my predicament. I was trying to duplicate the
following C code from one of my widgets in a PBDLL
function:
hndl = CreateFile(&portstring[0], (GENERIC_READ | GENERIC_WRITE),
NULL, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
The problem is that the "NULL" parameter above may be
NULL, or it may point to a SECURITY_ATTRIBUTES struct,
depending on usage. WIN32API.INC decl defines it
as the latter, so the compiler chokes on anything but
a struct there.
I tried 'duping' the function with an alias, but apparently
the compiler is smarter than that. It complained about
a duplicate name. (obviously "CreateFileA", since the PB
name I used was "CDUMMY", a pun of sorts.
Any ideas? No panic, it's more a learning exercise
for me than anything else.
Thanks,
Jim Barber
------------------
Is there a way in PBDLL/PBCC to "override" a parameter
type for a Declared function?
Here's my predicament. I was trying to duplicate the
following C code from one of my widgets in a PBDLL
function:
hndl = CreateFile(&portstring[0], (GENERIC_READ | GENERIC_WRITE),
NULL, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
The problem is that the "NULL" parameter above may be
NULL, or it may point to a SECURITY_ATTRIBUTES struct,
depending on usage. WIN32API.INC decl defines it
as the latter, so the compiler chokes on anything but
a struct there.
I tried 'duping' the function with an alias, but apparently
the compiler is smarter than that. It complained about
a duplicate name. (obviously "CreateFileA", since the PB
name I used was "CDUMMY", a pun of sorts.

Any ideas? No panic, it's more a learning exercise
for me than anything else.
Thanks,
Jim Barber
------------------
Comment