CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: [RESOLVED] dll crashing issue

  1. #1
    Join Date
    Mar 2006

    [RESOLVED] dll crashing issue

    Hi, I have designed a dll to run from excel which prices financial options. It all works fine when I reference the dll on my pc, but If I copy the dll to a shared directory so that others can use it, then it crashed excel all the time..

    Is there something I need to specify in the configuration properties in order for it to work on other pc's?

    [edit]Just to add this is a win32 app[/edit]
    Last edited by jrogers; January 24th, 2012 at 05:58 PM.

  2. #2
    Join Date
    Oct 2005
    Minnesota, U.S.A.

    Re: dll crashing issue

    You need to post more information.

    1. Is it a regular DLL or MFC?
    2. Does it access any database, if so, do you share it?
    3. What type of interface are you using.

  3. #3
    Join Date
    Mar 2006

    Re: dll crashing issue

    it is a regular dll.. I created a blank WIN32 Consol Application.

    I have solved it.
    I was using
    extern "C" __declspec(dllexport) double __sdtcall functionname()
    but i have now found that if I use

    #define EXPORT comment(linker, "/EXPORT:"__FUNCTION__"="__FUNCDNAME__)
    in my header file and then add
    double __stdcall function(double &a)
    #pragma EXPORT
    //rest of code
    that it not only does not decorate my functions, but It works wherever I install the dll. (I also don't have to use a .def file)

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)