Autor Beitrag
incal99
Hält's aus hier
Beiträge: 9

xp
delphi, GCC
BeitragVerfasst: Mo 17.10.05 11:06 
Für einen SPS-Steuerung (Industrie) hat der Produzent einen Comm Server mit ActiveX Schnittstelle. Sample Code ist aber in BCBuilder. I glaube Ich benoetige .ocx datei um einen ActiveX component zu installieren. Der Produzent kennt aber Delphi leider nicht -:)). Wie kann ich BCB ActiveX definitionen unter Delphi convertieren damit ich die Aufrufe die COMM Server zu Verfuegung stellt auch verwenden kann. Ich habe von Produzent folgende Datein bekommen und Er sagt:

Zitat:
In BCB, you just use "#include xxx.xxx" syntax then you can use ActiveX control item.

Faconsrv_TLB.cpp
Faconsrv_TLB.h
Faconsrv_TLB.obj

Mfg.
Incal99



inhalt von FaconSrv_TLB.h

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
// ************************************************************************ //
// 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.134.1.41  $
// File generated on 2002/1/28 ¤U¤È 05:26:38 from Type Library described below.

// ************************************************************************ //
// Type Lib: D:\Project\FaconSvr_106\ORG\FaconSvr.tlb (1)
// IID\LCID: {39EC6DB2-DE51-4843-8629-5BA95C57C192}\0
// Helpfile: 
// DepndLst: 
//   (1) v2.0 stdole, (D:\WINNT\System32\stdole2.tlb)
//   (2) v4.0 StdVCL, (D:\WINNT\System32\stdvcl40.dll)
// ************************************************************************ //
#ifndef   __FaconSvr_TLB_h__
#define   __FaconSvr_TLB_h__

#pragma option push -b -w-inl

#include <utilcls.h>
#if !defined(__UTILCLS_H_VERSION) || (__UTILCLS_H_VERSION < 0x0500)
//
// 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 Faconsvr_tlb
{

// *********************************************************************//
// HelpString: FaconSvr 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 __declspec (package) const GUID LIBID_FaconSvr;
extern __declspec (package) const GUID IID_IFaconServer;
extern __declspec (package) const GUID DIID_IFaconServerEvents;
extern __declspec (package) const GUID CLSID_FaconServer;

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
interface DECLSPEC_UUID("{E33C7B53-90BB-41E9-88E5-3DD8D485E95B}") IFaconServer;
typedef TComInterface<IFaconServer, &IID_IFaconServer> IFaconServerPtr;
interface DECLSPEC_UUID("{6FC145E9-A43F-4A71-89B5-9D7284540D5B}") IFaconServerEvents;
typedef TComInterface<IFaconServerEvents, &DIID_IFaconServerEvents> IFaconServerEventsPtr;

// *********************************************************************//
// 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 IFaconServer FaconServer;
typedef IFaconServerPtr FaconServerPtr;

#define LIBID_OF_FaconServer (&LIBID_FaconSvr)
// *********************************************************************//
// Interface: IFaconServer
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {E33C7B53-90BB-41E9-88E5-3DD8D485E95B}
// *********************************************************************//
interface IFaconServer  : public IDispatch
{
public:
  virtual HRESULT STDMETHODCALLTYPE OpenProject(BSTR filename/*[in]*/) = 0; // [1]
  virtual HRESULT STDMETHODCALLTYPE SaveProject(BSTR filename/*[in]*/) = 0; // [2]
  virtual HRESULT STDMETHODCALLTYPE Connect(void) = 0; // [3]
  virtual HRESULT STDMETHODCALLTYPE Disconnect(void) = 0; // [4]
  virtual HRESULT STDMETHODCALLTYPE AddGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                                             signed_char priority/*[in]*/, 
                                             signed_char enabled/*[in]*/) = 0; // [5]
  virtual HRESULT STDMETHODCALLTYPE EditGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                                              signed_char priority/*[in]*/, 
                                              signed_char enabled/*[in]*/) = 0; // [6]
  virtual HRESULT STDMETHODCALLTYPE DeleteGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/) = 0; // [7]
  virtual HRESULT STDMETHODCALLTYPE AddItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/) = 0; // [8]
  virtual HRESULT STDMETHODCALLTYPE DeleteItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/) = 0; // [9]
  virtual HRESULT STDMETHODCALLTYPE GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, 
                                            TVariant* value/*[out,retval]*/) = 0; // [10]
  virtual HRESULT STDMETHODCALLTYPE SetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, 
                                            BSTR value/*[in]*/) = 0; // [11]

