changing version in .idl 
Author Message
 changing version in .idl

Hello,

[
 uuid(xxxxxxxxxxxxxxxxxxxxxxxxxxx),
 version(1.0),
 helpstring("Client 1.0"), helpcontext(10000),
]
library ClientLib
{

When I change the version(1.0) to version(2.0), VB's For Each stops working
on my collection class.
I traced into ATL code, and found that in

CComTypeInfoHolder::GetTI(LCID lcid)

LoadRegTypeLib is called:
      hRes = LoadRegTypeLib(*m_plibid, m_wMajor, m_wMinor, lcid, &pTypeLib);
with m_wMajor == 1.

What am I doing wrong??

TIA
C. Bates



Mon, 24 May 2004 04:23:45 GMT  
 changing version in .idl
Hello,

You should update version parameters in all templates, e.g. IDispatchImpl,
IProvideClassInfo2Impl, IDispEventImpl etc. You could define global version
constant and specify it for each template class needy in the type library
version parameters.

--
Cheers,
Vadim Melnik,
{*filter*} Developer.
_____________________
http://www.*-*-*.com/


Quote:
> Hello,

> [
>  uuid(xxxxxxxxxxxxxxxxxxxxxxxxxxx),
>  version(1.0),
>  helpstring("Client 1.0"), helpcontext(10000),
> ]
> library ClientLib
> {

> When I change the version(1.0) to version(2.0), VB's For Each stops
working
> on my collection class.
> I traced into ATL code, and found that in

> CComTypeInfoHolder::GetTI(LCID lcid)

> LoadRegTypeLib is called:
>       hRes = LoadRegTypeLib(*m_plibid, m_wMajor, m_wMinor, lcid,
&pTypeLib);
> with m_wMajor == 1.

> What am I doing wrong??

> TIA
> C. Bates



Mon, 24 May 2004 05:12:14 GMT  
 changing version in .idl
Specify correct version number in template parameters for IDispatchImpl and
IProvideClassInfo2Impl. See KB Article Q221792 "PRB: "Library Not
Registered" Error When Calling Method in ATL Server"
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat, and
wrong." H.L. Mencken


Quote:
> Hello,

> [
>  uuid(xxxxxxxxxxxxxxxxxxxxxxxxxxx),
>  version(1.0),
>  helpstring("Client 1.0"), helpcontext(10000),
> ]
> library ClientLib
> {

> When I change the version(1.0) to version(2.0), VB's For Each stops
working
> on my collection class.
> I traced into ATL code, and found that in

> CComTypeInfoHolder::GetTI(LCID lcid)

> LoadRegTypeLib is called:
>       hRes = LoadRegTypeLib(*m_plibid, m_wMajor, m_wMinor, lcid,
&pTypeLib);
> with m_wMajor == 1.

> What am I doing wrong??

> TIA
> C. Bates



Mon, 24 May 2004 05:25:55 GMT  
 changing version in .idl
Thanks, Vadim and Igor.
I traced back up the food chain from CComTypeInfoHolder and discovered the
wMajor and wMinor args in IDispatchImpl.

A related question, and maybe this moves in to the realm of the C
preprocessor...
The version() in the .idl, the wMajor and wMinor args in the IDispatchImpl
template, and, presumably, the info in the .rgs file:
ClientLib.Thang.2 = s 'Thang Class'
and
ProgID = s 'ClientLib.Thang.2'

all need to be in sync.  Is there a sensible way to do that?
Thanks again for your help,
C. Bates



Mon, 24 May 2004 07:07:03 GMT  
 changing version in .idl
If you are asking if you can define them in one place and only modify that -
no, that's impossible. You can define them in one place for the code only
though, as Vadim already suggested.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> Thanks, Vadim and Igor.
> I traced back up the food chain from CComTypeInfoHolder and discovered the
> wMajor and wMinor args in IDispatchImpl.

> A related question, and maybe this moves in to the realm of the C
> preprocessor...
> The version() in the .idl, the wMajor and wMinor args in the IDispatchImpl
> template, and, presumably, the info in the .rgs file:
> ClientLib.Thang.2 = s 'Thang Class'
> and
> ProgID = s 'ClientLib.Thang.2'

> all need to be in sync.  Is there a sensible way to do that?
> Thanks again for your help,
> C. Bates



Mon, 24 May 2004 08:50:58 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. IDL Version number changes and VB

2. IDL version and build updating

3. changing the id tag within the idl file

4. importing mshtml.idl in IDL file

5. IDL question - import "msxml2.idl";

6. Including an IDL file in an IDL file

7. Change .exe version info. after build

8. forcing assembly version to change

9. Changed Version Info Now Assembly Won't Load

10. Changes in C# between VS.NET Beta and VS.NET Final versions

11. ATL COM: How do I change the component's version

12. changing the database-version

 

 
Powered by phpBB® Forum Software