home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WDSPHLPR.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-18
|
6KB
|
175 lines
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 1994, by WATCOM International Inc. All rights %
% reserved. No part of this software may be reproduced or %
% used in any form or by any means - graphic, electronic or %
% mechanical, including photocopying, recording, taping or %
% information storage and retrieval systems - except with the %
% written permission of WATCOM International Inc. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
/*************************************************************************
*
* WOleDispatchHelper -- Dispatch Interface Helper class
*
*
* Events:
*
*
*************************************************************************/
#ifndef _WDSPHLPR_HPP_INCLUDED
#define _WDSPHLPR_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
#ifndef _WOLEAUTO_HPP_INCLUDED
# include "woleauto.hpp"
#endif
#ifndef _WDEF_HPP_INCLUDED
# include "wdef.hpp"
#endif
#ifndef _WOLEDEF_HPP_INCLUDED
# include "woledef.hpp"
#endif
#ifndef _WOLEPARM_HPP_INCLUDED
# include "woleparm.hpp"
#endif
// forward class declarations
class WCMCLASS WOleInvokeHelper;
class WCMCLASS WOleAutomationErrorInfo {
public:
/**********************************************************
* Constructors and Destructors
*********************************************************/
WOleAutomationErrorInfo();
WOleAutomationErrorInfo( const WOleAutomationErrorInfo & info );
~WOleAutomationErrorInfo();
/**************************************************************
* Methods
**************************************************************/
void Display( void );
/**********************************************************
* Operators
*********************************************************/
WOleAutomationErrorInfo & operator=( const WOleAutomationErrorInfo & info );
/**********************************************************
* Data Members
*********************************************************/
public:
WInvokeError error;
WExceptionInfo exception;
WUInt argError;
WHRESULT hresult;;
};
class WCMCLASS WOleDispatchHelper : public WObject {
WDeclareSubclass( WOleDispatchHelper, WObject );
public:
/**********************************************************
* Constructors and Destructors
*********************************************************/
WOleDispatchHelper( void );
WOleDispatchHelper( WPIDispatch pIDispatch,
WBool release=TRUE,
WBool initMembers=FALSE );
WOleDispatchHelper( WPIUnknown pIUnknown,
WBool release=TRUE,
WBool initMembers=FALSE );
virtual ~WOleDispatchHelper();
public:
/**************************************************************
* Properties
**************************************************************/
// read-only Automation properties
WPIDispatch GetDispatchInterface( void ) const;
WOleAutomationErrorInfo GetErrorInfo( void ) const;
WVariant GetLastResult( void ) const;
WVarType GetLastResultType( void ) const;
/**************************************************************
* Methods
**************************************************************/
WBool Create( WPIDispatch pIDispatch, WBool release=TRUE,
WBool initMembers=FALSE );
WBool Create( WPIUnknown pIUnknown, WBool release=TRUE,
WBool initMembers=FALSE );
WBool Destroy( void );
void ClearErrorInfo( void );
// Automation methods
// the following will not cause ITypeInfo lookups
WBool Invoke( WMemberID memberID, WDispatchFlag flag,
WUInt cvtParms, WVarType *vtParms,
WVarType vtRet,
void *result, ... );
WBool Method( WMemberID memberID,
WUInt cvtParms, WVarType *vtParms,
WVarType vtRet, void *result, ... );
WBool PropertyGet( WMemberID memberID, WVarType vtRet, void *result );
WBool PropertyPut( WMemberID memberID, WVarType vt, ... );
WBool PropertyPutRef( WMemberID memberID, WVarType vt, ... );
WBool IDofName( const WString & name, WMemberID & id );
// the following may cause ITypeInfo lookups
WBool Invoke( WMemberID memberID, WDispatchFlag flag,
WVarType vtRet, void *result,
const WOleParmList & parmlist );
/**************************************************************
* Operators
**************************************************************/
operator WPIUnknown() const;
operator WPIDispatch() const;
/**********************************************************
* Data Members
*********************************************************/
protected:
WOleInvokeHelper *_inv_helper;
};
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _WDSPHLPR_HPP_INCLUDED