Shoutbox

Trying to use activex in c++ - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Trying to use activex in c++ (/showthread.php?tid=67342)

Trying to use activex in c++ by Deco on 10-15-2006 at 01:56 PM

Hi guys

I'm trying to write something that uses Pai's Xniff here .

I have added a wrapper class but I don't know how to get the onData event.. Here's a copy of the wrapper generated class for the Events:

--- code ---


// CXniffEvents.h  : Declaration of ActiveX Control wrapper class(es) created by Microsoft Visual C++

#pragma once

/////////////////////////////////////////////////////////////////////////////
// CXniffEvents

class CXniffEvents : public COleDispatchDriver
{
public:
    CXniffEvents() {}        // Calls COleDispatchDriver default constructor
    CXniffEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
    CXniffEvents(const CXniffEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}

// Attributes
public:

// Operations
public:

    void OnData(LPCTSTR srcip, LPCTSTR srcport, LPCTSTR destip, LPCTSTR destport, LPCTSTR data, long datalen)
    {
        static BYTE parms[] = VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 ;
        InvokeHelper(0xc9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, srcip, srcport, destip, destport, data, datalen);
    }


};
----- end of code e-----

Anyone?

Thanks!