how would i conseal another file, say another program.exe ...that i would want to extract from my program at one time or another... no im not trying to make a trojan or virus ... LoL ... anyway... any1 no?
Printable View
how would i conseal another file, say another program.exe ...that i would want to extract from my program at one time or another... no im not trying to make a trojan or virus ... LoL ... anyway... any1 no?
This might be helpful...
Shell Function
Runs an executable program and returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero.
Syntax
Shell(pathname[,windowstyle])
The Shell function syntax has thesenamed arguments:
Part Description
pathname Required; Variant (String). Name of the program to execute and any requiredarguments orcommand-line switches; may include directory or folder and drive.
windowstyle Optional. Variant (Integer) corresponding to the style of the window in which the program is to be run. If windowstyle is omitted, the program is started minimized with focus.
The windowstyle named argument has these values:
Constant Value Description
vbHide 0 Window is hidden and focus is passed to the hidden window.
vbNormalFocus 1 Window has focus and is restored to its original size and position.
vbMinimizedFocus 2 Window is displayed as an icon with focus.
vbMaximizedFocus 3 Window is maximized with focus.
vbNormalNoFocus 4 Window is restored to its most recent size and position. The currently active window remains active.
vbMinimizedNoFocus 6 Window is displayed as an icon. The currently active window remains active.
Remarks
If the Shell function successfully executes the named file, it returns the task ID of the started program. The task ID is a unique number that identifies the running program. If the Shell function can't start the named program, an error occurs.
Note By default, the Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed.
hmmmmmmmm...interesting...any1 else got info on this topic?
res files...
heres some code to extrsact them...
VB Code:
Sub ExtractFiles(Directory As String, fileType As String, fileName As String) Dim I As Integer, btBuffer() As Byte, btFileNum As Byte On Error Resume Next ' We don't want to handle the Path Already Exists error which might occur... Call MkDir(Directory) ' Create the directory. On Error GoTo 0 ' Cancel error handling. We want to know about further errors, it will help us fix them. btBuffer = LoadResData(101, fileType) ' 101, 102, 103 and 104! (index,format) btFileNum = FreeFile ' Get the free file number! Open Directory & "\" & fileName & "." & fileType For Binary As #btFileNum ' Open the file! Put #btFileNum, , btBuffer ' Write to the file! Close #btFileNum ' Close the file! End Sub
What you have to do is....
1. through the "addins" menu. you will have to check the
vb 6 Resource editor
2. refere to the project tree view.. Right click, choose ADD..
Add a resource file
3. choose Add Custom Resource...... Find the file.. etc.
4. Right click on the file you just added. and choose properties...
then change the extension of the filee...
5, Use the code I got from the board here.. ..
I think thats got it..
Seahag