Z znj_326 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-04 #2 procedure TimerAPCProc( lpArgToCompletionRoutine: Pointer; dwTimerLowValue, dwTimerHighValue: DWORD ); stdcall;
procedure TimerAPCProc( lpArgToCompletionRoutine: Pointer; dwTimerLowValue, dwTimerHighValue: DWORD ); stdcall;
A allendelphi Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-04 #3 问题是如何定义并调用这个TimerAPCProc函数? 能写一个简单的DEMO吗?
Z znj_326 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-06 #5 [!] 这样还不会 看看这个,还不会的话,我可以给你翻译成delphi http://www.vckbase.com/document/viewdoc/?id=1587
A allendelphi Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-08 #6 To znj_326: 这段代码我也有看到过, 显然VC可以很方便地使用回调函数CALL BACK, 而DELPHI怎样调用这个回调函数呢, 我一直困惑中, 麻烦你将其翻译成PASCAL语法吧, 万分感谢!!
To znj_326: 这段代码我也有看到过, 显然VC可以很方便地使用回调函数CALL BACK, 而DELPHI怎样调用这个回调函数呢, 我一直困惑中, 麻烦你将其翻译成PASCAL语法吧, 万分感谢!!
Z znj_326 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-08 #7 procedure TimerAPCProc( lpArgToCompletionRoutine: Pointer; dwTimerLowValue, dwTimerHighValue: DWORD ); stdcall; var lpszInfoString: PChar; dwInfoNumber: DWORD; begin {} lpszInfoString:=PMyData(PCreateStruct(dwTimerHighValue).lpCreateParams).szText; dwInfoNumber:=PMyData(PCreateStruct(dwTimerLowValue).lpCreateParams).dwValue; end; procedure myThread.SetWait; var lpointer; //htime:Cardinal; hStart:int64; hNext:Integer; bSuss:Boolean; myPMYDATA; begin hStart:=40000; hnext:=40000; lp:=pointer(myp); htime:=CreateWaitableTimer(nil,True,'myTimer'); bSuss:=SetWaitableTimer(htime,hStart,hNext,TFarProc(@TimerAPCProc) ,lp,True); //if bSuss then end; 最近实在是太忙,如果这样还不会~~~~~~~~,再说吧
procedure TimerAPCProc( lpArgToCompletionRoutine: Pointer; dwTimerLowValue, dwTimerHighValue: DWORD ); stdcall; var lpszInfoString: PChar; dwInfoNumber: DWORD; begin {} lpszInfoString:=PMyData(PCreateStruct(dwTimerHighValue).lpCreateParams).szText; dwInfoNumber:=PMyData(PCreateStruct(dwTimerLowValue).lpCreateParams).dwValue; end; procedure myThread.SetWait; var lpointer; //htime:Cardinal; hStart:int64; hNext:Integer; bSuss:Boolean; myPMYDATA; begin hStart:=40000; hnext:=40000; lp:=pointer(myp); htime:=CreateWaitableTimer(nil,True,'myTimer'); bSuss:=SetWaitableTimer(htime,hStart,hNext,TFarProc(@TimerAPCProc) ,lp,True); //if bSuss then end; 最近实在是太忙,如果这样还不会~~~~~~~~,再说吧
N nicai_wgl Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-08 #8 procedure MyTimerAPCProc( lpArgToCompletionRoutine: Pointer; dwTimerLowValue, dwTimerHighValue: DWORD ); begin ....... end; SetWaitableTimer(htime,hStart,hNext,@MyTimerAPCProc,lp,True);
procedure MyTimerAPCProc( lpArgToCompletionRoutine: Pointer; dwTimerLowValue, dwTimerHighValue: DWORD ); begin ....... end; SetWaitableTimer(htime,hStart,hNext,@MyTimerAPCProc,lp,True);