You need DECLARE - DLL.
ByVal, I think, means the parameter is passed by value. For DECLARE -DLL, this means the "@" is not to be included. The end of the declaration specifies the return type.
Let me try to guess. Comments in braces {} should be ommited.
DECLARE LONG {this is the return type} EnumWindowStations in user32 {optional?} as ListUsers {you will access the function with this name later} LONG lpEnumFunc, LONG lParam
>I believe that the enumWindowStations API call should be able to do it, but I cannot decipher the VFP code.
>
>In the WINAPI32.txt file it shows...
>
>Public Declare Function EnumWindowStations Lib "user32" Alias "EnumWindowStationsA" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
>
>TIA,
>Larry
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)