Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding DLL reference to VB.NET project

Tags:

vb.net

dll

ogg

Just to start off, this question does seem very similar to another post Add the DLL (lame_enc.dll) reference to my project, but I haven't been able to successfully apply that answer. I am pretty new to VB.NET so it is very possible I'm simply missing something obvious.

I am trying to link a DLL to a VB.NET 2010 project to allow my VB app to play *.ogg files. I followed some other advice here on the forums and downloaded FMOD's FMOD Ex Programmers API. I am trying to now reference that functionality. These appear to be the files I need to somehow reference.

C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\fmodex64.dll.
C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\libfmodex64_vc.lib.

I haven't discovered how to add a *.lib reference (or the equivalent), but selecting the DLL as a reference gives the following error.

A reference to 'C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\fmodex64.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

I'm not sure what I could be missing. Any ideas? Thanks!

like image 275
user1555362 Avatar asked Jul 26 '12 17:07

user1555362


People also ask

How do you add references in Visual Basic?

To add a reference, right click on the References or Dependencies node in Solution Explorer and choose Add Reference. You can also right-click on the project node and select Add > Reference.

How do I link a DLL in Visual Studio?

On Windows you do not link with a . dll file directly – you must use the accompanying . lib file instead. To do that go to Project -> Properties -> Configuration Properties -> Linker -> Additional Dependencies and add path to your .


1 Answers

In Solution Explorer, double-click the My Project node for the project.

In the Project Designer, click the References tab.

Click the Add button to open the Add Reference dialog box.

In the Add Reference dialog box, select the tab indicating the type of component you want to reference.

Select the components you want to reference, then click OK.

like image 151
user2516305 Avatar answered Nov 10 '22 10:11

user2516305