Как в функцию передать адресс callback функции из PB для ее вызова из dll ?
With best regards, Alexander Schiriy.
25/05/2004 16:06:06, Alexander Schiriy отписал(а) к All:
AS> Как в функцию передать адресс callback функции из PB для ее вызова из
AS> dll ?
Hикак. :( Только если обходными путями чрез свою .dll.
За сим откланиваюсь, Олег.
global type w_test_all_proccess from window
integer width = 2949
integer height = 2100
boolean titlebar = true
string title = "List of Current Processes:"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_ok cb_ok
mle_1 mle_1
end type
global w_test_all_proccess w_test_all_proccess
type variables
ulong HandleP[] // Handle of the process
constant ulong PROCESS_ALL_ACCESS = 2035711
end variables
event open;//
ProcessEntry Process // Window structure (arrayof 500 ulong)...arbitrary
value !
ModuleEntry Module // Window structure (array of 100long)... idem
PROCESS_MEMORY_COUNTERS pmc
long tailleP=2000 // Size of Process
long TailleM=400 // Size of Module
long NeededP // returned size of Process
long NeededM // returned size of Module
long resName // size of returned name of the module
long ifx, ii // for looping through processes
boolean resultP, resultM // return codes for EnumProcesses and
EnumProcessModules
string name // Name of the module
string ls_message, ls_un
ls_un =
"~r~n-----------------------------------------------------------------------
--------------------~r~n"
resultP=EnumProcesses(Process,TailleP,NeededP)
if resultP=true then
for ifx=1 to integer(NeededP / 4)
HandleP[ifx] =
OpenProcess(PROCESS_ALL_ACCESS,false,Process.lpIdProcess[iFX])
resultM = EnumProcessModules(HandleP[ifx], Module, TailleM, NeededM)
if NeededM >= 4 then
if GetProcessMemoryInfo( HandleP[ifx], pmc, 40 ) then
ls_message = ''
ls_message = "PageFaultCount: " + string(pmc.PageFaultCount) + '~r~n'
+ &
+ "PeakWorkingSetSize: " +
string(pmc.PeakWorkingSetSize ) + '~r~n' &
+ "WorkingSetSize: " + string(pmc.WorkingSetSize ) + '~r~n' +
"QuotaPeakPagedPoolUsage: " + string(pmc.QuotaPeakPagedPoolUsage ) + '~r~n'
&
+ "QuotaPagedPoolUsage: " + string(pmc.QuotaPagedPoolUsage ) +
'~r~n' &
+ "QuotaPeakNonPagedPoolUsage: " +
string(pmc.QuotaPeakNonPagedPoolUsage ) + '~r~n' &
+ "QuotaNonPagedPoolUsage: " + string(pmc.QuotaNonPagedPoolUsage)
+ '~r~n' &
+ "PagefileUsage: " + string(pmc.PagefileUsage ) + '~r~n' &
+ "PeakPagefileUsage: " + string(pmc.PeakPagefileUsage )
Name=space(254)
resName=GetModuleBaseNameA(handleP[ifx], Module.lpidmodule[1], name
,254)
// file://MessageBox( "Memory Info for : " + Name,ls_message)
ii ++
mle_1.text += "~r~nMemory Info for : " + Name + ls_un + ls_message + ls_un
end if
end if
CloseHandle(HandleP[ifx])
next
IF ii > 0 THEN
mle_1.text = "Retrieved ProcessMemoryInfo for " + string(ii) + "
processes~r~n" + mle_1.text
END IF
else
MessageBox ("Memory Info","Fail calling EnumProcesses")
end if
end event
on w_test_all_proccess.create
this.cb_ok=create cb_ok
this.mle_1=create mle_1
this.Control[]={this.cb_ok,&
this.mle_1}
end on
on w_test_all_proccess.destroy
destroy(this.cb_ok)
destroy(this.mle_1)
end on
type cb_ok from commandbutton within w_test_all_proccess
integer x = 329
integer y = 1872
integer width = 402
integer height = 112
integer taborder = 20
integer textsize = -10
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "OK"
end type
type mle_1 from multilineedit within w_test_all_proccess
integer x = 14
integer width = 2853
integer height = 1876
integer taborder = 10
integer textsize = -8
integer weight = 400
fontcharset fontcharset = russiancharset!
fontpitch fontpitch = fixed!
fontfamily fontfamily = roman!
string facename = "Courier"
long textcolor = 33554432
string text = "none"
boolean hscrollbar = true
boolean vscrollbar = true
boolean autohscroll = true
boolean autovscroll = true
borderstyle borderstyle = stylelowered!
end type
----------------------------------------------------------------------------
--------------------------------------------
"Oleg Tonkikh" <Oleg.T...@f698.n5020.z2.fidonet.org> сообщил/сообщила в
новостях следующее: news:10856...@f698.n5020.z2.ftn...