none
Issues with C++ Activex wrapper calling a C# dll RRS feed

  • Question

  • Hello,

    First if this is the incorrect forum for this question please let me know the correct one.

    Issue:

    We have developed a C# dll that is used company wide. This was developed using visual studio 2019, framework 4.7.2.

    We are creating a visual studio C++ 2005 axtivex wrapper that will allow equipment we used to access the C# methods and properties via COM. The application works as designed on windows XP, 7 and 10 running full versions of windows. The target device is using windows 7 embedded standard and seems to stop functioning when the C++ code goes to create the point to the C# dll.

    I have made sure that all dependencies are included on the target and also all framework version from 1.0 to 4.7.2 are installed on the target. I do not get any errors on the target system.

    The section of code that it stops on is as follows:

    HRESULT hr = CoInitialize(NULL);
    IHmsTGenPtr cHMSFuncCall(__uuidof(cHmsTGen));  Seems to be stopping at this point.

    The declaration is as follows

    #import "..\WizardDLL\HmsTGen.tlb" rename_namespace("WizardDll") raw_interfaces_only
    using namespace WizardDll;

    The dll is named WizardDLL.

    I am not sure why this is working on full windows systems and not on windows 7 embeded standard.

    Thank You for any information.

    Tom

    Thursday, October 3, 2019 5:20 PM

Answers

All replies

  • Hi Tom,

    Sorry for delay in reply.

    According to your description, this issue might more related to the windows 7 embedded standard which is not support the application.

    Windows 7 embedded standard is different from full windows systems, some libraries or files are not included in this version. In my opinion, the system component library might not support the application.

    As far as I know, windows 7 embedded standard needs to be customized by the manufacturer. We recommend you could contact the manufacturer to modify windows 7 embedded standard to meet your requirements.

    Hope all above could help you.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 4, 2019 7:28 AM
  • Hello,

    Thank You for the response.

    I have verified that all dependencies needed are installed for the C++ activeX application.

    How do I determine what needs to be added to the windows embedded system for my application to function?

    Is there a way or tool that I could use to verify needed components or services? I am not getting any errors.

    Thanks Tom

    Friday, October 4, 2019 2:47 PM
  • Hi Tom,

    Thanks for the feedback.

    Since  this issue is more related to Windows Embedded and our forum discusses the usage of tools and editor in Visual Studio IDE, I will help you to move this issue to Windows Embedded Compact Platform Development Forum and you could get more professional help there.

    Really sorry for this inconvenience and thanks for your understanding.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.




    Tuesday, October 8, 2019 5:48 AM
  • Did you build the WES7 image? If so can you build a WES7 image based on the Application Compatibility template, which will pull in most of the feature packages?

    Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com

    Tuesday, October 8, 2019 5:04 PM
    Moderator
  • Sean,

    Thank you for the response. This is a third party product from one of our vendors. I have asked the vendor to see if the image was based on the Application Compatibility template and if not if we could get a new image built.

    I do have a VB.net application that is using the same dll and this one seems to work on this WES7 system but the C++ activex wrapper we are developing does not, which seems strange to me.

    Again thank you for the valuable information.


    Tom

    Wednesday, October 9, 2019 11:08 AM
  • So here is some new information on this issue.

    The C# DLL is a common COM DLL created two years ago and is used in a VB.net application and a VB6 application with no issue.

    I installed the VB.net setup and this works on the WES7 system, I then uninstalled the VB.net program and installed the VB6 setup on the WES7 system. With this install the DLL reported back information correctly. I then installed the new C++ 2005 wrapper project and it came up working correctly. I then uninstalled the VB6 project and ran the C++ project again and it would no longer function.

    this kind of leads me to believe that there is a registry issue for some reason when using the C++ setup or I am still missing libraries needed by C++. 

    I have run a dependency checker and it does not show any missing. 

    I am bit stumped at the moment

    Thank You

    Tom

    Thursday, October 10, 2019 8:34 PM
  • One missing piece is what packages are in the image. Hopefully, the vendor can give you the list of packages that build the image with.

    Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com

    Friday, October 11, 2019 3:01 PM
    Moderator
  • Did you resolve the issue?

    Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com

    Thursday, November 28, 2019 3:54 PM
    Moderator
  • Thank You for the information everyone. The resolution was compiler settings and setup..

    Thank You all for the information

    Saturday, January 18, 2020 2:52 AM