\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#362: Simple 32 and 64 bit Registry Support}
\date{March 01, 2010}
\author{Damon Courtney, Kevin Kenny}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#362}&\textbf{Simple 32 and 64 bit Registry Support}\\\hline
Author&

Damon Courtney \tipmail{damon}{tclhome.com}
\par
Kevin Kenny \tipmail{kevin.b.kenny}{gmail.com}
\\
Created&Monday, \(\text{1}^{\text{st}}\) March 2010\\
Type&Project\\
Tcl Version&\(8.6\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.9 $\\
Keywords&Windows, Tcl\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

Add new options to the \textbf{registry} command on Windows to allow it to specify that the action should be taken specifically on the 32 or 64 bit registry.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

When Microsoft created a 64 bit version of Windows they had this idea of separating certain areas of the registry into a new node for 32 bit programs to access. The idea was that 64 bit programs would use the standard keys while 32 bit programs living in the 64 bit world would have their registry access shuffled off to a separate node behind their backs. By default, a 32 bit program will get the 32 bit registry node and a 64 bit program will get the 64 bit nodes, and in Tcl, this is what we're currently left to. It is possible to specify which registry you want to use through flags to the various registry commands, Tcl's \textbf{registry} command just doesn't know anything about them currently.

\section{Specification}

The \textbf{registry} command will receive two new (mutually exclusive) options to specify that the given \textbf{registry} command should be executed against the 32 bit or 64 bit registry. The proposed implementation is the addition of a \textbf{-32bit} and a \textbf{-64bit} option, one of which may be placed before the \textit{subcommand} like so:

\begin{quote}
\textbf{package require registry 1.3}
\end{quote}

\begin{quote}
\textbf{registry} ?\textbf{-32bit}\tipbar{}\textbf{-64bit}? \textit{subcommand} ?\textit{options}?
\end{quote}

By default, no option will mean that the \textbf{registry} command does what it has always done, which is to operate on the registry that matches the current compiled version of the running Tcl. Specifying \textbf{-32bit} means to operate on the 32 bit registry regardless of the current binary, and \textbf{-64bit} means to operate on the 64 bit registry. The options will be supported by all subcommands of \textbf{registry}.

Concurrently with this change, the version number of the \textbf{registry} package will be advanced to 1.3.

\section{Reference Implementation}

See Patch \#2960976 at SourceForge [\url{https://sourceforge.net/support/tracker.php?aid=2960976}].

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
