Win32API调用错误号与信息(6000-6999)

来源:互联网 发布:追星软件哪个最好 编辑:程序博客网 时间:2024/05/29 11:42

Author:水如烟 

 

Namespace LzmTW.uSystem.uWindows.Win32API
    
Friend Class ErrCollection06
        
Private Collection As New Dictionary(Of IntegerString)

        
Private Shared Loader As ErrCollection06
        
Private Shared gInternalSyncObject As Object

        
Private Sub New()
            
With Collection
                .Add(
6000"无法加密指定的文件")
                .Add(
6001"指定的文件无法解密")
                .Add(
6002"指定的文件已加密,而且用户没有能力解密")
                .Add(
6003"这个系统没有有效的加密恢复策略配置")
                .Add(
6004"所需的加密驱动程序并未加载到系统中")
                .Add(
6005"文件加密所使用的加密驱动程序与目前加载的加密驱动程序不同")
                .Add(
6006"没有为用户定义的 EFS 关键字")
                .Add(
6007"指定的文件并未加密")
                .Add(
6008"指定的文件不是定义的 EFS 导出格式")
                .Add(
6009"指定的文件是只读文件")
                .Add(
6010"已为加密而停用目录")
                .Add(
6011"不信任服务器来进行远程加密操作")
                .Add(
6118"此工作组的服务器列表当前无法使用")
                .Add(
6200"要正常运行,任务计划程序服务的配置必须在系统帐户中运行。单独的任务可以被配置成在其他帐户中运行")
            
End With
        
End Sub

        
Private Shared Function GetLoader() As ErrCollection06
            
If Loader Is Nothing Then
                
SyncLock InternalSyncObject
                    
If Loader Is Nothing Then
                        Loader 
= New ErrCollection06
                    
End If
                
End SyncLock
            
End If
            
Return Loader
        
End Function

        
Private Shared ReadOnly Property InternalSyncObject() As Object
            
Get
                
If gInternalSyncObject Is Nothing Then
                    System.Threading.Interlocked.CompareExchange(gInternalSyncObject, 
New ObjectNothing)
                
End If
                
Return gInternalSyncObject
            
End Get
        
End Property


        
Public Shared Function GetString(ByVal errNum As IntegerAs String
            
With GetLoader.Collection
                
If .ContainsKey(errNum) Then
                    
Return .Item(errNum)
                
Else
                    
Return "预留或未知"
                
End If
            
End With
        
End Function

    
End Class
End Namespace