New:interface IDShape { ... properties { VT_FLOAT Width dispid 999 get proc HrOamShapeGetWidth } }
...
STDMETHODIMPC HrOamShapeGetWidth(IDShape *pidsp, float *pflWidth) { int fIDispatch = vrf.fIDispatch; int fObjModelCall = vfObjModelCall;
Generic *pgen = PgenFromPunk(pidsp); OASO *poaso = (OASO *)LpvFromGenericInstanceData(
HRESULT hr = poaso->HrGetWidth(pflWidth);
vrf.fIDispatch = fIDispatch; vfObjModelCall = fObjModelCall;
return HrRaiseExcepHr(pidsp, hr); }
And both need:interface IDShape class_handler OASO { ... properties { VT_FLOAT Width dispid 999 read_only } }
(Some code facts and names have been changed, but it's a representative sample.)HRESULT OASO::HrGetWidth(float *pflWidth) { *pflWidth = PtFromEmu(PspInternal()->flWidth()); return S_OK; }