
                     -------------------------------------------------------
                           "Dog server" Installation and using Guide
                                      (English Version)
                                  (中文版在本文件的后半部分)
                     -------------------------------------------------------

                 Copyrights (c)  1999 , Rainbow Goldensoft Co., Ltd. 

======================
Introduction of Netdog
======================

NetDog consists of "Dog hardware", "Dog server" and "Dog client" three parts.
--------------
"Dog hardware"
--------------
    The hardware is a circuit to be plugged on a parallel port. It contains a singlechip 
microprocessor and 200 bytes of storage. It receives data from the parallel port, 
and communicates with the drivers in the computer at proper time. Dog hardware is inserted 
on the parallel port of the computer in which "Dog server" is loaded. 

------------
"Dog server"
------------
    A set of software. "Dog server" manages "Dog hardware", provides services to "Dog client", 
and also dominates the number of "Dog client". These services include login, logout, read, 
and convert.  "Dog server" may be installed on NetWare file server, NT server or any computer 
that runs Windows 9x/NT or 2000 in the LAN.

------------
"Dog client"
------------
    A set of API or EXE encryption tool. API provides a set of functions for 
operating "Dog hardware", such as: apply to the Dog server for login or logout, data 
conversion, reading data from "Dog hardware", etc. Software developers who want to protect 
their programs can use these functions, to prevent their applications from piracy and keep 
their copyrights. "Dog client" operates "Dog hardware" through "Dog server".

------------------------
"Dog client application"
------------------------
"Dog client application" is an application program that is protected by Netdog by using 
Netdog's API or Utility and runs in any workstation of the LAN.

NetDog is specially designed for running in network environment. Only one NetDog hardware 
is needed in a network for an application, and "Dog client application" running in each 
workstation will be protected by the NetDog. This will dramatically reduce the cost of 
software developers in protecting their programs (as compared with one Dog for each 
workstation), and thus reduce the cost of their software itself. 

"Dog server" should be installed before your protecting work.

Upon delivery of your protected application program to your end users, "Dog server" and 
device drivers should be provided along with your protected program. And It's the 
developer's responsibility to instruct your end user how to install "Dog server" and 
device drivers and network protocols. 

With regard to installation for "Dog Server" and device drivers, please refer "Quick strat.doc"
in the installation path.

With regard to protection skills, please refer "Developer's Manual for GS-NH".

===================
Passed Environments
===================
    Novell NetWare 3.x/4.x/5.x
    Windows NT Server 3.x/4.x/5.x
    Windows 9x

===============================
Functionalities of "Dog Server"
===============================
1) "Dog Server" is a service program, is an application that communicates with the 
   protected application and the Dog hardware, it works like a bridge between them. 
   The protected application accesses the Dog hardware through "Dog Server". 
   "Dog Server" is used by the developers and developers' end users, and is 
   released along with the developer's programs. It must be installed in the end user's 
   network server and normally starts with the operating system. No "Dog Server" 
   duplication is allowed to be run in the same time. 
     
   "Dog Server" has no any relationship with serial number of Netdog.

2) Login to "Dog Server" and logout from "Dog Server"
   When a protected application starts at a workstarion, a login operation should be 
   first done.
   When a protected application is going to terminate, a logout operation should be
   done ahead.
   Before login or after logout, the protected application is not able to get any 
   services from "Dog Server". 

3) User number management
   User number management ensures that the simultaneous users in the same network 
   will not be more than the allowed number of the protected application, as being 
   required by the develper. 

4) Diagnostic information
   Besides the management of client license, and provision of service for Netdog 
   access, "Dog Server" also provide a service to the Monitor program, which is in 
   the UTILITY\MONITOR directory after Netdog's SDK installation. This service 
   involves the provision of the following information:
a. The operating system, version, and computer name;
b. The version of "Dog Server";
c. The supported network protocols by this "Dog Server";
d. The allowed maximum users and the number of users currently logined. 

