杂锦代码_1Dim lngUserRecno As Long
杂锦代码_1    lngUserRecno 
= IsValidADSUser()
杂锦代码_1    
If lngUserRecno < 0 Then
杂锦代码_1        
If intADSAuthFlag = ADSAUTH_SYSTEM Then
杂锦代码_1            
Dim sIISAuth As String
杂锦代码_1            sIISAuth 
= m_pfs.dfVntToTrimStr(m_objRequest.ServerVariables("AUTH_TYPE"))
杂锦代码_1            
If sIISAuth = "" Then
杂锦代码_1                
'm_objResponse.Write "ADS Error: Your setting is forbidden to anonymous user."
杂锦代码_1
                m_objResponse.Status = "401 Unauthorized - Logon failed"
杂锦代码_1
                m_objResponse.AddHeader "WWW-Authenticate""BASIC"
杂锦代码_1
                
杂锦代码_1                m_objResponse.
End
杂锦代码_1                
Exit Function
杂锦代码_1            
End If
杂锦代码_1        
End If
杂锦代码_1        lngUserRecno 
= ADSAuthUser()
杂锦代码_1    
End If
杂锦代码_1    
杂锦代码_1    
If lngUserRecno <= 0 Then
杂锦代码_1        
If intADSAuthFlag = ADSAUTH_SYSTEM Then
杂锦代码_1            m_objResponse.Redirect sErrorNoRightUrl
杂锦代码_1            m_objResponse.
End
杂锦代码_1        
Else
杂锦代码_1            m_objResponse.Redirect sLogonUrl 
& "?ReturnUrl=" & m_objServer.URLEncode(sReturnUrl)
杂锦代码_1            m_objResponse.
End
杂锦代码_1        
End If
杂锦代码_1    
End If


杂锦代码_1Dim strSimplifiedChinese, strTraditionalChinese As String
杂锦代码_1        strSimplifiedChinese 
= "我是中国人!"
杂锦代码_1
        strTraditionalChinese = StrConv(strSimplifiedChinese, VbStrConv.TraditionalChinese) '简转繁
杂锦代码_1
        Console.Write(strTraditionalChinese)
杂锦代码_1        strSimplifiedChinese 
= StrConv(strTraditionalChinese, VbStrConv.SimplifiedChinese) '繁转简
杂锦代码_1
        Console.Write(strSimplifiedChinese)
杂锦代码_1
杂锦代码_1
杂锦代码_1
'Set bps = .BodyPart.BodyParts
杂锦代码_1'
Set bp = bps.Add
杂锦代码_1'
    bps.Delete bp
杂锦代码_1

杂锦代码_1
杂锦代码_1
Sub SaveMessageToFile(iMsg As CDO.Message, Filepath As String)
杂锦代码_1    
Dim Stm As New Stream
杂锦代码_1    Stm.Open
杂锦代码_1    Stm.Type 
= adTypeText
杂锦代码_1    Stm.Charset 
= "US-ASCII"
杂锦代码_1
    
杂锦代码_1    
Dim iDsrc As IDataSource
杂锦代码_1    
Set iDsrc = iMsg
杂锦代码_1    iDsrc.SaveToObject Stm, 
"_Stream"
杂锦代码_1
    
杂锦代码_1    Stm.SaveToFile Filepath, adSaveCreateOverWrite
杂锦代码_1    
杂锦代码_1
End Sub
杂锦代码_1


