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 6887371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:52:37+00:00 2026-05-27T05:52:37+00:00

My project simply creates log files that holds the information about the date when

  • 0

My project simply creates log files that holds the information about the date when the application starts or application exits and how.

Optional Question: How can I add my application to start up list (to msconfig.exe thing)

Optional Question 2: Is there a loss probability when i want to create an only one log file while/before on shutdown?

  • 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-05-27T05:52:37+00:00Added an answer on May 27, 2026 at 5:52 am

    There is a way to detect why the application is shutting down, but you need to get at the Windows main message loop using p/Invoke. I don’t know the exact message that Windows broadcasts when a shutdown is triggered, but at least I can get you in the right direction.

    General information on messages: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632590%28v=vs.85%29.aspx

    The GetMessage function: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644936%28v=vs.85%29.aspx

    I think this is the broadcast message: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632617%28v=vs.85%29.aspx

    Doing this from C# is left as an exercise for the reader. It would involve replacing the main message pump provided by WinForms or WPF, inspecting each message, then calling the replaced pump.

    I’d start here: Message pumping?

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

Sidebar

Related Questions

I've created a very simple Enterprise Application project with about 7 entity beans and
Okay, I was able to create a simple Windows Forms project that reproduces some
I have a new project which simply put, is an attempt to formalize the
Before moving on to use SVN, I used to manage my project by simply
The project I'm working on creates a local copy of the SQL Server database
I need to create an application for the iPhone that will connect to a
I've got an XCode iPHone project setup with the following: My App Delegate creates
We're using a messaging queue (JMS / ActiveMQ) in an application that is facilitating
My goal is to create a log app, apart from my main app, that
I have an monotouch application that includes an objective-c static library. The application runs

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.