5)  Collision detection
    When "Dog Server" is starting, it first look for other "Dog Server" runing at the 
    network, and the "Dog Server" managing same serial number with its. If the "Dog 
    Server" has been found, this "Dog Server" will refuse to answer any request of 
    this "Dog Client", but the "Dog Server" continues to run. This is because the 
    "Dog Server" may be used to manage other serial number's Netdogs.   

========================================
Installation of "Dog Server" for NetWare
========================================
1) Get NDOGINST.DAT file:
   After successful installation of SDK, you must execute DOGEDIT.EXE, which is located 
at UTILITY folder, to get NDOGINST.DOG file. Please set access "Password" in hardware 
key and maximum user number of your protected application(s) by using DOGEDIT.EXE, 
and you will get NDOGINST.DAT file at UTILITY folder, please COPY the file to the folder 
SERVER, otherwise "Dog Server" can not be installed.

2) Copy ALL files in SERVER folder to a floppy disk.

3) Insert the hardware key into a parallel port of the NetWare Server.

4) Installing "Dog Server" for NetWare
   Execute command NDOGINST.NLM in the floppy disk at server console. The syntax is:
      LOAD A:NDOGINST  A:\    （Note last "\"）

5) Start "Dog Server", please execute NDSRVNW.NLM, the syntax is:
      LOAD NDSRVNW 
   In order to load automatically "Dog Server" when NetWare Server starting, please 
modify AUTOEXEC.NCF (execute LOAD INSTALL at server console, select modify AUTOEXEC.NCF, 
and add following line: 
      LOAD NDSRVNW
Save your modification on AUTOEXEC.NCF).

6) Deleting the "Dog Server" of certain serial number, the syntax is:
      LOAD NDOGINST -u:<serial number>

7) Caution: 1) There is no need for device driver in NetWrae system;
            2) Please don't load IPXRTR.

=============================================================
Using method of installation program SRVSETUP.EXE for WINDOWS 
=============================================================
    SRVSETUP.EXE is an installing program designed for WINDOWS system, which may 
automatically discern the type of operating system and install corresponding 
"Dog Server" and device driver. Please follow the steps to install "Dog Server" 
and device driver:

1) Get NDOGINST.DAT file:
   After successful installation of SDK, you must execute DOGEDIT.EXE, which is located 
at UTILITY folder, to get NDOGINST.DOG file. Please set access "Password" in hardware 
key and maximum user number of your protected application(s) by using DOGEDIT.EXE, 
and you will get NDOGINST.DAT file at UTILITY folder, please COPY the file to the folder 
SERVER, otherwise "Dog Server" can not be installed.

2) Copy ALL files in SERVER folder to a floppy disk.

3) Insert the hardware key into a parallel port of the computer.

4) Installing "Dog Server" and device driver for Windows
    The syntax:

  a. [drive:]SRVSETUP install [source path of "Dog Server"]
     Install "Dog Server" and device driver on the computer. In the case of illustration,
     you may enter:
     A:SRVSETUP install A:\
    
     If installation process runs into failure, please delete the files in the 
     Windows folder which have .DOG extension, and reinstall again.

  b. [drive:]SRVSETUP remove [serial number]
     Delete "Dog Server" from the system, if "Dog Server" manages dogs' number not 
     less than one, and you may delete a certain serial number's dog, "serial number" 
     parameter is that you want to delete.
     If you miss the "serial number" parameter, that means you want to delete ALL Netdog's 
     services.

  c. [drive:]SRVSETUP info
     Get status of "Dog Server".

