The MASM Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
MASM32 Downloads
Home
Help
Search
Login
Register
The MASM Forum
»
Members Gallery
»
Showcase
»
Cute toy to run files and apps on a network box.
« previous
next »
Print
Pages: [
1
]
Author
Topic: Cute toy to run files and apps on a network box. (Read 845 times)
hutch--
Administrator
Member
Posts: 10264
Mnemonic Driven API Grinder
Cute toy to run files and apps on a network box.
«
on:
December 29, 2021, 12:56:19 PM »
Elegant in its simplicity, if it fits in half a screen, it has to be OK.
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
include \masm32\include64\masm64rt.inc
.data?
hInstance dq ?
.data
ffilter db "All Files",0,"*.*",0,0 ; the file filter string
pfilt dq ffilter ; pointer to filter string
pName dq 0 ; pointer for retrieved filename
.code
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
entry_point proc
mov hInstance, rvcall(GetModuleHandle,0)
invoke open_file_dialog,0,hInstance, \ ; file dialog
"Select file to open",pfilt
mov pName, rax ; store the file data address
cmp BYTE PTR [rax], 0 ; test if its a zero (0)
je @F ; bypass action if zero
invoke ShellExecute,0,"open",pName,0,0,SW_SHOW ; try ShellExecute to run different file types
.if rax { 33 ; if error
exec pName ; run CreateProcess()
.endif
@@:
.exit
entry_point endp
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
end
Logged
hutch at movsd dot com
http://www.masm32.com
hutch--
Administrator
Member
Posts: 10264
Mnemonic Driven API Grinder
Re: Cute toy to run files and apps on a network box.
«
Reply #1 on:
December 31, 2021, 09:18:25 PM »
If you have your LAN set up correctly and share at least one partition, you can start this toy and enter the computer name in the form "\\MyBox", hit enter and you can navigate the shared partition or folder and run files in that folder.
Logged
hutch at movsd dot com
http://www.masm32.com
Print
Pages: [
1
]
« previous
next »
The MASM Forum
»
Members Gallery
»
Showcase
»
Cute toy to run files and apps on a network box.