Calling win32 dll in VSTO using PInvoke RRS feed

  • Question

  • I need to develop an excel AddIn using a third party API. The API is in the form of multiple win32 dlls. There is one main dll and the rest of the dlls are being called in the main dll. I am calling main dll using PInvoke from the VSTO. I am able to successfully pinvoke the main dll but the main dll could not locate other dlls. The API is working with native .net application. I have tried by coping child dll in windows, system32 and system folders.

    Any idea what’s going wrong?


    Thursday, April 19, 2012 3:43 PM

All replies

  • try using process monitor to see where main dll is searching for other dlls and why it is failing
    Thursday, April 19, 2012 6:34 PM
  • Hi M.AbrarAhmad,

    Thanks for posting in the MSDN Forum.

    It's based on my understanding the "PInvoke" is used call functions in native dll files. would you please show me some snippet for further research?

    And it will make more sense to tell me you platform version for research.

    Have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, April 23, 2012 7:40 AM