如何用VB获得Windows各类系统目录
现在有很多关于如何用VB获得Windows目 录的文章,但大都只讲到如何获得Windows目录和System目录,有时候我们却需要获得像"我的文档"这样的目录("我的文档"的路径并不是固定 的,可以由自己设定,也有可能因为系统的安装路径不同而不同),那又该如何处理呢?下面我们来具体谈谈如何用VB获得这种路径。
先向大家介绍两个API函数,这两个函数分别是SHGetSpecialFolderLocation和SHGetPathFromIDList,这就是我们用来获得各种路径的武器。
函数声明:
Private
Declare Function SHGetSpecialFolderLocation Lib "Shell32" (ByVal
hwndOwner As Long, ByVal nFolder As Integer, ppidl As Long) As Long
Private
Declare Function SHGetPathFromIDList Lib "Shell32" Alias
"SHGetPathFromIDListA" (ByVal pidl As Long, ByVal szPath As String) As
Long
函数功能及参数说明:
SHGetSpecialFolderLocation:获得某个特殊目录在特殊目录列表中的位置;它有三个参数,第一个参数是用来指定所有者窗口的,在应用中一般我们写上"0"就可以了;第二个参数是一个整数id,它决定要查找的目录是哪一个目录,它的取值可能如下:
&H0& '桌面
&H2& '程序集
&H5& '我的文档
&H6& '收藏夹
&H7& '启动
&H8& '最近打开的文件
&H9& '发送
&HB& '开始菜单
&H13& '网上邻居
&H14& '字体
&H15& 'ShellNew
&H1A& 'Application Data
&H1B& 'PrintHood
&H20& '网页临时文件
&H21& 'Cookies目录
&H22& '历史
第三个参数是获得的特殊目录在特殊目录列表中的地址。
SHGetPathFromIDList:根据某特殊目录在特殊目录列表中的地址获取该目录的准确路径。它有两个参数,第一个参数是特殊目录在特殊目录列表中的地址,也即上一个函数所获得的地址;第二个参数是一个字符串型数据,用来保存返回的特殊目录的准确路径。
比如:为了获得DeskTop的路径,首先需调用SHGetSpecialFolderLocation获得DeskTop在特殊目录列表中的位置Pid,然后调用SHGetPathFromIDList函数获得Pid指向的列表内容,即DeskTop的准确路径。
下面是我编写的一个用来获取Windows各种目录路径的例子,供大家参考。如果您有什么问题或建议,欢迎给我来信(xuhaoliang@21cn.com)。
程序代码如下:
Private
Declare Function SHGetSpecialFolderLocation Lib "Shell32" (ByVal
hwndOwner As Long, ByVal nFolder As Integer, ppidl As Long) As Long
Private
Declare Function SHGetPathFromIDList Lib "Shell32" Alias
"SHGetPathFromIDListA" (ByVal pidl As Long, ByVal szPath As String) As
Long
Private Declare Function GetWindowsDirectory Lib "kernel32"
Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As
Long) As Long
Private Declare Function GetSystemDirectory Lib
"kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal
nSize As Long) As Long
Private Declare Function GetTempPath Lib
"kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal
lpBuffer As String) As Long
Const MAX_LEN = 200 '字符串最大长度
Const DESKTOP = &H0& '桌面
Const PROGRAMS = &H2& '程序集
Const MYDOCUMENTS = &H5& '我的文档
Const MYFAVORITES = &H6& '收藏夹
Const STARTUP = &H7& '启动
Const RECENT = &H8& '最近打开的文件
Const SENDTO = &H9& '发送
Const STARTMENU = &HB& '开始菜单
Const NETHOOD = &H13& '网上邻居
Const FONTS = &H14& '字体
Const SHELLNEW = &H15& 'ShellNew
Const APPDATA = &H1A& 'Application Data
Const PRINTHOOD = &H1B& 'PrintHood
Const PAGETMP = &H20& '网页临时文件
Const COOKIES = &H21& 'Cookies目录
Const HISTORY = &H22& '历史
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Dim sTmp As String * MAX_LEN '存放结果的固定长度的字符串
Dim nLength As Long '字符串的实际长度
Dim pidl As Long '某特殊目录在特殊目录列表中的位置
'*************************获得Windows目录**********************************
Length = GetWindowsDirectory(sTmp, MAX_LEN)
txtWin.Text = Left(sTmp, Length)
'*************************获得System目录***********************************
Length = GetSystemDirectory(sTmp, MAX_LEN)
txtSystem.Text = Left(sTmp, Length)
'*************************获得Temp目录***********************************
Length = GetTempPath(MAX_LEN, sTmp)
txtTemp.Text = Left(sTmp, Length)
'*************************获得DeskTop目录**********************************
SHGetSpecialFolderLocation 0, DESKTOP, pidl
SHGetPathFromIDList pidl, sTmp
txtDesktop.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得发送到目录**********************************
SHGetSpecialFolderLocation 0, SENDTO, pidl
SHGetPathFromIDList pidl, sTmp
txtSendTo.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得我的文档目录*********************************
SHGetSpecialFolderLocation 0, MYDOCUMENTS, pidl
SHGetPathFromIDList pidl, sTmp
txtDocument.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得程序集目录***********************************
SHGetSpecialFolderLocation 0, PROGRAMS, pidl
SHGetPathFromIDList pidl, sTmp
txtProgram.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得启动目录*************************************
SHGetSpecialFolderLocation 0, STARTUP, pidl
SHGetPathFromIDList pidl, sTmp
txtStart.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得开始菜单目录*********************************
SHGetSpecialFolderLocation 0, STARTMENU, pidl
SHGetPathFromIDList pidl, sTmp
txtStartMenu.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得收藏夹目录***********************************
SHGetSpecialFolderLocation 0, MYFAVORITES, pidl
SHGetPathFromIDList pidl, sTmp
txtFavorites.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'**********************获得最后打开的文件目录*******************************
SHGetSpecialFolderLocation 0, RECENT, pidl
SHGetPathFromIDList pidl, sTmp
txtRecent.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得网上邻居目录*********************************
SHGetSpecialFolderLocation 0, NETHOOD, pidl
SHGetPathFromIDList pidl, sTmp
txtNetHood.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得字体目录**********************************
SHGetSpecialFolderLocation 0, FONTS, pidl
SHGetPathFromIDList pidl, sTmp
txtFonts.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得Cookies目录**********************************
SHGetSpecialFolderLocation 0, COOKIES, pidl
SHGetPathFromIDList pidl, sTmp
txtCookies.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得历史目录**********************************
SHGetSpecialFolderLocation 0, HISTORY, pidl
SHGetPathFromIDList pidl, sTmp
txtHistory.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'***********************获得网页临时文件目录*******************************
SHGetSpecialFolderLocation 0, PAGETMP, pidl
SHGetPathFromIDList pidl, sTmp
txtPageTmp.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得ShellNew目录*********************************
SHGetSpecialFolderLocation 0, SHELLNEW, pidl
SHGetPathFromIDList pidl, sTmp
txtShellNew.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'***********************获得Application Data目录*****************************
SHGetSpecialFolderLocation 0, APPDATA, pidl
SHGetPathFromIDList pidl, sTmp
txtAppData.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得PrintHood目录*********************************
SHGetSpecialFolderLocation 0, PRINTHOOD, pidl
SHGetPathFromIDList pidl, sTmp
txtPrintHood.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
End Sub
获取系统各种文件夹路径
'调用函数GetSpecialPath(参数)
'例1:msgbox GetSpecialPath(CSIDL_font) & "\" (返回系统字体的文件夹)
'例2:msgbox GetSpecialPath(CSIDL_Users_FAVORITES) & "\" (返回当前用户收藏夹)
'例3:msgbox GetSpecialPath(CSIDL_Users_Pictures) & "\" (返回当前用户-图片收藏)
'例4:msgbox GetSpecialPath(CSIDL_AllUsers_FAVORITES) & "\"(返回共享收藏夹)
'例5:msgbox GetSpecialPath(CSIDL_Users_MyDocuments) & "\" (返回当前用户-我的文档)
Option Explicit
Private Const NOERROR = 0
Private Const CSIDL_Users_FAVORITES = &H6 '当前用户\收藏夹
Private Const CSIDL_Users_DESKTOPDIRECTORY = &H10 '当前用户\桌面
Private Const CSIDL_Users_STARTMENU = &HB '当前用户\开始菜单
Private Const CSIDL_Users_STARTMENU_cx = &H2 '当前用户\开始-程序
Private Const CSIDL_Users_MyDocuments = &H5 '当前用户\我的文档
Private Const CSIDL_Users_STARTMENU_a = &H7 '当前用户\开始-程序-启动
Private Const CSIDL_Users_Recent = &H8 '当前用户\'Recent
Private Const CSIDL_Users_SendTo = &H9 '当前用户\SendTo
Private Const CSIDL_Users_MyMusic = &HD '当前用户\My Documents\My Music\
Private Const CSIDL_Users_NetHood = &H13 '当前用户\NetHood
Private Const CSIDL_Users_Templates = &H15 '当前用户\Templates
Private Const CSIDL_Users_AppData = &H1A '当前用户\Application Data\
Private Const CSIDL_Users_PrintHood = &H1B '当前用户\PrintHood\
Private Const CSIDL_Users_Local_AppData = &H1C '当前用户\Local Settings\Application Data\
Private Const CSIDL_Users_Temp = &H20 '当前用户\Local Settings\Temporary Internet Files\
Private Const CSIDL_Users_Cookies = &H21 '当前用户\Cookies\
Private Const CSIDL_Users_History = &H22 '当前用户\Local Settings\History\
Private Const CSIDL_Users_Pictures = &H27 '当前用户\My Documents\My Pictures\
Private Const CSIDL_Users = &H28 '当前用户\
Private Const CSIDL_Users_gl = &H30 '当前用户\「开始」菜单\程序\管理工具\
Private Const CSIDL_Users_CDBurning = &H3B '当前用户\Local Settings\Application Data\Microsoft\CD Burning\
Private Const CSIDL_AllUsers_STARTMENU = &H16 'All Users\「开始」菜单\
Private Const CSIDL_AllUsers_STARTMENU_cx = &H17 'All Users\「开始」菜单\程序\
Private Const CSIDL_AllUsers_STARTMENU_j = &H18 'All Users\「开始」菜单\程序\启动\
Private Const CSIDL_AllUsers_DESKTOPDIRECTORY = &H19 'All Users\桌面
Private Const CSIDL_AllUsers_FAVORITES = &H1F 'All Users\Favorites\(收藏夹)
Private Const CSIDL_AllUsers_Templates = &H2D 'All Users\Templates\
Private Const CSIDL_AllUsers_Documents = &H2E 'All Users\Documents\
Private Const CSIDL_AllUsers_gl = &H2F 'All Users\「开始」菜单\程序\管理工具\
Private Const CSIDL_AllUsers_Music = &H35 'All Users\Documents\My Music\
Private Const CSIDL_AllUsers_Pictures = &H36 'All Users\Documents\My Pictures\
Private Const CSIDL_AllUsers_Videos = &H37 'All Users\Documents\My Videos\
Private Const CSIDL_AllUsers_AppData = &H23 'All Users\Application Data\
Private Const CSIDL_WinDows = &H24 '系统安装路径 C:\WINDOWS\
Private Const CSIDL_WinSystem = &H25 '系统文件夹 C:\WINDOWS\system32\
Private Const CSIDL_ProgramFiles = &H26 '应用程序安装文件夹 C:\Program Files\
Private Const CSIDL__ProgramFiles_CommonFiles = &H2B 'C:\Program Files\Common Files\
Private Const CSIDL_WIN_Resources = &H38 'C:\WINDOWS\Resources\
Private Const CSIDL_font = &H14 '字体文件夹C:\WINDOWS\Fonts\
' 声明API函数
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias
"SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As
Long
Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll"
(ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As Long) As Long
Private Function GetSpecialPath(CSIDL As Long) As String
Dim s As Long
Dim path As String
Dim pidl As Long
'根据指定的文件夹获得pidl
s = SHGetSpecialFolderLocation(Me.hWnd, CSIDL, pidl)
If s = NOERROR Then ' 根据r的返回值判断是否有错误发生,如果没有错误就获取文件夹路径
path = Space$(512)
s = SHGetPathFromIDList(ByVal pidl, ByVal path)
GetSpecialPath = Left$(path, InStr(path, Chr$(0)) - 1)
Exit Function
End If
GetSpecialPath = ""
End Function
Private Declare Function
SHGetSpecialFolderLocation Lib "Shell32" (ByVal hwndOwner As Long, ByVal
nFolder As Integer, ppidl As Long) As Long
Private Declare Function SHGetPathFromIDList Lib "Shell32" Alias
"SHGetPathFromIDListA" (ByVal pidl As Long, ByVal szPath As String) As
Long
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias
"GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long)
As Long
Private Declare Function GetSystemDirectory Lib "kernel32" Alias
"GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As
Long
Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA"
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Const MAX_LEN = 200 '字符串最大长度
Const DESKTOP = &H0& '桌面
Const PROGRAMS = &H2& '程序集
Const MYDOCUMENTS = &H5& '我的文档
Const MYFAVORITES = &H6& '收藏夹
Const STARTUP = &H7& '启动
Const RECENT = &H8& '最近打开的文件
Const SENDTO = &H9& '发送
Const STARTMENU = &HB& '开始菜单
Const NETHOOD = &H13& '网上邻居
Const FONTS = &H14& '字体
Const SHELLNEW = &H15& 'ShellNew
Const APPDATA = &H1A& 'Application Data
Const PRINTHOOD = &H1B& 'PrintHood
Const PAGETMP = &H20& '网页临时文件
Const COOKIES = &H21& 'Cookies目录
Const HISTORY = &H22& '历史
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Dim sTmp As String * MAX_LEN '存放结果的固定长度的字符串
Dim nLength As Long '字符串的实际长度
Dim pidl As Long '某特殊目录在特殊目录列表中的位置
'*************************获得Windows目录**********************************
Length = GetWindowsDirectory(sTmp, MAX_LEN)
txtWin.Text = Left(sTmp, Length)
'*************************获得System目录***********************************
Length = GetSystemDirectory(sTmp, MAX_LEN)
txtSystem.Text = Left(sTmp, Length)
'*************************获得Temp目录***********************************
Length = GetTempPath(MAX_LEN, sTmp)
txtTemp.Text = Left(sTmp, Length)
'*************************获得DeskTop目录**********************************
SHGetSpecialFolderLocation 0, DESKTOP, pidl
SHGetPathFromIDList pidl, sTmp
txtDesktop.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得发送到目录**********************************
SHGetSpecialFolderLocation 0, SENDTO, pidl
SHGetPathFromIDList pidl, sTmp
txtSendTo.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得我的文档目录*********************************
SHGetSpecialFolderLocation 0, MYDOCUMENTS, pidl
SHGetPathFromIDList pidl, sTmp
txtDocument.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得程序集目录***********************************
SHGetSpecialFolderLocation 0, PROGRAMS, pidl
SHGetPathFromIDList pidl, sTmp
txtProgram.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得启动目录*************************************
SHGetSpecialFolderLocation 0, STARTUP, pidl
SHGetPathFromIDList pidl, sTmp
txtStart.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得开始菜单目录*********************************
SHGetSpecialFolderLocation 0, STARTMENU, pidl
SHGetPathFromIDList pidl, sTmp
txtStartMenu.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得收藏夹目录***********************************
SHGetSpecialFolderLocation 0, MYFAVORITES, pidl
SHGetPathFromIDList pidl, sTmp
txtFavorites.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'**********************获得最后打开的文件目录*******************************
SHGetSpecialFolderLocation 0, RECENT, pidl
SHGetPathFromIDList pidl, sTmp
txtRecent.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得网上邻居目录*********************************
SHGetSpecialFolderLocation 0, NETHOOD, pidl
SHGetPathFromIDList pidl, sTmp
txtNetHood.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得字体目录**********************************
SHGetSpecialFolderLocation 0, FONTS, pidl
SHGetPathFromIDList pidl, sTmp
txtFonts.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得Cookies目录**********************************
SHGetSpecialFolderLocation 0, COOKIES, pidl
SHGetPathFromIDList pidl, sTmp
txtCookies.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得历史目录**********************************
SHGetSpecialFolderLocation 0, HISTORY, pidl
SHGetPathFromIDList pidl, sTmp
txtHistory.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'***********************获得网页临时文件目录*******************************
SHGetSpecialFolderLocation 0, PAGETMP, pidl
SHGetPathFromIDList pidl, sTmp
txtPageTmp.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得ShellNew目录*********************************
SHGetSpecialFolderLocation 0, SHELLNEW, pidl
SHGetPathFromIDList pidl, sTmp
txtShellNew.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'***********************获得Application Data目录*****************************
SHGetSpecialFolderLocation 0, APPDATA, pidl
SHGetPathFromIDList pidl, sTmp
txtAppData.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
'*************************获得PrintHood目录*********************************
SHGetSpecialFolderLocation 0, PRINTHOOD, pidl
SHGetPathFromIDList pidl, sTmp
txtPrintHood.Text = Left(sTmp, InStr(sTmp, Chr(0)) - 1)
End Sub
如何用VB获得Windows各类系统目录的更多相关文章
- 如何用VB.Net创建一个三层的数据库应用程序
[b]1.[/b][b]概论:[/b] 本文将介绍如何创建一个三层应用程序,并且将介绍如何创建一个Web Service服务. ADO.NET创建Windows三层结构应用程序的体系架构如下图所示: ...
- 如何用python在Windows系统下,生成UNIX格式文件
平时测试工作中,少不了制造测试数据.最近一个项目,我就需要制造一批可在UNIX下正确读取的文件.为确保这批文件能从FTP下载成功,开发叮嘱我:“文件中凡是遇到换行,换行符必须是UNIX下的LF,而不是 ...
- 如何用.NET创建Windows服务
我们将研究如何创建一个作为Windows服务的应用程序.内容包含什么是Windows服务,如何创建.安装和调试它们.会用到System.ServiceProcess.ServiceBase命名空间的类 ...
- OS-DOS/CMD/Windows/各类软件快捷键等使用总结
一.快捷键 很多软件的快捷键使用相通,在不确定的情况下,先试试其他软件的快捷键的使用方法 Windows电脑快捷键 HP惠普笔记本 win+E 打开文件管器 win+D 显示桌面 win+L 锁计算机 ...
- VB用windows API激活子窗体
http://files.cnblogs.com/files/liuzhaoyzz/%E6%BF%80%E6%B4%BB%E5%AD%90%E7%AA%97%E4%BD%93.rar setforeg ...
- VB指针操作和消息钩子
二.VB怎么用指针 要想弄明白VB怎么使用指针,就必须要弄明白两件事,第一,如何取得数组的指针,第二,如何将指针所指向的数组取出来. A.在讲解这两个问题之前,我们需要了解几个 ...
- windows下编写dll
dll的优点 简单的说,dll有以下几个优点: 1) 节省内存.同一个软件模块,若是以源代码的形式重用,则会被编译到不同的可执行程序中,同时运行这些exe时这些模块的二进制码会被重复加载到内存中.如果 ...
- 【转】Delphi利用系统环境变量获取常用系统目录
Delphi code //譬如 %WINDIR% 是表示系统目录的系统变量, 可以这样获取: var s: string; begin s := GetEnvironmentVariable('WI ...
- 【转】分析Linux和windows动态库
原文地址:http://www.cnblogs.com/chio/archive/2008/11/13/1333119.html 摘要:动态链接库技术实现和设计程序常用的技术,在Windows和Lin ...
随机推荐
- 采用Duplicate target database在线恢复秩序oracle datagard图书馆设备
线上oracle datagard备库由于断电以及误删除从库的归档日志文件,所以导致,备库主库数据不一致,备库须要紧急恢复.以下是大概恢复过程 1,从主库上面备份控制文件[oracle@localho ...
- aul 学习测试(测量)
-------------------aul5 ----------test0------------------------- select file#,rfile#,name from v$dat ...
- 【超酷超实用】CSS3可滑动跳转的分页插件制作教程
原文:[超酷超实用]CSS3可滑动跳转的分页插件制作教程 今天我要向大家分享一款很特别的CSS3分页插件,这款分页插件不仅可以点击分页按钮来实现分页,而且可以滑动滑杆来实现任意页面的跳转,看看都非常酷 ...
- DFS-leetcode Combination Sum I/I I
深度优先搜索(DFS)它是一个搜索算法.第一次接触DFS它应该是一个二进制树的遍历内部,二叉树预订.序和后序实际上属于深度遍历-first.在本质上,深度优先搜索,遍历中则看到了更纯正的深度优先搜索算 ...
- 从头开始学JavaScript (十)——垃圾收集
原文:从头开始学JavaScript (十)--垃圾收集 一.垃圾收集 1.1javascript垃圾收集机制: 自动垃圾收集,执行环境会负责管理代码执行过程中的使用的内存.而在C和C++之类的语言中 ...
- hdu1086(线段相交)
题目意思: 给出n个线段,推断这n条线段中,线段相交的对数. http://acm.hdu.edu.cn/showproblem.php?pid=1086 题目分析: 此题主要写出推断线段相交的函数, ...
- java_面试_20140402(爬虫面试题)
- oracle_修改Oracle数据库字符集 AL32UTF8;
修改数据库字符集 以支持维文等 utf8 停掉库 进入装载模式 ALTER SYSTEM ENABLE RESTRICTED SESSION; ALTER SYSTEM SET JOB_QUEUE_ ...
- 浅谈javascript中的call()和apply()方法
话说在js中,每个函数都包含两个非继承而来的放方法,apply()和call(),使得我们能在特定的作用域中调用函数. 官方定义: 语法: fun.call(thisArg[, arg1[ ...
- UML九种图汇总
UML视频读,该文件开始起草.我不知道如何下手啊!我想先UML九图和总结的关系,然后开始用它的文件. 首先在地图上. UML的九种图各自是:用例图.类图.对象图.状态图.活动图.协作图.序列图.组件图 ...