Utiliser un Dll delphi 2009 dans mon service Web
Bonjours à tous,
voilà mon problème, je dois utiliser un Dll fait avec Delphi 2009 dans mon service Web. Seulement, lorsque j'envoie mes strings en paramètres de ma fonction, il semble qu'ils soient vide dans le Dll.
Alors voilà mon code c#:
Code:
1 2 3 4 5 6 7 8
|
[DllImport(@"D:\Projets\CTRLWebService\CTRLWebClient\CTRLWebClient\bin\smgweb.dll", CharSet = CharSet.Unicode)]
public static extern int GetIntFieldSequence([MarshalAs(UnmanagedType.BStr)] string AFieldName, int AValidateKey, [MarshalAs(UnmanagedType.BStr)] string AInstall, [MarshalAs(UnmanagedType.BStr)] string AProduct);
private void buttonFieldSequence_Click(object sender, EventArgs e)
{
textBoxFieldSequence.Text = GetIntFieldSequence("FT01FDTSEQ", 0, "D:\\red\\sgfdev\\", "E").ToString();
} |
Et du coté delphi (dll):
Code:
1 2 3 4 5
|
function GetIntFieldSequence(AFieldName: WideString; AValidateKey: Integer; AInstall: WideString; AProduct: WideString): Integer;
begin
ShowMessage(AFieldName);
end; |
Le show message est donc, comme expliquer plus haut, vide.
Merci de votre aide.