Memory access violation
BlitzPlus Forums/BlitzPlus Programming/Memory access violation
| ||
I created a simple movieplayer, which must be loaded when I double-click an AVI-file. I changed the filetype in Windows for setting my movieplayer to run when an AVI is opened. When doubled-clicking this file: "c:\TestMovie.avi", Windows runs my movieplayer, but I get the error-message "Memory Acces Violation". This is the code used for opening the file: file$=CommandLine() movie=OpenMovie(file$) When I change the code to this: movie=OpenMovie("C:\TestMovie.avi") then it works perfectly. I printed the commandline onscreen, using: text 0, 0, file$ and then it said: "C:\TestMovie.avi" So I don't see any problem why the upper approach doesn't work. Can anyone help me with this? |
| ||
try this:file$ = Replace$(Commandline$,chr$(34),"") movie = OpenMovie(file$) |
| ||
At first it didn't work. After setting the first line to this: file$ = Replace$(CommandLine$(), chr$(34), "") Now it works, thanks. |
| ||
Oh yeah, silly me! That's what happens when you type code straight into the replybox. :) |