Thema: Delphi ICQ - API

Einzelnen Beitrag anzeigen

Benutzerbild von Mr_T
Mr_T

Registriert seit: 7. Jun 2002
Ort: Eilsum
136 Beiträge
 
Delphi 2005 Personal
 
#10
  Alt 8. Jul 2002, 11:29
Hmm - habe da noch ne andere Unit gefunden, die aber nicht zu diesen gehört ... sie ist aber ebenfalls eine schnittstelle zur icqmapi.dll .... was genau dioese Unit kann, habe ich nciht ausprobiert:

Code:
unit ICQMAPI_API;

interface
uses windows;
const libname = 'ICQMAPI.DLL';

type
  BSICQAPI_FireWallData = packed record
    m_bEnabled,
      m_bSocksEnabled: BYTE;
    m_sSocksVersion: Word;
    m_szSocksHost: array[0..512 - 1] of char;
    m_iSocksPort: integer;
    m_bSocksAuthenticationMethod: BYTE;
  end;

  BSICQAPI_User = packed record
    m_iUIN: integer;
    m_hFloatWindow: HWND;
    m_iIP: integer;
    m_szNickname: array[0..20 - 1] of char;
    m_szFirstName: array[0..20 - 1] of char;
    m_szLastName: array[0..20 - 1] of char;
    m_szEmail: array[0..100 - 1] of char;
    m_szCity: array[0..100 - 1] of char;
    m_szState: array[0..100 - 1] of char;
    m_iCountry: integer;
    m_szCountryName: array[0..100 - 1] of char;
    m_szHomePage: array[0..100 - 1] of char;
    m_iAge: integer;
    m_szPhone: array[0..20 - 1] of char;
    m_bGender: BYTE;
    m_iHomeZip: integer;
// Version 1.0001
    m_iStateFlags: integer;
  end;

//BPSICQAPI_User=^BSICQAPI_User;

  BSICQAPI_Group = packed record
    m_szName: array[0..50 - 1] of char;
    m_iUserCount: integer;
    m_ppUsers: BSICQAPI_User;
  end;

//BPSICQAPI_Group=^BSICQAPI_Group;

  BICQAPINotify_OnlineListChange = procedure(iType: integer); stdcall;
  BICQAPINotify_OnlineFullUserDataChange = procedure(iUIN: integer); stdcall;
  BICQAPINotify_AppBarStateChange = procedure(iDockingState: integer); stdcall;
  BICQAPINotify_OnlinePlacementChange = procedure; stdcall;
  BICQAPINotify_OwnerChange = procedure(iUIN: integer); stdcall;
  BICQAPINotify_OwnerFullDataChange = procedure; stdcall;
  BICQAPINotify_OnlineListHandleChange = procedure(hWindow: hwnd); stdcall;
  BICQAPINotify_FileReceived = procedure(const pszFileNames: pchar); stdcall;


const
  BICQAPI_USER_STATE_ONLINE = 0;
  BICQAPI_USER_STATE_CHAT = 1;
  BICQAPI_USER_STATE_AWAY = 2;
  BICQAPI_USER_STATE_OUT = 3;
  BICQAPI_USER_STATE_OCCUPIED = 4;
  BICQAPI_USER_STATE_DND = 5;
  BICQAPI_USER_STATE_INVISIBLE = 6;
  BICQAPI_USER_STATE_OFFLINE = 7;

  ICQAPINOTIFY_ONLINELIST_CHANGE = 0;
  ICQAPINOTIFY_ONLINE_FULLUSERDATA_CHANGE = 1;
  ICQAPINOTIFY_APPBAR_STATE_CHANGE = 2;
  ICQAPINOTIFY_ONLINE_PLACEMENT_CHANGE = 3;
  ICQAPINOTIFY_OWNER_CHANGE = 4;
  ICQAPINOTIFY_OWNER_FULLUSERDATA_CHANGE = 5;
  ICQAPINOTIFY_ONLINELIST_HANDLE_CHANGE = 6;
  ICQAPINOTIFY_FILE_RECEIVED = 8;
  ICQAPINOTIFY_LAST = 80;
  ICQAPINOTIFY_ONLINELISTCHANGE_ONOFF = 1;
  ICQAPINOTIFY_ONLINELISTCHANGE_FLOAT = 2;
  ICQAPINOTIFY_ONLINELISTCHANGE_POS = 3;


procedure ICQAPIUtil_FreeUser(var pUser: BSICQAPI_User); stdcall;
procedure ICQAPIUtil_FreeUsers(iCount: integer; var pUsers: BSICQAPI_User); stdcall;
procedure ICQAPIUtil_FreeGroup(var pGroup: BSICQAPI_Group); stdcall;