Notes:
a. There should be NHSETUP.DLL in the same directory or searchable path.
b. The installing operator must have the rights to read/write to the system 
   directory (it may has a administrator's rights), and the installing program should 
   be run at the server's local console.

===========================
Using guide for NHSETUP.DLL
===========================
    SRVSETUP.DLL is a DLL program for Windows95/98/NT/2000, which may be used by 
developers to write an installation program for "Dog Server" and device drivers. 
    SRVSETUP.EXE do use this DLL to fulfill the installation process.

    NHSETUP.DLL provides the following functions:

    unsigned long PASCAL GetDLLVersion ( void );
    unsigned long PASCAL GetInstallInfo ( void );
    unsigned long PASCAL Install ( char * SourcePath );
    unsigned long PASCAL Remove ( unsigned long * SerialNo );

    Descriptions for the functions
    ------------------------------

    --------------------------------------------
    unsigned long PASCAL GetDLLVersion ( void );
    --------------------------------------------
    Function: Get verion number of the program
    Input parameter: None
    Output parameter: None
    Return value: Version number. 

    ---------------------------------------------
    unsigned long PASCAL GetInstallInfo ( void );
    ---------------------------------------------
    Function: Get the status of "Dog server"
    Input parameter: None
    Output parameter: None
    Return value: The "Dog server" installation status. 0 reflects that "Dog server" is 
                  in good status. For other status, please see following error codes. 

    ---------------------------------------------------
    unsigned long PASCAL Install ( char * SourcePath );
    ---------------------------------------------------
    Function: Installing "Dog Server" 
    Input parameter: original path of "Dog Server" program. If it's the current path, 
                     could be "."
    Output parameter: None
    Return value: The installation status of "Dog Server". 0 reflects that "Dog server"
                  is installed well. For other status, please see following error codes. 

    ---------------------------------------------------------
    unsigned long PASCAL Remove ( unsigned long * SerialNo );
    ---------------------------------------------------------
    Function: Deleting "Dog Server"
    Input Parameter: The serial number of the NetDog to be deleted. If the parameter 
                     is 0, it means that all dogs' services managed by the "Dog Server" 
                     will be deleted, as well as the service program, you should input 0. 
    Output parameter: None
    Return value: 0 means that the action is completed, others are following error codes. 

    ----------------
    Error codes list
    ----------------
        20001   --  "Dog server" is not installed or is not running 
        20002   --  No Netdog driver is installed
        20003   --  Error with manipulation on the service controller/registry table. 
                    This might be caused by lack of enough authorization. 
        20004   --  No file is defined for installation
        20005   --  No file is found for installation
        20006   --  Unable to install files to the specified folder. 
        20007   --  NDogInst.DAT file not found
        20008   --  Illegal NDogInst.DAT file
        20009   --  No NDOGSRV.DOG file generated
        20010   --  Illegal NDOGSRV.DOG file
        20011   --  NDogInst.DAT file not found
        20012   --  Service can not be started
        20013   --  Installation failure
        20014   --  Failure on deleting relative files 
        20015   --  Illegal serial number
        20016   --  Service can not be stopped
        20017   --  "Dog Server" can not be deleted
        20018   --  Device driver error
        20019   --  "Dog Server" error
        20101   --  Device driver stopped
        20102   --  Device driver is being started
        20103   --  Device driver is being stopped
        20104   --  Device driver busy
        20105   --  Device driver is being paused
        20106   --  Device driver has been paused
        20201   --  "Dog Server" stopped
        20202   --  "Dog Server" is being started
        20203   --  "Dog Server" is being stopped
        20204   --  "Dog Server" busy
        20205   --  "Dog Server" is being paused
        20206   --  "Dog Server" has been paused
        Others   --  Please see WinError.H
Caution: 
a. You can call GetLastError() to get a more detailed description after getting 
   error.  

b. If a serial number is defined when calling function Remove(), the service for 
   that Netdog will be terminated by "Dog Server", and the serial number will be 
   deleted from the file Ndogsrv.dog in the system directory of Windows. But ONE
   important thing should be mentioned is all other dog's service will be reset, 
   and all "Dog Clients" related with these dogs should login again to regain 
   service.
   If last Netdog's service is going to be stopped, "Dog Server" will stop all 
   service for Netdog.

=================
Technical Support
=================
    For technical issues, please contact Rainbow GoldenSoft Co., Ltd. or its distributors 
immediately. 
    For contact information, please see Address.txt under installation path.


=========================================================================
  "Dog" is trademarks of Beijing Goldensoft Co., Ltd., which is authorized to 
Rainbow Goldensoft Co., Ltd. in software protection products.



FOLLOWING IS CHINESE VERSION OF THIS FILE.


                  =======================================================
                                网络狗服务程序及驱动程序
                                     安装及使用说明
                                        (中文版)
                  =======================================================

==========
网络狗简介
==========

    网络狗由"狗"硬件、"狗"服务器和"狗"客户端三个部分构成：

    "狗"硬件    一个可安装在计算机并行口上的硬件电路，其中内置了一片单片机
                及 200字节的存储器，该单片机接收并口得到的数据，并在适当的
                时候与计算机中的驱动程序进行通信。
                "狗"硬件安装在要加载"狗"服务器的计算机并行口上。

    "狗"服务器  一套软件。
                "狗"服务器管理"狗"硬件，为"狗"客户端提供服务，同时限制"狗"
                客户端的数量。服务的内容包括登录、退出、读和变换。"狗"服务
                器安装在NetWare文件服务器、NT服务器或者局域网中任一台
                Windows 95/Windows 98/Windows 2000上。

    "狗"客户端  一套接口软件或是 EXE加密工具。
                接口软件中提供了一组函数。这组函数提供了对"狗"硬件操作的接口，
                其中包括：向"狗"服务器申请登录及撤消登录，数据变换功能，读"狗"
                硬件功能。想对自己编制的软件进行加密的编程人员综合使用这几
                个函数就可以使您的软件不被非法使用，您的权益得到保护。"狗"客
                户端通过"狗"服务器操作"狗"硬件。

    此外，我们称调用了"狗"客户端而加密了的软件为 ── "狗"客户端软件。

    网络狗是专为保护在网络上运行的软件而设计的。一个网络只要安装一个网络狗的
    硬件，而不需要在每个工作站上都安装，则"狗"客户端软件在网络中任意一个工作
    站上运行都将得到网络"狗"的有效保护。这将极大地减少软件开发商用于软件保护
    上的费用（相对于为每个工作站配一只"狗"），从而降低软件的成本。

    软件开发商在进行加密工作时需要安装相应的"狗"服务器程序及设备驱动程序。

    软件开发商在发行软件时，应向最终用户提供"狗"服务器程序及设备驱动程序，并根
    据最终用户的网络环境，指导最终用户安装相应的"狗"服务器程序、设备驱动程序及
    网络协议。(对于Netware服务器环境不需要安装设备驱动程序，只进行"狗"服务器程
    序的安装即可。)
  
    关于“狗”服务器程序、设备驱动程序的安装请参见安装目录下的《GS-NH快速入门》。
    关于加密技巧，请参阅《GS-NH网络狗开发商指南》。


================
已通过的测试环境
================
    Novell NetWare 3.x/4.x/5.x
    Windows NT SERVER 3.x, 4.x, 5.x
    Windows 9x

======================
网络狗服务程序功能介绍
======================
1)  服务程序是一个应用程序，它与被保护软件和狗硬件通讯，象是连接二者的一个通道。
    被保护软件通过服务程序来访问狗硬件。服务程序由开发商和最终用户使用，该软件
    与开发商软件一同发行，安装在最终用户的网络中。服务程序一般情况下应随操作系
    统一同启动。并且不允许启动多个副本。
    服务程序本身与狗的系列号无关。

