У меня есть большой проект в C++ Builder, который, похоже, использовал функцию Import Type Library. В нем есть файл с таким заголовком
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //
// C++ TLBWRTR : $Revision: 1.134.1.41 $
// File generated on 2003-10-27 12:57:05 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\WINNT\system32\MQOA.DLL (1)
// IID\LCID: {D7D6E071-DCCD-11D0-AA4B-0060970DEBAE}\0
// Helpfile:
// DepndLst:
// (1) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
// (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
// ************************************************************************ //
#ifndef __MSMQ_OCX_h__
#define __MSMQ_OCX_h__
#pragma option push -b -w-inl
#include <utilcls.h>
#if !defined(__UTILCLS_H_VERSION) || (__UTILCLS_H_VERSION < 0x0500)
//
// The code generated by the TLIBIMP utility or the Import|TypeLibrary
// and Import|ActiveX feature of C++Builder rely on specific versions of
// the header file UTILCLS.H found in the INCLUDE\VCL directory. If an
// older version of the file is detected, you probably need an update/patch.
//
#error "This file requires a newer version of the header UTILCLS.H" \
"You need to apply an update/patch to your copy of C++Builder"
#endif
#include <olectl.h>
#include <ocidl.h>
#if !defined(_NO_VCL)
#include <stdvcl.hpp>
#endif // _NO_VCL
#include <ocxproxy.h>
...
Как видите, этот файл был сгенерирован довольно давно :). Мне удалось создать этот проект с помощью C++ Builder 2010 в 64-разрядной версии Windows 7. Но когда я устанавливаю XE2 и пытаюсь исправить все мелкие проблемы, которые возникают, поскольку теперь по умолчанию используется STRICT вместо NO_STRICT, я сталкиваюсь с совсем другой вопрос. Вышеупомянутый файл и другие, созданные таким же образом, больше не работают должным образом.
Я получаю ошибки, как
[Ошибка BCC32] MSMQ_OCX.h(66): квалификатор E2090 «Oleserver» не является именем класса или пространства имен
Поиск MQOA.DLL, который, по его утверждениям, не использовался, кажется, что ничего подобного не существует. Кто-нибудь знает, как обойти подобные проблемы при обновлении проекта до XE2? Проект пережил обновления ранее и, наконец, был обновлен до C++ Builder 2010. Но я больше работаю с Visual Studio, поэтому многие материалы Embarcadero — это новая территория.
STRICT
? - person Remy Lebeau   schedule 14.02.2012