mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:15:41 +00:00
[MSHTA] Implement MSHTA.exe (#577) CORE-12813
Implement mshta.exe. It links directly to the function RunHTMLApplication in mshtml and passes the file name and other optional arguments along. While the function is unimplemented in mshtml, it's a start. [MSHTML] Add ADD_IMPORTLIB to CMakeLists so mshta can link to mshtml. [BOOTDATA] Add the association information for mshta.exe to the registry.
This commit is contained in:
parent
1d398057a3
commit
76a73b4295
7 changed files with 39 additions and 1 deletions
|
@ -23,6 +23,7 @@ add_subdirectory(mplay32)
|
||||||
add_subdirectory(msconfig)
|
add_subdirectory(msconfig)
|
||||||
add_subdirectory(msconfig_new)
|
add_subdirectory(msconfig_new)
|
||||||
add_subdirectory(mscutils)
|
add_subdirectory(mscutils)
|
||||||
|
add_subdirectory(mshta)
|
||||||
add_subdirectory(mspaint)
|
add_subdirectory(mspaint)
|
||||||
add_subdirectory(mstsc)
|
add_subdirectory(mstsc)
|
||||||
add_subdirectory(network)
|
add_subdirectory(network)
|
||||||
|
|
6
base/applications/mshta/CMakeLists.txt
Normal file
6
base/applications/mshta/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
add_executable(mshta main.c mshta.rc)
|
||||||
|
target_link_libraries(mshta)
|
||||||
|
set_module_type(mshta win32gui)
|
||||||
|
add_importlibs(mshta msvcrt mshtml kernel32 ntdll)
|
||||||
|
add_cd_file(TARGET mshta DESTINATION reactos/system32 FOR all)
|
18
base/applications/mshta/main.c
Normal file
18
base/applications/mshta/main.c
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* PROJECT: ReactOS HTML Application Host
|
||||||
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||||
|
* PURPOSE: Forwards HTA application information to mshtml
|
||||||
|
* COPYRIGHT: Copyright 2017-2018 Jared Smudde(computerwhiz02@hotmail.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <windef.h>
|
||||||
|
#include <winbase.h>
|
||||||
|
#include <winuser.h>
|
||||||
|
#include <mshtml.h>
|
||||||
|
|
||||||
|
extern DWORD WINAPI RunHTMLApplication(HINSTANCE hinst, HINSTANCE hPrevInst, LPSTR szCmdLine, int nCmdShow);
|
||||||
|
|
||||||
|
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow)
|
||||||
|
{
|
||||||
|
return RunHTMLApplication(hInst, hPrevInst, cmdline, cmdshow);
|
||||||
|
}
|
BIN
base/applications/mshta/mshta.ico
Normal file
BIN
base/applications/mshta/mshta.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
7
base/applications/mshta/mshta.rc
Normal file
7
base/applications/mshta/mshta.rc
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS HTML Application Host"
|
||||||
|
#define REACTOS_STR_INTERNAL_NAME "mshta"
|
||||||
|
#define REACTOS_STR_ORIGINAL_FILENAME "mshta.exe"
|
||||||
|
|
||||||
|
#include <reactos/version.rc>
|
||||||
|
|
||||||
|
1 ICON "mshta.ico"
|
|
@ -216,6 +216,12 @@ HKCR,"chm.file","",0x00000000,%CHMFILE%
|
||||||
HKCR,"chm.file\DefaultIcon","",0x00020000,"%SystemRoot%\hh.exe,0"
|
HKCR,"chm.file\DefaultIcon","",0x00020000,"%SystemRoot%\hh.exe,0"
|
||||||
HKCR,"chm.file\shell\open\command","",0x00020000,"%SystemRoot%\hh.exe %1"
|
HKCR,"chm.file\shell\open\command","",0x00020000,"%SystemRoot%\hh.exe %1"
|
||||||
|
|
||||||
|
; HTA Files
|
||||||
|
HKCR,".hta","",0x00000000,"htafile"
|
||||||
|
HKCR,"htafile","",0x00000000,"HTML Application"
|
||||||
|
HKCR,"htafile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\mshta.exe,-1"
|
||||||
|
HKCR,"htafile\shell\open\command","",0x00020000,"%SystemRoot%\system32\mshta.exe ""%1"" %*"
|
||||||
|
|
||||||
; set MIME type for .html and .htm because Tiny webserver needs it
|
; set MIME type for .html and .htm because Tiny webserver needs it
|
||||||
HKCR,".htm","",0x00000000,"htmlfile"
|
HKCR,".htm","",0x00000000,"htmlfile"
|
||||||
HKCR,".htm","Content Type",0x00000000,"text/html"
|
HKCR,".htm","Content Type",0x00000000,"text/html"
|
||||||
|
|
|
@ -8,7 +8,7 @@ add_definitions(
|
||||||
|
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
|
||||||
add_idl_headers(mshtml_nsiface_header nsiface.idl)
|
add_idl_headers(mshtml_nsiface_header nsiface.idl)
|
||||||
spec2def(mshtml.dll mshtml.spec)
|
spec2def(mshtml.dll mshtml.spec ADD_IMPORTLIB)
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
conpoint.c
|
conpoint.c
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue