hi,
I need to catch the return of the following command:
oActiveX:Do("TerSearchReplace2","rich","",SRCH_SEARCH,N,0)
According to documentation of the TerSearchReplace2 component would have to return a numerical value.
function OleGetProperty( hObj, cPropName )
local o := TOleAuto()
local uRet
o:hObj = hObj
uRet = __ObjSendMsg( o, cPropName )
o:hObj = nil
return uRet
function OleSetProperty( hObj, cPropName, uValue )
local o := TOleAuto()
local uRet
o:hObj = hObj
uRet = __ObjSendMsg( o, "_" + cPropName, uValue )
o:hObj = nil
return uRet
function OleInvoke( hObj, cMethName, ... )
local o := TOleAuto()
local uRet
o:hObj = hObj
uRet = o:Invoke( cMethName, ... )
o:hObj = nil
return uRet
Application
===========
Path and name: F:\FWH\SAMPLES\pdf.exe (32 bits)
Size: 1,306,624 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 07/31/07, 09:38:02
Error description: Error /16389 E_FAIL: TERCOMMAND
Args:
[ 1] = N 680
[ 2] = U
[ 3] = U
[ 4] = U
[ 5] = U
Stack Calls
===========
Called from: win32ole.prg => TOLEAUTO:TERCOMMAND(0)
Called from: => HB_EXECFROMARRAY(0)
Called from: win32ole.prg => TOLEAUTO:INVOKE(397)
Called from: => ACTXINVOKE(67)
Called from: ACTIVEX.PRG => TACTIVEX:DO(0)
Called from: pdf.prg => MAIN(16)
function OleInvoke( hObj, cMethName, uPar1, uPar2, uPar3, uPar4, uPar5 )
local o := TOleAuto()
local uRet
o:hObj = hObj
IF uPar2 # NIL
uRet = o:Invoke( cMethName, uPar1, uPar2, uPar3, uPar4, uPar5 )
ELSE
uRet = o:Invoke( cMethName, uPar1 )
ENDIF
o:hObj = nil
return uRet
STATIC FUNCTION EventInfo(event, aParams,oActiveX,oWnd,nKey,nx,ny)
LOCAL nSt,text:=Space(100),font:="",n
IF Upper(event) $ "KEYPRESS"
? oActiveX:Do("TerSearchReplace2","rich","",SRCH_SEARCH,N,0)
ENDIF
RETURN NIL
STATIC FUNCTION EventInfo(event, aParams,oActiveX,oWnd,nKey,nx,ny)
LOCAL nSt,text:=Space(100),font:="",n
IF Upper(event) $ "KEYPRESS"
? OleInvoke(oActivex:hWnd,"TerSearchReplace2","rich","",SRCH_SEARCH,N,0)
ENDIF
RETURN NIL
oActiveX:bOnEvent := { | event, nKey | EventInfo( event, nKey ) }
STATIC FUNCTION EventInfo(event, nKey)
IF Upper(event) $ "KEYPRESS,KEYDOWN"
IF nKey = 80
.....
ENDIF
ENDIF
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 46 guests