1. amit kurhe
  2. PowerBuilder
  3. Wednesday, 11 March 2020 14:48 PM UTC

Giving error on custom control ole object on line ole_1.Object.Open(sFileName) while opening a avi file quick help is really appreciated.  the error is "Error calling external object function open in line 10 in open event of object win_wait_prompt". Powerbuilder application execution error (R0035).

environment env 

string sFileName, sDir

sFileName = "C:\SGA\RES\filecopy.avi"
IF NOT FileExists(sFileName) THEN
// sFileName = sDir + "\filecopy.avi"
MessageBox("Missing", "Missing ~"filecopy.avi~"", Exclamation!)
END IF
IF FileExists(sFileName) THEN
ole_1.Object.Open(sFileName)
ole_1.Object.Play(-1,0,-1)
MessageBox("Available", "Available ~"filecopy.avi~"", Exclamation!)
ELSE
MessageBox(Title, "Missing ~"filecopy.avi~"", Exclamation!)
END IF

amit kurhe Accepted Answer Pending Moderation
  1. Monday, 30 March 2020 16:15 PM UTC
  2. PowerBuilder
  3. # 1

thanks all, issue resolved after registering the MSCOMCT2.ocx which was missing the latest windows version & prerequiste for the animation control.

Comment
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 11 March 2020 15:02 PM UTC
  2. PowerBuilder
  3. # 2

Hi Amit,

Something is going wrong on Open. Maybe there is no such function or the function may not work for some reasons.

You may try to use TRY-CATCH to catch the OLERuntimeError exception. Maybe there are more information about the error in the "Description" property of the exception.

HTH,

René

Comment
  1. David Peace (Powersoft)
  2. Wednesday, 11 March 2020 15:13 PM UTC
Hi



Do you need to initialize the ole object first in order to access the fucntions?



As Amit says use OLERuntimeError exception to get more information.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.