: com-query-interface ( interface iid -- interface' )
{ void* }
- [ IUnknown::QueryInterface ole32-error ]
+ [ IUnknown::QueryInterface check-ole32-error ]
with-out-parameters ;
: com-add-ref ( interface -- interface )
: <ole32-error> ( code -- error )
dup n>win32-error-string \ ole32-error boa ;
-: ole32-error ( hresult -- )
+: check-ole32-error ( hresult -- )
dup succeeded? [ drop ] [ <ole32-error> throw ] if ;
: ole-initialize ( -- )
- f OleInitialize ole32-error ;
+ f OleInitialize check-ole32-error ;
: guid= ( a b -- ? )
[ 16 memory>byte-array ] bi@ = ;
swap ! icp
FALSE ! fTrailing
] if
- { int } [ ScriptStringCPtoX ole32-error ] with-out-parameters ;
+ { int } [ ScriptStringCPtoX check-ole32-error ] with-out-parameters ;
: x>line-offset ( x script-string -- n trailing )
ssa>> ! ssa
swap ! iX
- { int int } [ ScriptStringXtoCP ole32-error ] with-out-parameters ;
+ { int int } [ ScriptStringXtoCP check-ole32-error ] with-out-parameters ;
<PRIVATE
f ! pbInClass
f void* <ref> ! pssa
[ ScriptStringAnalyse ] keep
- [ ole32-error ] [ |ScriptStringFree void* deref ] bi* ;
+ [ check-ole32-error ] [ |ScriptStringFree void* deref ] bi* ;
: set-dc-colors ( dc font -- )
[ background>> color>RGB SetBkColor drop ]
! iMinSel
! iMaxSel
FALSE ! fDisabled
- ScriptStringOut ole32-error ;
+ ScriptStringOut check-ole32-error ;
: draw-script-string ( dc script-string -- )
[ font>> set-dc-colors ] keep (draw-script-string) ;
PRIVATE>
M: script-string dispose*
- ssa>> void* <ref> ScriptStringFree ole32-error ;
+ ssa>> void* <ref> ScriptStringFree check-ole32-error ;
SYMBOL: cached-script-strings