home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
OLEAUTO.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
12KB
|
281 lines
//----------------------------------------------------------------------------
// OleAuto.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: OleAuto.pas
//----------------------------------------------------------------------------
#ifndef OleAutoHPP
#define OleAutoHPP
//----------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <OleCtl.hpp>
#include <OLE2.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Oleauto
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) TAutoDispatch;
class __declspec(delphiclass) TAutoObject;
class __declspec(pascalimplementation) TAutoObject : public System::TObject
{
typedef System::TObject inherited;
private:
int FRefCount;
TAutoDispatch* FAutoDispatch;
long __fastcall GetIDsOfNames(Ole2::POleStrList Names, int Count, Ole2::PDispIDList DispIDs);
System::Variant __fastcall GetOleObject(void);
long __fastcall Invoke(long DispID, int Flags, DISPPARAMS &Params, System::PVariant VarResult, Ole2::PExcepInfo
ExcepInfo, Windows::PInteger ArgErr);
void __fastcall InvokeMethod(void * AutoEntry, void * Args, void * Result);
long __fastcall QueryInterface(const GUID &iid, void *obj);
protected:
virtual TAutoDispatch* __fastcall CreateAutoDispatch(void);
virtual void __fastcall GetExceptionInfo(System::TObject* ExceptObject, EXCEPINFO &ExcepInfo);
public:
__fastcall virtual TAutoObject(void);
__fastcall virtual ~TAutoObject(void);
int __fastcall AddRef(void);
int __fastcall Release(void);
__property TAutoDispatch* AutoDispatch = {read=FAutoDispatch, nodefault};
__property System::Variant OleObject = {read=GetOleObject};
__property int RefCount = {read=FRefCount, nodefault};
};
class __declspec(pascalimplementation) TAutoDispatch : public Ole2::IDispatch
{
typedef Ole2::IDispatch inherited;
private:
TAutoObject* FAutoObject;
public:
__fastcall TAutoDispatch(TAutoObject* AutoObject);
virtual long __stdcall QueryInterface(const GUID &iid, void *obj);
virtual long __stdcall AddRef(void);
virtual long __stdcall Release(void);
virtual long __stdcall GetTypeInfoCount(int &ctinfo);
virtual long __stdcall GetTypeInfo(int itinfo, long lcid, Ole2::ITypeInfo* &tinfo);
virtual long __stdcall GetIDsOfNames(const GUID &iid, Ole2::POleStrList rgszNames, int cNames, long
lcid, Ole2::PDispIDList rgdispid);
virtual long __stdcall Invoke(long dispIDMember, const GUID &iid, long lcid, Word flags, DISPPARAMS
&dispParams, System::PVariant varResult, Ole2::PExcepInfo excepInfo, Windows::PInteger argErr);
virtual TAutoObject* __stdcall GetAutoObject(void);
__property TAutoObject* AutoObject = {read=FAutoObject, nodefault};
public:
/* TObject.Destroy */ __fastcall virtual ~TAutoDispatch(void) { }
};
typedef System::TMetaClass*TAutoClass;
enum TAutoClassInstancing { acInternal, acSingleInstance, acMultiInstance };
struct TAutoClassInfo
{
System::TMetaClass*AutoClass;
System::AnsiString ProgID;
System::AnsiString ClassID;
System::AnsiString Description;
TAutoClassInstancing Instancing;
} ;
class __declspec(delphiclass) TRegistryClass;
class __declspec(pascalimplementation) TRegistryClass : public System::TObject
{
typedef System::TObject inherited;
private:
TRegistryClass* FNext;
System::TMetaClass*FAutoClass;
System::AnsiString FProgID;
GUID FClassID;
System::AnsiString FDescription;
TAutoClassInstancing FInstancing;
long FRegister;
public:
__fastcall TRegistryClass(const TAutoClassInfo &AutoClassInfo);
__fastcall virtual ~TRegistryClass(void);
void __fastcall UpdateRegistry(bool Register);
};
enum TStartMode { smStandalone, smAutomation, smRegServer, smUnregServer };
typedef void __fastcall (__closure *TLastReleaseEvent)(bool &Shutdown);
class __declspec(delphiclass) TAutomation;
class __declspec(pascalimplementation) TAutomation : public System::TObject
{
typedef System::TObject inherited;
private:
TRegistryClass* FRegistryList;
int FAutoObjectCount;
int FClassFactoryCount;
void *FSaveInitProc;
bool FIsInprocServer;
TStartMode FStartMode;
TLastReleaseEvent FOnLastRelease;
void __fastcall CountAutoObject(bool Created);
void __fastcall Initialize(void);
void __fastcall LastReleased(void);
public:
__fastcall TAutomation(void);
__fastcall virtual ~TAutomation(void);
void __fastcall RegisterClass(const TAutoClassInfo &AutoClassInfo);
void __fastcall UpdateRegistry(bool Register);
__property int AutoObjectCount = {read=FAutoObjectCount, nodefault};
__property bool IsInprocServer = {read=FIsInprocServer, write=FIsInprocServer, nodefault};
__property TStartMode StartMode = {read=FStartMode, nodefault};
__property TLastReleaseEvent OnLastRelease = {read=FOnLastRelease, write=FOnLastRelease};
};
class __declspec(delphiclass) EOleError;
class __declspec(pascalimplementation) EOleError : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
public:
/* Exception.Create */ __fastcall EOleError(const System::AnsiString Msg) : Sysutils::Exception(Msg
) { }
/* Exception.CreateFmt */ __fastcall EOleError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EOleError(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EOleError(int Ident, const System::TVarRec * Args, const int
Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EOleError(const System::AnsiString Msg, int AHelpContext) : Sysutils::
Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EOleError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EOleError(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EOleError(int Ident, const System::TVarRec * Args, const
int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
public:
/* TObject.Destroy */ __fastcall virtual ~EOleError(void) { }
};
class __declspec(delphiclass) EOleSysError;
class __declspec(pascalimplementation) EOleSysError : public EOleError
{
typedef EOleError inherited;
private:
int FErrorCode;
public:
__fastcall EOleSysError(int ErrorCode, int Dummy1, int Dummy2);
__property int ErrorCode = {read=FErrorCode, nodefault};
public:
/* Exception.CreateFmt */ __fastcall EOleSysError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Oleauto::EOleError(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EOleSysError(int Ident) : Oleauto::EOleError(Ident) { }
/* Exception.CreateResFmt */ __fastcall EOleSysError(int Ident, const System::TVarRec * Args, const
int Args_Size) : Oleauto::EOleError(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EOleSysError(const System::AnsiString Msg, int AHelpContext) :
Oleauto::EOleError(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EOleSysError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Oleauto::EOleError(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EOleSysError(int Ident, int AHelpContext) : Oleauto::EOleError(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EOleSysError(int Ident, const System::TVarRec * Args, const
int Args_Size, int AHelpContext) : Oleauto::EOleError(Ident, Args, Args_Size, AHelpContext) { }
public:
/* TObject.Destroy */ __fastcall virtual ~EOleSysError(void) { }
};
class __declspec(delphiclass) EOleException;
class __declspec(pascalimplementation) EOleException : public EOleError
{
typedef EOleError inherited;
private:
int FErrorCode;
System::AnsiString FSource;
System::AnsiString FHelpFile;
public:
__fastcall EOleException(const EXCEPINFO &ExcepInfo);
__property int ErrorCode = {read=FErrorCode, nodefault};
__property System::AnsiString HelpFile = {read=FHelpFile, nodefault};
__property System::AnsiString Source = {read=FSource, nodefault};
public:
/* Exception.CreateFmt */ __fastcall EOleException(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Oleauto::EOleError(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EOleException(int Ident) : Oleauto::EOleError(Ident) { }
/* Exception.CreateResFmt */ __fastcall EOleException(int Ident, const System::TVarRec * Args, const
int Args_Size) : Oleauto::EOleError(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EOleException(const System::AnsiString Msg, int AHelpContext)
: Oleauto::EOleError(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EOleException(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Oleauto::EOleError(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EOleException(int Ident, int AHelpContext) : Oleauto::EOleError(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EOleException(int Ident, const System::TVarRec * Args,
const int Args_Size, int AHelpContext) : Oleauto::EOleError(Ident, Args, Args_Size, AHelpContext) { }
public:
/* TObject.Destroy */ __fastcall virtual ~EOleException(void) { }
};
struct TCallDesc;
typedef TCallDesc *PCallDesc;
#pragma pack(push, 1)
struct TCallDesc
{
Byte CallType;
Byte ArgCount;
Byte NamedArgCount;
Byte ArgTypes[256];
} ;
#pragma pack(pop)
//-- var, const, procedure ---------------------------------------------------
#define MaxDispArgs (Byte)(32)
extern TAutomation* Automation;
extern void __fastcall OleError(long ErrorCode);
extern void __fastcall OleCheck(long Result);
extern GUID __fastcall StringToClassID(const System::AnsiString S);
extern System::AnsiString __fastcall ClassIDToString(const GUID &ClassID);
extern GUID __fastcall ProgIDToClassID(const System::AnsiString ProgID);
extern System::AnsiString __fastcall ClassIDToProgID(const GUID &ClassID);
extern System::Variant __fastcall VarFromInterface(Ole2::IUnknown* Unknown);
extern Ole2::IDispatch* __fastcall VarToInterface(const System::Variant &V);
extern TAutoObject* __fastcall VarToAutoObject(const System::Variant &V);
extern System::Variant __fastcall CreateOleObject(const System::AnsiString ClassName);
extern System::Variant __fastcall GetActiveOleObject(const System::AnsiString ClassName);
extern void __fastcall DispInvokeError(int Status, const EXCEPINFO &ExcepInfo);
extern long __stdcall DllGetClassObject(const GUID &CLSID, const GUID &IID, void *Obj);
extern long __stdcall DllCanUnloadNow(void);
extern long __stdcall DllRegisterServer(void);
extern long __stdcall DllUnregisterServer(void);
extern void __fastcall finalization(void);
} /* namespace Oleauto */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Oleauto;
#endif
//-- end unit ----------------------------------------------------------------
#endif // OleAuto