I'd like to know how to set up callback function in Powerbuilder. As far as I know, there is a way to use DLL. But I don't know how to pass the data to the Powerbuilder application when I receive the data.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.