none
Build Errors in 2017 CS1503

    Question

  • Hello

    I've got a project that is giving me build errors in VS2017, however it's been building without errors in 2013

    In this project C# I am using a vendor DLL that has a function signature of

    VendorMethod(DoubleWaveform, int, int[*], double, VendorAssembly.DesiredUnits, double, double, double, Vendor.Assembly.UnitLabels, vendorAssemblyComplexSpectrum, vendorAssembly.Element[*], int, string)

    The errors are

    Argument 3 cannot convert from int[] to int[*]    \\ my declaration is int[] data = {1,2,3,4,5 };

    Arugment 11 cannot convert from out vendorAssembly.Element[]  to  out vendorAssembly.Element[*]  \\my declaration is vendorAssembly.Element[] Elements;

    This builds without errors in 2013, is there something within 2017 properties that I can change?




     

    Friday, April 21, 2017 3:41 PM

All replies

  • Hi William256,

    Thank you for posting here.

    I am not sure that the dll is written by what language. C++or C#?

    For the int[*] format, I have never seen the format in C# language.

    I am not sure that this is bug in VS2013. For testing the issue, could you please provide a reproducing demo for us?

    I suggest that you should modify the interface of DLL.

    Best Regards,

    Hart


    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.

    Monday, April 24, 2017 6:24 AM
  • Hello

    I'm working with a vendor DLL, and having some issues in a method call that has a pointer as an argument.  The method signature from object browser is showing up as

    int[] harmonics = { 1, 2, 3, 4, 5 };

    vendorAssembly.Element[] Components;

    public static void VendorMethod(int max, int[] harmonics, out Element[] components)

    The errors I get from the compiler VS 2015 or CS 2017 are CS1503 Cannot convert from 'int[] to 'int[*]

    and cannot convert from 'out vendorAssembly.Element[] to out vendorAssembly.Element[*]

    Any ideas?

    Monday, April 24, 2017 1:12 PM
  • I'm not sure what the DLL is developed in, but if it sows up in object browser wouldn't it be in a .NET language?

    In object browser the argumetns that are causing the errors appear as  int[*], vendorAssembly.Element[*],

    For a working example, what do you mean? 

    Monday, April 24, 2017 1:46 PM
  • Hi,

    >>" For a working example, what do you mean?  "

    For your first reply that the same code works in VS 2013, but nor working in VS 2017.

    I am not sure that this is a bug, i hope that you can provide a reproducing demo to test the bug.

    Best Regards,

    Hart


    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, April 25, 2017 3:20 AM
  • Hi William256,

    Thank you for posting here and sorry for late reply.

    For your question, do you get the error in C# project? 

    Could your provide more code for us to test?

    We are waiting for your update.

    Best Regards,

    Wendy


    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.

    Monday, May 01, 2017 3:21 AM
    Moderator
  • Please do not post the same question multiple times. Merging to the original thread.
    Monday, May 01, 2017 2:46 PM
    Moderator