1) Create your dll with the call.
2) Create a nvo and declare the function aa local or global. For example:
Function boolean GetChildInfoByHwnd(ulong Child, ulong Hwnd, ref str_wobj winfo) Library "Pbenum.dll"
3) Create your function within the nvo:
//************************************************************
// Object: nvo_enum inherited from nonvisualobject
// Function: uf_getchildinfobyhwnd
// Access: public
// Arguments: unsignedlong al_parent
// unsignedlong al
// ref str_wobj astr
// Returns: integer
//************************************************************
str_wobj lstr
Integer li_buf=255
Integer li_rtn
String ls_msg
lstr.WinCaptionBuffer = Space(li_buf)
lstr.WinCaptionSize = li_buf
lstr.WinClassBuffer = Space(li_buf)
lstr.WinClassSize = li_buf
If GetChildInfoByHwnd(al_parent, al, lstr) Then
lstr.WinClassBuffer = Trim(lstr.WinClassBuffer)
lstr.WinCaptionBuffer = Trim(lstr.WinCaptionBuffer)
astr = lstr
li_rtn = 1
End If
Return li_rtn
//************************************************************
4) In this function I defined the following structure to pass to the DLL to fill:
$PBExportHeader$str_wobj.srs
$PBExportComments$Window structure for DLL calls
global type str_wobj from structure
unsignedlong winhandle
integer processid
boolean isvisible
boolean isenabled
boolean isiconic
string wincaptionbuffer
unsignedlong wincaptionsize
string winclassbuffer
unsignedlong winclasssize
str_rect rect
end type
Thats it! In this example I used Delphi to create the DLL function and the actual call to the Windows callback.
Paul Mele
DFAS-CL/TSAD