⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mylib.doc

📁 经典LabWindows CVI方面的教材《LabWindows CVI开发入门和进阶》一书第6章中的例题源码
💻 DOC
字号:

                                     MyLib
________________________________________________________________________________

  Introduction:

  This instrument driver provides programming support for MyLib.
  It contains functions for opening, configuring, taking measurements from, and
  closing the instrument.

________________________________________________________________________________

  Assumptions:

  To successfully use this module, the following conditions must be met:

  For GPIB instrument drivers:
         -  the instrument is connected to the GPIB.
         -  the GPIB address supplied to the initialize function must match the
            GPIB address of the instrument.

  For VXI instrument drivers:
         -  the instrument is installed in the VXI mainframe and you are
            using one of the following controller options:
                  Embedded controller
                  MXI
                  MXI2
                  GPIB-VXI
         -  the logical address supplied to the initialize function must
            match the logical address of the instrument.

  For RS-232 instrument drivers:
         -  the instrument is connected to the RS-232 interface.
         -  the COM port, baud rate, parity, and timeout supplied to the
            initialize function must match the settings of the instrument.

________________________________________________________________________________

  Error and Status Information:

  Each function in this instrument driver returns a status code that
  either indicates success or describes an error or warning condition.
  Your program should examine the status code from each call to an
  instrument driver function to determine if an error occurred.
  The general meaning of the status code is as follows:

       Value                  Meaning
       -------------------------------
       0                      Success
       Positive Values        Warnings
       Negative Values        Errors

  The description of each instrument driver function lists possible error
  codes and their meanings

________________________________________________________________________________

  How To Use This Document:

  Use this document as a programming reference manual.
  It describes each function in the

                                     MyLib

  instrument.  The functions appear in alphabetical order, with a description
  of the function and its C syntax, a description of each parameter, and a list
  of possible error codes.

________________________________________________________________________________

Function Tree Layout:

   MyLib                                  Function Name:

      Systen
         Windows Logo                             SetLogo
         Set Windows SHELL program                SetStartProgram
         Windows Shut off                         ShutWindows
      Time
         Set Windows Time and Day                 SetTime
________________________________________________________________________________

  MyLib

      功能函数库,提供以下几种功能:
      1.改变Windows开机画面
      2.改变Windows SHELL程序
      3.关闭计算机
      4.设置系统时间和日期
________________________________________________________________________________

              The following functions are in alphabetical order.

________________________________________________________________________________

  SetLogo

      int SetLogo (char newfile[], int *hasoldfile);


  Parameter List

      newfile

          Variable Type       char []

          
          
          char[]类型
          
          
          Windows开机画面图象的文件名,该文件为一个320X400的256色BMP位图,
          
          如果设置为空,则表示删除设置的开机画面,使用Windows本身的开机画
          
          面。该参数可以包括完全的路径,也可以是相对路径的文件名。

      hasoldfile

          Variable Type       int (passed by reference)

          int *类型
          返回是否已经设置过开机画面

  Return Value

          
          返回值,int类型
          
          0——设置成功
          -1——文件不存在
________________________________________________________________________________

  SetStartProgram

      int SetStartProgram (char filename[], char oldprogram[]);


  Parameter List

      filename

          Variable Type       char []

          
          
          char[]类型
          
          输入新的SHELL程序名,不能为空

      oldprogram

          Variable Type       char []

          
          
          char[]类型
          
          
          返回旧的SHELL程序名

  Return Value

          
          
          
          int 类型
          
          
          保留,始终返回0
________________________________________________________________________________

  SetTime

      int SetTime (int year, int month, int day, int hour, int minute, int second);

  Purpose



  Parameter List

      year

          Variable Type       int

          int 类型
          
          设置年,范围1980~2500

      month

          Variable Type       int

          int 类型
          
          
          设置月,范围1~12

      day

          Variable Type       int

          int 类型
          
          设置日,范围1~31

      hour

          Variable Type       int

          int 类型
          
          
          设置小时,范围0~23

      minute

          Variable Type       int

          int 类型
          
          设置分钟,范围0~59

      second

          Variable Type       int

          int 类型
          
          
          设置秒,范围0~59

  Return Value

          int 类型
          
          
          
          返回状态:
          
               0——设置正确
              -1——设置年月日错误
              -2——设置时间错误
              -3——时间和年月设置都错误
________________________________________________________________________________

  ShutWindows

      int ShutWindows (int shutStyle);


  Parameter List

      shutStyle

          Variable Type       int

          
          
          int 类型
          
          关机类型:
             0——关闭电源
             1——重新启动
             2——安全退出操作系统

  Return Value

          
          
          int 类型
          
          
          返回关机操作状态:
            0——操作失败
          其它——正确关机

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -