hey guys
how about using resources??
... oh and what do you mean by "block"?
And I don't know what a resource is.
ptrdiff_t len = end - start;
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
you can add files to your executables as resources.so when you want to use them you
can extract it and use it. I think it works for the bigger files.
Thanks a lot!
One small question about that ptrdiff_t type. What exactly will 'len' be, the size of bytes? Or would that depend on the types of pointers I'm subtracting?
'cause I just subtracted the addresses of binary_data_avi_start and binary_data_avi_end without specifying a pointer type.
It's related to the type.
So if you have
int array[10];
int *p = &array[5];
then p - array will be 5
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Btw, there is another way to embed something into your application such as appending data(s) into the end of your executable file. This method less efficient for large data because it will search the given markers to determine the position of your datas.Since windows provided APIs to modifying resources, it's less protective. If you want somebody could 'easily' change something in your application then probably you can use it.
> If you want somebody could 'easily' change something in your application then probably you can use it.
No different than the method mentioned above.