function ICQAPICall_SetLicenseKey(const pszName: pchar; const pszPassword: pchar; const pszLicense: pchar): BOOL; stdcall;
function ICQAPICall_GetVersion(var iVersion: integer): BOOL; stdcall;
function ICQAPICall_GetDockingState(var iDockingState: integer): BOOL; stdcall;
function ICQAPICall_GetFirewallSettings(var oFireWallData: BSICQAPI_FireWallData): BOOL; stdcall;
function ICQAPICall_GetFullOwnerData(var ppUser: BSICQAPI_User; iVersion: integer): BOOL; stdcall;
function ICQAPICall_GetFullUserData(var pUser: BSICQAPI_User; iVersion: integer): BOOL; stdcall;
function ICQAPICall_GetOnlineListDetails(var iCount: integer; var ppUsers: BSICQAPI_User): BOOL; stdcall;
function ICQAPICall_GetOnlineListHandle(var hWindow: hwnd): BOOL; stdcall;
function ICQAPICall_GetOnlineListPlacement(iIsShowOnlineList: integer): BOOL; stdcall;
function ICQAPICall_GetWindowHandle(var hWindow: hwnd): BOOL; stdcall;
function ICQAPICall_RegisterNotify(iVersion, iCount: integer; var piEvents: BYTE): BOOL; stdcall;
function ICQAPICall_UnRegisterNotify(): BOOL; stdcall;
function ICQAPICall_SendFile(iPIN: integer; const pszFileNames: pchar): BOOL; stdcall;
// Version 1.0001
function ICQAPICall_GetOnlineListType(var iListType: integer): BOOL; stdcall;
function ICQAPICall_GetGroupOnlineListDetails(iGroupCount: integer; var ppGroups: BSICQAPI_Group): BOOL; stdcall;
function ICQAPICall_SetOwnerState(iState: integer): BOOL; stdcall;
function ICQAPICall_SetOwnerPhoneState(iPhoneState: integer): BOOL; stdcall;
function ICQAPICall_SendMessage(iUIN: integer; const pszMessage: Pchar): BOOL; stdcall;
function ICQAPICall_SendURL(iUIN: integer; const pszMessage: pchar): BOOL; stdcall;
function ICQAPICall_SendExternal(iUIN: integer; const pszExternal: pchar; const pszMessage: pchar; bAutoSend: BYTE): BOOL; stdcall;
function ICQAPICall_Generic(iCode: integer; {var?} pInBuffer: pointer; iInSize: integer; var ppOutBuffer: pointer; var iOutSize: integer): BOOL; stdcall;

procedure ICQAPIUtil_SetUserNotificationFunc(uNotificationCode: UINT; pUserFunc: pointer); stdcall;


implementation

uses Haupt;
procedure ICQAPIUtil_FreeUser(var pUser: BSICQAPI_User); external libname; stdcall;
procedure ICQAPIUtil_FreeUsers(iCount: integer; var pUsers: BSICQAPI_User); external libname; stdcall;
procedure ICQAPIUtil_FreeGroup(var pGroup: BSICQAPI_Group); external libname; stdcall;

function ICQAPICall_SetLicenseKey(const pszName: pchar; const pszPassword: pchar; const pszLicense: pchar): BOOL; external libname; stdcall;
function ICQAPICall_GetVersion(var iVersion: integer): BOOL; external libname; stdcall;
function ICQAPICall_GetDockingState(var iDockingState: integer): BOOL; external libname; stdcall;
function ICQAPICall_GetFirewallSettings(var oFireWallData: BSICQAPI_FireWallData): BOOL; external libname; stdcall;
function ICQAPICall_GetFullOwnerData(var ppUser: BSICQAPI_User; iVersion: integer): BOOL; external libname; stdcall;
function ICQAPICall_GetFullUserData(var pUser: BSICQAPI_User; iVersion: integer): BOOL; external libname; stdcall;
function ICQAPICall_GetOnlineListDetails(var iCount: integer; var ppUsers: BSICQAPI_User): BOOL; external libname; stdcall;
function ICQAPICall_GetOnlineListHandle(var hWindow: hwnd): BOOL; external libname; stdcall;
function ICQAPICall_GetOnlineListPlacement(iIsShowOnlineList: integer): BOOL; external libname; stdcall;
function ICQAPICall_GetWindowHandle(var hWindow: hwnd): BOOL; external libname; stdcall;
function ICQAPICall_RegisterNotify(iVersion, iCount: integer; var piEvents: BYTE): BOOL; external libname; stdcall;
function ICQAPICall_UnRegisterNotify(): BOOL; external libname; stdcall;
function ICQAPICall_SendFile(iPIN: integer; const pszFileNames: pchar): BOOL; external libname; stdcall;
// Version 1.0001
function ICQAPICall_GetOnlineListType(var iListType: integer): BOOL; external libname; stdcall;
function ICQAPICall_GetGroupOnlineListDetails(iGroupCount: integer; var ppGroups: BSICQAPI_Group): BOOL; external libname; stdcall;
function ICQAPICall_SetOwnerState(iState: integer): BOOL; external libname; stdcall;
function ICQAPICall_SetOwnerPhoneState(iPhoneState: integer): BOOL; external libname; stdcall;
function ICQAPICall_SendMessage(iUIN: integer; const pszMessage: Pchar): BOOL; external libname; stdcall;
function ICQAPICall_SendURL(iUIN: integer; const pszMessage: pchar): BOOL; external libname; stdcall;
function ICQAPICall_SendExternal(iUIN: integer; const pszExternal: pchar; const pszMessage: pchar; bAutoSend: BYTE): BOOL; external libname; stdcall;
function ICQAPICall_Generic(iCode: integer; {var?} pInBuffer: pointer; iInSize: integer; var ppOutBuffer: pointer; var iOutSize: integer): BOOL; external libname; stdcall;

procedure ICQAPIUtil_SetUserNotificationFunc(uNotificationCode: UINT; pUserFunc: pointer); external libname; stdcall;

end.
Hoffe, du bekommst die Probs in den Griff........
  Mit Zitat antworten Zitat