Bonjour á tous,
Etant nul en Visual Basic, j ai resu le code suivant que je dois implementer en C#. je ne comprend pas tres bien ce que le code fait et vue l exercice que j ai recue je dois etre á mesure de lire les emails de notre Server.
SVP es ce que quelqu´un peut me dire ce que ce code effectue et comment je peux commencer pour l´implementer en C#? voilá le code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Dim oApp, oAccount, oArchive, oItem, oItems2, oFile, objFSO, oItem2, oFSO ' object variables
Dim dbConnection, dbRecordset ' DB variables
Dim strConnection, strSQL, strInput, strFile, s_emessage, strFolder, strAppStart 'string variables
Dim i, iPosition, iPositionRFS, iPositionAVN, iPositionAT, iPositionSKU, iPositionAAID, iPositionBra, iLoopQ, ii, iResult, iVersion, iSQLq, iProgress  'integer variables
Dim eLongNameID, eLongNameApp, eDate, eDate2, eSubject, eSKU, eStatus, eVersion, eMonth, eAppID, eAppType, eBody, eSKU2  'email's variables
Set oApp = CreateObject("DVOBJAPILib.DvISEAPI") ' Preparing connection to david.fx itunes email store
Set oAccount = oApp.Logon("", "", "", "", "", "NOAUTH")
Set dbConnection = CreateObject("ADODB.Connection") ' Preparing connection to DB serverDo
	Set oArchive = oAccount.ArchiveFromID("\\david\david\archive\18\4\2\0\slitte")
	Set oItems2 = oArchive.GetArchiveEntries("default")
 
	iLoopQ = oItems2.Count - 1 'Query quantity of emails (From 0 thus -1)
 
	If bTestDB = 0 And bTest = 0 Then 
		If iLoopQ > 0 Then
			oFile.Write "[" & Now() & "] Starting scan of " & iLoopQ +1 & " email(s)." & vbCrLf
			'iResult = MsgBox("Will scan " & iLoopQ +1 &  " records from David.fx", 1)
			iResult = 0
		End If
	End If
	If bTestDB <> 0 Then 
		oFile.Write  "[" & Now() & "] Test mode, no Deleting email action. Scan of " & iLoopQ +1 & " email(s)." &  vbCrLf
		WScript.StdOut.Write("Will scan in TEST mode " & iLoopQ +1 &  " records from David.fx" &  vbCrLf)
		'iResult = MsgBox("Will scan in TEST mode " & iLoopQ +1 &  " records from David.fx", 1)
	End If
	If bTest <> 0 Then 
		oFile.Write  "[" & Now() & "] Test mode, no SQL and Deleting action. Scan of " & iLoopQ +1 & " email(s)." &  vbCrLf
		WScript.StdOut.Write("Will scan in TEST mode " & iLoopQ +1 &  " records from David.fx" &  vbCrLf)
		'iResult = MsgBox("Will scan in TEST mode " & iLoopQ +1 &  " records from David.fx", 1)
	End If
Merci d´avance pour toutes vos suggestions
maeva