Getting functions from an .exe or unmanaged .dll

npsiegfried 1 Reputation point
2021-06-02T19:24:30.207+00:00

A programmer wrote a VB wrapper around Lame.exe and it gives all of the information I need. I have intermediate knowledge in C# and I'd like to create a C# wrapper. The example at CodeProject.com is old (2004) but it still works. and it's written in VB. Can anyone give me information on what tools I'm going to need to do this? Lame.exe is not a COM component and lame_enc is an unmanaged dll. I don't where to begin with this project. Please help!

Developer technologies | C#
{count} votes

1 answer

Sort by: Most helpful
  1. Timon Yang-MSFT 9,606 Reputation points
    2021-06-03T05:24:55.3+00:00

    For unmanaged dll, we can use Platform Invoke (P/Invoke) to use it.

    Please check the following documents:

    Platform Invoke (P/Invoke)

    Interoperating with unmanaged code

    If you want to use an exe method in the current project, you can right-click the Reference of the current project and select Add regerence.
    101981-2.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.