Click here to Skip to main content
15,881,852 members
Articles / Desktop Programming / ATL

CWorkerThread and IWorkerThreadClient – Looking Further

Rate me:
Please Sign up or sign in to vote.
4.67/5 (8 votes)
28 Jul 2006Ms-PL5 min read 41.5K   518   37  
A tutorial on how to use the ATL7 thread class CWorkerThread and its associated helper classes CRTThreadTraits, IWorkerThreadClient etc. It also presents a generic logging component which can be used in CPU intensive applications.

/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */

/* link this file in with the server and any clients */


 /* File created by MIDL compiler version 6.00.0366 */
/* at Thu Jul 27 18:19:39 2006
 */
/* Compiler settings for .\LogMan.idl:
    Oicf, W1, Zp8, env=Win32 (32b run)
    protocol : dce , ms_ext, c_ext
    error checks: allocation ref bounds_check enum stub_data 
    VC __declspec() decoration level: 
         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
         DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING(  )

#pragma warning( disable: 4049 )  /* more than 64k source lines */


#ifdef __cplusplus
extern "C"{
#endif 


#include <rpc.h>
#include <rpcndr.h>

#ifdef _MIDL_USE_GUIDDEF_

#ifndef INITGUID
#define INITGUID
#include <guiddef.h>
#undef INITGUID
#else
#include <guiddef.h>
#endif

#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
        DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)

#else // !_MIDL_USE_GUIDDEF_

#ifndef __IID_DEFINED__
#define __IID_DEFINED__

typedef struct _IID
{
    unsigned long x;
    unsigned short s1;
    unsigned short s2;
    unsigned char  c[8];
} IID;

#endif // __IID_DEFINED__

#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED

#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
        const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}

#endif !_MIDL_USE_GUIDDEF_

MIDL_DEFINE_GUID(IID, IID_IConfig,0x21989C01,0x87E2,0x425D,0xAC,0x57,0x09,0x53,0x06,0x1C,0xB3,0x83);


MIDL_DEFINE_GUID(IID, IID_ILogData,0x1F09AA80,0x7FC8,0x45E9,0xB3,0xBE,0x17,0x77,0x7D,0x98,0x5B,0x45);


MIDL_DEFINE_GUID(IID, IID_ILogManager,0x88C1A0A8,0x15C1,0x42DD,0xA0,0x0D,0xCB,0xE2,0xB6,0x9C,0x3D,0xB9);


MIDL_DEFINE_GUID(IID, LIBID_LogManLib,0x96087471,0x5A8B,0x48EA,0x94,0x60,0x78,0x26,0xEB,0x3C,0x00,0x3B);


MIDL_DEFINE_GUID(CLSID, CLSID_LogManager,0xAB8ABFE0,0x6C9F,0x4CAD,0x82,0x4D,0xE4,0x26,0x34,0xE0,0x9D,0xB1);


MIDL_DEFINE_GUID(CLSID, CLSID_Config,0x0440CF6C,0x818A,0x437F,0xBC,0x81,0xE1,0x03,0xDD,0xD0,0xD7,0x06);


MIDL_DEFINE_GUID(CLSID, CLSID_LogData,0xED8398DE,0x3764,0x485A,0x93,0x17,0x12,0xAD,0xAE,0x15,0x42,0x87);

#undef MIDL_DEFINE_GUID

#ifdef __cplusplus
}
#endif



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 Microsoft Public License (Ms-PL)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions