当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 如何用dde连接word啊?,,,,我给分很快的,,,只要解决问题,我马上给分,, ......
    摘要: 别告诉我在win98里再打一次包。 ......


怎样知道一个硬盘分了几个区到哪里去取数据

怎样知道一个硬盘分了几个区?到哪里去取数据?

NO.1   作者: westfly

var   Drivers,   I,   Mask:   DWord;  
  begin  
      Drivers   :=   GetLogicalDrives;  
      ComboBox1.Items.Clear;  
      for   I   :=   0   to   31   do  
      begin  
          Mask   :=   1;  
          Mask   :=   Mask   shl   I;  
          if   Drivers   and   Mask   =   Mask   then  
              ComboBox1.Items.Add(Chr(Ord(A)   +   I)   +   :);  
      end;  
  end;

NO.2   作者: qiqi97

procedure   TForm1.getdriveinfo;   //查看驱动器信息  
  var  
        d:dword;  
        i:byte;  
        s,sd:string;  
        la,lb,p:int64;  
  begin  
  s:=本机中的逻辑驱动器有:+#10;  
  d:=getlogicaldrives;  
  for   i:=0   to   25   do   begin  
      if   ((d   shr   i)   and   1=1)   then   begin  
        sd:=chr(i+ord(A));  
        s:=s+sd+--;  
        if   i<2   then   s:=s+软盘驱动器+#10  
        else   begin  
          case     GetDriveType(pchar(sd+:\))   of  
            0:   s:=s+驱动器形式不能确定;  
            1:   s:=s+根目录不存在;  
            2:   s:=s+可移动的驱动器;  
            3:   s:=s+硬盘驱动器;  
            4:   s:=s+远程(网络)驱动器;  
            5:   s:=s+CD-ROM驱动器;  
            6:   s:=s+虚拟驱动器;  
            end;  
            if   disksize(i+1)<>-1   then  
            if   GetDiskFreeSpaceex(PChar(sd+:\),la,lb,@p)=true   then  
            s:=s+   容量为+FormatFloat(###,##0,lb)  
                    +   剩余空间为+FormatFloat(###,##0,la)  
                    +#10;  
            if     disksize(i+1)=-1     then   s:=s+     驱动器没准备好+#10;  
            end;  
            end;  
            end;  
  send(driveinfo+s);  
  end;


 ·有关recordsource的问题。    »显示摘要«
    摘要: 我自己在编写一个activex控件时, 在控件中有一个data控件,现在要在此控件中继成data控件的 recordsource属性,用以下代码,调试进出错。 错误说第二个过程(let...)的参数声明不对。请指教! data控件的名字叫data1 public property get recordsource() recordsource = data1.recordsource en......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE