yeah
Printable View
yeah
De-hash was maybe a better term :)
Didn't know there was any such thing as "de-hashing". (ummm, *whispers*: "By definition, a hash is irreversible.")
But, I also didn't know there was compression that could compress infinite videos with all their frames down into 2 Bytes (i.e., 65536 possibilities). (*whispers again*: "Even a single movie will have far more than 65536 frames, and that only allows one pixel per frame." *chuckles*)
But I seem to remember that we've been down this road before with ThEiMp.
LOL, yeah. But I think in the past it was 20 bytes, so a 10x improvement on the compression side since last time.
I think the end goal is to distribute an exe file that contains pirated movies/tv shows embedded in the .exe file itself, which has always made me uneasy about these threads in the first place.
WOW, why would anyone want to do that? I mean, movies are already compressed close to the max, and there are plenty of excellent video players out there.
And if we're truly dealing with pirated stuff, who in the world would go anywhere near an EXE? I mean, they'd already be doing something nefarious, so they'd be on high-alert for virus/trojan/spoofing activity. Most MP? type data is fairly safe, but an EXE is pretty much the exact opposite of that.
Ohhhh, wait. I've got it. It's ThEiMp who's trying to spread some virus/etc with his EXEs. Nowwww, I see. :)
I am NOT a virus programmer, okay then matey
It can help if you can explain why you want to store films and series inside your application.
It's very odd and inconvenient to do this. If you already have to movies and series on your disk then just use a media player, like VNC.
If it's about building a movie database, with descriptions and ratings about films and series then you don't store the content also in the database.
-- I might be able to store the ratings, comments in a XHTML document, using coding tags, like the <P>, etc???
Or just use a MDB file.
Define the columns you need and use ADO to update and read the database content.
I believe this thread has some sample code:
https://www.vbforums.com/showthread....y-on-each-text
More threads about a movie database on vbForums:
https://www.google.com/search?q=site...movie+database
Thanks for the input, dear forum member
still my variable data is a = 0. this however is set then the form is activated. then when the form load has been called, it now equals a = a+ 1. not sure what this means by???
When does the form_activated event run? Have you done anything to see when this is running and what order? Try printing a debug mesage in the Activate event and then another in the Load event to see what is happening. Or you could just read the documentation https://learn.microsoft.com/en-us/pr...ectedfrom=MSDN
There is nothing magic about writing code, apart from turning 43Mb file into a 2 byte compressed file, it is all about understanding a problem and then writing code to solve this problem. When things go wrong you need to debug your code, use breakpoints, print things to the output window, write to a log file, etc.
well yes i know about debugging my source code. but then there is the problem with the variables, i am calling them and they are wrong values, when i make them a special value, even
yeah, i have been using the: Debug.Print command and Beep, also
So where did you use Debug.Print? What did it tell you? Did you do as I suggested and put them in the activated and load events?
Why are you using the activated event? When do you think it is raised?
It is like getting blood from a stone trying to get anything useful from you.
If you have done a Debug.Print in the two events you should see what order / when they fire, that would explain one of your problems.
If you had stepped through your form load event and paid attention to the item1 variable's contents and how it changed, that would have explained another of your problems.
If you had used the debugger and inspected the item1 after you load the initial value then you would have seen using StrConv on the binary data wasn't doing what you though it was doing, that would have explained another of your problems.
This is the source of your project, have a look at my comments.
You never ever did something with our remarks about using Strings instead of Byte arrays
Code:Option Explicit
'
Dim a As Integer
Dim Item1 As String
Dim PauseTime, Start, Finish, TotalTime
'
Public Sub Form_Activate()
On Error Resume Next
a = 0
With App
.TaskVisible = False
If .PrevInstance = False Then Exit Sub
If .PrevInstance = True Then Unload Main
End With
End Sub
Public Sub Form_Load()
On Error Resume Next
a = a + 1
'<< Comment by Arnoutdv: DON"T use StrConv: Store the data in a byte array!
Item1 = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
'>>
MkDir ("C:\Temp\Video1234567890")
'<< Comment by Arnoutdv: DON"T use StrConv: Save the byte array as binary
Open ("C:\Temp\Video1234567890\Image1234567890.jpg") For Output As #1
Print #1, (StrConv(LoadResData("IMAGE", "DATA"), vbUnicode))
'>>
Close #1
With Main
.picBox.Picture = LoadPicture("C:\Temp\Video1234567890\Image1234567890.jpg")
.rtbText.TextRTF = (StrConv(LoadResData("TEXT", "DATA"), vbUnicode))
End With
With Main.CustomDialog1
.Action = 2
'<< Comment by Arnoutdv: DON"T use StrConv: Use the byte array
.Data = (StrConv(LoadResData("EP" & Item1, "SEASON1"), vbUnicode))
'>>
.DefaultFilter = "flv"
.FileName = "Video1234567890"
.Filter = "flv"
.FilterEnabled = False
.Path = "C:\Temp\Video1234567890"
End With
With Main.CustomDialog1
'<< Comment by Arnoutdv: It's binary data, don't use For Output, use For Binary and Put
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Output As #1
Print #1, .Data
'>>
Close #1
End With
1 With Main
.Timer1.Interval = .Timer1.Interval - 1
'<< Comment by Arnoutdv: Bogus code...
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
If TotalTime = 0 Then GoTo 2
'>>
2 .WMP.URL = ("C:\Temp\Video1234567890\Video1234567890.flv")
'<< Comment by Arnoutdv: Bogus code...
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
If TotalTime = 0 Then GoTo 3
'>>
3 .picBox.Visible = False
End With
Item1 = ""
End Sub
Public Sub Form_Resize()
On Error Resume Next
Dim FormLeft As Long
Dim FormTop As Long
With Main
FormLeft = .Left
FormTop = .Top
.Left = FormLeft
.Top = FormTop
.Height = 7515
.Width = 15870
End With
End Sub
Public Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Set Main = Nothing
RmDir ("C:\Temp\Video1234567890")
Unload Main
End Sub
WHAT is this???????????????????
Code:Public Sub Form_Resize()
On Error Resume Next
Dim FormLeft As Long
Dim FormTop As Long
With Main
FormLeft = .Left
FormTop = .Top
.Left = FormLeft
.Top = FormTop
.Height = 7515
.Width = 15870
End With
End Sub
It looks like conversion from "Single" to "Long".
That's whats it is, then
-- Could someone look at my source code in the way that is the I/O data filling process???
Have you changed your code since the example in post #26 (https://www.vbforums.com/showthread....=1#post5611620) , if you have then you need to show us the new code.
If you haven't, why have you ignored all the advice so far?
In an attempt to get you to debug it and tell us what is happening could you answer some simple questions?
1. Why are you doing
instead of correctly handling any errors that may occur, errors are a why of finding out what is going wrong, this is causing you to ignore potentially useful information.Code:On Error Resume Next
2. What is the value of a before and after this line of code?
3. why are you doingCode:a = a + 1
when you have been told not to use StrConv on binary data?Code:Item1 = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
4. Why are you doing
if you never use the CustomDialog1 object anywhere?Code:With Main.CustomDialog1
.Action = 2
.Data = Item1
.FileName = "\Video1234567890.flv"
.Path = "C:\Temp\Video1234567890"
End With
5. What are the contents of the variable item1 and the contents of the file "C:\Temp\Video1234567890\Video1234567890.flv" before and after this bit of code
are they what you expect?Code:Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Get #1, , Item1
Close #1
6. What are the contents of the variable item1 and the contents of the file "C:\Temp\Video1234567890\Video1234567890.flv" before and after this bit of code
are they what you expect?Code:Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Put #1, , Item1
Close #1
There are so many potential problems in your code, that have already been pointed out to you, that need addressing before anything else can be done.
There is no point in asking for help, then completely ignoring the help and advice, then asking for help again on exactly the same problem. You need to either make the suggested updates, or at least explain what is going on. You have shown absolutely no evidence that you have tried to debug this, no evidence of stepping through the code and analysing what is going on, and no evidence you are paying attention to the advice you are getting.
Now you know why OP chose his particular handle:
Imp definition: a small, mischievous devil or sprite
okay then, i will look back at my source code, then so