mDN Wrapper

 

実現方法 - Wrapper DLL

Implementation Method - Wrapper DLL

ラッパーDLL は、アプリケーションと元のDLL との間に割り込んで、 アプリケーションからのDLL の呼び出しを横取りして、 本来のDLL とは異なった処理をさせるものです。

Positioned between the application and the original DLL, the wrapper DLL hooks the application DLL call and operates different processing than that in the original DLL.

how wrapper DLL works

アプリケーションからのDLL の呼び出しはラッパーに渡されます。 ラッパーはそこで、付加的な処理を行なって、 元のDLL のエントリを呼び出します。 また、元のDLL の処理結果は一旦ラッパーに返され、 ここでも付加的な処理を行なって、 最終的な結果がアプリケーションに返されることになります。

The application DLL call is passed to the wrapper. The wrapper performs additional processing and calls the original DLL entry. Next, the processing result of the original DLL is returned to the wrapper and the wrapper again performs additional processing, then the final result is returned to the application.

mDN wrapper では、WINSOCK DLLの

WSOCK32.DLLWINSOCK V1.1
WS2_32.DLL WINSOCK V2.0
に対するラッパーDLL を提供して、 多言語ドメイン名の名前解決ができるようにします。

With mDN Wrapper, to provide name resolution of multilingual domain names, a wrapper DLL is provided for the following WINSOCK DLLs:

WSOCK32.DLLWINSOCK V1.1
WS2_32.DLL WINSOCK V2.0
: 16ビット版のWINSOCK (WINSOCK.DLL) は対象外です。
Note: The 16-bit version of WINSOCK (WINSOCK.DLL) is not supported.

処理対象のAPI

APIs Subject to Processing

mDN Wrapper はWINSOCK の名前解決に関連したAPI についてのみ 付加的な処理を行ないます。 処理の対象となるWINSOCK APIは以下のものです。

mDN Wrapper performs additional processing on only those APIs that are associated with WINSOCK name resolution. The following WINSOCK APIs are subject to processing.

WINSOCK 1.1, WINSOCK 2.0 の両方にあるもの
When both the WINSOCK 1.1 and WINSOCK 2.0 APIs exist:
gethostbyaddr
gethostbyname
WSAAsyncGetHostByAddr
WSAAsyncGetHostByName

WINSOCK 2.0 だけにあるもの
When only the WINSOCK 2.0 API exists:
WSALookupServiceBeginA
WSALookupServiceNextA
WSALookupServiceEnd

アプリケーションによっては、 これらのAPI を使わないで独自にドメイン名の解決を行なうものもあります。 例えば、nslookupは、これらのAPI を使わないで、 内部で独自にDNS リクエストの生成、解釈を行なっています。 当然のことながら、これらのアプリケーションについては、 mDN Wrapper では多言語化対応させることはできません。

Some applications independently resolve domain names without using these APIs. For example, nslookup internally generates and interprets DNS requests independently. Naturally, mDN Wrapper does not provide multilingual domain name support to these applications.

: dnsproxyはネットワーク上でDNS のリクエスト、 レスポンスについて多言語化しますので、 これらのアプリケーションについても多言語化させることができます。 必要に応じて適時使い分けるといいでしょう。
Note: dnsproxy makes DNS request/response multilingual on the network and also can make these applications multilingual. It is recommended they be used as needed.
: WINSOCK 2.0 には、WIDE CHARACTER ベースの名前解決のAPI として
WSALookupServiceBeginW
WSALookupServiceNextW
もありますが、これらについてはラップしません。 これらのAPI はマイクロソフト仕様による国際化に対応したものですから、 そのフレームワーク上で使うべきものです。 これらについてはmDN Kit によって他の多言語フレームワークに 変換してしまうのは危険ではないか、と判断しました。
Note: WINSOCK 2.0 has the following APIs for WIDE CHARACTER based name resolution.
WSALookupServiceBeginW
WSALookupServiceNextW
However, these are not wrapped. These APIs are internationalized for Microsoft specifications and therefore should be used within that framework. We determined that it is dangerous to use mDN Kit to convert these APIs to another multilingual framework.

