Jump to content

Reikira

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Reikira

  1. Hi all,

    I have to call the following function that is part of a C dll:

    icon_regfilt_createRegistrationFilter (const char * extractComponent, const char ** extractSubcomponent, const float * shifts, unsigned int nSubcomponents, enum regfilt_interpolation_method_t method, BOOL copySubComponents)

    How can I pass the extractSubcomponent parameter, that is an array of strings (char**)?

    In C it is quite simple, this is how the function is used:

    char * registrationDataFormat;

    char* extractionDataFormat;

    const char* subComponents[3] = {"Red", "Green", "Blue"};

    float shifts[3] = {0.0f, 0.0f, 0.0f};

    // Create a registration filter for the component named Color 1

    registrationFilter = icon_regfilt_createRegistrationFilter("Color 1", subComponents, shifts, 3, NN, FALSE);

    In LabVIEW I tried a few:

    - create the array of strings in LV and pass it directly to the call library node declaring it as "Adapt to type" and "Handle by value"

    - create the array of strings in LV and pass it directly to the call library node declaring it as "Adapt to type" and "Pointer to handles"

    - converting in LV the array of strings to a 2D array of numbers and passing this to the Call library function node (but I can't change the function in order to pass the array sizes)

    but the problem is that in LV 8.5 it always crashes and in LV 2010 the function runs and returns a pointer as it is expected, without any error, but actually it doesn't create the memory structure that should create.

    Have you ever passed an array of strings to a dll? How can I do this?

    Thank you very much for your help!

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.