2)  登录与注销
    当被保护的应用程序在工作站上启动时，应执行登录操作。被保护的应用程序在终止前
    应执行注销操作。
    登录前和注销后被保护的应用程序得不到任何服务。

3)  用户数管理
    用户数管理，即保证在网络中同时运行被保护软件的工作站的数目不超过开发商所规定的
    最大用户数。

4)  诊断信息
    服务程序除了管理客户的运行许可及提供访问狗的服务外，还专门对网络狗的诊断程序
    NDTOOL.EXE(网络狗的SDK安装以后，NDTOOL.EXE程序位于UTILITY\MONITOR目录下)程序
    提供诊断服务，即向NDTOOL软件提供下列信息：
    本程序的运行环境（operating system , version, and computer name）；
    本程序的version；
    本程序所能支持的网络协议；
    本程序管理的各个的狗所限定的用户数及正在使用的用户数。

5)  冲突检测
    服务程序在启动后，首先会在网络上查询是否有其他的服务程序也在管理着与本机相同系列号
    的狗，如果有，服务程序会停止对该狗的客户请求给出应答，但程序继续运行，因为服务程序
    有可能还要管理别的系列号的狗。

=================================
NetWare“狗”服务器的安装以及删除
=================================
1) 得到NDOGINST.DAT文件：
   网络狗SDK安装成功后，运行UTILITY目录下的DOGEDIT.EXE工具，设置狗的密码和用户数。
   成功后会在UTILITY目录下得到NDOGINST.DAT文件，将此文件拷贝至SERVER目录，不然将
   影响后面的服务程序的安装！