処理対象外のAPI

APIs Not Subject to Processing

上記以外のWINSOCK API については、mDN Wrapper はなにもしないで、 元のWINSOCK API を呼び出します。 WINSOCK DLL にはドキュメントされていないエントリも含まれています。 それらのエントリについては、呼び出しパラメタ等が判らないので、 ラッパー内のコードから元のDLL のエントリを呼び出すことができません。 そこで、mDN Wrapper は上記以外のエントリについては、 function forwarding によって、 DLL の呼び出しが元のDLL にフォワードされるようにしています。

Regarding WINSOCK APIs other than those above, mDN Wrapper does not do anything and calls the original WINSOCK API. WINSOCK DLL includes entries that are not documented. Regarding those entries, since call parameters, etc. are not known, it is not possible to call the original DLL entries using codes inside the wrapper. Therefore, for the entries other than the above, mDN Wrapper uses 'function forwarding' to forward calling of a DLL to the original DLL.

'function forwarding' を使う場合には、 ラッパーDLL 作成時にフォワード先のDLL 名を明示的に指定する必要があり、 そのDLL 名はラッパー自身とは別の名前、 すなわち元のDLL とも別の名前、になっていなければなりません。 mDN wrapper では、元のWINSOCK DLL を名前を変えてコピーし、 それをフォワード先のDLL として使用するものとします。

When 'function forwarding' is used, it is necessary to explicitly specify the forward destination DLL name when the wrapper DLL is created. The DLL name must be different from the wrapper itself, that is, a different name that the original DLL. mDN wrapper copies the original WINSOCK DLL as a different name and uses it as the forward destination DLL.

wsock32.dll->wsock32o.dll
ws2_32.dll ->ws2_32o.dll

ラッパーDLL は元のWINSOCK DLL と同じ名前で作成されます。 従ってmDN wrapper がインストールされた状態では、

A wrapper DLL is created with the same name as the original WINSOCK DLL. Therefore, when mDN Wrapper has been installed, their names are as follows:

wsock32.dll mDN Wrapper for WINSOCK V1.1
ws2_32.dll mDN Wrapper for WINSOCK V2.0
wsock32o.dllOriginal WINSOCK V1.1 DLL
ws2_32o.dll Original WINSOCK V2.0 DLL
となります。

非同期 API

Asynchronous API

ドメイン名の変換は、以下のタイミングで行なわれる必要があります。

Conversion of domain names must be carried out in the following sequence:

DNS へのリクエスト時
When request is sent to DNS
ローカルエンコーディング->DNS エンコーディング
Local encoding->DNS encoding
DNS からの応答受信時
When response is received from DNS
DNS エンコーディング->ローカルエンコーディング
DNS encoding->local encoding

同期API においては、 ローカルエンコーディングからDNS エンコーディングへの変換は、 元のAPI を呼び出す前に行われ、 DNS エンコーディングからローカルエンコーディングへの変換は、 元のAPI から復帰してきたところで行なわれます。

With synchronous API, conversion from local encoding to DNS encoding is performed before the original API is called and conversion from DNS encoding to local encoding is performed when control is returned from the original API.

しかし、WINSOCK の以下のAPI は非同期API で、 DNS からの応答受信前に復帰してしまいます。

However, the following WINSOCKs are asynchronous APIs and control is returned before response is received from the DNS.

WSAAsyncGetHostByAddr
WSAAsyncGetHostByName

これらのAPI においては、名前解決の完了は、 Windows へのメッセージによって通知されます。 このため、 DNS エンコーディングからローカルエンコーディングへの変換を行なうには、 ラッパーは通知先のウィンドウプロシジャのメッセージキューをフックして、 この完了メッセージを捕獲する必要があります。