#if !defined(__TLB_NO_INTERFACE_WRAPPERS)

  TVariant __fastcall GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/)
  {
    TVariant value;
    OLECHECK(this->GetItem(path, itemname, (TVariant*)&value));
    return value;
  }



#endif //   __TLB_NO_INTERFACE_WRAPPERS

};

// *********************************************************************//
// Interface: IFaconServerEvents
// Flags:     (4096) Dispatchable
// GUID:      {6FC145E9-A43F-4A71-89B5-9D7284540D5B}
// *********************************************************************//
interface IFaconServerEvents : public TDispWrapper<IDispatch>
{

};
#if !defined(__TLB_NO_INTERFACE_WRAPPERS)
// *********************************************************************//
// SmartIntf: TCOMIFaconServer
// Interface: IFaconServer
// *********************************************************************//
template <class T /* IFaconServer */ >
class TCOMIFaconServerT : public TComInterface<IFaconServer>, public TComInterfaceBase<IUnknown>
{
public:
  TCOMIFaconServerT() {}
  TCOMIFaconServerT(IFaconServer *intf, bool addRef = false) : TComInterface<IFaconServer>(intf, addRef) {}
  TCOMIFaconServerT(const TCOMIFaconServerT& src) : TComInterface<IFaconServer>(src) {}
  TCOMIFaconServerT& operator=(const TCOMIFaconServerT& src) { Bind(src, true); return *this;}

  HRESULT         __fastcall OpenProject(BSTR filename/*[in]*/);
  HRESULT         __fastcall SaveProject(BSTR filename/*[in]*/);
  HRESULT         __fastcall Connect(void);
  HRESULT         __fastcall Disconnect(void);
  HRESULT         __fastcall AddGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                                      signed_char priority/*[in]*/, signed_char enabled/*[in]*/);
  HRESULT         __fastcall EditGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                                       signed_char priority/*[in]*/, signed_char enabled/*[in]*/);
  HRESULT         __fastcall DeleteGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/);
  HRESULT         __fastcall AddItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/);
  HRESULT         __fastcall DeleteItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/);
  HRESULT         __fastcall GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, 
                                     TVariant* value/*[out,retval]*/);
  TVariant        __fastcall GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/);
  HRESULT         __fastcall SetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, BSTR value/*[in]*/);

};
typedef TCOMIFaconServerT<IFaconServer> TCOMIFaconServer;

// *********************************************************************//
// DispIntf:  IFaconServer
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {E33C7B53-90BB-41E9-88E5-3DD8D485E95B}
// *********************************************************************//
template<class T>
class IFaconServerDispT : public TAutoDriver<IFaconServer>
{
public:
  IFaconServerDispT(){}

  IFaconServerDispT(IFaconServer *pintf)
  {
    TAutoDriver<IFaconServer>::Bind(pintf, false);
  }

  IFaconServerDispT(IFaconServerPtr pintf)
  {
    TAutoDriver<IFaconServer>::Bind(pintf, true);
  }

  IFaconServerDispT& operator=(IFaconServer *pintf)
  {
    TAutoDriver<IFaconServer>::Bind(pintf, false);
    return *this;
  }

  IFaconServerDispT& operator=(IFaconServerPtr pintf)
  {
    TAutoDriver<IFaconServer>::Bind(pintf, true);
    return *this;
  }

  HRESULT BindDefault()
  {
    return OLECHECK(Bind(CLSID_FaconServer));
  }

  HRESULT BindRunning()
  {
    return BindToActive(CLSID_FaconServer);
  }

  HRESULT         __fastcall OpenProject(BSTR filename/*[in]*/);
  HRESULT         __fastcall SaveProject(BSTR filename/*[in]*/);
  HRESULT         __fastcall Connect();
  HRESULT         __fastcall Disconnect();
  HRESULT         __fastcall AddGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                                      signed_char priority/*[in]*/, signed_char enabled/*[in]*/);
  HRESULT         __fastcall EditGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                                       signed_char priority/*[in]*/, signed_char enabled/*[in]*/);
  HRESULT         __fastcall DeleteGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/);
  HRESULT         __fastcall AddItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/);
  HRESULT         __fastcall DeleteItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/);
  HRESULT         __fastcall GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, 
                                     TVariant* value/*[out,retval]*/);
  TVariant        __fastcall GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/);
  HRESULT         __fastcall SetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, BSTR value/*[in]*/);

};
typedef IFaconServerDispT<IFaconServer> IFaconServerDisp;

// *********************************************************************//
// DispIntf:  IFaconServerEvents
// Flags:     (4096) Dispatchable
// GUID:      {6FC145E9-A43F-4A71-89B5-9D7284540D5B}
// *********************************************************************//
template <class T>
class IFaconServerEventsDispT : public TAutoDriver<IFaconServerEvents>
{
public:
  IFaconServerEventsDispT(){}

  void Attach(LPUNKNOWN punk)
  { m_Dispatch = static_cast<T*>(punk); }


};
typedef IFaconServerEventsDispT<IFaconServerEvents> IFaconServerEventsDisp;

// *********************************************************************//
// SmartIntf: TCOMIFaconServer
// Interface: IFaconServer
// *********************************************************************//
template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::OpenProject(BSTR filename/*[in]*/)
{
  return (*this)->OpenProject(filename);
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::SaveProject(BSTR filename/*[in]*/)
{
  return (*this)->SaveProject(filename);
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::Connect(void)
{
  return (*this)->Connect();
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::Disconnect(void)
{
  return (*this)->Disconnect();
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::AddGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                               signed_char priority/*[in]*/, signed_char enabled/*[in]*/)
{
  return (*this)->AddGroup(path, groupname, priority, enabled);
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::EditGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                                signed_char priority/*[in]*/, signed_char enabled/*[in]*/)
{
  return (*this)->EditGroup(path, groupname, priority, enabled);
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::DeleteGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/)
{
  return (*this)->DeleteGroup(path, groupname);
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::AddItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/)
{
  return (*this)->AddItem(path, itemname);
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::DeleteItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/)
{
  return (*this)->DeleteItem(path, itemname);
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, 
                              TVariant* value/*[out,retval]*/)
{
  return (*this)->GetItem(path, itemname, value);
}

template <class T> TVariant __fastcall
TCOMIFaconServerT<T>::GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/)
{
  TVariant value;
  OLECHECK(this->GetItem(path, itemname, (TVariant*)&value));
  return value;
}

template <class T> HRESULT __fastcall
TCOMIFaconServerT<T>::SetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, BSTR value/*[in]*/)
{
  return (*this)->SetItem(path, itemname, value);
}

// *********************************************************************//
// DispIntf:  IFaconServer
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {E33C7B53-90BB-41E9-88E5-3DD8D485E95B}
// *********************************************************************//
template <class T> HRESULT __fastcall
IFaconServerDispT<T>::OpenProject(BSTR filename/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("OpenProject"), DISPID(1));
  TAutoArgs<1> _args;
  _args[1] = filename /*[VT_BSTR:0]*/;
  return OleFunction(_dispid, _args);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::SaveProject(BSTR filename/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("SaveProject"), DISPID(2));
  TAutoArgs<1> _args;
  _args[1] = filename /*[VT_BSTR:0]*/;
  return OleFunction(_dispid, _args);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::Connect()
{
  _TDispID _dispid(*this, OLETEXT("Connect"), DISPID(3));
  return OleFunction(_dispid);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::Disconnect()
{
  _TDispID _dispid(*this, OLETEXT("Disconnect"), DISPID(4));
  return OleFunction(_dispid);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::AddGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                               signed_char priority/*[in]*/, signed_char enabled/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("AddGroup"), DISPID(5));
  TAutoArgs<4> _args;
  _args[1] = path /*[VT_BSTR:0]*/;
  _args[2] = groupname /*[VT_BSTR:0]*/;
  _args[3] = priority /*[VT_I1:0]*/;
  _args[4] = enabled /*[VT_I1:0]*/;
  return OleFunction(_dispid, _args);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::EditGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/, 
                                signed_char priority/*[in]*/, signed_char enabled/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("EditGroup"), DISPID(6));
  TAutoArgs<4> _args;
  _args[1] = path /*[VT_BSTR:0]*/;
  _args[2] = groupname /*[VT_BSTR:0]*/;
  _args[3] = priority /*[VT_I1:0]*/;
  _args[4] = enabled /*[VT_I1:0]*/;
  return OleFunction(_dispid, _args);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::DeleteGroup(BSTR path/*[in]*/, BSTR groupname/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("DeleteGroup"), DISPID(7));
  TAutoArgs<2> _args;
  _args[1] = path /*[VT_BSTR:0]*/;
  _args[2] = groupname /*[VT_BSTR:0]*/;
  return OleFunction(_dispid, _args);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::AddItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("AddItem"), DISPID(8));
  TAutoArgs<2> _args;
  _args[1] = path /*[VT_BSTR:0]*/;
  _args[2] = itemname /*[VT_BSTR:0]*/;
  return OleFunction(_dispid, _args);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::DeleteItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("DeleteItem"), DISPID(9));
  TAutoArgs<2> _args;
  _args[1] = path /*[VT_BSTR:0]*/;
  _args[2] = itemname /*[VT_BSTR:0]*/;
  return OleFunction(_dispid, _args);
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, 
                              TVariant* value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("GetItem"), DISPID(10));
  TAutoArgs<2> _args;
  _args[1] = path /*[VT_BSTR:0]*/;
  _args[2] = itemname /*[VT_BSTR:0]*/;
  return OutRetValSetterPtr(value /*[VT_VARIANT:1]*/, _args, OleFunction(_dispid, _args));
}