2) 拷贝SERVER目录下的所有文件到软盘上。

3) 将狗硬件插入NetWare服务器的并口上。

4) 安装Netware“狗”服务器。在服务器的控制台上执行下面的命令：
   LOAD NDOGINST <SOURCE PATH>
   假设文件放置在软盘的根目录，可以：
   LOAD A:NDOGINST A:\
   注意“狗”服务器所在目录下应该有NDOGINST.DAT 文件。

5) 加载“狗”服务器程序，在服务器的控制台上执行下面的命令：
   LOAD NDSRVNW
   为了今后在服务器启动时，能够自动加载“狗”服务器程序，请修改AUTOEXEC.NCF
   (在控制台运行LOAD INSTALL，选择修改AUTOEXEC.NCF)，加入以下一行语句：
   LOAD NDSRVNW

6) 删除某一系列号的狗服务器。
   LOAD NDOGINST -u:<serial number>

7) 注意事项：
  a. NetWare“狗”服务器不需要安装驱动程序；
  b. 不要加载IPXRTR。 	
      

===========================================
WINDOWS系统下的安装程序SRVSETUP.EXE使用方法
===========================================
    SRVSETUP.EXE 是适用于Windows 系统平台、用于网络狗驱动程序和服务器程序的
安装的应用程序。请按照以下步骤进行WINDOWS系统的安装：
1) 得到NDOGINST.DAT文件：
   网络狗SDK安装成功后，运行UTILITY目录下的DOGEDIT.EXE工具，设置狗的密码和用户数。
   成功后会在UTILITY目录下得到NDOGINST.DAT文件，将此文件拷贝至SERVER目录，不然将
   影响后面的服务程序的安装！

2) 拷贝SERVER目录下的所有文件到软盘上。

3) 将狗硬件插入WINDOWS 系统的计算机的并口上。

4) 安装“狗”服务器。SRVSETUP.EXE会自动判断操作系统的类型，其使用格式为：

    [driver:]SRVSETUP install [source path at which drivers exist]
       安装狗服务器及相应的驱动程序，后面跟的参数是路径，当使用当前目录时为：
           SRVSETUP install .
       注意此时 NDOGINST.DAT 应该放置在同一目录。如果安装不能成功，
       将 Windows 目录下的 .DOG 文件删除后再重新安装。

    [driver:]SRVSETUP remove [serial number of the dog you want to remove]
       删除狗服务器。如果狗服务器管理超过一个狗，后面可以跟特定的狗系列
       号，以删除特定的狗服务器。
       没有该参数表示删除所有狗服务。

    [driver:]SRVSETUP info
       得到狗服务器的运行状态

注意：1) 本程序运行时，须有NHSetup.dll在当前目录或在可搜索的路径中。
      2) 安装驱动软件的操作员必须有对系统文件有操作权力(最好是系统管理员
         Administrator权限)的人，在服务器本地进行。

======================================================   
服务及驱动程序的安装程序动态连接库NHSETUP.DLL使用说明
======================================================
   NHSETUP.DLL 是适用于Windows 系统平台、用于网络狗驱动程序和服务器程序的
安装的动态连接库程序。
   在Windows 系统平台下，网络狗的服务及驱动程序的安装可以用安装程序SRVSETUP.EXE来完成，
