summaryrefslogtreecommitdiff
path: root/extensions/test
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2000-10-16 11:48:07 +0000
committerJoachim Lingner <jl@openoffice.org>2000-10-16 11:48:07 +0000
commitb44f728d491c733604c95db6ecae588094d6d9f0 (patch)
tree51d44022afb0e7fcc16674827f3423196a214d21 /extensions/test
parent411473ad8a409f07a85f7fde993eb1e4c57fdb82 (diff)
MfcControlCtl.cpp
Diffstat (limited to 'extensions/test')
-rw-r--r--extensions/test/ole/MfcControl/MfcControlCtl.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.cpp b/extensions/test/ole/MfcControl/MfcControlCtl.cpp
index 53690fc80ed1..52f6a0f4e8b5 100644
--- a/extensions/test/ole/MfcControl/MfcControlCtl.cpp
+++ b/extensions/test/ole/MfcControl/MfcControlCtl.cpp
@@ -40,11 +40,11 @@ BEGIN_DISPATCH_MAP(CMfcControlCtrl, COleControl)
DISP_FUNCTION(CMfcControlCtrl, "inDouble", inDouble, VT_R8, VTS_R8)
DISP_FUNCTION(CMfcControlCtrl, "inVariant", inVariant, VT_VARIANT, VTS_VARIANT)
DISP_FUNCTION(CMfcControlCtrl, "inObject", inObject, VT_DISPATCH, VTS_DISPATCH)
- DISP_FUNCTION(CMfcControlCtrl, "outShort", outShort, VT_EMPTY, VTS_I2)
- DISP_FUNCTION(CMfcControlCtrl, "outLong", outLong, VT_EMPTY, VTS_I4)
+ DISP_FUNCTION(CMfcControlCtrl, "outShort", outShort, VT_EMPTY, VTS_PI2)
+ DISP_FUNCTION(CMfcControlCtrl, "outLong", outLong, VT_EMPTY, VTS_PI4)
DISP_FUNCTION(CMfcControlCtrl, "outString", outString, VT_EMPTY, VTS_PBSTR)
- DISP_FUNCTION(CMfcControlCtrl, "outFloat", outFloat, VT_EMPTY, VTS_R4)
- DISP_FUNCTION(CMfcControlCtrl, "outDouble", outDouble, VT_EMPTY, VTS_R8)
+ DISP_FUNCTION(CMfcControlCtrl, "outFloat", outFloat, VT_EMPTY, VTS_PR4)
+ DISP_FUNCTION(CMfcControlCtrl, "outDouble", outDouble, VT_EMPTY, VTS_PR8)
DISP_FUNCTION(CMfcControlCtrl, "outVariant", outVariant, VT_EMPTY, VTS_PVARIANT)
DISP_FUNCTION(CMfcControlCtrl, "outObject", outObject, VT_EMPTY, VTS_PDISPATCH)
//}}AFX_DISPATCH_MAP
@@ -304,15 +304,20 @@ void CMfcControlCtrl::outDouble(double* val)
void CMfcControlCtrl::outVariant(VARIANT FAR* val)
{
- val= (VARIANT*)CoTaskMemAlloc( sizeof( VARIANT));
+ VariantInit( val);
+ val->vt= VT_BSTR;
+ val->bstrVal= SysAllocString( L"a string in a VARIANT");
}
void CMfcControlCtrl::outObject(LPDISPATCH FAR* val)
{
//{BFE10EBE-8584-11D4-005004526AB4}
- CLSID clsTestControl={0xBFE10EBE,0x8584,0x11D4, { 0x00,0x50,0x04,0x52,0x6A,0xB4}};
+ HRESULT hr= S_OK;
+ CLSID clsTestControl;
+ hr= CLSIDFromProgID( L"AxTestComponents.Basic", &clsTestControl);
+
IDispatch* pDisp= NULL;
- HRESULT hr= CoCreateInstance( clsTestControl, NULL, CLSCTX_ALL, __uuidof(IDispatch), (void**)&pDisp);
+ hr= CoCreateInstance( clsTestControl, NULL, CLSCTX_ALL, __uuidof(IDispatch), (void**)&pDisp);
if( SUCCEEDED( hr) && val)
{
@@ -336,3 +341,4 @@ void CMfcControlCtrl::outObject(LPDISPATCH FAR* val)
}
}
+// VT_I1