Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Win32API.inc error

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

  • Win32API.inc error

    The following declare is incorrect:
    Code:
    DECLARE FUNCTION EnumDisplayMonitors LIB "USER32.DLL" ALIAS "EnumDisplayMonitors" (BYVAL hdc AS DWORD, lprcClip AS RECT, lpfnEnum AS DWORD, BYVAL dwData AS LONG) AS LONG
    It should be
    Code:
    DECLARE FUNCTION EnumDisplayMonitors LIB "USER32.DLL" ALIAS "EnumDisplayMonitors" (BYVAL hdc AS DWORD, lprcClip AS RECT, BYVAL lpfnEnum AS DWORD, BYVAL dwData AS LONG) AS LONG
    The addresses of callbacks are never passed by reference.
    Dominic Mitchell
    Phoenix Visual Designer
    http://www.phnxthunder.com

  • #2
    Right. For one example posted in my forum I had to use BYVAL CODEPTR(MonitorEnumProc).
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment

    Working...
    X