Click here to Skip to main content
15,894,646 members
Articles / Programming Languages / C++

Harnessing the task scheduler

Rate me:
Please Sign up or sign in to vote.
4.70/5 (20 votes)
28 Aug 2013CPOL9 min read 118.9K   3.4K   83  
Using the Task Scheduler interface in applications can be tricky, as it requires a detailed knowledge of the COM technology. This article presents a practical solution to this problem, based on simplifying communications with the interface.
// MyTaskDemo.h : main header file for the MYTASKDEMO application
//

#if !defined(AFX_MYTASKDEMO_H__E9D25682_113A_48AE_ADD2_9A885C35BC06__INCLUDED_)
#define AFX_MYTASKDEMO_H__E9D25682_113A_48AE_ADD2_9A885C35BC06__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols

/////////////////////////////////////////////////////////////////////////////
// CMyTaskDemoApp:
// See MyTaskDemo.cpp for the implementation of this class
//

class CMyTaskDemoApp : public CWinApp
{
public:
	CMyTaskDemoApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyTaskDemoApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CMyTaskDemoApp)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MYTASKDEMO_H__E9D25682_113A_48AE_ADD2_9A885C35BC06__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Publisher
Poland Poland
Software Developer's Journal (formerly Software 2.0) is a magazine for professional programmers and developers publishing news from the software world and practical articles presenting very interesting ready programming solutions. To read more

Comments and Discussions