Thank you very much for the info.  I have looked at some of them before, I
will look into the others.

BTW were you able to pass string  and integer (int32) arrays to your com
callers (VB6)?

If you did, would you mind post a a prototype or two?

As for ComVisible, that was recommended by the C# help.

I just dug up some info on my other VB project. I was using a template sent
to me. I forgot aoubt it all togther.  Under "My Documents\Visual Studio
2005\Templates\ItemTemplates\Visual Basic", there is a ComClass.zip.  That
zip file has ComClass.vstemplate and ComClass.vb.

With the template in place. I did not have to manually use TLIB or
anything, just write code and build. All I have to than run my COM client
against the project. with VBScript, I was able to use
   myCOmObj.function(...)
instead of
   myCOmObj.object.function(...)



Content of ComClass.vstemplate:
 <VSTemplate Version="2.0.0" Type="Item"
xmlns="http://schemas.microsoft.com/developer/vstemplate/2005";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://schemas.microsoft.com/developer/vstemplate/2005";>
   <TemplateData>
     <Name Package="{164B10B9-B200-11D0-8C61-00A0C91E29D5}"
ID="3114" />
     <Description Package="{164B10B9-B200-11D0-8C61-00A0C91E29D5}"
ID="3115" />
     <Icon Package="{164B10B9-B200-11D0-8C61-00A0C91E29D5}"
ID="4554" />
     <ProjectType>VisualCs</ProjectType>
     <SortOrder>140</SortOrder>
     <DefaultName>ComClass.cs</DefaultName>
   </TemplateData>
   <TemplateContent>
     <ProjectItem ReplaceParameters="true">ComClass.cs</ProjectItem>
   </TemplateContent>
   <WizardExtension>
     <Assembly>Microsoft.VSDesigner, Version=8.0.0.0,
Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>

<FullClassName>Microsoft.VSDesigner.ProjectWizard.ComClassWizard</FullClassN
ame>
   </WizardExtension>
 </VSTemplate>



Content of ComClass.cs:::::::::::::::::::::
 [ComClass($safeitemname$.ClassId, $safeitemname$.InterfaceId,
$safeitemname$.EventsId)]
 Public Class $safeitemname$

 #Region "COM GUIDs"
     ' These  GUIDs provide the COM identity for this class
     ' and its COM interfaces. If you change them, existing
     ' clients will no longer be able to access the class.
     Public Const ClassId As String = "$guid1$"
     Public Const InterfaceId As String = "$guid2$"
     Public Const EventsId As String = "$guid3$"
 #End Region

     ' A creatable COM class must have a Public Sub New()
     ' with no parameters, otherwise, the class will not be
     ' registered in the COM registry and cannot be created
     ' via CreateObject.
     Public void New(){
         MyBase.New()
     }

 End Class

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to