[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Christian Schmidt

9/10/2007 8:33:00 PM

Hi,
I have a Win32-Application (Excel 2000) living in a different directory
than my C++/CLI mixed mode DLL. I can load the DLL as long as it does
not have references to a C# DLL in the mixed mode DLL's directory.
Otherwise I get System.IO.FileNotFoundException

I've tried two variants to solve the problem:

1. Modify the DLL search path by modifying the PATH environment variable
and changing the current dir to the DLL's path with no success. I
couldn't figure it out how to do it correctly. Any ideas?

2. Integrate the C# Library into the C++ wrapper by linking CIL into the
mixed mode DLL (single binary). I added the following postbuild step in
the C# project to generate a .netmodule:

cd $(ProjectDir)
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc /target:module
/out:$(OutDir)$(TargetName).netmodule *.cs

Then I removed the project reference in the C++ wrapper and replaced the
using statement to

#using "<TargetName>.netmodule"

Variant 2 works, but is somehow cumbersome and debugging the C# part
does not work. Does anyone know how to get variant 1 to work?

Thanks for any advice,

Christian
1 Answer

70.67.20.208@sjrb.ca

2/11/2013 8:16:00 PM

0

On 09 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:LLBRs.162467$Sl.4850@newsfe27.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spamβuster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> us.politics,soc.culture.african.american,alt.society.liberalism,misc.su
> rvivalism,alt.atheism Subject: Re: Scientist seeks "liberal female"
> atheist to have Neanderthal baby References:
> <XnsA1618A7DA4AFBUBVCYT723@217.119.49.38>
> <36e17569-ac8d-40d1-a4a2-954244b82ae2@j2g2000yqj.googlegroups.com>
> <20130208191400.84d5dd522131dc15e16591ba@fidemturbare.com>
> In-Reply-To:
> <20130208191400.84d5dd522131dc15e16591ba@fidemturbare.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> Content-Transfer-Encoding: 7bit Lines: 8
> Message-ID: <LLBRs.162467$Sl.4850@newsfe27.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1360455787 70.67.20.208 (Sun, 10 Feb 2013 00:23:07 UTC)
> NNTP-Posting-Date: Sun, 10 Feb 2013 00:23:07 UTC
> Date: Sat, 09 Feb 2013 16:22:40 -0600
> X-Received-Bytes: 1522

--