With those APIs, the completion of name resolution is notified via the message to Windows. For that reason, in order to convert from DNS encoding to local encoding, the wrapper needs to hook the message queue of the window procedure to which notification is sent and capture the completion message.

そこで、非同期API が呼び出された場合には、mDN Wrapper は、 通知先のウィンドウプロシジャ(これはAPI のパラメタで指示されます)に フックを設定します。 フックが完了メッセージ(これもAPI のパラメタで指示されます)を検出したなら、 フックは結果の格納領域(これもAPI のパラメタで指示されています)のドメイン名を、 DNS 側のエンコーディングからローカルエンコーディングに変換するものとします。

Therefore, when an asynchronous API is called, mDN Wrapper sets the hook (this is specified by the parameter of the API) to the window procedure to which notification is sent. When the hook detects the completion message (this is also specified by the parameter of the API), the hook converts the domain name in the storage area of the result (this is also specified by the paramter of the API) from the DNS side encoding to local encoding.

Wrapper DLL のインストール

Installing Wrapper DLL

WINSOCK DLL はWindows のシステムディレクトリに置かれています。 WINSOCK を確実にラップするには、システムディレクトリにおいて

The WINSOCK DLL is placed in the system directory of the Windows. To surely wrap WINSOCK, the following need to be performed in the system directory;

オリジナルWINSOCK DLL の名前の変更
Change the names of original WINSOCK DLLs:
ren wsock32.dll wsock32o.dll
ren ws2_32.dll  ws2_32o.dll
ラッパーDLL の導入
Copy Wrapper DLLs:
	
copy somewhere\wsock32.dll wsock32.dll
copy somewhere\ws2_32.dll  ws2_32.dll
copy another DLLs also
を行なう必要があります。

しかし、システムディレクトリでこのようなDLL の置き換えを行なうのは 大変危険な操作になります。

However, this kind of replacement of DLLs in the system directory is a very dangerous operation.

a) DLL を入れ替えた状態で、もういちど同じ操作を行なうと、 オリジナルのWINSOCK DLL が失われてしまうことになります。
Once the DLL is replaced, if the same operation is repeated again, the original WINSOCK DLL will be lost.
b) サービスパックやアプリケーションなどで、 WINSOCK DLL を再導入するものがありますが、 これによってもWINSOCK が利用不能になることがあります。
Some service packs and applications re-introduce WINSOCK DLLs. This may also disable WINSOCK.

このような状態になると、ネットワーク機能が全く使えなくなったり、 最悪はWindows の起動すらできなくなる可能性があります。

When such status occurs, it is possible that the entire network function will become disabled, or, in the worst case, Windows will not boot.

そこで、mDN Wrapper では、上のようなシステムレベルのラップではなく、 アプリケーションに対するラップを基本機能として提供するものとします。

Therefore, mDN Wrapper shall provide application wrapping as a basic function, not at the system level.

Windows において、DLL は、基本的には

Basically, in Windows, DLLs are searched in the following order:

アプリケーションのロードディレクトリ
Load directory of application
%SystemRoot%\System32
%SystemRoot%\System32
%SystemRoot%
%SystemRoot%
PATH で指示されるディレクトリ
Directory specified by PATH

の順序で検索されて、最初に見つかったものがロードされます。 ですから、一般的には、 DLL をアプリケーションのロードディレクトリにインストールすれば、 そのアプリケーションからのWINSOCK の呼び出しをラップすることができます。

and the first one found is loaded. Because of that, in general, installing the DLL in the load directory of the application enables calling of WINSOCK from the application to be wrapped.

ただし、いくつかのアプリケーション、DLL では、 検索パスを経由せずに特定のDLL をリンクするようになっているものがあります。 このような構成のアプリケーション、DLL が使われた場合には mDN Wrapper では対処することはできません。

However, some applications and DLLs have a specific DLL linked without going through the search path. mDN Wrapper cannot handle this structure of application or DLL.

