Basic
Basic

Reputation: 26766

Unable to add a DLL Reference to VS 2008

I wonder if someone can help me.

I'm trying to add a reference to the LAME MP3 encoder in my VB.Net (3.5) App.

The DLL I'm using (lame_enc.dll v3.98.2) was downloaded from here: http://rarewares.org/mp3-lame-bundle.php

When I try to add the DLL reference to my project, I get an error: "A reference to C:\\Lame_Enc.dll could not be added. Please make sure this file is accessible and that it is a valid assembly or COM component"

I would just assume this was a corrupt download/similar but...

Next thought - the DLL is b0rked but...

So... I've come to the conclusion it's not a COM DLL or (obviously) a .Net one. It is probably intact but I can't reference it directly with VS.

Previously when I've added non-.Net DLLs, VS has created an INTEROP Class for me. I'd ideally like to achieve similar with this DLL.

Unfortunately, this is about the extent of my ability - Can someone please point me in the right direction for how to use this DLL (or another mechanism to interact with LAME)?

Many thanks in advance for any help

Upvotes: 1

Views: 6692

Answers (3)

Charlie Salts
Charlie Salts

Reputation: 13508

Sounds like it's not a .Net DLL. You'll likely need to obtain a wrapper (Jayden's answer seems to be a wrapper).

As an aside, you're probably going to want to get LAME direct from the source.

Upvotes: 3

Jayden
Jayden

Reputation: 2778

This article uses a different approach at building a wrapper in VB.NET around lame.exe.

Have a look :

http://www.codeproject.com/KB/audio-video/LameShell.aspx?print=true

Upvotes: 3

Jayden
Jayden

Reputation: 2778

This project (in C# albiet but the same principle must apply for VB.NET) refers to using the Lame_enc.dll. You could try downloading the sample project and see what they are doing compared with you :

http://www.codeproject.com/KB/audio-video/MP3Compressor.aspx

Upvotes: 1

Related Questions