Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / December 2004

Tip: Looking for answers? Try searching our database.

Shadow copy with with CLR Hosting Interfaces

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Atipon Pongpat - 11 Dec 2004 12:29 GMT
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


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.