Home

Add

Edit

Without Linenumbers

Code in Textfield

Download

  1. 
    
  2. '-----------------------------------------------------------------------------------------------------------------
    
  3. Function IRC_SetCallbackSet(Byref R_IRCID As Uinteger, V_CallbackSet As IRC_Int_Callback_Type) As IRC_Return_Enum
    
  4. Mutexlock(IRC_Int_Com_Mutex)
    
  5. Dim TPtr As IRC_Int_Com_Type Ptr = IRC_Int_ComGet_ByIRCID(R_IRCID)
    
  6. If TPtr = 0 Then Mutexunlock(IRC_Int_Com_Mutex): Return IRCRE_IRCIDnotFound
    
  7. TPtr->V_Callbacks = V_CallbackSet
    
  8. Mutexunlock(IRC_Int_Com_Mutex)
    
  9. Return IRCRE_NoError
    
  10. End Function
    
  11. 
    
  12. 
    
  13. 
    
  14. Dim tcallbacks As IRC_Int_Callback_Type
    
  15. With tcallbacks
    
  16.    .C_Connected = @foo
    
  17.    .C_Disonnected = @bar
    
  18. End With
    
  19. SetCallbackSet(123, tcallbacks)