0

I have replicated the exact procedure which the link shows:

http://www.codeproject.com/Articles/9826/How-to-create-a-DLL-library-in-C-and-then-use-it-w

I have developed and build a vc++ dll project and build and succeeded as well. Now my question is where the dll will be saved inside the created Vc++ project. I have serached in the debud folder there's no dll file present over. I Can refer the dll into my C# application only if i copy paste the dll in to the bin folder(As specfied by the link)

Please help me out on this

BharathNadadur
  • 557
  • 1
  • 6
  • 13

1 Answers1

0

Check the properties of your VC++ DLL project by right clicking on the project (in Solution Explorer) and selecting Properties... from the context menu.

In the tree control of the properties dialog box select: Configuration Properties | General

Now, the first entry on the right hand side of the screen is Output Directory. This is where your outputs should be, including the DLL.

Seb Rose
  • 3,628
  • 18
  • 29
  • thanks Rose. The output directory shows like: $(SolutionDir)$(ConfigurationName). So what could be the path of the dll? – BharathNadadur Aug 27 '12 at 09:38
  • $(SolutionDir) is the folder your solution is in. $(ConfigurationName) will likely be Debug or Release depending which you've built. You can always use the Windows search functionality to look for *.dll – Seb Rose Aug 27 '12 at 09:43
  • yeah thx! I found the dll. However i ve copied the dll and paste in to the debug folder of the c# and when I run It shows the below error: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) – BharathNadadur Aug 27 '12 at 09:52
  • From http://forums.asp.net/t/1729295.aspx/1 : "This error indicates that you are trying to load a 32 bit dll into a 64 bit process. Both posts below have discussed this issue: http://social.msdn.microsoft.com/Forums/en-US/netfx64bit/thread/35b09f74-1d8e-4676-90e3-c73a439bf632/ http://social.msdn.microsoft.com/Forums/en/netfxsetup/thread/3da8eceb-0f8f-4d2b-9ea0-0b25defd997d" – Seb Rose Aug 27 '12 at 09:59
  • yeah! I tried the same with vs2010 and it works great. Many thanks. – BharathNadadur Aug 27 '12 at 10:22