Author Topic: Displaying hidden files  (Read 856 times)

Vortex

  • Member
  • *****
  • Posts: 1795
Displaying hidden files
« 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.

nidud

  • Member
  • *****
  • Posts: 1506
    • https://github.com/nidud/asmc
Re: Displaying hidden files
« Reply #1 on: January 29, 2018, 11:39:12 PM »
Winreg.inc and a few other include files is added. I made a test case modified for use with -pe -gui. Winreg.inc is included in windows.inc 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

Vortex

  • Member
  • *****
  • Posts: 1795
Re: Displaying hidden files
« Reply #2 on: January 30, 2018, 07:34:56 AM »
Hi nidud,

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