473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Platform Invoke - getting the DLL copied to the EXE directory

I have a Solution that consists of two projects, one written in C/C++ that
builds a DLL, and another written in C# that builds an EXE. I'm using
P/Invoke to call the DLL, and it all works just fine. However I haven't yet
found a really nice way to make sure that the DLL gets automatically copied
to the same directory as the .EXE file so that it'll be available at
runtime.
Currently I'm using a Post-Build step in the DLL project to copy the DLL to
the 'DEBUG' directory of my main C# project, but that's clearly not a
satisfactory solution. I've tried mentioning the DLL project as being a
Dependency of the C# project, but doesn't do the trick. And mentioning the
DLL in the C# project's References doesn't work, because the DLL is not a
valid Assembly.

What's the best way of doing this ?

Thanks,

Steve.
Nov 17 '05 #1
0 894

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jessica | last post by:
I have a .Net 1.0 web service that uses a .Net 1.1 assembly to create users, change users' passwords, validate users, and remove users from an LDAP server. The 1.1 code uses the DirectoryServices...
2
by: Wysiwyg | last post by:
I am using MS Visual Studio 2002 with Windows 2000 Advanced Server and am starting to learn C#. Perhaps this is obvious but I can't see if what's happening is "normal" or if something needs to be...
6
by: Binoy | last post by:
Hello, I am getting this error once in a while from my web sites. When I will refresh web browser, it goes off and sites are working fine. Directory structures and file names are as below- ...
5
by: krupa.p | last post by:
Hi All, I am trying to call the waveOutGetVolume() function in winmm.dll from my VS 2005 C# project using P/Invoke. I copied winmm.dll from Windows\system32 directory into the root directory of...
4
by: herc | last post by:
My objective is to get the "label" information for the different volumes that are mounted. I want to display the same information as Windows Explorer. I wrote this test code with gets me the...
3
by: nospam | last post by:
I am trying to monitor the process of a file being copied, but I cannot find a function that will return the actual file size, not the total file size, as reported by fileinfo.length. Has anyone...
0
by: marathoner | last post by:
I am currently migrating my Visual C++ 6.0 applications to Visual Studio 2005. I am getting compiler errors involving the VS2005's platform SDK. When I removed directory references to that SDK,...
1
by: Vinod Sadanandan | last post by:
Cross Platform Migration An Unproblematic Approach (Windows-UNIX ) Oracle 10\11g The principal restriction on cross-platform transportable database is that the source and destination platform...
3
lifeisgreat20009
by: lifeisgreat20009 | last post by:
I am getting the following error :- 1>------ Build started: Project: Polygon Drawer, Configuration: Debug Win32 ------ 1>Compiling... 1>Dialog.cpp 1>g:\my subjects\3rd semester\project...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.