/RegEditExe.cpp (EXE工程的)
#include "RegExcute.h"
int _tmain(int argc, _TCHAR* argv[])
{
int x;
long i;
printf( "Input your action:/n" );
printf( "1:Add/n" );
printf( "2:Remove/n" );
scanf( "%d", &x );
act = Action ( x );
CRegExcute excute;
i = excute.RegOperation( act );
printf( "result:%l/n",i );
return 0;
}
///RegExcute.h (DLL工程的)
#include "atlbase.h"
#define IN_SUCCESS 1
#define IN_FAILED 2
#define OUT_SUCCESS 3
#define OUT_FAILED 4
#define OPEN_FAILED 5
#define REG_ERROR 100
enum Action
{
In = 1,
Out = 2,
}act;
typedef struct CValue_1
{
DWORD dwValue1;
}Add_Value;
class CRegExcute :
public CRegKey
{
public:
__d