Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting result of a task
Message
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Common Language Runtime
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01643645
Message ID:
01644082
Vues:
42
Using DllExport utility and class I'm having some troubles with the declaration.

Here is my C# function
 [DllExport("ValidatePass", System.Runtime.InteropServices.CallingConvention.StdCall)]
        /// <summary>
        /// ValidatePass function
        
        /// <param name="tcBarcode">Barcode - The DLL will package up the tcBarcode and tcUsageDate into simple JSON</param>
        /// <param name="tcUsageDate">Datetime of the scan converted into the necessary string format</param>
        
        /// <param name="tnRetries">If no response in the timeout period, the number of times to attempt contact . 
        ///                         If it was a DNS lookup failure or other glaring connection issue, then retries can be bypassed..</param>
        /// <param name="tnReturnValue">Passed by reference, it is the “ReturnValue” string in the JSON response</param>
        /// <param name="tcReturnValueText">Passed by reference, it is the “ReturnValueText” string in the JSON response</param>
        /// <param name="tcMessage">“Message” string in the JSON response, if present</param>
        /// <param name="tcProductCode">“ExternalProductCode” string in the JSON response, if present</param>
        /// <returns>int Status</returns> 
        /// </summary>        
        public static int ValidatePass(String tcBarcode,
                      String tcUsageDate, Int32 tnRetries,
                      ref Int32 tnReturnValue, ref String tcReturnValueText, ref String tcMessage, ref String tcProductCode)
and this is my VFP declaration
declare integer ValidatePass in "myDll.dll" ;
		string, string, integer, @integer, @string, @string, @string
and attempt to call it
result = ValidatePass("01120800369238", "2016-10-28T15:09:06.7021957-06:00", 3, ;
		@ReturnValue, @ReturnValueText, @cMessage, @ProductCode)
However, I am getting 'Too many arguments' error on that line (2 other functions that only set static properties seem to work fine).

Can I have function in VFP with many parameters passed by reference? Could the problem be in the integer return value by reference?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform