[BLACKBOX] CP interface to C/C++ code

From: [at]} <Darek>
Date: Mon, 31 Jan 2011 22:06:42 +0100

----boundary-LibPST-iamunique-1452500437_-_-
Content-type: text/plain

Dear All,
  I am trying to implement an interface from the BBox to the
Excalibur digital receiver (http://www.winradio.co.uk/home/g31ddc.htm)
using the provided DLL library. I came across some strange (at least
for me) C/C++ constructs, and I do not know how to map them to the
CP:


DECLARE_INTERFACE(IG31DDCDeviceEnumerator)
{
    STDMETHOD_(LONG,AddRef)(THIS) PURE;
    STDMETHOD_(LONG,Release)(THIS) PURE;

    STDMETHOD_(BOOL,Enumerate)(THIS) PURE;
    STDMETHOD_(UINT32,GetCount)(THIS) PURE;
    STDMETHOD_(BOOL,GetDeviceInfo)(THIS_ UINT32
DeviceIndex,G31DDC_DEVICE_INFO *DeviceInfo,UINT32 BufferLength) PURE;
};

also how I should map the following construct to CP?

 BOOL __stdcall CreateInstance(UINT32 ClassId,void **Intf);
 (my fist solution was: fcn_map : PROCEDURE (ClassId :INTEGER; Inft
: ANYPTR):BOOLEAN but I not sure if it makes any sense).

The DLL has only one entry that allows creation of two objects, and
the rest of functionality is (somehow) embedded within the object's
code.
 How should I approach this kind of interfaces?

 Any tips & tricks are very welcome.

 Regards,
   Darek


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1452500437_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibH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1hcCB0aGUgZm9sbG93aW5nIGNvbnN0cnVjdCB0byBD
UD9ccGFyDQpccGFyDQogQk9PTCBfX3N0ZGNhbGwgQ3JlYXRlSW5zdGFuY2UoVUlOVDMyIENsYXNz
SWQsdm9pZCAqKkludGYpO1xwYXINCiAobXkgIGZpc3Qgc29sdXRpb24gd2FzOiAgZmNuX21hcCA6
IFBST0NFRFVSRSAoQ2xhc3NJZCA6SU5URUdFUjsgSW5mdFxwYXINCjogQU5ZUFRSKTpCT09MRUFO
ICBidXQgSSBub3Qgc3VyZSBpZiBpdCBtYWtlcyBhbnkgc2Vuc2UpLlxwYXINClxwYXINClRoZSBE
TEwgaGFzIG9ubHkgb25lIGVudHJ5IHRoYXQgYWxsb3dzIGNyZWF0aW9uIG9mIHR3byBvYmplY3Rz
LCBhbmRccGFyDQp0aGUgcmVzdCBvZiBmdW5jdGlvbmFsaXR5IGlzIChzb21laG93KSBlbWJlZGRl
ZCB3aXRoaW4gdGhlIG9iamVjdCdzXHBhcg0KY29kZS5ccGFyDQogSG93IHNob3VsZCBJIGFwcHJv
YWNoIHRoaXMga2luZCBvZiBpbnRlcmZhY2VzP1xwYXINClxwYXINCiBBbnkgdGlwcyAmIHRyaWNr
cyAgYXJlICB2ZXJ5IHdlbGNvbWUuXHBhcg0KXHBhcg0KIFJlZ2FyZHMsXHBhcg0KICAgRGFyZWtc
cGFyDQpccGFyDQpccGFyDQotLS0tXHBhcg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdl
IHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLkNI
XHBhcg0KfQ==
----boundary-LibPST-iamunique-1452500437_-_---
Received on Mon Jan 31 2011 - 22:06:42 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:18 UTC