DOC: ThreadingModel Is Not a Subkey

Last reviewed: July 2, 1997
Article ID: Q150199
The information in this article applies to:
  • The Development Environment (was Visual Workbench) included with: - Microsoft Visual C++, 32-bit Edition, versions 2.0, 2.1, 2.2, 4.0,

         4.1, 4.2
    

SUMMARY

In the article "Processes and Threads" from the OLE Programmer's Reference, paragraph 12 gives the following incorrect information:

   For thread-aware DLL-based or in-process objects, you need to set the
   threading model in the registry. The default model when you do not
   specify a threading model is single-thread-per-process. To specify a
   model, you add the ThreadingModel subkey to the InprocServer32 key in
   the registration database.

ThreadingModel is not a subkey; it is a named value.

This documentation error was fixed in the "Processes and Threads" article of the Visual C++ 4.2 CD online OLE Programmer’s reference. The text has been modified as follows:

   For thread-aware DLL-based or in-process objects, you need to set the
   threading model in the registry. The default model when you do not
   specify a threading model is single-thread-per-process. To specify a
   model, you add the ThreadingModel named-value to the InprocServer32 key
   in the registration database.

MORE INFORMATION

To set the threading model, perform these steps:

  1. Run Regedit in Windows 95, or run Regedt32 in Windows NT.

  2. Choose the HKEY_CLASSES_ROOT folder, and then choose the CLSID folder.

  3. Find the GUID for the object you want to enable with apartment-model threading. Then expand the object's folder.

  4. Expand the InprocServer32 key.

  5. From the Windows 95 Edit menu, select New. Then select String Value, and type ThreadingModel. Select the name just typed from the Edit menu, select Modify, and type Apartment for Value data.

    -or-

    From the Windows NT Edit menu, select Add Value. Type ThreadingModel for the Value Name. Click OK, and type Apartment for the String value.


Additional query words: thread apartment
Keywords : vc50rel vcbuglist400 vcfixlist420 ntsetup snasetup
Technology : kbMfc kbole
Version : 2.0 2.1 2.2 4.0 4.1 4.2
Platform : NT
Issue type : kbdocerr
Resolution Type : kbdocfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.