home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WOLEPOBJ.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-18
|
6KB
|
176 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. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
/*************************************************************************
*
* WOleProgrammableObject -- Ole Programmable Object
*
*
* Events:
*
*
*************************************************************************/
#ifndef _WOLEPOBJ_HPP_INCLUDED
#define _WOLEPOBJ_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
#ifndef _WOLEBSTR_HPP_INCLUDED
# include "wolebstr.hpp"
#endif
#ifndef _WOLEOBJ_HPP_INCLUDED
# include "woleobj.hpp"
#endif
// forward class declarations
class WOleIDispatchHandler;
class WOleEventHandler;
// the following is definitions of WOleProgrammableObject
class WCMCLASS WOleProgrammableObject : public WEventGenerator {
WDeclareSubclass( WOleProgrammableObject, WEventGenerator );
public:
/**********************************************************
* Constructors and Destructors
*********************************************************/
WOleProgrammableObject();
virtual ~WOleProgrammableObject();
public:
/**************************************************************
* Properties
**************************************************************/
// Hot Link
WBool SetHotLink( WBool set );
WBool GetHotLink();
// Remote Host
WBool SetRemoteHost( const WString & remoteHost );
WString GetRemoteHost() const;
// read-only properties
WPICursor GetICursor( void ) const;
WBool GetHasICursor( void ) const;
WBool GetOpened() const;
WBool GetModified() const;
WBool GetLinked() const;
WPIUnknown GetObjectInterface() const;
WString GetObjectClassID() const;
// read-only Licensing properties
WBool GetLicenseVerified() const;
WBool GetRuntimeKeyAvailable() const;
WBString GetRuntimeLicenseKey() const;
// read-only Automation properties
WOleAutomationErrorInfo GetErrorInfo( void ) const;
WVariant GetLastResult( void ) const;
WVarType GetLastResultType( void ) const;
// event notification method
WBool SetOleEventHandler( WObject *source, WDispIndex disp_index,
WDispID disp_id,
WControlEventHandler handler );
/**************************************************************
* Methods
**************************************************************/
// creation, initialization and destruction functions
WBool Create( const WBString *license=NULL );
WBool Create( WString const & classID, const WBString *license=NULL );
WBool CreateLink( WString const & linkSrc, const WBString *license=NULL );
void Destroy();
// 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 );
// object linking methods
WBool UpdateLink( void );
// other methods
void FreezeControlEvents( WBool freeze );
/**************************************************************
* Operators
**************************************************************/
operator WPIUnknown() const;
operator WPIDispatch() const;
/**************************************************************
* Internal members
**************************************************************/
private:
virtual const WChar * GetRegisteredClass();
/**********************************************************
* Data Members
*********************************************************/
protected:
WOleIDispatchHandler *_idispHandler;
WOleEventHandler *_eventHandler;
WPIUnknown _pIUnknown;
WString _progID;
WString _classID;
WBool _isLinked;
WBool _hotLink;
WBool _runTimeKeyAvail;
WBool _licVerified;
WBStr _licenseKey;
unsigned long _cacheConnection;
WString _remoteHost;
};
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _WOLEPOBJ_HPP_INCLUDED