Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Sun, 4 Jun 2006 21:41:18 -0400,    group: microsoft.public.platformsdk.com_ole        back       


Versioning of COM interfaces   
I'm not sure what the appropriate things to change are in terms of 
versioning when you update your COM server.

I've added a couple new interfaces to my COM classes. I tried to update my 
version from 1.0 to 1.1, but when I did VBScripts could no longer create my 
object (I have an out-of-proc COM server). VB6 also seemed a bit confused 
and could not see the new interfaces (though it could still create and use 
the object, using the old interfaces, unlike VBScript).

I thought that I should change the IDL as follows:

[
 uuid(49A23555-5555-4955-8D55-8E4F56FCB555),
 version(1.1),
 helpstring("MyCompany Product 1.1 Type Library")
]
library PRODUCTLib
{
 importlib("stdole2.tlb");


There are only a few places in the IDL where a version can even be 
specified. I also changed this line in my applications CMyApp.cpp file:
[ module(unspecified, uuid = "{49A23555-5555-4955-8D55-8E4F56FCB555}", 
helpstring = "PRODUCT 1.1 Type Library", name = "PRODUCTLib") ];

This looks to only be a help string though.

Lastly, and probably most importantly, I changed the classes that implement 
the interfaces as such:
public IDispatchImpl<IMyInterface2, &IID_IMyInterface2, &LIBID_PRODUCTLib, 
/*wMajor =*/ 1, /*wMinor =*/ 1>

(the interface names I used here are examples only of course)

If I change this back to 1.0, everything works fine, but I don't know 
whether it's important that I revise my version now that I've added new 
interfaces. Is there any down side to leaving everything as version 1.0???
date: Sun, 4 Jun 2006 21:41:18 -0400   author:   Paul

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us