HighTechTalks DotNet Forums  

Backward Compatability Issues

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss Backward Compatability Issues in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ashok
 
Posts: n/a

Default Backward Compatability Issues - 04-02-2004 , 08:46 AM






Hi Everyon

I have a situation where backward compatability issue made a source stopper to my application

I have developed a User control in C#. Now when i want to add the user control in VB6.0 or VC 6.0 i am really facing a problem of errors which makes me to stop adding into components

When i try to add the control to my form container at runtime, it gives me problems

I have follwed the steps after creation of c# dll lik

1. Creating a tlb as it creates wrapper for com callable
2. Register with the Assembl
3. Add to GAC Util

Inspite of creating tlb using key which has .snk extension i have the problem of this dll not abled to be used in Unmanged code environment

If any one could give me a suggestion or help will be really a great support and appreciated

Thanks & regard
Ashok

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default RE: Backward Compatability Issues - 04-02-2004 , 08:46 PM






Ashok,

What you are doing is not possible per: Q311334 INFO: ActiveX Control
Containers That Support .NET Controls
http://support.microsoft.com/?id=311334.

.NET uses a different message pump architecture than VB6 and therefore this
was never designed to work. You'll have to change what you are doing by
either upgrading all of your applications to .NET or keep using your VB6
usercontrols....Sorry!

Thanks! Robert Gruen
Microsoft, VB.NET

This posting is provided "AS IS", with no warranties, and confers no rights.


--------------------
#Thread-Topic: Backward Compatability Issues
#thread-index: AcQYuNYz4CNHATiJTmeUfOL1+24Jsg==
#X-Tomcat-NG: microsoft.public.dotnet.framework.clr
#From: "=?Utf-8?B?QXNob2s=?=" <mvnashokkumar (AT) hotmail (DOT) com>
#Subject: Backward Compatability Issues
#Date: Fri, 2 Apr 2004 05:46:01 -0800
#Lines: 20
#Message-ID: <DE8C2315-567E-4F9A-85B0-2F85A549EA9E (AT) microsoft (DOT) com>
#MIME-Version: 1.0
#Content-Type: text/plain;
# charset="Utf-8"
#Content-Transfer-Encoding: 7bit
#X-Newsreader: Microsoft CDO for Windows 2000
#Content-Class: urn:content-classes:message
#Importance: normal
#Priority: normal
#X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
#Newsgroups: microsoft.public.dotnet.framework.clr
#Path: cpmsftngxa06.phx.gbl
#Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.clr:10090
#NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
#X-Tomcat-NG: microsoft.public.dotnet.framework.clr
#
#Hi Everyone

I have a situation where backward compatability issue made a source stopper
to my application.

I have developed a User control in C#. Now when i want to add the user
control in VB6.0 or VC 6.0 i am really facing a problem of errors which
makes me to stop adding into components.

When i try to add the control to my form container at runtime, it gives me
problems.

I have follwed the steps after creation of c# dll like

1. Creating a tlb as it creates wrapper for com callable.
2. Register with the Assembly
3. Add to GAC Util.

Inspite of creating tlb using key which has .snk extension i have the
problem of this dll not abled to be used in Unmanged code environment.

If any one could give me a suggestion or help will be really a great
support and appreciated.

Thanks & regards
Ashok
#


Reply With Quote
  #3  
Old   
Valery Pryamikov
 
Posts: n/a

Default Re: Backward Compatability Issues - 04-03-2004 , 05:06 AM



As far as I know the problem is not with message pumping, but with the fact
that VB6 and other unmanaged processes knows nothing about CRL and doesn't
call CorExitProcess (exported by MSCOREE.dll). That in order means that CLR
doesn't terminate properly and among other problems means that Finalizers
will not be run on unmanaged proccess terminate. Last is because without a
call to CorExitProcess, the CLR is only notified that the process is
shutting down from DllMain's process detach notification. The loader lock is
held at this point, so there is no way that finalization code can safely
run. Internet Explorer is one of the few unmanaged programs that is aware
about CLR and does endeed call CorExitProcess - that explains its
compatibility.

As far as I know - there are no problems with message pumping and no
differences in message pumping architecture...

-Valery

http://www.harper.no/valery


"Robert Gruen [MSFT]" <robgruen (AT) online (DOT) microsoft.com> wrote

Quote:
Ashok,

What you are doing is not possible per: Q311334 INFO: ActiveX Control
Containers That Support .NET Controls
http://support.microsoft.com/?id=311334.

NET uses a different message pump architecture than VB6 and therefore this
was never designed to work. You'll have to change what you are doing by
either upgrading all of your applications to .NET or keep using your VB6
usercontrols....Sorry!

Thanks! Robert Gruen
Microsoft, VB.NET

This posting is provided "AS IS", with no warranties, and confers no
rights.




Reply With Quote
  #4  
Old   
Valery Pryamikov
 
Posts: n/a

Default Re: Backward Compatability Issues - 04-04-2004 , 03:19 AM



Hi,

Yesterday I didn't answer your question when I posted to this thread. Your
problem is that OLE Controls (that were renamed into ActiveX controls during
96) require implementation of several interfaces (8-12 different interfaces)
that is not implemented by CCW or runtime. VB6 and C++ implements OLE
Controls hosting only, while as internet Explorer allows hosting of any
control compatible with Controls-95 specification (original ActiveX
control). Controls-95 specification relaxed requirements to amount of
interfaces required by "ActiveX" control to bare minimum but unfortunately
old OLE controls also got the same name "ActiveX" due to huge marketing push
that was done during 96-97. If you up to challenges- you can use Managed C++
to implement generic Windows Control host that is visible outside as OLE
Control (pardon me ActiveX control). It is possible to do (I've done couple
of similar things on my older job), but you must be aware about calling
CorExitProcess issues.



-Valery.



http://www.harper.no/valery



"Ashok" <mvnashokkumar (AT) hotmail (DOT) com> wrote

Quote:
Hi Everyone

I have a situation where backward compatability issue made a source
stopper to my application.

I have developed a User control in C#. Now when i want to add the user
control in VB6.0 or VC 6.0 i am really facing a problem of errors which
makes me to stop adding into components.

When i try to add the control to my form container at runtime, it gives me
problems.

I have follwed the steps after creation of c# dll like

1. Creating a tlb as it creates wrapper for com callable.
2. Register with the Assembly
3. Add to GAC Util.

Inspite of creating tlb using key which has .snk extension i have the
problem of this dll not abled to be used in Unmanged code environment.

If any one could give me a suggestion or help will be really a great
support and appreciated.

Thanks & regards
Ashok



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.