Re: Calling a DLL

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jerry W. Lewis (post_a_reply_at_no_e-mail.com)
Date: 07/09/04


Date: Fri, 09 Jul 2004 11:53:16 GMT

http://support.microsoft.com/default.aspx?scid=kb;en-us;213554

may have some useful information. Your DLL must use _stdcall calling
convention, or you cannot use it. I have not experience with the CALL()
function, but using a VBA declaration and passing arguments ByVal has
worked well for me.

Jerry

Augusto Afonso wrote:

> Hi All,
>
> I'm trying to call a dll from within Excel 2000. This is what I´m doing:in
> cell B1 I include this code: =CALL("MyDll";"Mult";"JJJ!";C1;D1)
> in C1 and C2 there are any integers.
>
> what I get is the FALSE word in cell B1.
>
> Inside the DLL there is only one function (Mult) that multiplies two
> integers and returns another integer. It works ok out of excel.Any comments
> are welcome.Augusto.



Relevant Pages

  • Re: linking problem in DPAPI
    ... to a dll without the usage of any import libraries. ... > It's mean who's responsibility to clean stack frame. ... The problem is that the 'Convention' parameter in 'pragma Import' ... Microsoft has two naming conventions for the StdCall calling ...
    (comp.lang.ada)
  • Re: Using a DLL without a library / stdcall / WinAPI
    ... To use a DLL for which you don't have a .lib file, you have to have the prototype on your ... C uses C calling convention. ...
    (microsoft.public.vc.mfc)
  • Can my MFC Regular DLL run in C++ and Visual Basic?
    ... So, as a test, I created a simple MFC Regular DLL ... the _cdecl convention and the other using the ...
    (microsoft.public.vc.mfc)
  • Re: C++ DLL used by Delphi - Entry Point Not Found error - exports?
    ... Sorry, export should be used if you compile .dll, not use it. ... convention will not help - look dll with special tools like PE Viewer ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: dll wont work with VB6
    ... The error I get under VB is Runtime error 49, "Bad DLL calling ... convention". ... VB can only call exported functions that use __stdcall calling ... I thought there was a CDecl keyword you could tag on the Declare Function ...
    (microsoft.public.vc.language)