杂锦代码_1Private Sub CreateFolder(sName As String, aDefaultContentClass As Variant, sMAPIFolderClass As String)
杂锦代码_1    
Dim recADO As New ADODB.Record
杂锦代码_1    recADO.Open sName, connADO, adModeReadWrite, adCreateCollection
杂锦代码_1    recADO.Fields(
"DAV:contentclass").Value = "urn:content-classes:folder"
杂锦代码_1
    recADO.Fields("http://schemas.microsoft.com/exchange/outlookfolderclass"= sMAPIFolderClass
杂锦代码_1    recADO.Fields(
"urn:schemas-microsoft-com:exch-data:expected-content-class").Value = aDefaultContentClass
杂锦代码_1    recADO.Fields(
"urn:schemas-microsoft-com:exch-data:schema-collection-ref").Value = sCustomSchemaFolder
杂锦代码_1    recADO.Fields.Update
杂锦代码_1    recADO.Close
杂锦代码_1
End Sub
杂锦代码_1


杂锦代码_1Email Creation:
杂锦代码_1
杂锦代码_1Two ways you might attack it.
杂锦代码_1
1. You can do a global event sink on a mailbox store.  Capturing creation
杂锦代码_1events of certain folders would likely give you mailbox creation events.
杂锦代码_1
2. Use the LDAP change notification mechanism to monitor AD for changes that
杂锦代码_1indicate mailbox creations.  This 
is potentially easier because you can
杂锦代码_1watch in a 
single place instead of on every store of every server.  This
杂锦代码_1also will catch the situation where an account gets 
"Mailbox enabled" but
杂锦代码_1the folders don
't actually get created on the store until much much later.
杂锦代码_1

杂锦代码_1Andy
杂锦代码_1
杂锦代码_1
"David Eales" <d.eales@Staff.covcollege.ac.uk> wrote in message
杂锦代码_1news:035d01c2bf2b$408c4a30$8af82ecf@TK2MSFTNGXA03杂锦代码_1
杂锦代码_1
> Hi,
杂锦代码_1
>
杂锦代码_1
> Is there a way to do an event sink so that when a new
杂锦代码_1
> mailbox is created a notification is sent to a certain
杂锦代码_1
> address via email.
杂锦代码_1
>
杂锦代码_1
> Thanks

杂锦代码_1Exchange_Delete_Attachment
杂锦代码_1
杂锦代码_1
Set objAttachments = objMessage.Attachments
杂锦代码_1 
If objAttachments.Count <> 0 Then
杂锦代码_1  
For Each objAttachment In objAttachments
杂锦代码_1   
With objAttachment
杂锦代码_1    
If .FileName = "TEST.DOC" Then
杂锦代码_1     objAttachments.Delete objAttachment
杂锦代码_1     objMessage.DataSource.Save
杂锦代码_1    
End If
杂锦代码_1   
End With
杂锦代码_1  
Next
杂锦代码_1 
End If


杂锦代码_1Exchange里各文件的作用.txt
杂锦代码_1
杂锦代码_1
* .edb,.stm
杂锦代码_1priv1.ebd,priv1.stm   MailBox Store
杂锦代码_1pub1.ebd, pub1.stm    
Public Folder Store
杂锦代码_1My store.ebd,My Store.stm  Your Store
杂锦代码_1
杂锦代码_1
With Exchange 2000each Exchange 2000 database is contained in two linked files — the .edb and the .stm. The .edb file contains folders, tables, and indexes for messaging data and MAPI messages and attachments. The .stm file contains native Internet content. When performing backup and restore procedures, you must always treat these two files as one.
杂锦代码_1
杂锦代码_1
* .log
杂锦代码_1
杂锦代码_1E0000001.
LOG
杂锦代码_1E000????.
LOG
杂锦代码_1res1.
log
杂锦代码_1res2.
log
杂锦代码_1Exchange 
2000 also uses write-ahead transaction log files to ensure the efficient processing of Exchange 2000 data. Write-ahead is the process of writing transactions sequentially in transaction logs before writing them in bulk to the database files. Because log files store copies of the transactions, this process ensures that transactions are never lost before they are written to the databases in bulk.
杂锦代码_1
Each storage group also maintains two log files (Res1.log and Res2.log) that function as placeholders for extra disk space on the hard disk containing the log files. If the drive containing the log files runs out of disk space, Res1.log and Res2.log allow the database files in the storage group to shut down in a consistent state.
杂锦代码_1
杂锦代码_1
* .chk
杂锦代码_1E00.CHK
杂锦代码_1E00.
log
杂锦代码_1Checkpoint files store information that indicates when a transaction 
is successfully saved to the database files on the hard disk. A checkpoint file is maintained for the series of log files within each storage group. Separate E<nn>.chk files (where <nn> refers to the log file prefix for the storage group) point to the oldest log file that has all transactions successfully committed to the database
杂锦代码_1
   

相关文章: