Board index » cppbuilder » Undefined symbol and Cannot generate template specialization from '_STL::vector<_Tp,_Alloc>'
Marcel
![]() CBuilder Developer |
Undefined symbol and Cannot generate template specialization from '_STL::vector<_Tp,_Alloc>'2004-02-27 06:33:23 PM cppbuilder90 Hello all, I am building an Active Server Page Object but ran again into some problems... When compiling i get the following errors: [C++ Error] rtfWriterImpl.cpp(248): E2451 Undefined symbol 'userproperty' [C++ Error] rtfWriterImpl.cpp(248): E2299 Cannot generate template specialization from '_STL::vector<_Tp,_Alloc>' This sounds very strange to me because i am sure that i defined userproperty in the implementations header file: Below is the source.... can someone help me please.... sure i am doing something wrong but what? Sorry for the large amount of code but i posted all the code because i am not sure where the errors are coming from... Can someone help me please??? Regards, Marcel #### rtfWriterImpl.h ### // RTFWRITERIMPL.H : Declaration of the TrtfWriterImpl #ifndef rtfWriterImplH #define IDEHEaderName #define ATL_FREE_THREADED #include "Project1_TLB.H" #include <vector> #include <asphlpr.h> //////////////////////////////////////////////////////////////////////////// / // TrtfWriterImpl Implements IrtfWriter, default interface of rtfWriter // ThreadingModel : Both // Dual Interface : TRUE // Event Support : FALSE // Default ProgID : Project1.rtfWriter // Description : //////////////////////////////////////////////////////////////////////////// / class ATL_NO_VTABLE TrtfWriterImpl : public CComObjectRootEx<CComMultiThreadModel>, public CComCoClass<TrtfWriterImpl, &CLSID_rtfWriter>, public IDispatchImpl<IrtfWriter, &IID_IrtfWriter, &LIBID_Project1>, public TMTSASPObject { public: TrtfWriterImpl() { // filling vector colors with default colors TrtfWriterImpl::addColor(WideString("black"),WideString("0"),WideString("0") ,WideString("0")); TrtfWriterImpl::addColor(WideString("blue"),WideString("0"),WideString("0"), WideString("255")); TrtfWriterImpl::addColor(WideString("lightblue"),WideString("0"),WideString( "255"),WideString("255")); TrtfWriterImpl::addColor(WideString("green"),WideString("0"),WideString("255 "),WideString("0")); //TrtfWriterImpl::addColor(WideString("pink"),WideString("255"),WideString(" 0"),WideString("255")); //TrtfWriterImpl::addColor(WideString("red"),WideString("255"),WideString("0 "),WideString("0")); //TrtfWriterImpl::addColor(WideString("yellow"),WideString("255"),WideString ("255"),WideString("0")); //TrtfWriterImpl::addColor(WideString("white"),WideString("255"),WideString( "255"),WideString("255")); //TrtfWriterImpl::addColor(WideString("darkblue"),WideString("0"),WideString ("0"),WideString("128")); //TrtfWriterImpl::addColor(WideString("seablue"),WideString("0"),WideString( "128"),WideString("128")); //TrtfWriterImpl::addColor(WideString("darkgreen"),WideString("0"),WideStrin g("128"),WideString("0")); //TrtfWriterImpl::addColor(WideString("purple"),WideString("128"),WideString ("0"),WideString("128")); //TrtfWriterImpl::addColor(WideString("darkred"),WideString("128"),WideStrin g("0"),WideString("0")); //TrtfWriterImpl::addColor(WideString("darkyellow"),WideString("128"),WideSt ring("128"),WideString("0")); //TrtfWriterImpl::addColor(WideString("darkgrey"),WideString("128"),WideStri ng("128"),WideString("128")); //TrtfWriterImpl::addColor(WideString("grey"),WideString("192"),WideString(" 192"),WideString("192")); // filling vector fonts with default fonts TrtfWriterImpl::addFont(WideString("TimesNewRoman"),WideString("froman"),Wid eString("0"),WideString("2"),WideString("Times New Roman")); TrtfWriterImpl::addFont(WideString("TimesNewRoman2"),WideString("froman"),Wi deString("238"),WideString("2"),WideString("Times New Roman CE")); /*TrtfWriterImpl::addFont(WideString("TimesNewRoman3"),WideString("froman"), WideString("204"),WideString("2"),WideString("Times New Roman Cyr")); TrtfWriterImpl::addFont(WideString("TimesNewRoman4"),WideString("froman"),Wi deString("161"),WideString("2"),WideString("Times New Roman Greek")); TrtfWriterImpl::addFont(WideString("TimesNewRoman5"),WideString("froman"),Wi deString("162"),WideString("2"),WideString("Times New Roman Tur")); TrtfWriterImpl::addFont(WideString("TimesNewRoman6"),WideString("froman"),Wi deString("177"),WideString("2"),WideString("Times New Roman (Hebrew)")); TrtfWriterImpl::addFont(WideString("TimesNewRoman7"),WideString("froman"),Wi deString("178"),WideString("2"),WideString("Times New Roman (Arabic)")); TrtfWriterImpl::addFont(WideString("TimesNewRoman8"),WideString("froman"),Wi deString("186"),WideString("2"),WideString("Times New Roman Baltic")); TrtfWriterImpl::addFont(WideString("TimesNewRoman9"),WideString("froman"),Wi deString("163"),WideString("2"),WideString("Times New Roman (Vietnamese)")); // \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} TrtfWriterImpl::addFont(WideString("Arial"),WideString("fswiss"),WideString( "0"),WideString("2"),WideString("Arial")); */ //TrtfWriterImpl::addProperty(WideString("TEST"),WideString("30"),WideString ("TEST VAN MARCEL")); } // Data used when registering Object // DECLARE_THREADING_MODEL(otBoth); DECLARE_PROGID(_T("Project1.rtfWriter")); DECLARE_DESCRIPTION(_T("")); // Function invoked to (un)register object // static HRESULT WINAPI UpdateRegistry(BOOL bRegister) { TTypedComServerRegistrarT<TrtfWriterImpl> regObj(GetObjectCLSID(), GetProgID(), GetDescription()); return regObj.UpdateRegistry(bRegister); } DECLARE_NOT_AGGREGATABLE(TrtfWriterImpl) BEGIN_COM_MAP(TrtfWriterImpl) COM_INTERFACE_ENTRY(IrtfWriter) COM_INTERFACE_ENTRY2(IDispatch, IrtfWriter) END_COM_MAP() // IrtfWriter public: STDMETHOD(addColor(BSTR name,BSTR red,BSTR green,BSTR blue)); STDMETHOD(addFont(BSTR name,BSTR fontfamily,BSTR charset,BSTR fprq,BSTR fonttype)); STDMETHOD(writeRtf()); STDMETHOD(writeColorTable()); STDMETHOD(writeFontTable()); STDMETHOD(writeUserProperties()); STDMETHOD(addProperty(BSTR propertyname,BSTR propertytype,BSTR propertystaticvalue)); struct color { WideString name; WideString red; WideString green; WideString blue; }; std::vector<color>colors; struct font { WideString name; WideString fontfamily; WideString charset; WideString fprq; WideString fonttype; }; std::vector<font>fonts; struct userproperty { WideString propertyname; WideString propertytype; WideString propertystaticvalue; }; std::vector<userproperty>userproperties; private: WideString RTF; }; #endif //rtfWriterImplH ################### ### rtfWriterImpl.cpp ### // RTFWRITERIMPL : Implementation of TrtfWriterImpl #include <vector> #include <vcl.h> #pragma hdrstop #include "RTFWRITERIMPL.H" //////////////////////////////////////////////////////////////////////////// / // TrtfWriterImpl STDMETHODIMP TrtfWriterImpl::addColor(BSTR name,BSTR red,BSTR green,BSTR blue) { try { bool color_exists; for(std::vector<color>::size_type i = 0;i != colors.size();i++) { if(colors[i].name == WideString(name)) { color_exists = true; colors[i].red = red; colors[i].green = green; colors[i].blue = blue; break; } else { color_exists = false; } } if(color_exists == false) { color newcolor; newcolor.name = WideString(name); newcolor.red = WideString(red); newcolor.green = WideString(green); newcolor.blue = WideString(blue); colors.push_back(newcolor); } } catch(Exception &e) { return Error(e.Message.c_str(), IID_IrtfWriter); } return S_OK; }; STDMETHODIMP TrtfWriterImpl::addFont(BSTR name,BSTR fontfamily,BSTR charset,BSTR fprq,BSTR fonttype) { try { bool font_exists; for(std::vector<font>::size_type i = 0;i != fonts.size();i++) { if(fonts[i].name == WideString(name)) { font_exists = true; fonts[i].fontfamily = fontfamily; fonts[i].charset = charset; fonts[i].fprq = fprq; fonts[i].fonttype = fonttype; break; } else { font_exists = false; } } if(font_exists == false) { font newfont; newfont.name = WideString(name); newfont.fontfamily = WideString(fontfamily); newfont.charset = WideString(charset); newfont.fprq = WideString(fprq); newfont.fonttype = WideString(fonttype); fonts.push_back(newfont); } } catch(Exception &e) { return Error(e.Message.c_str(), IID_IrtfWriter); } return S_OK; }; STDMETHODIMP TrtfWriterImpl::writeColorTable() { try { RTF += "{\\colortbl;"; for(std::vector<color>::size_type i = 0;i != colors.size();i++) { RTF += "\\red"; RTF += colors[i].red; RTF += "\\green"; RTF += colors[i].green; RTF += "\\blue"; RTF += colors[i].blue; RTF += ";"; } RTF += "}"; } catch(Exception &e) { return Error(e.Message.c_str(), IID_IrtfWriter); } return S_OK; }; STDMETHODIMP TrtfWriterImpl::writeFontTable() { try { RTF += "{\\fonttbl;"; //RTF += WideString(fonts.size()); for(std::vector<font>::size_type i = 0;i != fonts.size();i++) { RTF += "{\\f"; RTF += WideString(i); RTF += "\\"; RTF += fonts[i].fontfamily; RTF += "\\fcharset"; RTF += fonts[i].charset; RTF += "\\fprq"; RTF += fonts[i].fprq; RTF += " "; RTF += fonts[i].fonttype; RTF += ";}"; } RTF += "}"; } catch(Exception &e) { return Error(e.Message.c_str(), IID_IrtfWriter); } return S_OK; }; STDMETHODIMP TrtfWriterImpl::writeUserProperties() { try { RTF += "{\\*\\userprops "; for(std::vector<userproperty>::size_type i = 0;i != userproperties.size();i++) { RTF += "{\\propname "; RTF += userproperties[i].propertyname; RTF += "}"; RTF += "\\proptype"; RTF += userproperties[i].propertytype; RTF += "{\\staticval "; RTF += userproperties[i].propertystaticvalue; RTF += "}"; } RTF += "}"; } catch(Exception &e) { return Error(e.Message.c_str(), IID_IrtfWriter); } return S_OK; }; STDMETHODIMP addProperty(BSTR propertyname,BSTR propertytype,BSTR propertystaticvalue) { try { bool property_exists; /* 3 Integer 5 Real number 7 Date 11 Boolean 30 Text */ /* if(propertytype == WideString("INTEGER")) { propertytype = WideString("3"); } if(propertytype == WideString("REALNUMBER")) { propertytype = WideString("5"); } if(propertytype == WideString("DATE")) { propertytype = WideString("7"); } if(propertytype == WideString("BOOLEAN")) { propertytype = WideString("11"); } if(propertytype == WideString("TEXT")) { propertytype = WideString("30"); } */ for(std::vector<userproperty>::size_type i = 0;i != userproperties.size();i++) { if(userproperties[i].propertyname == WideString(propertyname)) { property_exists = true; userproperties[i].propertytype = propertytype; userproperties[i].propertystaticvalue = propertystaticvalue; break; } else { property_exists = false; } } if(!property_exists) { userproperty newuserproperty; newuserproperty.propertyname = propertyname; newuserproperty.propertytype = propertytype; newuserproperty.propertystaticvalue = propertystaticvalue; userproperties.push_back(newuserproperty); } } catch(Exception &e) { return Error(e.Message.c_str(), IID_IrtfWriter); } return S_OK; }; STDMETHODIMP TrtfWriterImpl::writeRtf() { try { RTF = ""; RTF += "{\\rtf1\\ansi\\ansicpg1252\\uc1\\deff0\\deflang1043\\deflangfe1043"; writeFontTable(); writeColorTable(); RTF += "{\\stylesheet{\\ql \\li0\\ri0\\widctlpar\\aspalpha\\aspnum\\faauto\\adjustright\\rin0\\lin0\\it ap0 \\fs24\\lang1043\\langfe1043"; RTF += "\\cgrid\\langnp1043\\langfenp1043 \\snext0 Normal;}{\\*\\cs10 \\additive Default Paragraph Font;}}"; RTF += "{\\info{\\title hallo}{\\author Gill}{\\operator Gill}"; RTF += "{\\creatim\\yr2004\\mo1\\dy20\\hr22\\min9}{\\revtim\\yr2004\\mo1\\dy20\\hr2 2\\min10}{\\version1}{\\edmins1}"; RTF += "{\\nofpages1}{\\nofwords0}{\\nofchars0}{\\*\\company Jack}{\\nofcharsws0}"; RTF += "{\\vern8247}}\\paperw11906\\paperh16838 \\deftab708\\widowctrl\\ftnbj\\aenddoc\\hyphhotz425\\noxlattoyen"; RTF += "\\expshrtn\\noultrlspc\\dntblnsbdb\\nospaceforul\\formshade\\horzdoc\\dgmar gin\\dghspace180\\dgvspace180"; RTF += "\\dghorigin1701\\dgvorigin1984\\dghshow1\\dgvshow1\\jexpand\\viewkind4\\vie wscale100\\pgbrdrhead"; RTF += "\\pgbrdrfoot\\splytwnine\\ftnlytwnine\\htmautsp\\nolnhtadjtbl\\useltbaln\\a lntblind\\lytcalctblwd\\lyttblrtgr"; RTF += "\\lnbrkrule\\fet0\\sectd\\linex0\\headery708\\footery708\\colsx708\\endnher e\\sectlinegrid360"; RTF += "\\sectdefaultcl {\\*\\pnseclvl1\\pnucrm\\pnstart1\\pnindent720\\pnhang{\\pntxta .}}{\\*\\pnseclvl2\\pnucltr\\pnstart1"; RTF += "\\pnindent720\\pnhang{\\pntxta .}}{\\*\\pnseclvl3\\pndec\\pnstart1\\pnindent720\\pnhang{\\pntxta .}}"; RTF += "{\\*\\pnseclvl4\\pnlcltr\\pnstart1\\pnindent720\\pnhang{\\pntxta )}}{\\*\\p nseclvl5\\pndec\\pnstart1\\pnindent720\\pnhang"; RTF += "{\\pntxtb (}{\\pntxta )}}{\\*\\pnseclvl6\\pnlcltr\\pnstart1\\pnindent720\\pnhang{\\pnt xtb (}{\\pntxta )}}"; RTF += "{\\*\\pnseclvl7\\pnlcrm\\pnstart1\\pnindent720\\pnhang{\\pntxtb (}{\\pntxta )}}"; RTF += "{\\*\\pnseclvl8\\pnlcltr\\pnstart1\\pnindent720\\pnhang{\\pntxtb (}{\\pntxta )}}{\\*\\pnseclvl9\\pnlcrm\\pnstart1\\pnindent720"; RTF += "\\pnhang{\\pntxtb (}{\\pntxta )}}\\pard\\plain \\ql \\li0\\ri0\\widctlpar\\aspalpha\\aspnum\\faauto\\adjustright\\rin0\\lin0\\it ap0"; RTF += "\\fs24\\lang1043\\langfe1043\\cgrid\\langnp1043\\langfenp1043 {\\lang1033\\langfe1043\\langnp1033 hallo\\par }}"; Response->Write(Variant(RTF)); } catch(Exception &e) { return Error(e.Message.c_str(), IID_IrtfWriter); } return S_OK; }; #################### ### Project1_TLB.h ### // ************************************************************************ // // 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.151.1.0.1.27 $ // File generated on 25-2-2004 17:29:01 from Type Library described below. // ************************************************************************ // // Type Lib: D:\Documents and Settings\Administrator\Desktop\aso25022004(7)\Project1.tlb (1) // LIBID: {65086C9F-0054-4AAB-BBFE-1E422D99B51F} // LCID: 0 // Helpfile: // HelpString: Project1 Library // DepndLst: // (1) v2.0 stdole, (D:\WINNT\System32\stdole2.tlb) // ************************************************************************ // #ifndef Project1_TLBH #define Project1_TLBH #pragma option push -b -w-inl #include <utilcls.h> #if !defined(__UTILCLS_H_VERSION) || (__UTILCLS_H_VERSION < 0x0600) // // 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(USING_ATLVCL) || defined(USING_ATL) #if !defined(__TLB_NO_EVENT_WRAPPERS) #include <atl/atlmod.h> #endif #endif // *********************************************************************// // Forward reference of some VCL types (to avoid including STDVCL.HPP) // *********************************************************************// namespace Stdvcl {class IStrings; class IStringsDisp;} using namespace Stdvcl; typedef TComInterface<IStrings>IStringsPtr; typedef TComInterface<IStringsDisp>IStringsDispPtr; namespace Project1_tlb { // *********************************************************************// // HelpString: Project1 Library // Version: 1.0 // *********************************************************************// // *********************************************************************// // GUIDS declared in the TypeLibrary. Following prefixes are used: // Type Libraries : LIBID_xxxx // CoClasses : CLSID_xxxx // DISPInterfaces : DIID_xxxx // Non-DISP interfaces: IID_xxxx // *********************************************************************// extern "C" const __declspec(selectany) GUID LIBID_Project1 = {0x65086C9F, 0x0054, 0x4AAB,{ 0xBB, 0xFE, 0x1E,0x42, 0x2D, 0x99,0xB5, 0x1F} }; extern "C" const __declspec(selectany) GUID IID_IrtfWriter = {0xB05ADA98, 0x28F2, 0x42B3,{ 0xBB, 0x97, 0xD7,0xFC, 0xC5, 0xF6,0x47, 0x79} }; extern "C" const __declspec(selectany) GUID CLSID_rtfWriter = {0xEE5FFA77, 0x82AE, 0x4373,{ 0xA1, 0x87, 0xBF,0x4E, 0x80, 0x84,0x88, 0x51} }; // *********************************************************************// // Forward declaration of types defined in TypeLibrary // *********************************************************************// interface DECLSPEC_UUID("{B05ADA98-28F2-42B3-BB97-D7FCC5F64779}") IrtfWriter; typedef TComInterface<IrtfWriter, &IID_IrtfWriter>IrtfWriterPtr; // *********************************************************************// // Declaration of CoClasses defined in Type Library // (NOTE: Here we map each CoClass to its Default Interface) // // The LIBID_OF_ macro(s) map a LIBID_OF_CoClassName to the GUID of this // TypeLibrary. It simplifies the updating of macros when CoClass name // change. // *********************************************************************// typedef IrtfWriter rtfWriter; typedef IrtfWriterPtr rtfWriterPtr; #define LIBID_OF_rtfWriter (&LIBID_Project1) // *********************************************************************// // Interface: IrtfWriter // Flags: (4416) Dual OleAutomation Dispatchable // GUID: {B05ADA98-28F2-42B3-BB97-D7FCC5F64779} // *********************************************************************// interface IrtfWriter : public IDispatch { public: virtual HRESULT STDMETHODCALLTYPE addColor(BSTR name/*[in]*/, BSTR red/*[in]*/, BSTR green/*[in]*/, BSTR blue/*[in]*/) = 0; // [1] virtual HRESULT STDMETHODCALLTYPE writeRtf(void) = 0; // [2] virtual HRESULT STDMETHODCALLTYPE writeColorTable(void) = 0; // [3] virtual HRESULT STDMETHODCALLTYPE addFont(BSTR name/*[in]*/, BSTR fontfamily/*[in]*/, BSTR charset/*[in]*/, BSTR fprq/*[in]*/, BSTR fonttype/*[in]*/) = 0; // [4] virtual HRESULT STDMETHODCALLTYPE writeFontTable(void) = 0; // [5] virtual HRESULT STDMETHODCALLTYPE writeUserProperties(void) = 0; // [6] virtual HRESULT STDMETHODCALLTYPE addProperty(BSTR propertyname/*[in]*/, BSTR propertytype/*[in]*/, BSTR propertystaticvalue/*[in]*/) = 0; // [7] #if !defined(__TLB_NO_INTERFACE_WRAPPERS) #endif // __TLB_NO_INTERFACE_WRAPPERS }; #if !defined(__TLB_NO_INTERFACE_WRAPPERS) // *********************************************************************// // SmartIntf: TCOMIrtfWriter // Interface: IrtfWriter // *********************************************************************// template <class T /* IrtfWriter */> class TCOMIrtfWriterT : public TComInterface<IrtfWriter>, public TComInterfaceBase<IUnknown> { public: TCOMIrtfWriterT() {} TCOMIrtfWriterT(IrtfWriter *intf, bool addRef = false) : TComInterface<IrtfWriter>(intf, addRef) {} TCOMIrtfWriterT(const TCOMIrtfWriterT& src) : TComInterface<IrtfWriter>(src) {} TCOMIrtfWriterT& operator=(const TCOMIrtfWriterT& src) { Bind(src, true); return *this;} HRESULT __fastcall addColor(BSTR name/*[in]*/, BSTR red/*[in]*/, BSTR green/*[in]*/, BSTR blue/*[in]*/); HRESULT __fastcall writeRtf(void); HRESULT __fastcall writeColorTable(void); HRESULT __fastcall addFont(BSTR name/*[in]*/, BSTR fontfamily/*[in]*/, BSTR charset/*[in]*/, BSTR fprq/*[in]*/, BSTR fonttype/*[in]*/); HRESULT __fastcall writeFontTable(void); HRESULT __fastcall writeUserProperties(void); HRESULT __fastcall addProperty(BSTR propertyname/*[in]*/, BSTR propertytype/*[in]*/, BSTR propertystaticvalue/*[in]*/); }; typedef TCOMIrtfWriterT<IrtfWriter>TCOMIrtfWriter; // *********************************************************************// // DispIntf: IrtfWriter // Flags: (4416) Dual OleAutomation Dispatchable // GUID: {B05ADA98-28F2-42B3-BB97-D7FCC5F64779} // *********************************************************************// template<class T> class IrtfWriterDispT : public TAutoDriver<IrtfWriter> { public: IrtfWriterDispT(){} IrtfWriterDispT(IrtfWriter *pintf) { TAutoDriver<IrtfWriter>::Bind(pintf, false); } IrtfWriterDispT(IrtfWriterPtr pintf) { TAutoDriver<IrtfWriter>::Bind(pintf, true); } IrtfWriterDispT& operator=(IrtfWriter *pintf) { TAutoDriver<IrtfWriter>::Bind(pintf, false); return *this; } IrtfWriterDispT& operator=(IrtfWriterPtr pintf) { TAutoDriver<IrtfWriter>::Bind(pintf, true); return *this; } HRESULT BindDefault() { return OLECHECK(Bind(CLSID_rtfWriter)); } HRESULT BindRunning() { return BindToActive(CLSID_rtfWriter); } HRESULT __fastcall addColor(BSTR name/*[in]*/, BSTR red/*[in]*/, BSTR green/*[in]*/, BSTR blue/*[in]*/); HRESULT __fastcall writeRtf(); HRESULT __fastcall writeColorTable(); HRESULT __fastcall addFont(BSTR name/*[in]*/, BSTR fontfamily/*[in]*/, BSTR charset/*[in]*/, BSTR fprq/*[in]*/, BSTR fonttype/*[in]*/); HRESULT __fastcall writeFontTable(); HRESULT __fastcall writeUserProperties(); HRESULT __fastcall addProperty(BSTR propertyname/*[in]*/, BSTR propertytype/*[in]*/, BSTR propertystaticvalue/*[in]*/); }; typedef IrtfWriterDispT<IrtfWriter>IrtfWriterDisp; // *********************************************************************// // SmartIntf: TCOMIrtfWriter // Interface: IrtfWriter // *********************************************************************// template <class T>HRESULT __fastcall TCOMIrtfWriterT<T>::addColor(BSTR name/*[in]*/, BSTR red/*[in]*/, BSTR green/*[in]*/, BSTR blue/*[in]*/) { return (*this)->addColor(name, red, green, blue); } template <class T>HRESULT __fastcall TCOMIrtfWriterT<T>::writeRtf(void) { return (*this)->writeRtf(); } template <class T>HRESULT __fastcall TCOMIrtfWriterT<T>::writeColorTable(void) { return (*this)->writeColorTable(); } template <class T>HRESULT __fastcall TCOMIrtfWriterT<T>::addFont(BSTR name/*[in]*/, BSTR fontfamily/*[in]*/, BSTR charset/*[in]*/, BSTR fprq/*[in]*/, BSTR fonttype/*[in]*/) { return (*this)->addFont(name, fontfamily, charset, fprq, fonttype); } template <class T>HRESULT __fastcall TCOMIrtfWriterT<T>::writeFontTable(void) { return (*this)->writeFontTable(); } template <class T>HRESULT __fastcall TCOMIrtfWriterT<T>::writeUserProperties(void) { return (*this)->writeUserProperties(); } template <class T>HRESULT __fastcall TCOMIrtfWriterT<T>::addProperty(BSTR propertyname/*[in]*/, BSTR propertytype/*[in]*/, BSTR propertystaticvalue/*[in]*/) { return (*this)->addProperty(propertyname, propertytype, propertystaticvalue); } // *********************************************************************// // DispIntf: IrtfWriter // Flags: (4416) Dual OleAutomation Dispatchable // GUID: {B05ADA98-28F2-42B3-BB97-D7FCC5F64779} // *********************************************************************// template <class T>HRESULT __fastcall IrtfWriterDispT<T>::addColor(BSTR name/*[in]*/, BSTR red/*[in]*/, BSTR green/*[in]*/, BSTR blue/*[in]*/) { _TDispID _dispid(*this, OLETEXT("addColor"), DISPID(1)); TAutoArgs<4>_args; _args[1] = name /*[VT_BSTR:0]*/; _args[2] = red /*[VT_BSTR:0]*/; _args[3] = green /*[VT_BSTR:0]*/; _args[4] = blue /*[VT_BSTR:0]*/; return OleFunction(_dispid, _args); } template <class T>HRESULT __fastcall IrtfWriterDispT<T>::writeRtf() { _TDispID _dispid(*this, OLETEXT("writeRtf"), DISPID(2)); return OleFunction(_dispid); } template <class T>HRESULT __fastcall IrtfWriterDispT<T>::writeColorTable() { _TDispID _dispid(*this, OLETEXT("writeColorTable"), DISPID(3)); return OleFunction(_dispid); } template <class T>HRESULT __fastcall IrtfWriterDispT<T>::addFont(BSTR name/*[in]*/, BSTR fontfamily/*[in]*/, BSTR charset/*[in]*/, BSTR fprq/*[in]*/, BSTR fonttype/*[in]*/) { _TDispID _dispid(*this, OLETEXT("addFont"), DISPID(4)); TAutoArgs<5>_args; _args[1] = name /*[VT_BSTR:0]*/; _args[2] = fontfamily /*[VT_BSTR:0]*/; _args[3] = charset /*[VT_BSTR:0]*/; _args[4] = fprq /*[VT_BSTR:0]*/; _args[5] = fonttype /*[VT_BSTR:0]*/; return OleFunction(_dispid, _args); } template <class T>HRESULT __fastcall IrtfWriterDispT<T>::writeFontTable() { _TDispID _dispid(*this, OLETEXT("writeFontTable"), DISPID(5)); return OleFunction(_dispid); } template <class T>HRESULT __fastcall IrtfWriterDispT<T>::writeUserProperties() { _TDispID _dispid(*this, OLETEXT("writeUserProperties"), DISPID(6)); return OleFunction(_dispid); } template <class T>HRESULT __fastcall IrtfWriterDispT<T>::addProperty(BSTR propertyname/*[in]*/, BSTR propertytype/*[in]*/, BSTR propertystaticvalue/*[in]*/) { _TDispID _dispid(*this, OLETEXT("addProperty"), DISPID(7)); TAutoArgs<3>_args; _args[1] = propertyname /*[VT_BSTR:0]*/; _args[2] = propertytype /*[VT_BSTR:0]*/; _args[3] = propertystaticvalue /*[VT_BSTR:0]*/; return OleFunction(_dispid, _args); } // *********************************************************************// // The following typedefs expose classes (named CoCoClassName) that // provide static Create() and CreateRemote(LPWSTR machineName) methods // for creating an instance of an exposed object. These functions can // be used by client wishing to automate CoClasses exposed by this // typelibrary. // *********************************************************************// // *********************************************************************// // COCLASS DEFAULT INTERFACE CREATOR // CoClass : rtfWriter // Interface: TCOMIrtfWriter // *********************************************************************// typedef TCoClassCreatorT<TCOMIrtfWriter, IrtfWriter, &CLSID_rtfWriter, &IID_IrtfWriter>CortfWriter; #endif // __TLB_NO_INTERFACE_WRAPPERS }; // namespace Project1_tlb #if !defined(NO_IMPLICIT_NAMESPACE_USE) using namespace Project1_tlb; #endif #pragma option pop #endif // Project1_TLBH ################### |