Results 1 to 3 of 3

Thread: Bad DLL calling convention ???

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241

    Question

    I am trying to use the icq api but am getting this error message when I try to use one of the function.

    The function set wich of MY functions (In my app) will be called when a certain notification from ICQ arrives...

    here goes..
    Now the documentation for the ICQ API is written for C++, I have managed to convert most of them but maybe this one is not converted correctly ?

    What the documentation says:
    Code:
    void WINAPI ICQAPIUtil_SetUserNotificationFunc(UINT uNotificationCode, void *pUserFunc);
    In a module:
    Code:
    Public Declare Function ICQSetUserNotificationFunc Lib "ICQMAPI.dll" Alias "ICQAPIUtil_SetUserNotificationFunc" (uNotificationCode As Integer, ByVal pUserFunc As Variant)

    In the code of a form:
    Code:
    Call ICQSetUserNotificationFunc(1, AddressOf ICQOnlineListChange)
    Is the function converted correctly ? if it is, what is the problem. If not , How should it be?

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241
    Thank You Stevie-O!

    I AM new at this and did not know of those rules... I will make sure I obey them at all times (I don't want to lose everything on my computer because of VB)

    if you have other rules, I would like to know them!
    thanks again

  3. #3
    Lively Member
    Join Date
    Apr 2000
    Location
    Hell
    Posts
    89
    Hehe, will do =)

    Consider yourself lucky - to my knowledge, none of those rules are actually explicitly written down anywhere. I determined them based on some existing documentation and a great deal of trial and error. VB's universal message 'Invalid DLL calling convention' wasn't much of a help either :P It reminds me of the good old DOS days when there was only one printer error - error #27, "Out Of Paper". QuickBASIC would say 'out of paper' whether the printer was off, unplugged, or even actually out of paper.
    - Steve

    Real programmers use COPY CON PROGRAM.EXE

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