English
Source / code snippets

Perform Delete Resources Save

 

Michael
Dell
It's all right here circa Resoucen The as File present are (in the Resource) these then on disk stored and carryed out.
CompileMarkSeparation
nach einer Idee von Stephan Dehne
erweitert:      von Achim Engelhardt
bearbeitet:     von Michael Dell
Befehl: GetResBin("NewFile.Name",%HInstance oder DLLhandle&,Nummer&,Typ&)
oder vor Profan 7.6
GetResBin "NewFile.Name",%HInstance oder DLLhandle&,Nummer&,Typ&
Speichert eine (Win)Resource, führt sie aus und löscht sie dann!
Funktioniert bei EXE/TXT/HLP/CHM/DOC/XLS und anderen mit einer Anwendung verknüpften Datei- Formaten!
def FindRes(3)   !"Kernel32.Dll","FindResourceA"
def LoadRes(2)   !"Kernel32.Dll","LoadResource"
def SizeofRes(2) !"Kernel32.Dll","SizeofResource"
declare Data#

Proc GetResBin

    Parameters TaskName$,hdl&,nr&,typ&
    declare Size&,Temp&,Handle1&,Handle2&,DLL&,dll$,EXEC$,PFAD$
    Handle1& = FindRes(hdl&,nr&,typ&)                          Finden der Resource (z.B.:Typ 240)
    Handle2& = LoadRes(hdl&,Handle1&)                          Laden der Resource
    Size&    = SizeofRes(hdl&,Handle1&)                        Größe der geladenen Resource ermitteln
    dim Data#,Size&
    Temp& = Data#                                             Original-Pointer von Data# sichern
    Data# = Handle2&                                          Bereichsvariable "verbiegen"
    assign #1,TaskName$                                       Geladenen Resource als Datei exportieren
    openrw #1
    blockwrite #1,Data#,0,Size&
    closerw #1
    Data# = Temp&                                             Originalzustand von Data# wiederherstellen
    dispose Data#
    EXEC$ = TaskName$
    ShellExec(EXEC$,"open",3)                               Starten der Exportierten Datei (wenns ne EXE ist)
    assign #1,TaskName$                                       Exportierte Datei löschen
    erase #1

ENDPROC

Salu...
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
11/20/04  
 



and at proggen need mans for what?

iF
 
11/20/04  
 




Michael
Dell
If one to that example a EXE in the Res has and the Save, Ausführn and again Delete wants
or time even Text/Help/Images/Sound u.ä. from the Res in the Verknüpften Program Show wants.

Sone things even.

Nachtrag: It's all right here circa Resoucen The as File present are (in the Resource)
these then on disk stored and carryed out.

Greeting...
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
11/20/04  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.377 Views

Untitledvor 0 min.
Rainer Hoefs07/12/19
RAW09/14/18
Wolfgang Laube01/13/17
Swissmade02/28/15
More...

Themeninformationen

this Topic has 2 subscriber:

Michael Dell (2x)
unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie