The MASM Forum

64 bit assembler => ASMC Development => Topic started by: Vortex on January 29, 2018, 03:29:04 AM

Title: Displaying hidden files
Post by: Vortex on January 29, 2018, 03:29:04 AM
Hi nidud,

I created a simple tool to display hidden Windows files. The tool takes one parameter :

Code: [Select]
HiddenFiles.exe show : displays hidden files
HiddenFiles.exe hide : do not show hidden files and hide protected system files
   
I could not find the include file Winreg.h in the asmc zip archive so I added manually the necessary function prototypes and equates. Could you add this missing header file? Thanks.
Title: Re: Displaying hidden files
Post by: nidud on January 29, 2018, 11:39:12 PM
Winreg.inc (https://github.com/nidud/asmc/blob/master/include/winreg.inc) and a few other include files is added. I made a test case (https://github.com/nidud/asmc/tree/master/source/test/wininc/winreg) modified for use with -pe -gui. Winreg.inc is included in windows.inc (https://github.com/nidud/asmc/blob/master/include/windows.inc#L460) so _WIN32REG has to be defined.

Code: [Select]
build_pe = 1

test.exe:
!if $(build_pe)
    asmc -pe -gui -D_WIN32REG $*.asm
!else
    asmc -D_WIN32REG $*.asm
    linkw format windows nt runtime windows file $*.obj
!endif

Ideally the import libraries should be defined in the include files:
Code: [Select]
ifdef __PE__
option dllimport:<advapi32>
else
includelib advapi32.lib
endif

In case of local prototypes and using the -pe switch the dllimport chain has to be stopped:

Code: [Select]
include windows.inc
ifdef __PE__
option dllimport:none ; to force proto below local..
endif

ParseCmdLine     PROTO :DWORD
EnumWndProc     PROTO STDCALL :DWORD,:DWORD
EnumChildWndProc    PROTO STDCALL :DWORD,:DWORD

WM_REFRESH     equ 28931

.data
Title: Re: Displaying hidden files
Post by: Vortex on January 30, 2018, 07:34:56 AM
Hi nidud,

Thanks for the new include file. It works fine :t