Reply To: Need to build an interface for XML to SQL Datadata

Reply To: Need to build an interface for XML to SQL Datadata

Home Forums NAACCR XML Standard Need to build an interface for XML to SQL Datadata Reply To: Need to build an interface for XML to SQL Datadata

#9636

Perhaps the byNaccrrid function will not work in C#?

Oh, it will work all right. I just have to enlist the help of a C# programmer at the CDC to look at it. Dollars to donuts it will be the something about the declarations.

The help file says the C# declaration for this function should look something like this:

[DllImportAttribute("XMLPlus.dll", EntryPoint = "XMLPlus_GetItemDataByNaaccrId")]
public static extern int XMLPlus_GetItemDataByNaaccrId(int XmlId,
   [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] string naaccrId);

(I just typed that from the help file, so please look to it there.) My hunch is that your declaration is not properly converting a C# string to a pointer to array of char, which of course is what you need for a C interface across languages. In the meantime, I’ll see if I can get somebody else to write a test for these functions at the CDC.

Kathleen

Copyright © 2018 NAACCR, Inc. All Rights Reserved | naaccr-swoosh-only See NAACCR Partners and Sponsors