template <class T> TVariant __fastcall
IFaconServerDispT<T>::GetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/)
{
  TVariant value;
  this->GetItem(path, itemname, (TVariant*)&value);
  return value;
}

template <class T> HRESULT __fastcall
IFaconServerDispT<T>::SetItem(BSTR path/*[in]*/, BSTR itemname/*[in]*/, BSTR value/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("SetItem"), DISPID(11));
  TAutoArgs<3> _args;
  _args[1] = path /*[VT_BSTR:0]*/;
  _args[2] = itemname /*[VT_BSTR:0]*/;
  _args[3] = value /*[VT_BSTR:0]*/;
  return OleFunction(_dispid, _args);
}

// *********************************************************************//
// DispIntf:  IFaconServerEvents
// Flags:     (4096) Dispatchable
// GUID:      {6FC145E9-A43F-4A71-89B5-9D7284540D5B}
// *********************************************************************//
// *********************************************************************//
// 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  : FaconServer
// Interface: TCOMIFaconServer
// *********************************************************************//
typedef TCoClassCreatorT<TCOMIFaconServer, IFaconServer, &CLSID_FaconServer, &IID_IFaconServer> CoFaconServer;
#endif  //   __TLB_NO_INTERFACE_WRAPPERS


#if !defined(__TLB_NO_EVENT_WRAPPERS) && defined(USING_ATLVCL)
// *********************************************************************//
// CONNECTIONPOINT/EVENT PROXY
// CoClass         : FaconServer
// Event Interface : IFaconServerEvents
// *********************************************************************//
template <class T>
class TEvents_FaconServer : public IConnectionPointImpl<T,
                                                 &DIID_IFaconServerEvents,
                                                 CComUnkArray<CONNECTIONPOINT_ARRAY_SIZE> >
{
public:
protected:
  IFaconServerEventsDisp m_EventIntfObj;
};

#endif  //   __TLB_NO_EVENT_WRAPPERS

};     // namespace Faconsvr_tlb

#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using  namespace Faconsvr_tlb;
#endif

#pragma option pop

#endif // __FaconSvr_TLB_h__


Moderiert von user profile iconraziel: Code-Tags hinzugefügt.
Bernhard Geyer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 721
Erhaltene Danke: 3



BeitragVerfasst: Mi 19.10.05 07:37 
In Delphi den Menupunkt "Projekt/Typbibliothek importieren" auswählen und dann die TLB-Datie "hinzufügen" und darauf hoffen das der Import von Delphi keinen fehlerm macht.
incal99 Threadstarter
Hält's aus hier
Beiträge: 9

xp
delphi, GCC
BeitragVerfasst: Mi 19.10.05 13:15 
Danke fuer die Antwort. Ich habe Unter Projekt/TypenBib. versucht die .h datei als tlb zu importieren. Delphi hat nicht eimal die Datei erkannt. Ganz lustig dass Borland angekuendigt hat dass CBuilder wird mit Delphi Studio zusammengesetzt und es wird nur Delphi Dev Studio geben.

Vielleicht dann geht es reibungls.

Mfg.
incal99
Bernhard Geyer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 721
Erhaltene Danke: 3



BeitragVerfasst: Mi 19.10.05 19:28 
user profile iconincal99 hat folgendes geschrieben:
Danke fuer die Antwort. Ich habe Unter Projekt/TypenBib. versucht die .h datei als tlb zu importieren.

Die .h-Datei ist ja auch keine TLB-Datei (Faconsrv.TLB ?). Du mußt entweder direkt die TLB-Datei importieren oder die DLL/Exe (Faconsrv.exe/.dll) in der diese Schnittstelle implementiert ist.

user profile iconincal99 hat folgendes geschrieben:
Ganz lustig dass Borland angekuendigt hat dass CBuilder wird mit Delphi Studio zusammengesetzt und es wird nur Delphi Dev Studio geben.

Ich hätte ja viel früher schon erwartet das C++-Builder und Delphi verschmelzen. Mit Kylix 3 hat man das ja schon geschaft. Aber erwarte dir nicht viel neues im Bereich TLB's/COM gegenüber Delphi 7/2005