: Netscapeは特定DLL にバインドされているようで、 アプリケーションディレクトリへのインストールではラップできません。 WINSOCK DLL 自体もシステムディレクトリの関連DLL に バインドされているようです。 一方、Internet ExploreやWindows Media Playerは 標準のサーチパスに従っているので、 ラップすることができます。
Note: Netscape seems to be bound to a specific DLL and wrap cannot be performed by installing the wrapper DLL in the application directory. WINSOCK DLL itself seems to be bound to the related DLL of the system directory. On the other hand, because Internet Explorer and Windows Media Player follow the standard search path, wrap can be performed.

エンコーディングの変換位置

Location of Encoding Conversion

WINSOCK 2.0 をサポートしているWindows には、 WINSOCK の1.1 と2.0 のそれぞれに対応するDLL があり、 WINSOCK 1.1 のAPI の呼び出しは 2.0 の同じエントリにリダイレクトされるようになっています。

Versions of windows that support WINSOCK 2.0 have DLLs that correspond to WINSOCK 1.1 and 2.0, respectively. Calling of the WINSOCK 1.1 API is re-directed to the same entry for 2.0.

calling winsock2.0 through winsock1.1

この場合には1.1 に対する呼び出しも2.0 に対する呼び出しも、 ともにV2.0用のDLL に渡されるので、 2.0用のラッパーDLL 側だけで エンコーディングの変換を行なうようにするべきでしょう。

In this case, calling of 1.1 and 2.0 are both passed to the DLL of V2.0. Therefore, conversion of encoding should be performed at the wrapper DLL side of 2.0 only.

一方、WINSOCK 1.1 しかサポートしていない場合(Win95)には、 1.1 に対応したDLL しかありません。

On the other hand, when only WINSOCK 1.1 is supported (Win95), there is only a DLL that corresponds to 1.1.

calling only winsock1.1

この場合には必然的に1.1 用のラッパーDLL で エンコーディングを変換しなければなりません。

In that case, naturally the wrapper DLL for 1.1 is used for encoding conversion.

mDN Wrapepr がwindows のシステムディレクトリにインストールされた場合には、 上の通りに動作するので、

When mDN Wrapper is installed in the Windows system directory, the operation is as shown above, therefore, conversion must be performed as follows.

WINSOCK 2.0 あり2.0 ラッパーで変換
WINSOCK 2.0 exists2.0 wrapper is used for conversion
WINSOCK 1.1 のみ1.1 ラッパーで変換
WINSOCK 1.1 only1.1 wrapper is used for conversion
する必要があります。

しかし、 アプリケーションディレクトリにインストールされた場合には動作が変わってきます。 Windows 付属の WINSOCK 1.1 DLLは、 システムディレクトリのWINSOCK 2.0 にバインドされているため、 アプリケーションディレクトリ側のWINSOCK 2.0 ラッパーDLL には リダイレクトされてきません。 このため、アプリケーションディレクトリへのインストールにおいては、 1.1DLL、2.0DLLの両方でエンコーディングを変換する必要があります。

However, when the wrapper DLL is installed in the application directory, the operation is different. Since WINSOCK 1.1 DLL attached to the Windows is bound to WINSOCK2.0 located in the system directory, calling of the WINSOCK 1.1 API is not re-directed to the WINSOCK2.0 wrapper DLL at the application directory side. For that reason, when the wrapper DLL is installed in the application directory, it is necessary to convert encoding for both the 1.1 and 2.0 DLL.

このようなDLL 間のバインディングはドキュメントされていませんので、 環境、バージョンによっては異なった動作をするかも知れません。 そこでmDN Wrapper では、レジストリ値によって、 ラッパーDLL のどこで変換を行なうかを決定するようにして、 インストール先による差異、あるいはバージョンによる差異を吸収するようにします。

Such binding between DLLs is not documented and operation may differ depending on the environment and version being used. Therefore, with mDN Wrapper, the registry value is used to determine which wrapper DLL is used for conversion so that differences related to the installation location or version are neutralized.

mDN Wrapper 用のレジストリ設定は

