sourceforge 1386454 now supporting return values in event handlers. also added visio example of this

This commit is contained in:
clay_shooter
2006-02-12 00:53:11 +00:00
parent da8e6f9985
commit 3a30d03be1
12 changed files with 597 additions and 31 deletions

View File

@@ -37,6 +37,7 @@
class EventProxy : public IDispatch
{
private:
int connected;
LONG m_cRef; // a reference counter
CComPtr<IConnectionPoint> pCP; // the connection point
DWORD dwEventCookie; // connection point cookie
@@ -47,6 +48,9 @@ private:
CComBSTR *MethName; // Array of method names
DISPID *MethID; // Array of method ids, used to match invokations to method names
JavaVM *jvm; // The java vm we are running
void convertJavaVariant(VARIANT *java, VARIANT *com);
void Connect(JNIEnv *env);
void Disconnect();
public:
// constuct with a global JNI ref to a sink object
// to which we will delegate event callbacks
@@ -62,7 +66,8 @@ public:
// IUnknown methods
STDMETHODIMP_(ULONG) AddRef(void)
{
return InterlockedIncrement(&m_cRef);
LONG res = InterlockedIncrement(&m_cRef);
return res;
}
STDMETHODIMP_(ULONG) Release(void)