Announcement

Collapse
No announcement yet.

API parameter 'fudging' in PBDLL/PBCC?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • API parameter 'fudging' in PBDLL/PBCC?

    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


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

  • #2
    Hi Jim

    to override do BYVAL NULL.

    Cheers

    Florent

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

    Comment


    • #3
      Hi Florent,

      >to override do BYVAL NULL.<

      Thanks! I thought there must be a simple way to
      do it. I'll give that a try.

      Regards,
      Jim Barber


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

      Comment

      Working...
      X