OCX / DLL will not run in production

G. Briggs

New Member
Hello,

I have test scenario that I am running which involves a DLL and an OCX. Both objects are suppose to play .wav files. They were developed using VB and reference the same class module. I was really doing this just to gain practice with using OCX's and DLL's in Progress. When I run the Application which is a .w built in Appbuilder from the development environment, the program works fine and the wav files play using both objects. However, when I try to run it standalone, it just errors with the bell sound and provides no message. Any ideas?

Thanks in advance.
 

jongpau

Member
Hi,

Are you sure the application can find the wav file in the production environment (perhaps it's a ProPath issue)?

When I try to play an non existent wav file using "PlaySoundA" (in winmm.dll) I get a beep and no error messages.

If this is not the case, a code sample might be helpful :)

HTH.
 

G. Briggs

New Member
I just checked the Propath and it seems to be fine. I am thinking it may have something to do with destroying the COM-handle object. When I run the procedure now in development on my machine it runs fine the first time, but if I click the button a second time it produces the Bell sound. Here is a code snippet.
Thanks again for the help.
-------------------------------------------------
Using Appbuilder,

In the Definitions,

DEF VAR chSpeechDLL AS COM-HANDLE.
DEF VAR chSpeechOCX AS COM-HANDLE.
DEF VAR WavPath AS CHAR NO-UNDO.
DEF VAR WavName AS CHAR NO-UNDO.


-----------------------------------------------------------------
In the main block,

ASSIGN WavPath = "W:\www\system\filecontent\".
ASSIGN WavName = "Record_Transfer".

(no file extension is needed on the wav file)

------------------------------------------------------------------

In the trigger block for OCX Speech Test,


DO:

ASSIGN chSpeechOCX = chCtrlFrame:interfaceSPH.

chspeechOCX:Speak(INPUT-OUTPUT WavPath BY-POINTER, INPUT-OUTPUT WavName BY-POINTER).

RELEASE OBJECT chSpeechOCX.

END.

--------------------------------------------------------------------------
 
Top