locked
Compiling Excel XLL with std::chrono::steady_clock results in Excel not recognising the XLL RRS feed

  • Question

  • For development, I use Windows 10 and Visual Studio 2015 Community Edition 14.0.24720.00 Update 1 (.NET 4.6.01038).

    I try to develop an XLL using the Excel 2010 XLL SDK.

    I downloaded the SDK and extracted it to "C:\2010 Office System Developer Resources\Excel2010XLLSDK\".

    I open "Developer Command Prompt for VS2015" and go to "C:\2010 Office System Developer Resources\Excel2010XLLSDK\SAMPLES".

    I type "make release build x86", and I get the compiled XLL EXAMPLE.xll in "C:\2010 Office System Developer Resources\Excel2010XLLSDK\SAMPLES\EXAMPLE\RELEASE".

    This XLL is successfully loaded if I call in Excel 2010 on Windows XP:

    Debug.Print Application.RegisterXLL("C:\TmpFolder\EXAMPLE.xll") ' Returns True

    ***

    However, if I rename "C:\2010 Office System Developer Resources\Excel2010XLLSDK\SAMPLES\EXAMPLE\EXAMPLE.C" to EXAMPLE.CPP, then if I add two lines there (after #include <framewrk.h>)


    #include <chrono>
    std::chrono::steady_clock::time_point LastMultipartMessageSent = std::chrono::steady_clock::now();


    and if I compile that XLL again,

    then finally Excel 2010 on Windows XP cannot load the XLL:

    Debug.Print Application.RegisterXLL("C:\TmpFolder\EXAMPLE.xll") ' Returns False.

    ***

    So it seems there is some problem with std::chrono::steady_clock.

    If I use std::chrono::system_clock, everything actually works fine (i.e. the XLL is loaded successfully) in the same settings with Excel 2010 and Windows XP.

    Windows XP is 32-bit and it has Service Pack 3. Windows XP has installed VC Redist 2015.

    The same XLL (with steady_clock) is loaded successfully on Windows 10 with Excel 2010, so it seems there is some specific issue with Windows XP.

    I also tried to create a stub Win32 exe project and use std::chrono::steady_clock there. I compiled it, and it runs successfully on Windows XP. So it is something even more subtle than just no support of std::chrono::steady_clock on Windows XP.

    ***

    Could you kindly advise, please, what might be the issue.

    • Moved by Weiwei Cai Monday, March 28, 2016 6:44 AM not VS IDE issue
    Sunday, March 27, 2016 12:04 PM

Answers



  • Hi,<o:p></o:p>



    Based on my research. I found on official document that does not support this function. Since you run it successfully on windows XP using std::chrono::steady_clock. Could you please provide me reproducing demo to test.<o:p></o:p>

    Best Regards,

    Hart<o:p></o:p>


    • Proposed as answer by Hart Wang Friday, April 1, 2016 8:20 AM
    • Marked as answer by May Wang - MSFT Tuesday, April 5, 2016 3:31 AM
    Tuesday, March 29, 2016 5:54 AM

All replies

  • However, if I rename "C:\2010 Office System Developer Resources\Excel2010XLLSDK\SAMPLES\EXAMPLE\EXAMPLE.C" to EXAMPLE.CPP, then if I add two lines there (after #include <framewrk.h>)
    ..
    and if I compile that XLL again,
    then finally Excel 2010 on Windows XP cannot load the XLL:

    Have you checked with Depends to see if there's some additional
    dependency that's not available under XP.

    http://dependencywalker.com/

    Dave

    Sunday, March 27, 2016 1:37 PM
  • Thanks for David's reply.

    Hi Yura Perov,

    Do you get any error message when the XLL doesn't load on Windows XP? Please share the detailed message here to help us find out what happened with your code.

    >> I also tried to create a stub Win32 exe project and use std::chrono::steady_clock there. I compiled it, and it runs successfully on Windows XP

    Please run your code in Windows XP to make sure whether this problem is related to the incompatible on Windows XP.

    In addition, since this forum is discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    Your problem is more related to C++ problem, I help you move this thread to C++ forum for a better help. Thanks for your understanding.

     Best Regards,
    Weiwei

    Monday, March 28, 2016 6:44 AM


  • Hi,<o:p></o:p>



    Based on my research. I found on official document that does not support this function. Since you run it successfully on windows XP using std::chrono::steady_clock. Could you please provide me reproducing demo to test.<o:p></o:p>

    Best Regards,

    Hart<o:p></o:p>


    • Proposed as answer by Hart Wang Friday, April 1, 2016 8:20 AM
    • Marked as answer by May Wang - MSFT Tuesday, April 5, 2016 3:31 AM
    Tuesday, March 29, 2016 5:54 AM