Click here to Skip to main content
15,886,199 members
Articles / Desktop Programming / ATL

Elevating your application for dummies: A step-by-step guide to elevate and write in the Registry

Rate me:
Please Sign up or sign in to vote.
5.00/5 (10 votes)
8 Apr 2009CPOL3 min read 43.7K   411   30  
We are going to enable your application to write entries in HKEY_LOCAL_MACHINE, elevating your application when necessary.

/* 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 7.00.0500 */
/* at Wed Apr 08 17:18:11 2009
 */
/* Compiler settings for .\Elevator.idl:
    Oicf, W1, Zp8, env=Win32 (32b run)
    protocol : dce , ms_ext, c_ext, robust
    error checks: 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_ILocalMachineWriter,0xBF7F20D5,0xB23A,0x4700,0x83,0xFA,0x27,0xD1,0xA1,0x7B,0x4C,0x24);


MIDL_DEFINE_GUID(IID, LIBID_ElevatorLib,0xA38F2A11,0xAF97,0x4903,0x9D,0xF3,0xF7,0x57,0x29,0x1C,0x93,0x58);


MIDL_DEFINE_GUID(CLSID, CLSID_LocalMachineWriter,0xE89BECE0,0x84AC,0x4EE0,0xBC,0x26,0x83,0x5C,0x26,0x9C,0x16,0x6F);

#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 Code Project Open License (CPOL)


Written By
Software Developer Dreaming With Objects S.L.
Spain Spain
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions