Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7743915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:39:24+00:00 2026-06-01T09:39:24+00:00

I have an application where i have created a thread which must check the

  • 0

I have an application where i have created a thread which must check the database for a specific type of data for a timeout interval. The thread is fully responsible for creating the database connection, query and closing the connection. I make the CoInitialize call only once , in the thread execution and i reused the Ado connection and Ado Query for subsequent use .

Now my question is , I had previously ( perhaps erroneously) left a CoUnitialize statement in the loop for database data checking. which means , that the call to CoUnitialize was done every time . Why did the application did not crash ? As there was no data to release CoUnitialize should have failed. I am doubtful on this .

Thanks in Advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:39:26+00:00Added an answer on June 1, 2026 at 9:39 am

    CoUninitialize is a WinApi function that takes nothing and returns nothing. Since those WINAPI functions never throw an exception (AFAIK), your application will not crash by calling them. CoUnitialize will just silently fail when called too many times.

    Your application could crash afterwards though, when code is called that needs an initialized COM. That your application does not crash can mean two things: the code doesn’t need CoInitialize, or somewhere else CoInitialize is called, maybe in your ADO library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an multi thread application on IIS (ASP.NET MVC), When the threading
I have created application where i just need to access data form assets folder.
I have created an application which needs to have a profile box tab which
I have a WPF application in which a thread checks some value. In certain
I have an application which uses SslStream to send and receive data with its
For purposes of learning I have created an application which returns a computed output
I have a CLI application, which is digging some data, in case of need,
see basically i have one multi-thread application in which i want to see the
I have created an application which stores a set five different times, at each
I have an application which loads a lot of data. I have the data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.