Click here to Skip to main content
15,898,134 members
Articles / Programming Languages / C++

Creating a Custom .NET Profiler

Rate me:
Please Sign up or sign in to vote.
4.89/5 (39 votes)
4 Sep 200613 min read 194.8K   6.9K   106  
Describes how to create your own custom profiler for any managed application

/* 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 Wed Aug 30 13:17:56 2006
 */
/* Compiler settings for .\DotNetProfiler.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_IProfiler,0x98ED3004,0x7454,0x49E1,0x99,0x02,0xF2,0x18,0xF0,0x57,0x8C,0xC3);


MIDL_DEFINE_GUID(IID, LIBID_DotNetProfilerLib,0xDA37BE57,0x9EA8,0x4622,0xBD,0xF5,0xE7,0x24,0xCD,0x3A,0x60,0xC1);


MIDL_DEFINE_GUID(CLSID, CLSID_Profiler,0x9E2B38F2,0x7355,0x4C61,0xA5,0x4F,0x43,0x4B,0x7A,0xC2,0x66,0xC0);

#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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
It all started when my folks were nice enough to drop $400 on a TI-99/4A and an adapter so I could save programs on my casette player. That, and a subscription to Compute! magazine, was the thunderbolt that got me to where I am today.

I live in NC where I've worked with Microsoft technology for 11 years. I now work for SlickEdit working on the Tools for Visual Studio 2005 product. Writing software that I use myself every day... could it get any better than that?

Comments and Discussions