昜丿捺

没有阳光,沉默而居

1. 查询当前数据库的基本信息

1
SELECT * FROM sysfiles;

记录查询结果的fileid值,在第2、3步要使用

阅读全文 »

一、使用API函数URLDownloadToFile,下载网页、图片等其它文件到本地

引入API:

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

用法:

1
2
3
4
5
6
7
8
9
Private Sub test()
Dim v_URL As String, v_FileName As String, v_Result As Long
v_URL = "http://www.baidu.com/img/baidu_logo.gif"
v_FileName = App.Path & "\Baidu.bmp" '下载百度Logo图片
v_Result = URLDownloadToFile(0, v_URL, v_FileName, 0, 0) '下载文件,返回 0 表示成功
v_URL = "http://www.baidu.com"
v_FileName = App.Path & "\Baidu.html" '下载百度首页的网页
v_Result = URLDownloadToFile(0, v_URL, v_FileName, 0, 0) '下载文件,返回 0 表示成功
End Sub
阅读全文 »

共享目录

1. 编辑并添加共享目录配置

1
vi /etc/samba/smb.conf

添加内容格式如下:

[xxFileServer]
        path = /filedisk/xxFileServer
        guest ok = yes
        writable = yes
        read only = No
        create mask = 0777
        directory mask = 0777
阅读全文 »