Einzelnen Beitrag anzeigen

Benutzerbild von Garfield
Garfield

Registriert seit: 9. Jul 2004
Ort: Aken (Anhalt-Bitterfeld)
1.334 Beiträge
 
Delphi XE5 Professional
 
#10

Re: Wie DVD Transfer mit ShrinkTo5.DLL?

  Alt 3. Dez 2009, 01:44
Ich habe pUser nur als Pointer deklariert und nil zugewiesen. Jetzt überlege ich, ob da eventuell der Pointer zu der Procedure hingehört, von welcher ich ein Callback möchte.

Was ich nicht verstehe:

Transfer.h:
Code:
// *** for alert receivers
// for C++ Languages: defines a CallBack to be overriden
virtual int CallBack(int alert, int param, void *pTransfer);    
// defines the callback routine to be called when an alert is available
// this function must be overwritten by a derived class
// the last parameter can be reinterpreted (explicit cast) to (Transfer *)

// for non C++ Languages: sets a pointer to a callback function
// when calling the CallBack the pTransfer parameter points to Transfer Object and pUser to the user supplied data to this function
virtual void SetCallBack(int (_stdcall *pCallBack)(int alert, int param, void *pTransfer, void *pUser), void *pUser);
TransferAlert.cpp
Code:
// for non C++ Languages: sets a pointer to a callback function
void TransferAlert::SetCallBack(int (_stdcall *pCallBack)(int alert, int param, void *pTransfer, void *pUser), void *pUser)
{
   this->pCallBack = pCallBack;
   this->pUser = pUser;
}
Gruss Garfield
Ubuntu 22.04: Laz2.2.2/FPC3.2.2 - VirtBox6.1+W10: D7PE, DXE5Prof
  Mit Zitat antworten Zitat