How to deal with callback function in MFC C++ ?
How to deal with callback function in MFC C++ ?
API Declarations
Declare Function A Lib "Sekure" Alias "_A@8" (ByVal iPort As Integer, vFunc As Variant) As Integer
Rate How to deal with callback function in MFC C++ ?
(1(1 Vote))
//global declaration
typedef void (*FINGER_STATUS) (short);
FINGER_STATUS FingStatus = NULL;
SEKURE_API int __stdcall int A (int comport, void *fnc)
{
FingStatus = (FINGER_STATUS)pFS;
int nRet = GetInfo(comport);
if (nRet) {
if(FingStatus)
FingStatus( nRet );
}
return OK;
......
}
in VB =>
Public Sub Verify()
Msgbox "HI"
..........
End Sub
Private Sub A_Click()
ret= A(1, AddressOf Verify)
......
End Sub
How to deal with callback function in MFC C++ ? Comments
No comments yet — be the first to post one!
Post a Comment