Perusing the code for the fastexit.asm, I came up with this rsrc.rc file.
There wasn't a build.bat I could study so I don't know where this gets used.
Thanks.
#include "\masm32\include\resource.h"
200 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "BACKUP.ICO"
-------------------------------------------------------------------------------------
;
; runbat.asm Run a bat or 16 bit .exe file from an icon,
; the icon can be moved and it remains in the
; same position after reboots !!!
; Much help from Hutch
.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Comctl32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\shell32.inc
include \masm32\include\oleaut32.inc
include \masm32\macros\macros.asm
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Comctl32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\oleaut32.lib
.data
notice db 'Andy Kennedy 10/21/04',0
.code
; ?????????????????????????????????????????????????????????????????????????
start:
; ?????????????????????????????????????????????????????????????????????????
main proc
LOCAL buffer[260]:BYTE
invoke GetCL,1,ADDR buffer
fn ShellExecute,0,"open",ADDR buffer,NULL,NULL,SW_SHOWNORMAL
invoke ExitProcess,0
main endp
; ?????????????????????????????????????????????????????????????????????????
end start
There wasn't a build.bat I could study so I don't know where this gets used.
Thanks.
#include "\masm32\include\resource.h"
200 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "BACKUP.ICO"
-------------------------------------------------------------------------------------
;
; runbat.asm Run a bat or 16 bit .exe file from an icon,
; the icon can be moved and it remains in the
; same position after reboots !!!
; Much help from Hutch
.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Comctl32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\shell32.inc
include \masm32\include\oleaut32.inc
include \masm32\macros\macros.asm
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Comctl32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\oleaut32.lib
.data
notice db 'Andy Kennedy 10/21/04',0
.code
; ?????????????????????????????????????????????????????????????????????????
start:
; ?????????????????????????????????????????????????????????????????????????
main proc
LOCAL buffer[260]:BYTE
invoke GetCL,1,ADDR buffer
fn ShellExecute,0,"open",ADDR buffer,NULL,NULL,SW_SHOWNORMAL
invoke ExitProcess,0
main endp
; ?????????????????????????????????????????????????????????????????????????
end start
If you use Hutch's MASM32 package, it detects the file and compiles and links it in for you, when you build it.
Regards, P1 8)
Regards, P1 8)
@echo off
if not exist rsrc.rc goto over1
\masm32\bin\rc /v rsrc.rc
\masm32\bin\cvtres /machine:ix86 rsrc.res
:over1
if exist "%1.obj" del "%1.obj"
if exist "%1.exe" del "%1.exe"
rem \masm32\bin\ml /c /coff "%1.asm" ;Old line
\masm32\bin\ml /c /coff "%1.asm" > "%1.txt"
if errorlevel 1 goto errasm
if not exist rsrc.obj goto nores
\masm32\bin\Link /DLL /DEF:"%1.def" /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib "%1.obj" rsrc.obj
if errorlevel 1 goto errlink
dir "%1.*"
goto TheEnd
:nores
\masm32\bin\Link /DLL /DEF:"%1.def" /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib "%1.obj"
if errorlevel 1 goto errlink
del "%1.res"
del "%1.obj"
dir "%1.*"
goto TheEnd
:errlink
echo _
echo Link error
goto TheEnd
If you use Hutch's MASM32 package, it detects the file and compiles and links it in for you, when you build it.
Regards, P1 8)
Regards, P1 8)
@echo off
if not exist rsrc.rc goto over1
\masm32\bin\rc /v rsrc.rc
\masm32\bin\cvtres /machine:ix86 rsrc.res
:over1
if exist "%1.obj" del "%1.obj"
if exist "%1.exe" del "%1.exe"
rem \masm32\bin\ml /c /coff "%1.asm" ;Old line
\masm32\bin\ml /c /coff "%1.asm" > "%1.txt"
if errorlevel 1 goto errasm
if not exist rsrc.obj goto nores
\masm32\bin\Link /DLL /DEF:"%1.def" /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib "%1.obj" rsrc.obj
if errorlevel 1 goto errlink
This is what I am getting.
rsrc.rc (3): error RC2175 : resource file BACKUP.BMP is not in 3.00 format
rsrc.rc (3): error RC2175 : resource file BACKUP.BMP is not in 3.00 format
Well appears to me like you're trying to load a BITMAP (.BMP) through the ICON parameter.
Well appears to me like you're trying to load a BITMAP (.BMP) through the ICON parameter.
rsrc.rc (3): error RC2175 : resource file BACKUP.BMP is not in 3.00 format
Well appears to me like you're trying to load a BITMAP (.BMP) through the ICON parameter.
Well appears to me like you're trying to load a BITMAP (.BMP) through the ICON parameter.
I have made icons before by renaming 120x120 bmps to .ico files, but that must be the problem because I renamed Hutch's .ico to a bmp but when I tried to view it with Mspaint it said it couldn't read the header. So Mspaint must be not be saving them to the proper format.
You don't use paint to create icons.... :shock:
You don't use paint to create icons.... :shock:
OK, you made a statement but no followup information. Recommendations
for programs that will make icons would be appreciated.
Thanks.
Try http://www.awicons.com/
Try http://www.awicons.com/
Thanks. I found an icon editor and everything assembles fine now.
I found what was supposed to be a freeware icon editor, but it's only good for
30 days. It'll serve my purpose for now.