Added registry test app

svn path=/trunk/; revision=1334
This commit is contained in:
Eric Kohl 2000-09-05 22:57:43 +00:00
parent fbac67d372
commit 90a17ecf05
3 changed files with 96 additions and 4 deletions

View file

@ -44,13 +44,13 @@ NET_DRIVERS = ndis tcpip tditest
# ne2000
NET_DEVICE_DRIVERS = ne2000
KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS) $(NET_DRIVERS) $(NET_DEVICE_DRIVERS)
APPS = args hello shell test cat bench apc shm lpc thread event file gditest \
pteb consume dump_shared_data vmtest
# wstest
pteb consume dump_shared_data vmtest regtest
# objdir
KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS) $(NET_DRIVERS) $(NET_DEVICE_DRIVERS)
all: buildno $(COMPONENTS) $(DLLS) $(SUBSYS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
.PHONY: all
@ -84,7 +84,7 @@ install: rcopy$(EXE_POSTFIX) rmkdir$(EXE_POSTFIX) make_install_dirs autoexec_ins
$(KERNEL_SERVICES:%=%_install) $(SUBSYS:%=%_install) \
$(APPS:%=%_install)
dist: clean_dist_dir make_dist_dirs $(COMPONENTS:%=%_dist) $(DLLS:%=%_dist) \
dist: rcopy$(EXE_POSTFIX) clean_dist_dir make_dist_dirs $(COMPONENTS:%=%_dist) $(DLLS:%=%_dist) \
$(LOADERS:%=%_dist) $(KERNEL_SERVICES:%=%_dist) $(SUBSYS:%=%_dist) \
$(APPS:%=%_dist)

View file

@ -0,0 +1,46 @@
#
#
#
PATH_TO_TOP = ../..
OBJECTS= ../common/crt0.o regtest.o
PROGS= regtest.exe
LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a \
../../lib/advapi32/advapi32.a
BASE_CFLAGS = -I../../include
all: $(PROGS)
.phony: all
clean:
- $(RM) *.o
- $(RM) *.exe
- $(RM) *.sym
.phony: clean
install: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
regtest.exe: $(OBJECTS) $(LIBS)
$(CC) -specs=../../specs $(OBJECTS) $(LIBS) -lgcc -o regtest.exe
$(NM) --numeric-sort regtest.exe > regtest.sym
include ../../rules.mak

View file

@ -0,0 +1,46 @@
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <windows.h>
HANDLE OutputHandle;
HANDLE InputHandle;
void dprintf(char* fmt, ...)
{
va_list args;
char buffer[255];
va_start(args,fmt);
vsprintf(buffer,fmt,args);
WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL);
va_end(args);
}
int main(int argc, char* argv[])
{
HKEY hKey = NULL;
DWORD dwDisposition;
AllocConsole();
InputHandle = GetStdHandle(STD_INPUT_HANDLE);
OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
dprintf ("RegCreateKeyExW:\n");
RegCreateKeyExW (HKEY_LOCAL_MACHINE,
L"Test",
0,
L"",
REG_OPTION_VOLATILE,
KEY_ALL_ACCESS,
NULL,
&hKey,
&dwDisposition);
dprintf ("\nTests done...\n");
return 0;
}