Results 1 to 4 of 4

Thread: ICQ API! Cool!

  1. #1

    Thread Starter
    Fanatic Member skald2k's Avatar
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    535

    ICQ API! Cool!

    Im new to API's!

    I downloaded the ICQ API and tried to use it, but I have to get the following function working first... would someone convert it to VB for me?

    This:

    void WINAPI ICQAPIUtil_SetUserNotificationFunc(UINT uNotificationCode, void *pUserFunc);

    This is what I get:

    Private Declare Function ICQAPIUtil_SetUserNotificationFunc Lib "C:\ICQMAPI.dll" (uNotificationCode As Long, pUserFunc As Variant)

    but its no good.
    Attached Files Attached Files
    - If at first you dont succeed, then give up, cause you will never will!

  2. #2
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Parameters should be:

    (ByVal uNotificationCode As Long, ByVal pUserFunc As Long)

    And in your call, pUserFunc must be a subroutine passed using the AddressOf keyword.

    HTH,
    Duncan
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  3. #3
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    http://www.vbthunder.com/reference/readcpp.html

    the above site will help you with your translations.....

    but whilst you are reading....

    It's a void - so it's a sub.....

    And the pointer to the pUserFunc should be a long.....

    And take the path out of the dll name, and make sure you put the DLL in the path somewhere...

    Code:
    Private Declare Sub ICQAPIUtil_SetUserNotificationFunc Lib "ICQMAPI.dll" (ByVal uNotificationCode As Long, ByVal pUserFunc As Long)

    In fact someone else has already translated loads of this stuff -
    http://groups.google.com/groups?q=Se...rcn.net&rnum=2
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  4. #4

    Thread Starter
    Fanatic Member skald2k's Avatar
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    535
    Thanks guys!

    And take the path out of the dll name, and make sure you put the DLL in the path somewhere...
    If I take the path out how will VB know where the DLL is?
    Last edited by skald2k; Mar 1st, 2002 at 10:04 PM.
    - If at first you dont succeed, then give up, cause you will never will!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width