View Single Post
Old 25th February 2019, 18:16   #11
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 342
i create a dll with C# for delete folder with files and sub folders in FTP
but when i want call to that with NSIS i see the message:




this is my NSIS Code:

HTML Code:
XPStyle on

Var Ftp_Address
Var Ftp_Username
Var Ftp_Password
Var Ftp_FolderName

Section

StrCpy $Ftp_Address "FTP.ADDRESS.COM" #	$Ftp_Address
StrCpy $Ftp_Username "USERNAME" #		$Ftp_Username
StrCpy $Ftp_Password "PASSWORD" #	$Ftp_Password
StrCpy $Ftp_FolderName "FOLDER NAME_YOU_WANT_DELETE_THAT" #	$Ftp_FolderName

  InitPluginsDir
  SetOutPath $PLUGINSDIR
  File "DLL\*.*"

CLR::Call /NOUNLOAD "FTPCityToolkit.dll" "FTPCityToolkit.DeleteFolderRecursively" "DeleteFtpFolder" 4 "$Ftp_Address" "$Ftp_Username" "$Ftp_Password" "$Ftp_FolderName"
Pop $0
CLR::Destroy

SectionEnd

Also This is the FTPCityToolkit.dll SourceCode C#:
HTML Code:
using Limilabs.FTP.Client;


namespace FTPCityToolkit
{
    public class DeleteFolderRecursively
    {
         public void DeleteFtpFolder(string FTPServerName, string FTPUsername, string FTPPassWord, string FTPRootFolderName)
         {
            using (Ftp client = new Ftp())
            {
               client.Connect(FTPServerName);
               client.Login(FTPUsername, FTPPassWord);
               client.DeleteFolderRecursively(FTPRootFolderName);
               client.Close();
            }
         }
    }
}

Also i attach the DLLs and DLL C# Project
what is my Problem?
i need help to solve this
Attached Thumbnails
Click image for larger version

Name:	CLR.jpg
Views:	223
Size:	14.1 KB
ID:	54400  
Attached Files
File Type: zip FTPCityToolkit.net 2.0 DLL CODE.zip (541.0 KB, 77 views)
File Type: zip Delete Folders NSIS Code.zip (258.6 KB, 70 views)
r2du-soft is offline   Reply With Quote