home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / ZSRV.HPP < prev    next >
C/C++ Source or Header  |  1997-02-14  |  10KB  |  249 lines

  1. //----------------------------------------------------------------------------
  2. // Zsrv.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: Zsrv.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef ZsrvHPP
  6. #define ZsrvHPP
  7. //----------------------------------------------------------------------------
  8. #include <Classes.hpp>
  9. #include <TypInfo.hpp>
  10. #include <SysUtils.hpp>
  11. #include <OLE2.hpp>
  12. #include <Windows.hpp>
  13. #include <System.hpp>
  14. #pragma warn -par
  15. #pragma warn -hid 
  16. #pragma warn -inl
  17.  
  18. namespace Zsrv
  19. {
  20. //-- type declarations -------------------------------------------------------
  21. class __declspec(delphiclass) IDelphiTypeInfo;
  22. class __declspec(delphiclass) IObjectDispatch;
  23. class __declspec(pascalimplementation) IObjectDispatch : public Ole2::IDispatch
  24. {
  25.     typedef Ole2::IDispatch inherited;
  26.     
  27. private:
  28.     int RefCount;
  29.     System::TObject* FObject;
  30.     IDelphiTypeInfo* FTypeInfo;
  31.     
  32. protected:
  33.     void __fastcall NewDispatch(VARIANTARG &V, System::TObject* Obj);
  34.     __property System::TObject* BoundObject = {read=FObject, nodefault};
  35.     
  36. public:
  37.     __fastcall virtual IObjectDispatch(System::TObject* Obj);
  38.     __fastcall virtual ~IObjectDispatch(void);
  39.     virtual long __stdcall QueryInterface(const GUID &iid, void *Obj);
  40.     virtual long __stdcall AddRef(void);
  41.     virtual long __stdcall Release(void);
  42.     virtual long __stdcall GetTypeInfoCount(int &pctinfo);
  43.     virtual long __stdcall GetTypeInfo(int itinfo, long lcid, Ole2::ITypeInfo* &tinfo);
  44.     virtual long __stdcall GetIDsOfNames(const GUID &iid, Ole2::POleStrList rgszNames, int cNames, long 
  45.         lcid, Ole2::PDispIDList rgdispid);
  46.     virtual long __stdcall Invoke(long dispIDMember, const GUID &iid, long lcid, Word flags, DISPPARAMS 
  47.         &dispParams, System::PVariant VarResult, Ole2::PExcepInfo excepInfo, Windows::PInteger argErr);
  48. };
  49.  
  50. class __declspec(pascalimplementation) IDelphiTypeInfo : public Ole2::ITypeInfo
  51. {
  52.     typedef Ole2::ITypeInfo inherited;
  53.     
  54. private:
  55.     int FRefCount;
  56.     IObjectDispatch* FDisp;
  57.     Typinfo::TPropList *FPropInfos;
  58.     int FPropCount;
  59.     
  60. public:
  61.     __fastcall IDelphiTypeInfo(IObjectDispatch* Disp);
  62.     __fastcall virtual ~IDelphiTypeInfo(void);
  63.     virtual long __stdcall QueryInterface(const GUID &iid, void *Obj);
  64.     virtual long __stdcall AddRef(void);
  65.     virtual long __stdcall Release(void);
  66.     virtual long __stdcall GetTypeAttr(Ole2::PTypeAttr &pptypeattr);
  67.     virtual long __stdcall GetTypeComp(Ole2::ITypeComp* &pptcomp);
  68.     virtual long __stdcall GetFuncDesc(int index, Ole2::PFuncDesc &ppfuncdesc);
  69.     virtual long __stdcall GetVarDesc(int index, Ole2::PVarDesc &ppvardesc);
  70.     virtual long __stdcall GetNames(long memid, Ole2::PBStrList rgbstrNames, int cMaxNames, int &cNames
  71.         );
  72.     virtual long __stdcall GetRefTypeOfImplType(int index, long &phreftype);
  73.     virtual long __stdcall GetImplTypeFlags(int index, int &pimpltypeflags);
  74.     virtual long __stdcall GetIDsOfNames(Ole2::POleStrList rgpszNames, int cNames, Ole2::PMemberIDList 
  75.         rgmemid);
  76.     virtual long __stdcall Invoke(void * pvInstance, long memid, Word Flags, DISPPARAMS &dispparams, 
  77.         System::PVariant VarResult, Ole2::PExcepInfo excepinfo, Windows::PInteger ArgErr);
  78.     virtual long __stdcall GetDocumentation(long memid, Ole2::PBStr pbstrName, Ole2::PBStr pbstrDocString
  79.         , Windows::PLongint pdwHelpContext, Ole2::PBStr pbstrHelpFile);
  80.     virtual long __stdcall GetDllEntry(long memid, long invkind, wchar_t * &bstrDllName, wchar_t * &bstrName
  81.         , Word &wOrdinal);
  82.     virtual long __stdcall GetRefTypeInfo(long reftype, Ole2::ITypeInfo* &tinfo);
  83.     virtual long __stdcall AddressOfMember(long memid, long invkind, void * &ppv);
  84.     virtual long __stdcall CreateInstance(Ole2::IUnknown* unkOuter, const GUID &iid, void *vObj);
  85.     virtual long __stdcall GetMops(long memid, wchar_t * &bstrMops);
  86.     virtual long __stdcall GetContainingTypeLib(Ole2::ITypeLib* &tlib, int &pindex);
  87.     virtual void __stdcall ReleaseTypeAttr(Ole2::PTypeAttr ptypeattr);
  88.     virtual void __stdcall ReleaseFuncDesc(Ole2::PFuncDesc pfuncdesc);
  89.     virtual void __stdcall ReleaseVarDesc(Ole2::PVarDesc pvardesc);
  90. };
  91.  
  92. typedef System::TMetaClass*TObjectDispatchClassRef;
  93.  
  94. typedef void __fastcall (__closure *TDispGetProp)(DISPPARAMS &DispParams, System::PVariant VarResult
  95.     , long &SCode);
  96.  
  97. class __declspec(delphiclass) ICustomDispatch;
  98. class __declspec(pascalimplementation) ICustomDispatch : public IObjectDispatch
  99. {
  100.     typedef IObjectDispatch inherited;
  101.     
  102. protected:
  103.     void __fastcall AddCustomProp(System::TMetaClass* BaseClass, const System::AnsiString PropName, TDispGetProp 
  104.         GetMethod);
  105.     
  106. public:
  107.     __fastcall virtual ICustomDispatch(System::TObject* Obj);
  108.     virtual void __fastcall DefineCustomProps(void);
  109.     virtual long __stdcall GetIDsOfNames(const GUID &iid, Ole2::POleStrList rgszNames, int cNames, long 
  110.         lcid, Ole2::PDispIDList rgdispid);
  111.     virtual long __stdcall Invoke(long dispIDMember, const GUID &iid, long lcid, Word flags, DISPPARAMS 
  112.         &dispParams, System::PVariant VarResult, Ole2::PExcepInfo excepInfo, Windows::PInteger argErr);
  113. public:
  114.         
  115.     /* IObjectDispatch.Destroy */ __fastcall virtual ~ICustomDispatch(void) { }
  116.     
  117. };
  118.  
  119. class __declspec(delphiclass) IComponentDispatch;
  120. class __declspec(pascalimplementation) IComponentDispatch : public ICustomDispatch
  121. {
  122.     typedef ICustomDispatch inherited;
  123.     
  124. private:
  125.     void __fastcall GetComponents(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  126.     void __fastcall GetComponentsCount(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  127.         
  128.     void __fastcall GetComponentsIndex(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  129.         
  130.     void __fastcall GetClassName(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  131.     void __fastcall GetObject(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  132.     void __fastcall GetOwner(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  133.     void __fastcall GetInheritsFrom(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  134.     void __fastcall GetDesignInfo(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  135.     
  136. public:
  137.     virtual void __fastcall DefineCustomProps(void);
  138. public:
  139.     /* ICustomDispatch.Create */ __fastcall virtual IComponentDispatch(System::TObject* Obj) : Zsrv::ICustomDispatch(
  140.         Obj) { }
  141.     
  142. public:
  143.     /* IObjectDispatch.Destroy */ __fastcall virtual ~IComponentDispatch(void) { }
  144.     
  145. };
  146.  
  147. class __declspec(delphiclass) IControlDispatch;
  148. class __declspec(pascalimplementation) IControlDispatch : public IComponentDispatch
  149. {
  150.     typedef IComponentDispatch inherited;
  151.     
  152. private:
  153.     void __fastcall GetEnabled(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  154.     void __fastcall GetText(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  155.     void __fastcall GetParent(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  156.     
  157. public:
  158.     virtual void __fastcall DefineCustomProps(void);
  159. public:
  160.     /* ICustomDispatch.Create */ __fastcall virtual IControlDispatch(System::TObject* Obj) : Zsrv::IComponentDispatch(
  161.         Obj) { }
  162.     
  163. public:
  164.     /* IObjectDispatch.Destroy */ __fastcall virtual ~IControlDispatch(void) { }
  165.     
  166. };
  167.  
  168. class __declspec(delphiclass) IWinControlDispatch;
  169. class __declspec(pascalimplementation) IWinControlDispatch : public IControlDispatch
  170. {
  171.     typedef IControlDispatch inherited;
  172.     
  173. private:
  174.     void __fastcall GetHandle(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  175.     void __fastcall GetControls(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  176.     void __fastcall GetControlCount(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  177.     
  178. public:
  179.     virtual void __fastcall DefineCustomProps(void);
  180. public:
  181.     /* ICustomDispatch.Create */ __fastcall virtual IWinControlDispatch(System::TObject* Obj) : Zsrv::IControlDispatch(
  182.         Obj) { }
  183.     
  184. public:
  185.     /* IObjectDispatch.Destroy */ __fastcall virtual ~IWinControlDispatch(void) { }
  186.     
  187. };
  188.  
  189. class __declspec(delphiclass) IApplicationDispatch;
  190. class __declspec(pascalimplementation) IApplicationDispatch : public IComponentDispatch
  191. {
  192.     typedef IComponentDispatch inherited;
  193.     
  194. private:
  195.     void __fastcall GetDispFromHandle(DISPPARAMS &Params, System::PVariant VarResult, long &SCode);
  196.     
  197. public:
  198.     virtual void __fastcall DefineCustomProps(void);
  199. public:
  200.     /* ICustomDispatch.Create */ __fastcall virtual IApplicationDispatch(System::TObject* Obj) : Zsrv::
  201.         IComponentDispatch(Obj) { }
  202.     
  203. public:
  204.     /* IObjectDispatch.Destroy */ __fastcall virtual ~IApplicationDispatch(void) { }
  205.     
  206. };
  207.  
  208. class __declspec(delphiclass) IDispatchFactory;
  209. class __declspec(pascalimplementation) IDispatchFactory : public Ole2::IClassFactory
  210. {
  211.     typedef Ole2::IClassFactory inherited;
  212.     
  213. private:
  214.     int RefCount;
  215.     Ole2::IDispatch* FDispatch;
  216.     
  217. public:
  218.     __fastcall IDispatchFactory(Ole2::IDispatch* Dispatch);
  219.     __fastcall virtual ~IDispatchFactory(void);
  220.     virtual long __stdcall QueryInterface(const GUID &iid, void *Obj);
  221.     virtual long __stdcall AddRef(void);
  222.     virtual long __stdcall Release(void);
  223.     virtual long __stdcall CreateInstance(Ole2::IUnknown* UnkOuter, const GUID &iid, void *vObj);
  224.     virtual long __stdcall LockServer(DWord fLock);
  225. };
  226.  
  227. //-- var, const, procedure ---------------------------------------------------
  228. #define FirstComponentIndex (Byte)(16)
  229. #define LastComponentIndex (int)(65535)
  230. #define FirstCustomPropIndex (int)(-2147483648)
  231. #define LastCustomPropIndex (int)(-65536)
  232. #define FirstPropIndex (int)(65535)
  233. #define LastPropIndex (int)(2147483647)
  234. extern void __fastcall RegisterAutomationEnabler(System::TMetaClass* ObjectClass, System::TMetaClass* 
  235.     DispClass);
  236. extern long __fastcall HandleInvokeException(Ole2::PExcepInfo ExcepInfo);
  237.  
  238. }    /* namespace Zsrv */
  239.  
  240. #pragma warn .par
  241. #pragma warn .hid 
  242. #pragma warn .inl
  243.  
  244. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  245. using namespace Zsrv;
  246. #endif
  247. //-- end unit ----------------------------------------------------------------
  248. #endif    // Zsrv
  249.