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

Posted on 2009-12-31
Last Modified: 2013-12-17
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#/ Windows Console application ?
Question by:Khalid Mehmood Awan
    LVL 5

    Author Comment

    by:Khalid Mehmood Awan
    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

    LVL 5

    Author Comment

    by:Khalid Mehmood Awan
    :-( experts ?????
    LVL 96

    Accepted Solution

    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.
    LVL 5

    Author Closing Comment

    by:Khalid Mehmood Awan
    I haven't tried it yet though ;-(

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now