也可以通过用VC/VB等编程语言调用NHSETUP.DLL来完成网络狗服务以及驱动程序的安装。

1) NHSETUP.DLL API详解

    NHSETUP.DLL 运行于 Windows95/98/NT/2000 平台上。可以进行当前平台
下狗服务程序、狗驱动程序的安装、启动和删除。

    NHSETUP.DLL 提供了以下函数：

    unsigned long PASCAL GetDLLVersion ( void );
    unsigned long PASCAL GetInstallInfo ( void );
    unsigned long PASCAL Install ( char * SourcePath );
    unsigned long PASCAL Remove ( unsigned long * SerialNo );

    函数说明：
    unsigned long PASCAL GetDLLVersion ( void );
        功能：得到版本号
        输入参数：无
        输出参数：无
        返回值：该DLL的版本号。

    unsigned long PASCAL GetInstallInfo ( void );
        功能：得到网络狗服务器状态
        输入参数：无
        输出参数：无
        返回值：狗服务器安装状态。0 表示狗服务器运行良好，其他是状态，参见错误码。

    unsigned long PASCAL Install ( char * SourcePath );
        功能：安装网络狗服务器
        输入参数：网络狗服务器程序的原始路径，如果是当前路径，可以为"."
        输出参数：无
        返回值：0表示狗服务器安装正确，其他是错误码

    unsigned long PASCAL Remove ( unsigned long * SerialNo );
        功能：删除网络狗
        输入参数：欲删除的网络狗系列号，如果是删除该服务器上所有的狗，连同服务程序，
                  则输入 0
        输出参数：无
        返回值：0 表示删除完成，其他是错误码

    错误码表：
        20001   --  狗服务器没有安装或没有运行
        20002   --  没有安装狗驱动程序
        20003   --  操作服务控制器或注册表错，可能是因为没有权限
        20004   --  没有指定需要进行安装的文件
        20005   --  未找到需要进行安装的文件
        20006   --  未能安装文件到指定的目录
        20007   --  未找到 NDogInst.DAT 文件
        20008   --  不合法的 NDogInst.DAT 文件
        20009   --  未能生成 NDOGSRV.DOG 文件
        20010   --  不合法的 NDOGSRV.DOG 文件
        20011   --  没有找到 NDogInst.DAT 文件
        20012   --  未能启动服务
        20013   --  安装失败
        20014   --  未能删除相应的文件
        20015   --  不合法的系列号
        20016   --  未能停止服务
        20017   --  未能删除服务器
        20018   --  驱动程序错
        20019   --  服务程序错
        20101   --  驱动程序停止
        20102   --  驱动程序正在启动
        20103   --  驱动程序正在停止
        20104   --  驱动程序忙
        20105   --  驱动程序正在暂停
        20106   --  驱动程序已暂停
        20201   --  服务程序停止
        20202   --  服务程序正在启动
        20203   --  服务程序正在停止
        20204   --  服务程序忙
        20205   --  服务程序正在暂停
        20206   --  服务程序已暂停
        其他    --  参见 WinError.H
   注意：
      1) 您可以在得到当前的错误码后，通过调用 GetLastError() 以得到更详细的解释。

      2) 在调用Remove()函数时，如果没有指定停止哪个系列号的狗，则所有狗的服务都
         将被停止并注销。如果指定了一个系列号，那么只有这个系列号的狗的服务被终
         止。这只狗的系列号将从Ndogsrv.dog文件中删除。但要注意在此过程中，所有
         其他系列号的狗的服务都将被置位，这些狗的狗客户必须重新LOGIN才可以获得
         服务。如果最后一只狗的服务也被停止，工具将停止所有狗服务器程序的服务。


==========
技术支持
==========

    如果遇到技术问题，请立即与彩虹天地公司或分公司或代理商联系。

    联系地址请看 /Address.txt。


=====================================================================
	"狗"是北京金天地软件发展有限公司的注册商标，已授权北京彩虹天地
信息技术有限公司使用。
