10/08/2013, 23:56
Dim mem As New clsFileMapping
Dim retval As Long
If mem.OpenFile("Dosya Yolu", FileAllAccess, FileShareReadWrite, FileOpenAlways, FileAttributeAll) = True Then
If mem.MapFile("") = True Then
If mem.OpenView(FileMapAll) = True Then
Dim veri As Byte
veri = mem.ReadData(DefineByte) ' -> Byte Türünde 1 Byte Çeker, Otomatikman 1 Artar.
MsgBox "Dosya Çalıştı..."
'Dosya Kapanıyor...
mem.CloseView False ' True Yaparsanız Yapdığınız Değişiklikler Dosyaya Kaydolur.
mem.CloseMap
mem.CloseFile
Else
retval = -3
End If
Else
retval = -2
End If
retval = -1
End If
If retval < 0 Then
MsgBox "Hatalı Dosya Açılışı, " & retval
End If
Not: ClsFileMapping Alıntıdır...
Dim retval As Long
If mem.OpenFile("Dosya Yolu", FileAllAccess, FileShareReadWrite, FileOpenAlways, FileAttributeAll) = True Then
If mem.MapFile("") = True Then
If mem.OpenView(FileMapAll) = True Then
Dim veri As Byte
veri = mem.ReadData(DefineByte) ' -> Byte Türünde 1 Byte Çeker, Otomatikman 1 Artar.
MsgBox "Dosya Çalıştı..."
'Dosya Kapanıyor...
mem.CloseView False ' True Yaparsanız Yapdığınız Değişiklikler Dosyaya Kaydolur.
mem.CloseMap
mem.CloseFile
Else
retval = -3
End If
Else
retval = -2
End If
retval = -1
End If
If retval < 0 Then
MsgBox "Hatalı Dosya Açılışı, " & retval
End If
Not: ClsFileMapping Alıntıdır...