I'm trying to create the AppDomain from the unmanaged C++.
I can create the AppDomain without problem by method
ICorRuntimeHost.CreateDomain. But I cannot create the domain with shadow copy
turn on.
Here is the steps.
- create the domain setup by ICorRuntimeHost.CreateDomainSetup
- set the required property of domain setup
PrivateBinPath, ShadowCopyDirectories, CachePath and ShadowCopyFiles
(with value "true")
- create the app domain by ICorRuntimeHost.CreateDomainEx
The new AppDomain did not copy the assembly to the cache path.
I also tried this code in managed env with C# and it works just fine.
Did I do anything wrong ?
Thanks,
Atipon
Junfeng Zhang[MSFT] - 12 Dec 2004 04:15 GMT
You need to set AppName,
See my blog for more detail.
http://blogs.msdn.com/junfeng/archive/2004/02/09/69919.aspx
> I'm trying to create the AppDomain from the unmanaged C++.
> I can create the AppDomain without problem by method
[quoted text clipped - 14 lines]
> Thanks,
> Atipon
Atipon Pongpat - 13 Dec 2004 11:09 GMT
It doesn't work.
I've try this.
domainSetup->put_ApplicationName(_bstr_t("CLRDomain"));
> You need to set AppName,
>
[quoted text clipped - 21 lines]
> > Thanks,
> > Atipon
Junfeng Zhang[MSFT] - 15 Dec 2004 22:25 GMT
You probably have to post full code sample.

Signature
Junfeng Zhang
http://blogs.msdn.com/junfeng
This posting is provided "AS IS" with no warranties, and confers no rights.
> It doesn't work.
>
[quoted text clipped - 27 lines]
>> > Thanks,
>> > Atipon
Atipon Pongpat - 16 Dec 2004 01:57 GMT
It works now.
My mistake that I did'nt use the full path for
"domainSetup->put_ShadowCopyDirectories" :P
And you're right, I have to specify ApplicationName also to make it work.
But I wonder why C# does not need the ApplectionName for shadow copy ?
Thank you so much :)
Atipon Pongpat
> You probably have to post full code sample.
>
[quoted text clipped - 29 lines]
> >> > Thanks,
> >> > Atipon
Junfeng Zhang[MSFT] - 16 Dec 2004 07:24 GMT
It is explained in my blog,
Basically CLR automatically set the ApplicationName for you.

Signature
Junfeng Zhang
http://blogs.msdn.com/junfeng
This posting is provided "AS IS" with no warranties, and confers no rights.
> It works now.
> My mistake that I did'nt use the full path for
[quoted text clipped - 41 lines]
>> >> > Thanks,
>> >> > Atipon
Atipon Pongpat - 16 Dec 2004 09:51 GMT
I see.
Thanks again.
Atipon Pongpat
> It is explained in my blog,
>
[quoted text clipped - 45 lines]
> >> >> > Thanks,
> >> >> > Atipon
Ravichandran J.V. - 17 Dec 2004 09:22 GMT
Shadow copy is a .Net technique used by the CLR that maintains a copy of
the metadata of the assembly. Yours is a COM dll and in COM
interoperability, the .net component does not know it is communicating
with a COM component and hence, when you attempt to make a shadow copy,
CLR would have looked for metadata which does not exist for the COM
component as interoperability works only with a wrapper class. Try
converting the COM dll into il and see if it works.
BTW, I am only providing you a possible answer; it is not guaranteed to
be absolutely correct.
with regards,
J.V.Ravichandran

Signature
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com