Einzelnen Beitrag anzeigen

Jumpy

Registriert seit: 9. Dez 2010
Ort: Mönchengladbach
1.737 Beiträge
 
Delphi 6 Enterprise
 
#11

AW: Tapi Callback Funktion darf nicht in Klasse sein

  Alt 26. Nov 2012, 15:11
Aus der SDK über die Tapi:

Zitat:
The lineCallbackFunc function is a placeholder for the application-supplied function name.

VOID FAR PASCAL lineCallbackFunc(

DWORD hDevice,
DWORD dwMsg,
DWORD dwCallbackInstance,
DWORD dwParam1,
DWORD dwParam2,
DWORD dwParam3
);


Parameters

hDevice

A handle to either a line device or a call associated with the callback. The nature of this handle (line handle or call handle) can be determined by the context provided by dwMsg. Applications must use the DWORD type for this parameter because using the HANDLE type may generate an error.

dwMsg

A line or call device message.

dwCallbackInstance

Callback instance data passed back to the application in the callback. This DWORD is not interpreted by TAPI.

dwParam1

A parameter for the message.

dwParam2

A parameter for the message.

dwParam3

A parameter for the message.



Remarks

For information about parameter values passed to this function, see Line Device Messages.
All callbacks occur in the application's context. The callback function must reside in a DLL or application module.
Eine andere Bemerkung dazu, die ich gefunden hatte. Heißt das nun, Statische Methode oder Klassenmethode ist OK, oder auch nicht?

Zitat:
Additionally, the callback function must be a global procedure, not a class member (method). The problem in substituting a callback function by a class member is that Windows does not understand either C++ class member functions or Delphi's methods which carry "this" and "self" as a first hidden parameter.
Ralph
  Mit Zitat antworten Zitat