http://msdn.microsoft.com/en-US/library/ms235211(v=VS.80).aspx
http://social.msdn.microsoft.com/Forums/en-AU/vcgeneral/thread/f46b5972-6cb5-4417-8cf9-33df56ccf2c4
Wednesday, August 31, 2011
Friday, August 26, 2011
List of MSXML versions
For reference, here you can find a list of all versions of MSXML:
http://support.microsoft.com/kb/269238
.. and just in case Microsoft decide to once again change their site structure without providing adequate redirects here is the content for prosperity:
Notes
Note If the MSXML parser is updated on a computer that has Microsoft Application Center 2000 installed, you must reinstall Application Center 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
http://support.microsoft.com/kb/269238
.. and just in case Microsoft decide to once again change their site structure without providing adequate redirects here is the content for prosperity:
MSXML versions that have been released by Microsoft
Version | File name | File version number |
---|---|---|
1.0 | Msxml.dll | 4.71.1712.5 |
1.0a | Msxml.dll | 4.72.2106.4 |
1.0 SP1 | Msxml.dll | 4.72.3110.0 |
2.0 | Msxml.dll | 5.0.2014.0206 |
2.0a | Msxml.dll | 5.0.2314.1000 |
2.0b | Msxml.dll | 5.0.2614.3500 |
2.5 Beta 2 | Msxml.dll | 5.0.2919.38 |
2.5a | Msxml.dll | 5.0.2919.6303 |
2.5 | Msxml.dll | 5.0.2920.0 |
2.5 SP1 | Msxml.dll | 8.0.5226 |
2.5 SP2 | Msxml.dll, Msxmlr.dll (the last DLL is a resource-only DLL) | 8.0.5718.1 |
2.5 SP3 | Msxml.dll, Msxmlr.dll (the last DLL is a resource-only DLL) | 8.00.6730.0 |
2.6 Web Release | Msxml2.dll | 7.50.4920.0 |
2.6 SP1 | Msxml2.dll, Msxml2a.dll, Msxml2r.dll (the last two DLLs are resource-only DLLs) | 8.1.7502.0 |
2.6 SP2 | Msxml2.dll, Msxml2a.dll, Msxml2r.dll (the last two DLLs are resource-only DLLs) | 8.2.8307.0 |
3.0 Web Release | Msxml3.dll, Msxml3a.dll, Msxml3r.dll (the last two DLLs are resource-only DLLs) | 7.50.5108.0 |
3.0 | Msxml3.dll, Msxml3a.dll, Msxml3r.dll (the last two DLLs are resource-only DLLs) | 8.0.7820.0 |
3.0 SP1 | Msxml3.dll, Msxml3a.dll, Msxml3r.dll (the last two DLLs are resource-only DLLs) | 8.10.8308.0 |
3.0 SP2 | Msxml3.dll, Msxml3a.dll, Msxml3r.dll (the last two DLLs are resource-only DLLs) | 8.20.8730.1 |
3.0 SP3 | Msxml3.dll, Msxml3a.dll (8.20.8730.1), Msxml3r.dll (8.20.8730.1) (the last two DLLs are resource-only DLLs) | 8.30.9926.0 |
3.0 SP4 | Msxml3.dll, Msxml3a.dll (8.20.8730.1), Msxml3r.dll (8.20.8730.1) (the last two DLLs are resource-only DLLs) | 8.40.9419.0 |
3.0 SP5 | Msxml3.dll, Msxml3a.dll (8.20.8730.1), Msxml3r.dll (8.20.8730.1) (the last two DLLs are resource-only DLLs) | 8.50.2162.0 |
3.0 SP7 | Msxml3.dll, Msxml3a.dll, Msxml3r.dll (the last two DLLs are resource-only DLLs) | 8.70.1104 |
3.0 Post SP7
MS06-061
(http://www.microsoft.com/technet/security/bulletin/ms06-061.mspx)
| Msxml3.dll | 8.70.1113.0 |
3.0 Post SP8 | Msxml3.dll, Msxml3a.dll (8.20.8730.1), Msxml3r.dll (8.20.8730.1) (the last two DLLs are resource-only DLLs) | 8.80.1185.0 |
3.0 SP9 | Msxml3.dll, Msxml3a.dll (8.20.8730.1), Msxml3r.dll (8.20.8730.1) (the last two DLLs are resource-only DLLs) | 8.90.1002.0 |
3.0 Post SP9 MS06-061
(http://www.microsoft.com/technet/security/bulletin/ms06-061.mspx)
| Msxml3.dll | 8.90.1101.0 |
3.0 SP10 (On Vista SP1) | Msxml3.dll, Msxml3r.dll (8.20.8730.1) (the last DLL is resource-only DLL) | 8.100.1043.0 |
3.0 SP10 (On Vista SP2) | Msxml3.dll, Msxml3r.dll (8.20.8730.1) (the last DLL is resource-only DLL) | 8.100.5000.0 |
3.0 Post SP10 KB973687
(http://support.microsoft.com/kb/973687)
| Msxml3.dll | 8.100.5002.0 |
3.0 SP11 | Msxml3.dll, Msxml3r.dll (8.110.7600.16385) (the last DLL is resource-only DLL) | 8.110.7600.16385 |
3.0 Post SP11 MS10-051
(http://www.microsoft.com/technet/security/Bulletin/MS10-051.mspx)
| Msxml3.dll | 8.110.7600.16605 |
4.0 | Msxml4.dll, WinHTTP5.dll, Msxml4a.dll, Msxml4r.dll (the last two DLLs are resource-only DLLs) | 4.0.9004.0 |
4.0 SP1 | Msxml4.dll, WinHTTP5.dll, Msxml4a.dll, Msxml4r.dll (the last two DLLs are resource-only DLLs) | 4.10.9404.0 |
4.0 SP2 | Msxml4.dll, WinHTTP5.dll (5.0.2613.0), Msxml4a.dll (4.10.9404.0), Msxml4r.dll (4.10.9404.0) (the last two DLLs are resource-only DLLs) | 4.20.9818.0 |
4.0 Post SP2
MS06-061
(http://www.microsoft.com/technet/security/bulletin/ms06-061.mspx)
| Msxml4.dll, Msxml4r.dll (4.10.9404.0) (the last DLL is a resource-only DLL) | 4.20.9839.0 |
4.0 Post SP2
MS06-071
(http://www.microsoft.com/technet/security/bulletin/ms06-071.mspx)
| Msxml4.dll | 4.20.9841.0 |
4.0 Post SP2
MS07-042
(http://www.microsoft.com/technet/security/bulletin/ms07-042.mspx)
| Msxml4.dll | 4.20.9848.0 |
4.0 SP3 | Msxml4.dll, Msxml4r.dll (4.30.2100.0) (the last DLL is a resource-only DLL) | 4.30.2100.0 |
5.0 (Office 2003) | Msxml5.dll, Msxml5r.dll (5.0.2916.0) (the last DLL is a resource-only DLL) | 5.0.2916.0 |
5.0 (Office 2003 SP1) | Msxml5.dll, Msxml5r.dll (5.10.2925.0) (the last DLL is a resource-only DLL) | 5.10.2925.0 |
5.0 (Office 2003 SP2) | Msxml5.dll, Msxml5r.dll ( 5.10.2927.0) (the last DLL is a resource-only DLL) | 5.10.2927.0 |
5.0 (Office 2003 Post SP2)
MS06-061
(http://www.microsoft.com/technet/security/bulletin/ms06-061.mspx)
| Msxml5.dll | 5.10.2930.0 |
5.0 (Office 2007) | Msxml5.dll | 5.20.1076 |
5.0 (Office 2007 Post release) MS07-042
(http://www.microsoft.com/technet/security/bulletin/ms07-042.mspx)
| Msxml5.dll | 5.20.1081.0 |
6.0 | Msxml6.dll, Msxml6r.dll (6.0.3883.0) (the last DLL is a resource-only DLL) | 6.0.3883.0 |
6.0 Post release
MS06-061
(http://www.microsoft.com/technet/security/bulletin/ms06-061.mspx)
| Msxml6.dll, Msxml6r.dll (6.0.3883.0) (the last DLL is a resource-only DLL) | 6.0.3888.0 |
6.0 Post release
MS06-071
(http://www.microsoft.com/technet/security/bulletin/ms06-071.mspx)
| Msxml6.dll | 6.0.3890.0 |
6.0 SP1 | Msxml6.dll | 6.10.1129.0 |
6.0 Post SP1 MS07-042
(http://www.microsoft.com/technet/security/bulletin/ms07-042.mspx)
| Msxml6.dll | 6.10.1200.0 |
6.0 Post SP2 MS08-069
(http://www.microsoft.com/technet/security/bulletin/ms08-069.mspx)
| Msxml6.dll | 6.20.1099.0 |
6.0 Post SP2 KB973687
(http://support.microsoft.com/kb/973687)
| Msxml6.dll | 6.20.5002.0 |
6.0 SP3 | Msxml6.dll, Msxml6r.dll (the last DLL is a resource-only DLL) | 6.30.7600.16385 |
- MSXML versions 1.x and 2.x are no longer supported by Microsoft.
- MSXML 3.0 support follows the support policy of the OS into which it is built.
- MSXML 4.0 is supported by Microsoft only if you are running Service Pack 3 (SP3).
- MSXML 5.0 is supported by the Microsoft Office lifecycle policy.
- MSXML 6.0 support follows the support policy of the OS into which it is built or onto which it is installed.
- This table includes the version of MSXML that is included in security updates that were released since October 10, 2006.
For more information about the security updates, click the following article numbers to view the articles in the Microsoft Knowledge Base:
924191(http://support.microsoft.com/kb/924191/ )MS06-061: Vulnerabilities in Microsoft XML Core Services could allow remote code execution928088(http://support.microsoft.com/kb/928088/ )MS06-071: Vulnerability in Microsoft XML Core Services could allow remote code execution936227(http://support.microsoft.com/kb/936227/ )MS07-042: Vulnerability in Microsoft XML Core Services could allow remote code execution955218(http://support.microsoft.com/kb/955218/ )MS08-069: Vulnerabilities in Microsoft XML Core Services could allow remote code execution2079403(http://support.microsoft.com/kb/2079403/ )MS10-051: Vulnerability in Microsoft XML Core Services Could allow remote code execution
- 32-bit versions of MSXML 3.0 (Wmsxml3.dll.) on 64-bit Windows Server 2003 uses the same MSXML and file version numbers that are listed in this table.
- If MSXML 4.0 SP2 (out-of-support in April 2010) is installed on a computer that is running Windows NT, Windows 2000 SP2 and earlier, Windows 2003 RTM, or Windows XP RTM, the WinHTTP5.dll file is installed.
MSXML versions that are included with other Microsoft products and software updates
Replaced MSXML security update - MS02-008
Article number | Msxml version | File name | File version number |
---|---|---|---|
318202
(http://support.microsoft.com/kb/318202/EN-US/
)
| 2.6 SP2 (including hotfix) | Msxml2.dll, Msxml2a.dll, Msxml2r.dll (the last two DLLs are resource-only DLLs) | 8.20.8307.0 |
317244
(http://support.microsoft.com/kb/317244/EN-US/
)
| 3.0 SP2 (including hotfix) | Msxml3.dll | 8.20.9415.0 |
317244
(http://support.microsoft.com/kb/317244/EN-US/
)
| 4.0 (including hotfix) | Msxml4.dll, WinHTTP5.dll, Msxml4a.dll, Msxml4r.dll (the last two DLLs are resource-only DLLs) | 4.00.9406.0 |
MSXML versions that are included with Microsoft Internet Explorer
Microsoft Internet Explorer version | Microsoft XML version (file version) |
---|---|
4.0 | 1.0 (4.71.1712.5) |
4.0a | 1.0a (4.72.2106.4) |
4.01 (SP1) | 2.0a (5.0.2014.0206) |
5.0a | 2.0a (5.0.2314.1000) |
5.0b | 2.0b (5.0.2614.3500) |
5.01 | 2.5a (5.0.2919.6303) |
5.01 SP1 | 2.5 SP1 (8.0.5226) |
5.5 | 2.5 SP1 (8.0.5226) |
5.5 SP2 | 2.5 Post-SP2 (8.00.6611.0) |
6.0 | 3.0 SP2 (8.20.8730.1) |
6.0 SP1 | 3.0 SP3 (8.30.9926.0) |
MSXML versions that are included with MDAC
MDAC version (products) | Microsoft XML version (file version) |
---|---|
MDAC 2.5 (Windows 2000) | 2.5 (5.0.2920.0) |
MDAC 2.5 SP1 (Windows 2000 SP1) | 2.5 SP1 (8.0.5226) |
MDAC 2.5 SP2 (Windows 2000 SP2) | 2.5 SP2 (8.0.5718.1) |
MDAC 2.5 SP3 (Windows 2000 SP3) | 2.5 SP3 (8.00.6730.0) |
MDAC 2.6 (SQL Server 2000) | 2.6 (8.0.6518.1) |
MDAC 2.6 SP1 (SQL Server 2000 SP1) | 2.6 SP1 (8.1.7502.0) |
MDAC 2.6 SP2 (SQL Server 2000 SP2) | 2.6 SP2 (8.2.8307.0) |
MDAC 2.7 (Windows XP) | 3.0 SP2 (8.20.8730.1) |
MDAC 2.7 SP1 (Windows XP SP1) | 3.0 SP3 (8.30.9926.0) |
MDAC 2.8 (Windows Server 2003) | 3.0 SP4 (8.40.9419.0) |
MDAC 2.8 SP1 | 3.0 SP7 (8.70.1104.0) |
MSXML versions that are included with other Microsoft products
This is not a complete list of MSXML versions that are included with other Microsoft products.Other products | Microsoft XML version (file version) |
---|---|
Microsoft Security Essentials (Client) | 4.0 |
BizTalk Server 2004 | 4.0 |
Microsoft Office Project Server 2003 | 4.0 |
Encarta 2003, 2004, 2005, and Student/Encarta 2006 | 4.0 |
Works Suite 2006, Works Suite 2005, Works Suite 2004, Works Suite 2003 | 4.0 |
Live Communications Server | 4.0, 6.0 |
Application Compatibility Toolkit | 4.0, 6.0 |
URGE | 6.0 |
Microsoft .NET Framework 3.0 | 6.0 |
Microsoft Visual Studio 2005 | 6.0 |
Microsoft SQL Server 2005 | 6.0 |
Microsoft SQL Server 2008 | 6.0 |
Student/Encarta 2007 | 6.0 |
Zune software version 1.0 | 6.0 |
Windows SharePoint Services 3.0 | 6.0 |
Note If the MSXML parser is updated on a computer that has Microsoft Application Center 2000 installed, you must reinstall Application Center 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
289510
(http://support.microsoft.com/kb/289510/
)
Application Center 2000 installs a special version of MSXML 3.0
Thursday, August 25, 2011
More fun with C++/CLI DLLs and native MFC Extension DLLs!
I've recently been busy working on an ActiveX DLL written in C++/CLI, I chose C++/CLI (instead of C#) because we have "legacy" code in native C++ DLLs, some of which contain MFC exported classes (i.e. MFC Extension DLLs). As such there would have been a horrible amount of "glue" code to get this working in C# so the C++/CLI was the best choice for this sort of project.
Everything seems to have been going very well, until I noticed regasm hanging up on Vista during interop registration, the debug version of the DLL doesn't exhibit the problem, only the release version.
So I fired up WinDbg and setup the Windows symbol server path and launched regasm through the debugger. The stack trace revealed an invalid pointer usage inside AfxTermExtensionModule inside MFC42U. After some research I learned the way that MFC extension DLLs work internally (via CDynLinkLibrary), and some further digging produced this:-
http://support.microsoft.com/kb/154126
My next point of call was the DllMain entry points for the 4 MFC extension DLLs I'm making use of, which revealed that the CDynLinkLibrary instantiation was being carried out inside DllMain()'s DLL_PROCESS_ATTACH switch branch. Following the advice from the Microsoft link above, it becomes obvious that we do indeed need to create a separate exported function for the CDynLinkLibrary instantiation, this way we can call it and wire into the link library chain of our own DLL.
Severe headache, but at least I found a solution!
Everything seems to have been going very well, until I noticed regasm hanging up on Vista during interop registration, the debug version of the DLL doesn't exhibit the problem, only the release version.
So I fired up WinDbg and setup the Windows symbol server path and launched regasm through the debugger. The stack trace revealed an invalid pointer usage inside AfxTermExtensionModule inside MFC42U. After some research I learned the way that MFC extension DLLs work internally (via CDynLinkLibrary), and some further digging produced this:-
http://support.microsoft.com/kb/154126
My next point of call was the DllMain entry points for the 4 MFC extension DLLs I'm making use of, which revealed that the CDynLinkLibrary instantiation was being carried out inside DllMain()'s DLL_PROCESS_ATTACH switch branch. Following the advice from the Microsoft link above, it becomes obvious that we do indeed need to create a separate exported function for the CDynLinkLibrary instantiation, this way we can call it and wire into the link library chain of our own DLL.
Severe headache, but at least I found a solution!
Finalize and Dispose in C#
I came across this succinct (well as succinct as you can be when discussing this topic) and comprehensive description of Dispose and Finalize semantics and thought I'd re-post it for reference (the author mentions specific C# functions, but the underlying mechanism applies to all .NET languages):-
(credits go to itowlson @ codeproject)
Finalize is the backstop method, called by the garbage collector when it reclaims an object. Dispose is the "deterministic cleanup" method, called by applications to release valuable native resources (window handles, database connections, etc.) when they are no longer needed, rather than leaving them held indefinitely until the GC gets round to the object.
As the user of an object, you always use Dispose. Finalize is for the GC. As the implementer of a class, if you hold managed resources that ought to be disposed, you implement Dispose. If you hold native resources, you implement both Dispose and Finalize, and both call a common method that releases the native resources. These idioms are typically combined through a private Dispose(bool disposing) method, which Dispose calls with true, and Finalize calls with false. This method always frees native resources, then checks the disposing parameter, and if it is true it disposes managed resources and calls GC.SuppressFinalize.
(credits go to itowlson @ codeproject)
Finalize is the backstop method, called by the garbage collector when it reclaims an object. Dispose is the "deterministic cleanup" method, called by applications to release valuable native resources (window handles, database connections, etc.) when they are no longer needed, rather than leaving them held indefinitely until the GC gets round to the object.
As the user of an object, you always use Dispose. Finalize is for the GC. As the implementer of a class, if you hold managed resources that ought to be disposed, you implement Dispose. If you hold native resources, you implement both Dispose and Finalize, and both call a common method that releases the native resources. These idioms are typically combined through a private Dispose(bool disposing) method, which Dispose calls with true, and Finalize calls with false. This method always frees native resources, then checks the disposing parameter, and if it is true it disposes managed resources and calls GC.SuppressFinalize.
Wednesday, August 24, 2011
Visual Studio embedded manfiest targetting 9.0.21022.8 CRT even though 9.0.30729.1 (SP1) is in the redist
Something else noticed whilst developing my C++/CLI ActiveX control.
I'm using the CRT (v9.0) and for deployment I'm shipping the DLLs as private assemblies (i.e. 'xcopy deployment'). However what I noticed is that the embedded manifest inside my DLL was pointing toward version 9.0.210228.8 of the CRT, when the actual DLLs in the redist folder (which I'm using for packaging) are the SP1 version of the CRT (v9.0.30729.1).
Problem is, if the target installation PC doesn't already have the SP1 Visual C++ 2008 Redistributable SP1 package installed, then the runtime probe will fallback to my private assembly, however, because my private assembly version is 9.0.30729.1 but the manifest is asking for 9.0.210228.8 then we get a load failure.
Solution is to add a #define into the source (stdafx.h) to tell Visual Studio to generate a manifest which points to the current vclibs installed for the development environment (i.e. 9.0.30729.1):-
I'm using the CRT (v9.0) and for deployment I'm shipping the DLLs as private assemblies (i.e. 'xcopy deployment'). However what I noticed is that the embedded manifest inside my DLL was pointing toward version 9.0.210228.8 of the CRT, when the actual DLLs in the redist folder (which I'm using for packaging) are the SP1 version of the CRT (v9.0.30729.1).
Problem is, if the target installation PC doesn't already have the SP1 Visual C++ 2008 Redistributable SP1 package installed, then the runtime probe will fallback to my private assembly, however, because my private assembly version is 9.0.30729.1 but the manifest is asking for 9.0.210228.8 then we get a load failure.
Solution is to add a #define into the source (stdafx.h) to tell Visual Studio to generate a manifest which points to the current vclibs installed for the development environment (i.e. 9.0.30729.1):-
#define _BIND_TO_CURRENT_VCLIBS_VERSION 1
Tuesday, August 23, 2011
C++/CLI ActiveX automatic registration
I've been working on an ActiveX control written in C++/CLI recently and I thought I'd share the COM registration function ([ComRegisterFunction()] attribute) I've written (which is called by regasm.exe when you're registering the assembly for COM Interop).
It does the following:
Creates the necessary keys to register as an ActiveX control.
Adds in the codebase keys so there is no need to pass the /codebase flag to regasm.exe.
Please note, if you're not including oleidl.h as part of your include hierarchy (which I am as I'm using the Windows SDK), then you'll need to define the following constants:
It does the following:
Creates the necessary keys to register as an ActiveX control.
Adds in the codebase keys so there is no need to pass the /codebase flag to regasm.exe.
Please note, if you're not including oleidl.h as part of your include hierarchy (which I am as I'm using the Windows SDK), then you'll need to define the following constants:
// Ref: http://msdn.microsoft.com/en-us/library/ms678497.aspx const int OLEMISC_RECOMPOSEONRESIZE = 1; const int OLEMISC_CANTLINKINSIDE = 16; const int OLEMISC_INSIDEOUT = 128; const int OLEMISC_ACTIVATEWHENVISIBLE = 256; const int OLEMISC_SETCLIENTSITEFIRST = 131072;Credit is given to the authors of the CSActiveX control upon which this code was originally based.
// // we need to add some extra registry keys on top of the regasm.exe generated // keys. this is because we are an ActiveX control (not just a plain COM control) // and as such require certain keys and values to be present. // // we also add in the codebase entries (instead of passing /codebase to regasm.exe) // this is so we avoid the overkill warnings that regasm.exe generates. // // as such to register this .NET assembly as a fully fledged ActiveX control // we need to run: // // regasm.exe /tlb // void FTEngine::Register( Type^ t ) { try { // Open the CLSID key of the control RegistryKey^ keyCLSID = Registry::ClassesRoot->OpenSubKey( "CLSID\\" + t->GUID.ToString("B"), true ); ////////////////////////////////////////////////////////////////////////// // Set "InprocServer32" to register a 32-bit in-process server. // InprocServer32 = // Ref: http://msdn.microsoft.com/en-us/library/ms683844.aspx // RegistryKey^ subkey = keyCLSID->OpenSubKey( "InprocServer32", true ); if( subkey ) { // .NET runtime engine (mscoree.dll) for .NET assemblies subkey->SetValue( nullptr, Environment::SystemDirectory + "\\mscoree.dll" ); // setup codebase flag as we're not in the GAC subkey->SetValue( "CodeBase", Assembly::GetExecutingAssembly()->CodeBase ); // setup the version specific codebase flag Version^ ver = Assembly::GetExecutingAssembly()->GetName()->Version; subkey = subkey->OpenSubKey( String::Format( "{0}.{1}.{2}.{3}", ver->Major, ver->Minor, ver->Build, ver->Revision ), true ); if( subkey ) { // setup codebase flag as we're not in the GAC subkey->SetValue( "CodeBase", Assembly::GetExecutingAssembly()->CodeBase ); } } ////////////////////////////////////////////////////////////////////////// // Create "Control" to identify it as an ActiveX Control. // Ref: http://msdn.microsoft.com/en-us/library/ms680056.aspx // keyCLSID->CreateSubKey( "Control" ); ////////////////////////////////////////////////////////////////////////// // Create "MiscStatus" to specify how to create/display an object. // MiscStatus = // Ref: http://msdn.microsoft.com/en-us/library/ms683733.aspx // subkey = keyCLSID->CreateSubKey( "MiscStatus" ); int nMiscStatus = OLEMISC_RECOMPOSEONRESIZE + OLEMISC_CANTLINKINSIDE + OLEMISC_INSIDEOUT + OLEMISC_ACTIVATEWHENVISIBLE + OLEMISC_SETCLIENTSITEFIRST; subkey->SetValue( "", nMiscStatus.ToString(), RegistryValueKind::String ); ////////////////////////////////////////////////////////////////////////// // Create "ToolBoxBitmap32" to identify the module name and the resource // ID for a 16 x 16 bitmap as the toolbar button face. // ToolBoxBitmap32 = ., // Ref: http://msdn.microsoft.com/en-us/library/ms687316.aspx // subkey = keyCLSID->CreateSubKey( "ToolBoxBitmap32" ); // If you want different icons for each control in the assembly you // can modify this section to specify a different icon each time. // Each specified icon must be embedded as a win32 resource in the // assembly; the default one is at the index 101, but you can use // additional ones. subkey->SetValue( "", Assembly::GetExecutingAssembly()->Location + ", 101", RegistryValueKind::String ); ////////////////////////////////////////////////////////////////////////// // Create "TypeLib" to specify the typelib GUID associated with the class. // subkey = keyCLSID->CreateSubKey("TypeLib"); Guid libId = Marshal::GetTypeLibGuidForAssembly( t->Assembly ); subkey->SetValue( "", libId.ToString("B"), RegistryValueKind::String ); ////////////////////////////////////////////////////////////////////////// // Create "Version" to specify the version of the control. // Ref: http://msdn.microsoft.com/en-us/library/ms686568.aspx // subkey = keyCLSID->CreateSubKey( "Version" ); int nMajor, nMinor; Marshal::GetTypeLibVersionForAssembly( t->Assembly, nMajor, nMinor); subkey->SetValue( "", String::Format( "{0}.{1}", nMajor, nMinor ) ); } catch( Exception^ ex ) { LogException( ex ); throw; } }
Custom attributes are not consistent!
error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c00007d).This is caused by specifying a managed attribute on the implementation of a C++/CLI function (i.e .cpp file), but not on the definition (i.e .h file).
Change your code so just the header file contains the attribute.
Javascript can't pass by reference into ActiveX/COM component
Useful information:
JScript / Javascript can't pass values by reference into a COM component, whereas VBScript can...
JScript / Javascript can't pass values by reference into a COM component, whereas VBScript can...
Subscribe to:
Posts (Atom)