VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   8595
   ClientLeft      =   165
   ClientTop       =   450
   ClientWidth     =   9120
   LinkTopic       =   "Form1"
   ScaleHeight     =   8595
   ScaleWidth      =   9120
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   495
      Left            =   3960
      TabIndex        =   0
      Top             =   4560
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
'Private Type BITMAPFILEHEADER
'        bfType As Integer
'        bfSize As Long
'        bfReserved1 As Integer
'        bfReserved2 As Integer
'        bfOffBits As Long
'End Type
'Private Sub Command1_Click()
'    Dim FileHeader As BITMAPFILEHEADER
'    FileHeader.bfType = &H4D42
'    FileHeader.bfOffBits = Len(FileHeader) + 40
'    FileHeader.bfSize = Len(FileHeader) + 40 + 1000
'
'    Open "C:\windows.000\desktop\UDT.txt" For Binary As #1
'    Put #1, , FileHeader
'    Close #1
'
'    Dim bArr() As Byte
'    ReDim bArr(LenB(FileHeader))
'    CopyMemory bArr(0), FileHeader, LenB(FileHeader)
'    Open "C:\windows.000\desktop\ByteArray.txt" For Binary As #1
'    Put #1, , bArr
'    Close #1
'
'End Sub
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Type BITMAPFILEHEADER
        bfType As Integer
        bfSize As Long
        bfReserved1 As Integer
        bfReserved2 As Integer
        bfOffBits As Long
End Type
Private Sub Command1_Click()
    Dim FileHeader As BITMAPFILEHEADER
    FileHeader.bfType = &H4D42
    FileHeader.bfOffBits = Len(FileHeader) + 40
    FileHeader.bfSize = Len(FileHeader) + 40 + 1000
    Open "C:\windows.000\desktop\UDT.txt" For Binary As #1
    Put #1, , FileHeader
    Close #1
    
    Dim bArr As BITMAPFILEHEADER
    LSet bArr = FileHeader
    Open "C:\windows.000\desktop\ByteArray.txt" For Binary As #1
    Put #1, , bArr
    Close #1
    
    Dim thearray() As Byte
    
    Open "C:\windows.000\desktop\ByteArray.txt" For Binary As #1
        ReDim thearray(LOF(1))
        Get #1, , thearray
    Close #1
    
'    Open "C:\windows.000\desktop\ByteArray.txt" For Binary As #1
'        Put #1, , thearray
'    Close #1
'The above is identical to ur original Header

'winsock1.senddata thearray?
End Sub

