Click here to Skip to main content
15,896,456 members
Articles / Programming Languages / C++

Registry Symbolic Links

Rate me:
Please Sign up or sign in to vote.
4.75/5 (14 votes)
21 Oct 2005CPOL9 min read 69.2K   2K   30  
An article on creating and using registry symbolic links.
// linkcreatDlg.h : Header-Datei
//

#if !defined(AFX_LINKCREATDLG_H__31E67BC2_0C3C_44D6_9051_CBA4AEDAB42F__INCLUDED_)
#define AFX_LINKCREATDLG_H__31E67BC2_0C3C_44D6_9051_CBA4AEDAB42F__INCLUDED_


/*
*
* $RCSfile: linkcreatDlg.h,v $
* $Source: /cvs/rgsymlnk/linkcreat/linkcreatDlg.h,v $
* $Author: cvs $
* $Revision: 1.2 $
* $Date: 2005/10/16 11:48:41 $
* $State: Exp $
* Copyright (c) Stefan Kuhr
*
*
*
* $Log: linkcreatDlg.h,v $
* Revision 1.2  2005/10/16 11:48:41  cvs
* Simplified and consolidated error output
* 
*/

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

/////////////////////////////////////////////////////////////////////////////
// CLinkcreatDlg Dialogfeld

class CLinkcreatDlg : public CDialog
{
    HKEY m_hLinkKey;
    HKEY GetPredefinedRegKey(void)const;
    void DestroyLinkKey(void);
    void ShowErrorSuccess(LONG lStatus)const;
public:
	CLinkcreatDlg(CWnd* pParent = NULL);	// Standard-Konstruktor

// Dialogfelddaten
	//{{AFX_DATA(CLinkcreatDlg)
	enum { IDD = IDD_LINKCREAT_DIALOG };
	CComboBox	m_cmbPredefRegHandles;
	//}}AFX_DATA

	// Vom Klassenassistenten generierte �berladungen virtueller Funktionen
	//{{AFX_VIRTUAL(CLinkcreatDlg)
	public:
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV-Unterst�tzung
	//}}AFX_VIRTUAL

// Implementierung
protected:
	HICON m_hIcon;

	// Generierte Message-Map-Funktionen
	//{{AFX_MSG(CLinkcreatDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtnCreateLinkTarget();
	afx_msg void OnBtnCreateSrcKey();
	afx_msg void OnBtnDeleteLinkTarget();
	afx_msg void OnBtnDeleteSrcKey();
	afx_msg void OnBtnLinkToSource();
	afx_msg void OnDestroy();
	//}}AFX_MSG
	afx_msg LRESULT OnKickIdle(WPARAM, LPARAM);
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ f�gt unmittelbar vor der vorhergehenden Zeile zus�tzliche Deklarationen ein.

#endif // !defined(AFX_LINKCREATDLG_H__31E67BC2_0C3C_44D6_9051_CBA4AEDAB42F__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
Software Developer
Germany Germany
Stefan has been writing programs in C/C++ since 1991, and for Windows since 1993. He holds a German engineer's degree Dipl.-Ing. (FH) in "Microelectronics/Technical Computer Science" from the Aalen (Germany) University of Applied Sciences and an MSc in "Software Technology" from the Stuttgart (Germany) University of Applied Sciences. Currently, he is employed by a software company in the south-west of Germany that specializes in PC life-cycle products and software deployment technology. In his spare time, Stefan likes to go swimming and enjoys listening to jazz music from the fifties. And yes, he has a Weblog at http://mcblogs.craalse.de/sku (German only).

Comments and Discussions