The registry setting for mDN Wrapper is placed under the following directory:

HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN
以下に配置されます。エンコーディング変換を行なう位置については、 この直下のレジストリ値 Where(REG_DWORD) によって決定します。 有効な値は、

The location for encoding conversion is determined by the Registry Where value (REG_DWORD) under the above. The effective values are as follows:

レジストリ Where (REG_DWORD)
Registry Where (REG_DWORD)
0WINSOCK 1.1、WINSOCK 2.0 の両方で変換する
0Converted at both WINSOCK 1.1 and WINSOCK 2.0 are converted
1WINSOCK 2.0 があれば、WINSOCK 2.0だけで変換する
1When WINSOCK 2.0 exists, converted only at WINSOCK 2.0
WINSOCK 1.1 だけの場合には WINSOCK 1.1 で変換する
When only WINSOCK 1.1 exists, converted only WINSOCK 1.1
2WINSOCK 1.1 だけで変換する
2Converted only at WINSOCK 1.1 only
3WINSOCK 2.0 だけで変換する
3Converted at WINSOCK 2.0
の4通りです。 アプリケーションディレクトリにインストールする場合には「0」を、 システムディレクトリにインストールする場合には「1」を設定する必要があります。 レジストリ値が存在しない場合には「0」を想定します。 これはアプリケーションディレクトリへのインストールを標準としたものです。

When the wrapper DLL is installed in the application directory, "0" needs to be set and when installed in the system directory, "1" needs to be set. If no value is set in the registry, "0" is assumed. This is based on installation in the application directory.

変換元/先のエンコーディング

Original/Converted Encoding

ラッパーDLL では、解決しようとするドメイン名を、 マシンのローカルエンコーディングからDNS サーバのエンコーディングに変換し、 また、DNS が返してきたドメイン名(DNS サーバのエンコーディング)を マシンのローカルエンコーディングに戻します。

Wrapper DLL converts the domain name to be resolved from the local encoding used by the machine to the DNS server encoding and returns the domain name (DNS server encoding) returned from the DNS to the encoding used by the local machine.

現在、DNS 側の多言語化エンコーディングについては、 いくつもの方式が提案されています。 ラッパーDLL はそれらのDNS 側エンコーディングのどれかひとつに 変換するように構成されます。 このDNS 側エンコーディングはレジストリで指示されます。 このレジストリには、mDN Wrapper のインストール時に デフォルトエンコーディング(現時点ではRACE)が設定されます。 当然、このレジストリは、後で他のものに変更することもできます。

With respect to multilingual encoding at the DNS side, a number of methods have been proposed. Wrapper DLL is structured to convert encoding to one of those DNS side encodings. This DNS side encoding is specified by the registry. In this registry, the default encoding (currently, it is RACE) is set when mDN Wrapper is installed. Naturally, this registry can be changed to some other encoding method.

mDN Wrapper 用のレジストリ設定は

The registry setting for mDN Wrapper is placed under the following directory.

HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN
以下に配置されます。 DNS 側のエンコーディングはレジストリ値 Encoding (REG_SZ)で指示されます。 このエンコーディング名は、libmdnで認識されるものでなければなりません。
DNS side encoding is specified by the registry value encoding (REG_SZ). This encoding name must be one that can be recognized by libmdn.
レジストリ Encoding (REG_SZ)
Registry encoding (REG_SZ)
DNS サーバ側のエンコーディング名を設定します
Set DNS server side encoding name.

一方、アプリケーションが使用しているローカルエンコーディングは、 通常はプロセスのコードページから求めます。 ラッパーDLL が使用する 'iconv' ライブラリは、 windows のコードページ名を エンコーディング名として受付けることができるので、 コードページ名をそのままローカルエンコーディング名として使用します。

On the other hand, the local encoding used by the application is usually derived from the code page of the process. Since the 'iconv' library used by Wrapper DLL can accept the code page name of the Windows as the encoding name, the code page name is used as the local encoding name as is.

