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

📄 dbigetsysversion.html

📁 Delphi API应用手册
💻 HTML
字号:
<HTML>
<HEAD>
<TITLE>BDE API Examples (DbiGetSysVersion)</TITLE>
<META NAME="KEYWORDS" CONTENT="BDE, Borland">
<META NAME="DESCRIPTION" CONTENT="">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000000" ALINK="#999999" VLINK="#666666">

<CENTER>
<TABLE CELLPADDING="4" CELLSPACING="4" BORDER="0" WIDTH="600">

<TR>

<TD ALIGN="CENTER" VALIGN="TOP" COLSPAN="1"><NOBR><A HREF="/"><IMG SRC="/images/bolus.gif" ALT="[View Borland Home Page]" BORDER="0"></A><A HREF="/products.html"><IMG SRC="/images/products.gif" ALT="[View Product List]" BORDER="0"></A><A HREF="/searchsite/"><IMG SRC="/images/search.gif" ALT="[Search This Web Site]" BORDER="0"></A><A HREF="/download.html"><IMG SRC="/images/downloads.gif" ALT="[View Available Downloads]" BORDER="0"></A><A HREF="/membership.html"><IMG SRC="/images/membership.gif" ALT="[Join Borland Online]" BORDER="0"></A><A HREF="/newsgroups/"><IMG SRC="/images/newsgroups.gif" ALT="[Enter Discussion Area]" BORDER="0"></A><A HREF="/feedback/"><IMG SRC="/images/feedback.gif" ALT="[Send Email To Webmaster]" BORDER="0"></A></NOBR></TD>
</TR>

<TR>

<TR><TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="1"><font size=2>

<h2>BDE API Examples (DbiGetSysVersion)</h2>
Retrieves the system version information, including the BDE version number, date, and time, and the client interface version number. 
<hr size=2 noshade>
<p>

<b>Get BDE system version information:</b> 
<DD>This example is included with Delphi in the BDE32.HLP file.

<hr size=2 noshade>

<h3>Example 1: Retrun BDE Major and Minor Version in a String</h3>
 This example uses the following format:<BR> <I>label1.caption := getversioninformation;</I>

<PRE>function getversioninformation: string;

  function DetermineMinorVersion(IntfVer, Month, Day, Year: integer): integer;
  begin
    Result := -1;
    case IntfVer of
      3:
      begin
        if (Month = 12) and (Day = 1) and (Year = 1995) then
          Result := 0;
        if (Month = 2) and (Day = 4) and (Year = 1996) then
          Result := 10;
        if (Month = 6) and (Day = 1) and (Year = 1996) then
          Result := 11;
        if (Month = 8) and (Day = 22) and (Year = 1996) then
          Result := 12;
        if (Month = 9) and (Day = 19) and (Year = 1996) then
          Result := 50;
        if (Month = 12) and (Day = 2) and (Year = 1996) then
          Result := 51;
      end;
      4:
      begin
        if (Month = 3) and (Day = 11) and (Year = 1997) then
          Result := 0;
        if (Month = 7) and (Day = 16) and (Year = 1997) then
          Result := 1;
        if (Month = 10) and (Day = 28) and (Year = 1997) then
          Result := 50;
        if (Month = 11) and (Day = 14) and (Year = 1997) then
          Result := 51;
      end;
      5:
      begin
        Result := -1;
      end;
    end;
  end;

var
  Version: SYSVersion;
  Major, Minor: smallint;
  Month, Day: word;
  Year: smallint;

begin

  Result := 'Unknown';
  try try
    Check(DbiInit(nil));
    Check(DbiGetSysVersion(Version));
    Check(DbiDateDecode(Version.dateVer, Month, Day, Year));

    Major := Version.iVersion div 100;
    Minor := DetermineMinorVersion(Major, Month, Day, Year);
    if Minor = -1 then
      Result := Format('%d.xx (cannot determine minor version)', [Major])
    else
      if Minor < 10 then
        Result := Format('%d.0%d', [Major, Minor])
      else
        Result := Format('%d.%d', [Major, Minor]);
  except
  end;
  finally
    DbiExit;
  end;
end;</PRE>

<hr size=2 noshade>
<p>



<A HREF="/devsupport/bde/bdeapiex/index.html">Back to BDE API Reference Page</A>

</TD></TR>

<TR><TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="1"><font size=2>


<HR SIZE="2" NOSHADE>

<FONT SIZE = 2><i><b>DISCLAIMER:</b> You have the right to use this technical information subject to 
the terms of  the No-Nonsense License Statement that you received with the Borland product to which 
this information pertains.</FONT></i></B>


</dl>
</td>

</TR>

<TR>

<!-- THIS IS THE BOTTOM COPYRIGHT & UPDATED MESSAGE -->

<TD ALIGN="CENTER" VALIGN="TOP" COLSPAN="3"><FONT SIZE="2"><A HREF="/copyright.html">Trademarks &amp; Copyright</A> &#169; 1998 Borland International, Inc.

<SCRIPT LANGUAGE="JavaScript">
<!-- HIDE FROM OLD BROWSERS

// THIS WILL WRITE OUT THE LAST MODIFIED DATE
// YOU DO NOT NEED TO CHANGE ANYTHING HERE

function makeArray(arraySize) {
     this.length = arraySize
     return this
}

monthNames = new makeArray(12)
monthNames[1] = "January"
monthNames[2] = "February"
monthNames[3] = "March"
monthNames[4] = "April"
monthNames[5] = "May"
monthNames[6] = "June"
monthNames[7] = "July"
monthNames[8] = "August"
monthNames[9] = "September"
monthNames[10] = "October"
monthNames[11] = "November"
monthNames[12] = "December"

updated = new Date(document.lastModified)
theMonth = monthNames[updated.getMonth() + 1]
theDate = updated.getDate()
theYear = updated.getYear() + 1900

document.write("Last modified on " + theDate +  "-" + theMonth + "-" + theYear + ".")
// END HIDING -->
</SCRIPT></FONT></TD>
</TR>

</TABLE>
</CENTER>

</BODY>
</HTML>

⌨️ 快捷键说明

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