Help and Support

PRB: VB/VB Apps Won't Run if Windows NT OLE Service Stopped

Article ID:129800
Last Review:December 9, 2003
Revision:2.0
This article was previously published under Q129800
On This Page

SYMPTOMS

If the OLE service under Windows NT is stopped, when you attempt to start Visual Basic or an application written with Visual Basic, you'll see this error:
"Unexpected error; quitting"
Or, if the OLE service is stopped while Visual Basic or an application written with Visual Basic is running and you attempt to use an OLE control in Visual Basic, you'll see this error:
"Unable to create embedded object"

Back to the top

CAUSE

Visual Basic uses OLE extensively for controls, data access, and even internal communication. The OLE Service is a necessary component for Visual Basic, but it is not absolutely necessary for this service to be running under Windows NT. It may be stopped to increase the overall performance of other tasks. If this is done, Visual Basic and Visual Basic applications will not run.

Back to the top

STATUS

This behavior is by design.

Back to the top

MORE INFORMATION

Steps to Reproduce Behavior

Back to the top

Scenario One

1.With Windows NT running, go to an MS-DOS command prompt. (Double-click the MS-DOS Command Prompt icon in your Main group in Program Manager.)
2.Type the following at the command prompt:
Net Stop OLE
3.Switch back to Windows, and start Visual Basic. You'll see this error:
Unexpected error; quitting
4.Switch back to MS-DOS, and type the following to restore everything to normal:
Net Start OLE

Back to the top

Scenario Two

1.Start Visual Basic.
2.With Windows NT running, go to an MS-DOS command prompt. (Double-click the MS-DOS Command Prompt icon in your Main group in Program Manager.)
3.Type the following at the command prompt.
Net Stop OLE
4.Attempt to add an OLE control to the default form. (Any control where an .OCX file appears in your Project window will be an OLE control.) Visual Basic reports this error:
Unable to create embedded object
5.Switch back to MS-DOS, and type the following to restore everything to normal:
Net Start OLE

Back to the top


APPLIES TO
Microsoft Visual Basic 4.0 Standard Edition
Microsoft Visual Basic 4.0 Professional Edition
Microsoft Visual Basic 4.0 16-bit Enterprise Edition
Microsoft Visual Basic 4.0 32-Bit Enterprise Edition
Microsoft Windows NT Server 3.51
Microsoft Windows NT Workstation 3.51

Back to the top

Keywords: 
kberrmsg kbprogramming kbprb KB129800

Back to the top

Article Translations

 

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.