Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: IGNORE IT!! Error 53 file not found


Message #1 by "Satyajeet Hattangadi" <satyajh@m...> on Thu, 22 Aug 2002 11:55:22 +0530
Guys i must kick myself for this one!!! it wasnt a dll dependancy error.. i
had one avi that i used to display progress...
and DOh!! i forgot to add it to the installer :)

Sorry for wasting your time....

Satya
----- Original Message -----
From: "Satyajeet Hattangadi" <satyajh@m...>
To: "professional vb" <pro_vb@p...>
Sent: Thursday, August 22, 2002 11:22 AM
Subject: [pro_vb] Error 53 file not found


> Hi
>
> I have a simple application that in addition to windows common controls
only
> references the Microsoft Xml parser3.0.
>
> App works fine on most machines but on one particular user machine( OS:
Win
> 2000) it gives the "Error 53 file not found"
> error message.
> I have installed the xml parser using the redistributable available on the
> msdn site.It installed fine with out any errors.
>
> Now the moment the exe of my app is clicked my splash screen is shown and
> after that i get this error.
> My startup object is sub main
> In submain i have the following code
>
> Sub Main()
> On Error GoTo eh
> Set objHTTP = CreateObject("msxml2.xmlhttp")
>
> If objHTTP Is Nothing Then
>    MsgBox "Msxml 3.0 is not installed. You may download it from
> msdn.microsoft.com/xml", vbCritical
>    End
> End If
>
> Load frmSplash
> frmSplash.Show
> Exit Sub
> eh:
> If objHTTP Is Nothing Then
>    MsgBox "Msxml 3.0 is not installed. You may download it from
> msdn.microsoft.com/xml", vbCritical
>    End
> End If
> MsgBox "Error occured in sub main:" & Err.Description
> End Sub
>
> The splash form only has a timer which on expiring loads and displays the
> main form and closes the splash form.
>
> I have found msdn kb articles say that this is caused due to lack of
> dependency information on dll's that have been installed.
>
> Any ideas??
>
> TIA
> Satya
> ----- Original Message -----
> From: "Peter N. Kipe" <pkipe@c...>
> To: "professional vb" <pro_vb@p...>
> Sent: Monday, August 19, 2002 1:07 PM
> Subject: [pro_vb] RE: How to inhibit file copy
>
>
> > Let's see...how about something like this:
> >
> > 1.  In a new project, add the Microsoft Common Dialog Control 6.0 (SP3)
> > under Project, Components.
> >
> > 2.  In Form1, add a CommonDialog, and three command buttons; cmdScramble
> > (caption "Scramble"), cmdUnscramble (caption "Unscramble"), and cmdExit
> > (caption "Exit").
> >
> > 3.  Paste the following into the Form1 code:
> >
> > '===========================================================
> > Option Explicit
> >
> > Dim miInput                 As Integer
> > Dim miOutput                As Integer
> > Dim mlByteLen               As Long
> > Dim mbytArray()             As Byte
> > Dim mbytArrayRemainder()    As Byte
> > Dim msInputFile             As String
> > Dim msOutputFile            As String
> > Dim msTempFile              As String
> >
> > Private Sub cmdScramble_Click()
> > '
> > '   Set file filter
> >     CommonDialog1.Filter = "Text files (*.txt)|*.txt"
> > '
> > '   Show the file open dialog
> >     CommonDialog1.ShowOpen
> > '
> > '   Exit if no file was chosen
> >     If CommonDialog1.FileName = "" Then
> >         Exit Sub
> >     End If
> > '
> > '   Build the fully-qualified input, output and temp file names.
> >     msInputFile = CommonDialog1.FileName
> >     msOutputFile = Left(msInputFile, _
> >         Len(msInputFile) - 1) & "z"
> >     msTempFile = App.Path & "\" & App.Title & ".tmp"
> > '
> > '   Open the file
> >     miInput = FreeFile()
> >     Open msInputFile For Binary As miInput
> > '
> > '   get current length of the file
> >     mlByteLen = LOF(miInput)
> > '
> > '   For this example, I'll put the first five bytes at the end
> > '   of the file.  Make sure file is longer than the amount we're
> > '   going to scramble.
> >     If mlByteLen <= 5 Then
> >         Exit Sub
> >     End If
> > '
> > '   Dim the "scrambled" array for 5 bytes (0's based)
> >     ReDim mbytArray(4)
> > '
> > '   Fill the "scrambled" array with its 5 bytes starting
> > '   at position 1 (1's based -- first byte is 1)
> >     Get miInput, 1, mbytArray
> > '
> > '   Dim a second array for the number of bytes remaining
> >     ReDim mbytArrayRemainder((mlByteLen - 5) - 1)
> > '
> > '   Read the remaining bytes of miInput
> >     Get miInput, 6, mbytArrayRemainder
> > '
> > '   Open the temporary output file.
> >     miOutput = FreeFile()
> >     Open msTempFile For Binary As miOutput
> > '
> > '   Write the "remainder bytes" to the temp file first
> >     Put #miOutput, , mbytArrayRemainder
> > '
> > '   Finally, write the bytes being scrambled.
> >     Put #miOutput, UBound(mbytArrayRemainder) + 2, mbytArray
> > '
> > '   Close the files and exit
> >     Close #miOutput
> >     Close #miInput
> > '
> > '   Now we'll erase the original file and rename the new one.
> >     Kill msInputFile
> >     Name msTempFile As msOutputFile
> >
> >     MsgBox msInputFile & vbCrLf & _
> >         " has been scrambled and saved as " & vbCrLf & _
> >         msOutputFile
> >
> > End Sub
> >
> > Private Sub cmdUnscramble_Click()
> > '
> > '   Set file filter
> >     CommonDialog1.Filter = "Scrambled files (*.txz)|*.txz"
> > '
> > '   Show the file open dialog
> >     CommonDialog1.ShowOpen
> > '
> > '   Exit if no file was chosen
> >     If CommonDialog1.FileName = "" Then
> >         Exit Sub
> >     End If
> > '
> > '   Build the fully-qualified input, output and temp file names.
> >     msInputFile = CommonDialog1.FileName
> >     msOutputFile = Left(msInputFile, _
> >         Len(msInputFile) - 1) & "t"
> >     msTempFile = App.Path & "\" & App.Title & ".tmp"
> > '
> > '   Open the file
> >     miInput = FreeFile()
> >     Open CommonDialog1.FileName For Binary As miInput
> > '
> > '   get current length of the file
> >     mlByteLen = LOF(miInput)
> > '
> > '   Make sure file is longer than the scrambled amount
> >     If mlByteLen <= 5 Then
> >         Exit Sub
> >     End If
> > '
> > '   Dim the "remainder" array for the number of bytes remaining
> > '   Remember the array is 0's based, so must reduce difference by 1
> >     ReDim mbytArrayRemainder((mlByteLen - 5) - 1)
> > '
> > '   Read the "remaining bytes" of miInput
> >     Get miInput, 1, mbytArrayRemainder
> > '
> > '   Dim the "scrambled" array for 5 bytes
> >     ReDim mbytArray(4)
> > '
> > '   Read the "scrambled" bytes
> >     Get miInput, (mlByteLen - 5) + 1, mbytArray
> > '
> > '   Open the output file.
> >     miOutput = FreeFile()
> >     Open msTempFile For Binary As miOutput
> > '
> > '   Write the "scrambled bytes" to the output file first
> >     Put #miOutput, , mbytArray
> > '
> > '   Finally, write the remaining bytes
> >     Put #miOutput, 6, mbytArrayRemainder
> > '
> > '   Close the files and exit
> >     Close #miOutput
> >     Close #miInput
> > '
> > '   Now we'll erase the original file and rename the new one.
> >     Kill msInputFile
> >     Name msTempFile As msOutputFile
> >
> >     MsgBox msInputFile & vbCrLf & _
> >         " has been unscrambled and saved as " & vbCrLf & _
> >         msOutputFile
> >
> > End Sub
> >
> > Private Sub cmdExit_Click()
> >     Unload Me
> >
> > End Sub
> > '===========================================================
> >
> > 4.  Save the project.
> >
> > 5.  Create a file called testinput.txt using Notepad and save it in your
> > project's path.  My file was 26 bytes long, and looked like this:
> > "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
> >
> > 6.  Run the project and click Scramble.  Select testinput.txt and open
it.
> > When you see the Msgbox, Exit the program and open testinput.txz in
> Notepad.
> > It should now look like this:
> > "FGHIJKLMNOPQRSTUVWXYZABCDE"
> >
> > 7.  Run the project again, and click Unscramble.  Select testinput.txz
and
> > open it.  When you see the Msgbox, Exit and take a look at the file.  It
> > should be back to normal.
> >
> > I took a small picture (a .jpg), renamed it to pic.txt, and put it
through
> > step 6 above.  I then copied the .txz file to a .jpg file and tried to
> view
> > it -- but was unable to do so.  I then ran step 7 and renamed the final
> .txt
> > file to a .jpg, and was able to view it as normal.
> >
> > As you can see, I didn't spend much time thinking about cool ways to
code
> > this thing...I just wanted to convey to you the process that I
originally
> > suggested.  You would obviously want to build a class that would handle
> the
> > whole thing for you in a neat, clean way.
> >
> > Be careful about using this...if you inadvertantly scramble a file more
> than
> > once, you need to keep track of the number of scrambles, and do the same
> > number of unscrambles.  It's pretty easy to hose a file if you lose
track
> of
> > what you've done to it.  I just happen to know this for a fact...
> >
> > Have fun,
> >
> > Pete
> >
> > -----Original Message-----
> > From: Dhodie C. Estoquia [mailto:dcestoquia@c...]
> > Sent: Sunday, August 18, 2002 8:42 PM
> > To: professional vb
> > Subject: [pro_vb] RE: How to inhibit file copy
> >
> >
> > Hi Peter !
> >
> > I am interested in your suggestion " moving the first 100 bytes or so to
> > the end
> > of the file". How could I accomplish this?
> >
> > Thanks.
> >
> > -Dhodie
> >
> >
> > Peter N. Kipe wrote:
> > >Subject: RE: How to inhibit file copy
> > >From: "Peter N. Kipe" <pkipe@c...>
> > >Date: Sat, 17 Aug 2002 13:09:33 -0400
> > >X-Message-Number: 9
> > >
> > >You can't prevent a file from being copied...but you can scramble it to
> > make
> > >it unusable by anything other than your app (which would know how to
> > >unscramble it). Unless you're fighting very sophisticated hackers,
> > >scrambling could be as easy as moving the first 100 bytes or so to the
> end
> > >of the file. Non-programmers would not be able to deal with it for
sure,
> > >and even most programmers wouldn't want to take the time to figure out
> > >what's going on. Unless the pictures contain tomorrow's winning lottery
> > >numbers...and then, I'd be very interested.
> >
> >
> >
> >
> > ---
> > Visual C# - A Guide for VB6 Developers
> > This book will make it easy to transfer your skills
> > from Visual Basic 6 to C#, the language of choice
> > of the .NET Framework.
> > http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
> >
> >
> >
> >
> > ---
> > Visual C# - A Guide for VB6 Developers
> > This book will make it easy to transfer your skills
> > from Visual Basic 6 to C#, the language of choice
> > of the .NET Framework.
> > http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
> >
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.361 / Virus Database: 199 - Release Date: 07/05/2002
>
> *********************************************************
> Disclaimer
>
> This message (including any attachments) contains
> confidential information intended for a specific
> individual and purpose, and is protected by law.
> If you are not the intended recipient, you should
> delete this message and are hereby notified that
> any disclosure, copying, or distribution of this
> message, or the taking of any action based on it,
> is strictly prohibited.
>
> *********************************************************
> Visit us at http://www.mahindrabt.com
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 07/05/2002

*********************************************************
Disclaimer

This message (including any attachments) contains 
confidential information intended for a specific 
individual and purpose, and is protected by law. 
If you are not the intended recipient, you should 
delete this message and are hereby notified that 
any disclosure, copying, or distribution of this
message, or the taking of any action based on it, 
is strictly prohibited.

*********************************************************
Visit us at http://www.mahindrabt.com

  Return to Index