しかし、アプリケーションによっては、 特定の多言語化エンコーディングで ドメイン名をエンコーディングしてしまうものもあります。 例えば、IEではドメイン名をUTF-8 で表記するように 指示することができるようになっています。 UTF-8 によるエンコーディングは、 提案されている多言語化方式のひとつですが、 多言語化されたDNS サーバは他のエンコーディングしか受付けないかも知れません。

However, some applications encode domain names using a specific multilingual encoding method. For example, with Internet Explorer, you can specify that domain names are to be expressed in UTF-8. UTF-8 encoding is one of the proposed multilingual methods, but multilingual DNS server may accept only other encoding.

このような状況に対処するため、mDN Wrapper は、 ローカルエンコーディングとして プログラム特有のエンコーディングも受付けることができるようにします。 このようなプログラム特有のローカルエンコーディングは レジストリ記載されるものとします。

In order to handle this situation, mDN Wrapper is able to accept program-specific encoding as local encoding. Such program-specific local encoding shall be written in the registry.

mDN Wrapper 用のプログラム特有のレジストリ設定は

Registry setting unique to the program for mDN Wrapper is placed under the following directory using the program name (execution module file name) as the key.

HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg
HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN\PerProg
以下に、プログラム名(実行モジュールファイル名)をキーとして配置されます。 例えば、Internet Explore の場合には、実行モジュール名のIEXPLOREをキーとして

For example, with Internet Explorer it is placed under the following directory using IEXPLORE of the execution module name as the key.

HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg\IEXPLORE
以下に置かれます。ローカルエンコーディング名は、レジストリ値Encoding (REG_SZ)で指示します。これもlibmdnで認識されるものでなければなりません。

The local encoding name is specified by the Registry Encoding value (REG_SZ). This also must be one that can be recognized by libmdn.

レジストリ Encoding (REG_SZ)
Registry Encoding (REG_SZ)
アプリケーションプログラム特有のエンコーディング名 (デフォルトのエンコーディング以外を必要とする場合)を指定します。

Indicates the encoding name unique to the application program (when other than default encoding is required).

ログ

Log

mDN Wrapper が期待した動作をしない場合、動作のログは問題解決に非常に 役立ちます。mDN Wrapper では、レジストリの設定により、以下の設定が 可能です。

When mDN Wrapper does not operate as expected, the operation log can be very useful in resolving the problem. With mDN Wrapper, the following settings can be made with the registry setting.

ログレベル、ログファイルともに次のレジストリの下で設定されます。

Both the log level and log file are set under the following registry.

HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN

ログレベルはレジストリ値 LogLevel (REG_DWORD) で指定します。定義されている 値は次の通りです。

The log level is specified usingg the LogLevel registry value (REG_DWORD). The defined values are as follows.

-1 (0xFFFFFFFF)
[None] ログを一切出力しない
-1 (0xFFFFFFFF)
[None] No log is output
0
[Fatal] 致命的エラーのみ出力
0
[Fatal] Outputs only fatal errors
1
[Error] 致命的でないエラーも出力
1
[Error] Outputs errors that are not fatal
2
[Warning] 警告メッセージも出力
2
[Warning] Outputs warning messages as well
3
[Info] エラー以外の情報も出力
3
[Info] Outputs information other than errors as well
4
[Trace] プログラムのトレース情報も出力
4
[Trace] Outputs program trace information
なお、このレベル指定は mDN Wrapper が使用している MDN ライブラリ の出力するログのレベル指定です。 ログにはこの他 mDN Wrapper 自身が出力するものがありますが、こちらは レベル指定はできず、単にオン・オフを切り替えるだけです。-1 を指定した場合には オフ、それ以外の値を指定した場合にはオンになります。 デフォルトは -1 です。
Note that this level specification is for the log level to be output by MDN library used by mDN Wrapper. In addition, mDN Wrapper itself outputs a log. The level of log of this cannot be specified and can only be switched ON and OFF. When -1 is specified, it is OFF; all other values switch the log ON. The default is -1.

