Announcement

Collapse
No announcement yet.

EXPORT for window procedures

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

  • EXPORT for window procedures

    I note that the window procedure in SKELETON.BAS is defined with the EXPORT keyword as follows.

    Code:
    FUNCTION WndProc (BYVAL hWnd AS LONG, BYVAL wMsg AS LONG, _
                      BYVAL wParam AS LONG, BYVAL lParam AS LONG) EXPORT AS LONG
    Is EXPORT needed here? Also, similar considerations apply to sub-classing window procedures. I’ve just stripped all EXPORT’s from my exe, which makes extensive use of subclassing, and it seems to still run just fine.

    Keith


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

  • #2
    In this case they are not needed since you pass the CODEPTR of the WinProc to the required API (ie, via RegisterClass, CreateDialog, etc), so Windows performs a direct call to the memory location.

    Likewise, the CALL clause in a CONTROL ADD statement performs the same action internally, so CALLBACK FUNCTIONs do not need to be EXPORTed either.



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Thanks Lance. That's cleared that for me.
      Keith

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

      Comment


      • #4

        I think the EXPORT for window procedures was a 16 bit requirement

        ------------------
        Kev G Peel
        KGP Software, Bridgwater, UK.
        mailto:[email protected][email protected]</A>
        kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

        Comment

        Working...
        X