Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/103691

From BetaArchive Wiki

PRB: Problems with Windows Sound System (QRECORD.EXE) & FoxPro

ID: Q103691

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS

Executing an @ ... SAY VERB "Play" command on a general field that contains a sound object causes FoxPro to lose the focus and appear to hang (lock up) on a system that has the Microsoft Windows Sound System installed. Specifically, FoxPro loses the focus, the hourglass appears, the sound plays, and then the system appears to hang.

CAUSE

When the Windows Sound System is installed, it replaces the default Windows Sound Recorder application and OLE server (SOUNDREC.EXE) with its own specialized version (QRECORD.EXE) and updates the registration database accordingly.

Because FoxPro's default mode for OLE transactions is synchronous, the OLE server must notify FoxPro that its task (playing the sound) is complete before FoxPro will continue processing. Normally, this notification is made by the action of the server closing the OLE object. Sound Recorder properly closes the object, but Quick Recorder does not. As a result, FoxPro appears to lock up because it is waiting for the server to release the object. If the Quick Recorder task is terminated (by pressing ALT+TAB and choosing Close from the Control menu or by choosing End Task in the Task List), FoxPro will continue processing normally.

RESOLUTION

There are two ways to work around this problem:

  • The simplest workaround is to instruct FoxPro to conduct its OLE transactions asynchronously. To do this, append the NOWAIT keyword to the @ ... SAY VERB "Play" command. If the OLE transaction is asynchronous, FoxPro will continue processing immediately after posting the "Play" transaction and will not wait for that transaction to complete. This solution may work in some simple cases, but it is not a complete workaround. -or-
  • The more complex workaround involves replacing QRECORD.EXE with SOUNDREC.EXE. The biggest difficulty involved here is that the registration database must be manually modified to execute the OLE server reassignment. A step-by-step description of the replacement procedure follows:

    1. In Windows Program Manager, choose Run from the File menu.

    2. In the Command Line box, type:

             REGEDIT.EXE -V
    
       3. In the Registration Editor, choose Find Key from the Search
          menu.
    
       4. In the Find What box, type "sound" (without the quotation
          marks), and choose the Find Next button.
    
       5. Under the Sound key, there should be a subsection labeled
          "StdFileEditing"; under that, there should be an entry labeled
          "server".
    
       6. Click the "server" line.
    
       7. In the Value box, change the text to SOUNDREC.EXE.
    
       8. From the File menu, choose Exit.
    
       9. When you asked if you want to save changes, choose Yes.
    

Additional reference words: FoxWin wss 2.50 2.50a Windows Sound System QRECORD quick Recorder OLE SAY KBCategory: kbsound kbole kbprg kbprb KBSubcategory: FxinteropOle


Last Reviewed: June 26, 1995
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.