• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:

Using a DLL in C#/VB.net (2008) NCPDLL32.DLL

We have few system which require vendor specific methods to transfer (FTP) files. For this reason attached dll have been used by my old team members. How will i use this dll in C#/VB.net Windows Console application ?
Khalid Mehmood Awan
Khalid Mehmood Awan
  • 3
1 Solution
Khalid Mehmood AwanAuthor Commented:
when we use this dll in VB-6 , we do it this way ...  (code attached)

Private Declare Function ncopy_1 Lib "ncpdll32.dll" (ByVal str As String) As Integer

Sub Test()
        cmdStr = "-b " & Chr(34) & mPartner(for each IN, one by one) & "!" & mFileName & Chr(34)
        cmdStr = cmdStr & " " + Chr(34) & mLocalFolder & "\" & mFileName + Chr(34)
        cmdStr = cmdStr & " " & mAdmission(for each IN, one by one)
        Res = ncopy_1(cmdStr)
End Sub

Open in new window

Khalid Mehmood AwanAuthor Commented:
:-( experts ?????
Bob LearnedCommented:
They are all probably out having a good time--me, I am recovering from being pretty sick.

If this is a COM DLL, then I would suggest adding a reference to the DLL, and making the necessary calls.  If it is a standard DLL, then you can use p/invoke calls to the library.
Khalid Mehmood AwanAuthor Commented:
I haven't tried it yet though ;-(

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now