Hallo.
Ich möchte mich jetzt ein wenig mit DLL's in AutoIt befassen, und habe nun eine Frage.
Habe mir Folgende DLL in C# erstellt.
Spoiler anzeigen
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestDLL
{
public class Class1
{
/// <summary>
/// Counts the number of times a character appears in a string.
/// </summary>
/// <param name="input">The string to parse</param>
/// <returns></returns>
public static string GetCharacters(string input)
{
string[,] alphanumerics = { { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" } };
string result = "";
int FI = 0;
int LI = 0;
int counts = 0;
for (int i = 0; i < 35; i++)
{
//Get the lower-case characters first//
FI = input.IndexOf(alphanumerics[0, i]);
while (FI > -1)
{
counts++;
LI = FI + 1;
FI = input.IndexOf(alphanumerics[0, i], LI);
}
if (counts > 0)
{
result += "There are " + counts + " " + alphanumerics[0, i] + "'s.\n";
}
//Count upper-case characters//
FI = input.IndexOf(alphanumerics[0, i].ToUpper());
while (FI > -1)
{
counts++;
LI = FI + 1;
FI = input.IndexOf(alphanumerics[0, i].ToUpper(), LI);
}
if (counts > 0)
{
result += "There are " + counts + " " + alphanumerics[0, i].ToUpper() + "'s.\n";
}
counts = 0;
}
return result;
}
}
}
Alles anzeigen
Und in AutoIt will ich jetzt mit DLLCall die Funktion aufrufen, und das habe ich so, aber es ist falsch.
Spoiler anzeigen
[autoit]
DllCall("TestDLL.dll", "str", "GetCharacters", "input", "Hier der Input Code")
[/autoit]Ich möchte nun von euch wissen, ob die Funktion richtig aufgerufen wird. Also das str und GetCharacters richtig ist.
Und wie ich den Input schreibe.
Die Zeile mit der ich mich in der DLL befasse ist die:
Aber welche Types und Params müssen benutzt werden ???
Danke im vorraus für antworten.
MfG. PrideRage
P.S.: Ich habe ein wenig in BugFix' Tut gestöbert, aber i.wie nix passendes gefunden.