Stubs for version.dll

svn path=/trunk/; revision=612
This commit is contained in:
Emanuele Aliberti 1999-08-11 19:56:48 +00:00
parent cb7f83ac74
commit 6cb529270a
5 changed files with 438 additions and 1 deletions

View file

@ -0,0 +1,98 @@
# $Id: makefile,v 1.1 1999/08/11 19:56:48 ea Exp $
#
# Makefile for ReactOS version.dll
#
TARGET=version
ifneq ($(HOST),mingw32-windows)
ifneq ($(HOST),mingw32-linux)
DLLTARGET=$(TARGET).a
else
DLLTARGET=$(TARGET).dll
endif
else
DOSCLI=yes
DLLTARGET=$(TARGET).dll
endif
all: $(DLLTARGET)
MISC_OBJECTS = misc/libmain.o misc/stubs.o
RESOURCE_OBJECTS = $(TARGET).coff
OBJECTS = $(MISC_OBJECTS) $(RESOURCE_OBJECTS)
$(TARGET).a: $(OBJECTS)
$(AR) csr $(TARGET).a $(OBJECTS)
$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
$(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
$(LD) -r $(OBJECTS) -o $(TARGET).o
$(DLLTOOL) \
--dllname $(TARGET).dll \
--def $(TARGET).def \
--kill-at \
--output-lib $(TARGET).a
$(CC) $(TARGET).o \
../kernel32/kernel32.a \
-specs=$(TARGET)_specs \
-mdll \
-o junk.tmp \
-Wl,--entry,_DllMain@12 \
-Wl,--base-file,base.tmp
- $(RM) junk.tmp
$(DLLTOOL) \
--dllname $(TARGET).dll \
--base-file base.tmp \
--output-exp temp.exp \
--def $(TARGET).edf
- $(RM) base.tmp
$(CC) $(TARGET).o \
../kernel32/kernel32.a \
-specs=$(TARGET)_specs \
-mdll \
-o $(TARGET).dll \
-Wl,--entry,_DllMain@12 \
-Wl,--image-base,0x70000000 \
-Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \
-Wl,temp.exp
- $(RM) temp.exp
$(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
ifeq ($(DOSCLI),yes)
CLEAN_FILES = *.o *.a *.coff *.sym *.tmp *.dll main\*.o misc\*.o
else
CLEAN_FILES = *.o *.a *.coff *.sym *.tmp *.dll main/*.o misc/*.o
endif
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.PHONY: clean $(CLEAN_FILES:%=%_clean)
floppy: $(FLOPPY_DIR)/dlls/$(TARGET).dll
$(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
ifeq ($(DOSCLI),yes)
$(CP) $(TARGET).dll $(FLOPPY_DIR)\dlls\$(TARGET).dll
else
$(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
endif
dist: $(DIST_DIR)/dlls/$(TARGET).dll
$(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
ifeq ($(DOSCLI),yes)
$(CP) $(TARGET).dll ..\..\$(DIST_DIR)\dlls\$(TARGET).dll
else
$(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
endif
include ../../rules.mak
# EOF

View file

@ -1,7 +1,7 @@
#include <windows.h>
INT
STDCALL
LibMain(
DllMain (
PVOID hinstDll,
ULONG dwReason,
PVOID reserved

View file

@ -0,0 +1,223 @@
/* $Id: stubs.c,v 1.1 1999/08/11 19:56:48 ea Exp $
*
* version.dll stubs: remove from this file if
* you implement one of these functions.
*/
#include <windows.h>
#ifndef HAVE_DLL_FORWARD
DWORD
STDCALL
GetFileVersionInfoSizeA (
LPSTR lptstrFilename,
LPDWORD lpdwHandle
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
WINBOOL
STDCALL
GetFileVersionInfoA (
LPSTR lptstrFilename,
DWORD dwHandle,
DWORD dwLen,
LPVOID lpData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
DWORD
STDCALL
GetFileVersionInfoSizeW (
LPWSTR lptstrFilename,
LPDWORD lpdwHandle
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
WINBOOL
STDCALL
GetFileVersionInfoW (
LPWSTR lptstrFilename,
DWORD dwHandle,
DWORD dwLen,
LPVOID lpData
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
#endif /* ndef HAVE_DLL_FORWARD */
DWORD
STDCALL
VerFindFileA (
DWORD uFlags,
LPSTR szFileName,
LPSTR szWinDir,
LPSTR szAppDir,
LPSTR szCurDir,
PUINT lpuCurDirLen,
LPSTR szDestDir,
PUINT lpuDestDirLen
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
DWORD
STDCALL
VerFindFileW (
DWORD uFlags,
LPWSTR szFileName,
LPWSTR szWinDir,
LPWSTR szAppDir,
LPWSTR szCurDir,
PUINT lpuCurDirLen,
LPWSTR szDestDir,
PUINT lpuDestDirLen
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
DWORD
STDCALL
VerInstallFileA (
DWORD uFlags,
LPSTR szSrcFileName,
LPSTR szDestFileName,
LPSTR szSrcDir,
LPSTR szDestDir,
LPSTR szCurDir,
LPSTR szTmpFile,
PUINT lpuTmpFileLen
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
DWORD
STDCALL
VerInstallFileW (
DWORD uFlags,
LPWSTR szSrcFileName,
LPWSTR szDestFileName,
LPWSTR szSrcDir,
LPWSTR szDestDir,
LPWSTR szCurDir,
LPWSTR szTmpFile,
PUINT lpuTmpFileLen
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
DWORD
STDCALL
VerLanguageNameA (
DWORD wLang,
LPSTR szLang,
DWORD nSize
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
DWORD
STDCALL
VerLanguageNameW (
DWORD wLang,
LPWSTR szLang,
DWORD nSize
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
WINBOOL
STDCALL
VerQueryValueA (
const LPVOID pBlock,
LPSTR lpSubBlock,
LPVOID * lplpBuffer,
PUINT puLen
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
WINBOOL
STDCALL
VerQueryValueW (
const LPVOID pBlock,
LPWSTR lpSubBlock,
LPVOID * lplpBuffer,
PUINT puLen
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* VerQueryValueIndex seems undocumented */
DWORD
STDCALL
VerQueryValueIndexA (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
DWORD
STDCALL
VerQueryValueIndexW (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* EOF */

View file

@ -0,0 +1,38 @@
#include "../../include/defines.h"
#include "../../include/reactos/resource.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", RES_STR_COMPANY_NAME
VALUE "FileDescription", "Version checking and file installation library\0"
VALUE "FileVersion", RES_STR_FILE_VERSION
VALUE "InternalName", "version\0"
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
VALUE "OriginalFilename", "version.dll\0"
VALUE "ProductName", RES_STR_PRODUCT_NAME
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View file

@ -0,0 +1,78 @@
*asm:
*asm_final:
*cpp:
-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}
*cc1:
%(cc1_spec)
*cc1plus:
*endfile:
*link:
%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMainCRTStartup@12}
*lib:
*libgcc:
-lgcc
*startfile:
*switches_need_spaces:
*signed_char:
%{funsigned-char:-D__CHAR_UNSIGNED__}
*predefines:
-Di386 -D_WIN32 -DWIN32 -D__WIN32__ -D__MINGW32__ -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) _D_stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -Asystem(winnt) -Acpu(i386) -Amachine(i386)
*cross_compile:
1
*version:
egcs-2.91.57
*multilib:
. ;
*multilib_defaults:
*multilib_extra:
*multilib_matches:
*linker:
collect2
*cpp_486:
%{!ansi:-Di486} -D__i486 -D__i486__
*cpp_586:
%{!ansi:-Di586 -Dpentium} -D__i586 -D__i586__ -D__pentium -D__pentium__
*cpp_686:
%{!ansi:-Di686 -Dpentiumpro} -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__
*cpp_cpu_default:
%(cpp_586)
*cpp_cpu:
-Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__ %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} %{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}
*cc1_cpu:
%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{mno-486:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mno-386:-mcpu=i486 -march=i486} %{mno-pentium:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mno-pentiumpro:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}