ログファイルはログを出力するファイルのパス名を指定するもので、 レジストリ値 LogFile (REG_SZ) で指定します。デフォルトは mDN Wrapper をインストールしたディレクトリの下の "mdn_wrapper.log" です。

Log file is used to specify the path to the file to which the log is to be output. The LogFile (REG_SZ) registry value is used to specify the path. The default is "mdn_wrapper.log" under the directory where mDN Wrapper is installed.

なお、ログレベルとログファイルはコンフィギュレーションプログラムを使用しても 設定することができます。

Note that the configuration program can be used to set the log level and log file settings.

レジストリ設定 - まとめ

Registry Setting - Summary

レジストリの優先順位

Registry Priority

mDN Wrapper の設定情報は、HKEY_LOCAL_MACHINE、HKEY_CURRENT_USERの

Software\JPNIC\MDN
以下に格納されます。mDN Wrapperは最初にHKEY_LOCAL_MACHINEの設定を読み込み、HKEY_CURRENT_USER側にも設定があれば、これで上書きします。通常は、HKEY_LOCAL_MACHINE 側だけを設定します。ユーザ個別に異なった設定を使いたい場合のみ、HKEY_CURRENT_USERを設定するようにしてください。

mDN Wrapper configuration information stored under

Software\JPNIC\MDN

of HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER. mDN Wrapper first loads the setting of HKEY_LOCAL_MACHINE and overwrites the setting using the setting at HKEY_CURRENT_USER side, if any. Usually, only the HKEY_LOCAL_MACHINE side is set. The HKEY_CURRENT_USER side is also set only when it is desired to use different setting for each user.

特に、コンフィギュレーションプログラムは常に HKEY_LOCAL_MACHINE の 設定しか読み書きしません。コンフィギュレーションファイルを使用して 設定を行う場合には気をつけてください。

In particular, the configuration program reads and writes only the settings of HKEY_LOCAL_MACHINE. Be careful when using the configuration file to set settings.

レジストリキー

Registry Key

全体の共通の設定と、プログラム個別設定とがあります。

There are common settings and program-specific settings.

共通定義

Common definition

        Software\JPNIC\MDN\Where         変換位置
	                    0:WINSOCK1.1 WINSOCK2.0の両方で
                            1:WINSOCK2.0 があればそちらで
			    2:WINSOCK1.1 だけで
			    3:WINSOCK2.0 だけで
        Software\JPNIC\MDN\Encoding      DNS側エンコーディング名
        Software\JPNIC\MDN\Normalize     正規化の方式
        Software\JPNIC\MDN\LogLevel      ログレベル
        Software\JPNIC\MDN\LogFile       ログファイル
        Software\JPNIC\MDN\Where         Conversion location
	                    0:Both WINSOCK1.1 and WINSOCK2.0
                            1:At WINSOCK2.0 when exists
			    2:At WINSOCK1.1 only
			    3:At WINSOCK2.0 only
        Software\JPNIC\MDN\Encoding      DNS side encoding name
        Software\JPNIC\MDN\Normalize     Method of normalization
        Software\JPNIC\MDN\LogLevel      Log level
        Software\JPNIC\MDN\LogFile       Log file

プログラム個別設定

Program-specific Settings

変換位置、およびプログラム側のエンコーディングは プログラム毎に特定することもできます。 これらは、以下のキーハイブの下に、 プログラム名をキーとする値で設定します。

Conversion location and program side encoding can be specified for each program.These are set under the following key hive using the value using the program name as the key.

Software\JPNIC\MDN\PerProg\<name>\Where Software\JPNIC\MDN\PerProg\<name>\Encoding
指定されていない場合には、
When they are not specified:
Where 01.1、2.0 の両方で変換
Where 0Converts at both 1.1 and 2.0
Encoding プロセスのコードページ
Encoding Code page of process
とみなします。
are assumed.