Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hiding a video
Message
De
18/08/2007 10:22:29
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01248415
Message ID:
01248945
Vues:
19
>>>>Is it possible to compile a video inside an exe so that the video file is never seen by a prying user? I have added it to 'other files'. But when I install the exe on a clean machine and click it's video button, it tells me that there is a missing file.
>>>
>>>It is possible to build the video in EXE, but I think to play it you need to extract it first as a disk file (not sure though)
>>>
>>>lcFileName = ADDBS(SYS(2023))+FORCEEXT(SYS(2015),[TMP])
>>>STRTOFILE(FILETOSTR([YourVideoFileNameHere.AVI]),lcFileName)
>>>
>>>*** play lcFileName
>>>
>>>ERASE(lcFileName)
>>>
>>
>>Now you have me wondering about running it from a memo field. Here is a way to execute code from a memo field that was posted a year or two ago. It's below - Can it be modified to run the video this way?
>>
>>* How can you execute compiled code stored in a MEMO field?
>>* If you have VFP6 with at least SP3, you can use the COMPILE command
>>
>>lcFileName = Sys(2015) + ".prg"
>>Strtofile(MyMemofield, lcFileName )
>>Compile (lcFileName)
>>DO (lcFileName)
>>
>>* In VFP7 you can use ExecScript
>>* ExecScript(MyMemofield)
>>
>
>
>Something like that:
>
>lcFileName = ADDBS(SYS(2023))+FORCEEXT(SYS(2015),[AVI]) && Make sure that the extention is AVI
>STRTOFILE(BLOBfieldhere,lcFileName) && Use BLOB or Memo binary to save AVI
>DECLARE INTEGER ShellExecute ;
>	    IN SHELL32.DLL ;
>	    INTEGER,;
>	    STRING,;
>	    STRING,;
>	    STRING,;
>	    STRING,;
>	    INTEGER
>ShellExecute(0, [open], lcFileName, [], [], 1)
>
As it turns out, the app with the video is entirely too big to install on most PCs. So, I will have to drop this idea. Thank you for the help, Borislav.
I ain't skeert of nuttin eh?
Yikes! What was that?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform