hi
i have this function:Public Function GetFile(Filename As String)
Dim path As String
Dim Fnum As Integer
'---read file in one pass!
Fnum = FreeFile
Open Filename For Input As #Fnum
GetFile = Input(LOF(Fnum), Fnum)
Close Fnum
Exit Function
ErrorHandler:
Err.Description = "GetFile: " & Err.Description & " -> " & File
Err.Raise Err.Number
End Function
AND
Private Sub Form_Load()
Dim path As String
On Error GoTo nofile
If Command$ Empty Then
Form1.Print
Form1.Print
Form1.Print
Form1.Print
Form1.Print "Command Line Parameter passed: " + Command$
If Left$(Command$, 1) = Chr$(34) And Right$(Command$, 1) = Chr$(34) Then
path = Mid(Command$, 2, (Len(Command$) - 2))
Else
path = Command$
End If
'MsgBox (path)
Form1.Print "Path of File passed: " + path
Form1.Print
Form1.Print "File contents: " + vbCrLf
Form1.Print GetFile(path)
Else
'MsgBox ("No Parameters passed!")
End If
Exit Sub
nofile:
MsgBox ("ERROR: No valid text file!")
End Sub
but as u can see..they are written in VB
i need the same thing but in Vc++/MFC
so, is there any equivalent functions for them
if not....could someone pleeease help me with this
reeealy ..any kind of help would be appriciated
thank u in advance