Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program performed illegal operation while renaming .new to .exe

Status
Not open for further replies.

topone

Programmer
Jul 28, 2004
21
0
0
GB
Hi,
I am getting an error - program performed illegal operation - exception 10h in module msvbvm60.dll when program checks for new version on server if exists downloads the program by closing the current program

1. App.exe -- calls AppUpdate.exe using shellcode
2. AppUpdate.exe terminate app.exe
3. Then check the version differences, if new version exists on server downloads using ftpdownload file named app.new.
4. filecopy app.new, app.exe,true - copy app.new to app.exe by overwriting the already existing file app.exe.
5. once all above is sucessful delete app.new and runs app.exe

In this process error occurs with above details. This happens at client place not in the development machine

Hope to get solution soon
Thanks
 
hi,
can u be specific about @ which step the error occurs, may be then, i can sugest somthing

 
When I call appUpdate.exe then error msg pops app.exe performed illegal operation
 
Excellent. So now how us how you are "call[ing] AppUpdate.exe with shellcode
 
Dim SEI As SHELLEXECUTEINFO
Dim ProcessHandle As Long, i As Long
Dim ConHandle As String

UpdateClient = False

ProcessHandle = MDIFrmMain.hwnd

'Fill the SHELLEXECUTEINFO structure
With SEI
.cbSize = Len(SEI)
.fMask = SEE_MASK_NOCLOSEPROCESS Or SEE_MASK_INVOKEIDLIST Or _
SEE_MASK_FLAG_NO_UI
.lpVerb = "Open"
.lpParameters = ProcessHandle & " " & HndCon
.lpFile = App.Path & "\appUpdate.exe"
.nShow = SW_SHOWNORMAL
End With

' execute
ShellExecuteEX SEI

AddStatusText "Updating app newer Version ..."
UpdateClient = True

End Function
 
I think we need to see your declarations for ShellExecuteEx and the SHELLEXECUTEINFO structure (given that what you have here so far looks OK)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top