FIX: Can't Get IBuildProject Interface from Developer Studio (200074)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
This article was previously published under Q200074 IMPORTANT: This article contains information about modifying the registry. Before you
modify the registry, make sure to back it up and make sure that you understand how to restore
the registry if a problem occurs. For information about how to back up, restore, and edit the
registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
SYMPTOMS
While you are automating Developer Studio through the use of its Object Model, an attempt to obtain the IBuildProject interface fails.
For example, the following code fails to get an IBuildProject interface pointer:
#include <bldauto.h>
IBuildProject* pIBuildProject = NULL;
pIGenericProject->QueryInterface(IID_IBuildProject,
(void**)&pIBuildProject));
CAUSE
The automation header Bldguid.h, the type library Devbld.pkg, and the actual implementation of IBuildProject each use a different GUID.
RESOLUTION
The fix to this problem consists of a .tlb file to add to the Developer Studio SharedIDE\Bin\IDE folder and a .reg file for properly registering the IBuildProject interface. The registry fix is nondestructive to existing entries, and the type library is additional; it does not overwrite anything.
To implement the fix, you must first create the .tlb file. To do so, follow these steps:
- Copy the following code from this article and paste it into a text editor, such as Microsoft Notepad. Save the file as IBuildProject.odl.
// IBuildProject.odl : type library source for IBuildProject.tlb
// This file will be processed by the Make Type Library (mktyplib) tool to
// produce the type library (IBuildProject.tlb).
[ uuid(48187B40-02D6-11D1-A308-00A0C909E775), version(1.0),
helpstring ("Type Library to properly register IBuildProject") ]
library AddIn
{
importlib("stdole32.tlb");
importlib("devshl.dll");
importlib("ide/devbld.pkg");
[ uuid(96961264-A819-11CF-AD07-00A0C9034965),
helpstring("Represents a group of related files that can include one or more configurations"),
oleautomation,
dual
]
interface IBuildProject : IGenericProject
{
// methods
[id(0x00000064), propget, helpstring("Returns the set of configurations in this project")]
HRESULT Configurations([out, retval] IConfigurations** Configurations);
};
};
- From a command line in the same folder as the file IBuildProject.odl, type the following command and press ENTER:
MKTYPLIB IBuildProject.odl - Copy the IBuildProject.tlb file (which was created by the previous step) to the folder <Developer Studio installation folder>\SharedIDE\Bin\IDE.
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may
require you to reinstall your operating system. Microsoft cannot guarantee that you can solve
problems that result from using Registry Editor incorrectly. Use Registry Editor at your own
risk.
Now you must register the modified IBuildProject interface. To do so, follow these steps:
- Copy the following code and paste it into a text editor, such as Microsoft Notepad.
REGEDIT4
[HKEY_CLASSES_ROOT\Interface\{96961264-A819-11CF-AD07-00A0C9034965}]
@="IBuildProject"
[HKEY_CLASSES_ROOT\Interface\{96961264-A819-11CF-AD07-00A0C9034965}\ProxyStubClsid]
@="{00020424-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\Interface\{96961264-A819-11CF-AD07-00A0C9034965}\ProxyStubClsid32]
@="{00020424-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\Interface\{96961264-A819-11CF-AD07-00A0C9034965}\TypeLib]
@="{48187B40-02D6-11D1-A308-00A0C909E775}"
"Version"="1.0"<BR/>
<BR/>
[HKEY_CLASSES_ROOT\TypeLib\{48187B40-02D6-11D1-A308-00A0C909E775}]
[HKEY_CLASSES_ROOT\TypeLib\{48187B40-02D6-11D1-A308-00A0C909E775}\1.0]
@="IBuildProject Type Library"
[HKEY_CLASSES_ROOT\TypeLib\{48187B40-02D6-11D1-A308-00A0C909E775}\1.0\409]
[HKEY_CLASSES_ROOT\TypeLib\{48187B40-02D6-11D1-A308-00A0C909E775}\1.0\409\win32]
@="c:\\Program Files\\DevStudio\\SharedIDE\\BIN\\IDE\\IBuildProject.tlb"
[HKEY_CLASSES_ROOT\TypeLib\{48187B40-02D6-11D1-A308-00A0C909E775}\1.0\FLAGS]
@="0"
Save this file as IBuildProject2.reg. - If your Developer Studio installation path is not "C:\Program Files\DevStudio\SharedIDE\BIN\IDE", edit the registry key named [HKEY_CLASSES_ROOT\TypeLib\{48187B40-02D6-11D1-A308-00A0C909E775}\1.0\409\win32] to point to the folder where you copied IBuildProject.odl.
- From Windows Explorer, open the file IBuildProject2.reg. Click OK when you are prompted to import the file into the registry.
STATUSThis problem was corrected in Visual Studio 6.0.
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
173483 HOWTO: Create Custom AppWizards that Generate Non-MFC Projects
Modification Type: | Major | Last Reviewed: | 10/24/2003 |
---|
Keywords: | kbAutomation kbBug kbDSSTools kbenv kbfix kbide kbVC600fix KB200074 |
---|
|