mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Integrated fixes from prep0016
Changes to the networking code to remove anonymous structures and unions Fix for bug where RtlSetEnvironmentVariable didn't if it had acquired the PEB lock before releasing it Updating clean targets svn path=/trunk/; revision=1286
This commit is contained in:
parent
65ecb0b98b
commit
c65edfad92
53 changed files with 1138 additions and 1031 deletions
|
@ -34,7 +34,7 @@ LOADERS = dos
|
|||
#
|
||||
# Select the device drivers and filesystems you want
|
||||
#
|
||||
DEVICE_DRIVERS = vga blue ide keyboard null parallel serial vidport
|
||||
DEVICE_DRIVERS = vidport vga blue ide keyboard null parallel serial
|
||||
# DEVICE_DRIVERS = beep event floppy ide_test mouse sound test test1
|
||||
|
||||
FS_DRIVERS = vfat
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.12 2000/07/19 14:18:20 dwelch Exp $
|
||||
# $Id: makefile,v 1.13 2000/08/05 18:01:54 dwelch Exp $
|
||||
#
|
||||
#
|
||||
TARGET=ide
|
||||
|
@ -18,6 +18,7 @@ clean:
|
|||
- $(RM) base.tmp
|
||||
- $(RM) temp.exp
|
||||
- $(RM) $(TARGET).sys
|
||||
- $(RM) $(TARGET).nostrip.sys
|
||||
|
||||
.phony: clean
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.7 2000/07/01 23:18:58 dwelch Exp $
|
||||
# $Id: makefile,v 1.8 2000/08/05 18:01:55 dwelch Exp $
|
||||
#
|
||||
# Makefile for ReactOS vgaddi.dll
|
||||
#
|
||||
|
@ -66,9 +66,9 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
|
|||
$(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
|
||||
|
||||
ifeq ($(DOSCLI),yes)
|
||||
CLEAN_FILES = *.o *.coff *.sym *.tmp *.dll main\*.o
|
||||
CLEAN_FILES = *.o *.coff *.sym *.tmp *.dll main\*.o objects\*.o vgavideo\*.o *.a
|
||||
else
|
||||
CLEAN_FILES = *.o *.coff *.sym *.tmp *.dll main/*.o
|
||||
CLEAN_FILES = *.o *.coff *.sym *.tmp *.dll main/*.o objects/*.o vgavideo/*.o *.a
|
||||
endif
|
||||
|
||||
clean: $(CLEAN_FILES:%=%_clean)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <ntddk.h>
|
||||
#include <debug.h>
|
||||
#include "vgaVideo.h"
|
||||
#include "vgavideo.h"
|
||||
#include "../../../../ntoskrnl/include/internal/i386/io.h"
|
||||
|
||||
void outxay(USHORT ad, UCHAR x, UCHAR y)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.18 2000/07/19 14:18:20 dwelch Exp $
|
||||
# $Id: makefile,v 1.19 2000/08/05 18:01:55 dwelch Exp $
|
||||
#
|
||||
#
|
||||
TARGET=vfatfs
|
||||
|
@ -22,7 +22,7 @@ ifeq ($(DOSCLI),yes)
|
|||
- $(RM) temp.exp
|
||||
- $(RM) $(TARGET).sys
|
||||
else
|
||||
- $(RM) $(OBJECTS) $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys
|
||||
- $(RM) $(OBJECTS) $(TARGET).coff junk.tmp base.tmp temp.exp $(TARGET).sys $(TARGET).nostrip.sys
|
||||
endif
|
||||
|
||||
.phony: clean
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
# NDIS.SYS - NDIS library
|
||||
|
||||
TARGETNAME=ndis
|
||||
|
||||
BASE_CFLAGS = -I./include -I../../../include -DNDIS_WRAPPER -DBINARY_COMPATIBLE=1
|
||||
|
||||
RESOURCE_OBJECT = $(TARGETNAME).coff
|
||||
NDIS_OBJECTS = ndis/main.o ndis/40gone.o ndis/50gone.o ndis/buffer.o ndis/cl.o \
|
||||
ndis/cm.o ndis/co.o ndis/control.o ndis/hardware.o \
|
||||
ndis/io.o ndis/memory.o ndis/miniport.o \
|
||||
ndis/protocol.o ndis/string.o ndis/stubs.o ndis/time.o
|
||||
|
||||
all: objects $(TARGETNAME).sys
|
||||
|
||||
objects:
|
||||
mkdir objects
|
||||
|
||||
$(TARGETNAME).coff: $(TARGETNAME).rc ../../../include/reactos/resource.h
|
||||
|
||||
OBJECTS = $(NDIS_OBJECTS) $(RESOURCE_OBJECT) ../../../ntoskrnl/ntoskrnl.a
|
||||
|
||||
|
||||
ifeq ($(DOSCLI),yes)
|
||||
CLEAN_FILES = *.o objects\*.o ndis\*.o $(TARGETNAME).coff $(TARGETNAME).o $(TARGETNAME).a \
|
||||
junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
|
||||
else
|
||||
CLEAN_FILES = *.o objects/*.o ndis/*.o $(TARGETNAME).coff $(TARGETNAME).o $(TARGETNAME).a \
|
||||
junk.tmp base.tmp temp.exp $(TARGETNAME).sys $(TARGETNAME).sym
|
||||
endif
|
||||
|
||||
$(TARGETNAME).sys: $(OBJECTS)
|
||||
$(DLLTOOL) \
|
||||
--dllname $(TARGETNAME).sys \
|
||||
--def $(TARGETNAME).def \
|
||||
--kill-at \
|
||||
--output-lib $(TARGETNAME).a
|
||||
$(CC) \
|
||||
-mdll \
|
||||
-specs=../../svc_specs \
|
||||
-Wl,-e,_DriverEntry@8 \
|
||||
-Wl,--base-file,base.tmp \
|
||||
-Wl,--defsym,_end=end \
|
||||
-Wl,--defsym,_edata=__data_end__ \
|
||||
-Wl,--defsym,_etext=etext \
|
||||
$(OBJECTS) \
|
||||
-o junk.tmp
|
||||
- $(RM) junk.tmp
|
||||
$(DLLTOOL) \
|
||||
--dllname $(TARGETNAME).sys \
|
||||
--base-file base.tmp \
|
||||
--output-exp temp.exp \
|
||||
--def $(TARGETNAME).edf
|
||||
- $(RM) base.tmp
|
||||
$(CC) \
|
||||
-mdll \
|
||||
-specs=../../svc_specs \
|
||||
-Wl,--image-base,0x10000 \
|
||||
-Wl,-e,_DriverEntry@8 \
|
||||
-Wl,temp.exp \
|
||||
$(OBJECTS) \
|
||||
-o $(TARGETNAME).sys
|
||||
- $(RM) temp.exp
|
||||
$(NM) --numeric-sort $(TARGETNAME).sys > $(TARGETNAME).sym
|
||||
|
||||
clean: $(CLEAN_FILES:%=%_clean)
|
||||
|
||||
$(CLEAN_FILES:%=%_clean): %_clean:
|
||||
- $(RM) $*
|
||||
|
||||
.PHONY: clean $(CLEAN_FILES:%=%_clean)
|
||||
|
||||
floppy: $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
|
||||
|
||||
$(FLOPPY_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
|
||||
ifeq ($(DOSCLI),yes)
|
||||
$(CP) $(TARGETNAME).sys $(FLOPPY_DIR)\drivers\$(TARGETNAME).sys
|
||||
else
|
||||
$(CP) $(TARGETNAME).sys $(FLOPPY_DIR)/drivers/$(TARGETNAME).sys
|
||||
endif
|
||||
|
||||
dist: $(DIST_DIR)/drivers/$(TARGETNAME).sys
|
||||
|
||||
$(DIST_DIR)/drivers/$(TARGETNAME).sys: $(TARGETNAME).sys
|
||||
ifeq ($(DOSCLI),yes)
|
||||
$(CP) $(TARGETNAME).sys ..\..\$(DIST_DIR)\drivers\$(TARGETNAME).sys
|
||||
else
|
||||
$(CP) $(TARGETNAME).sys ../../$(DIST_DIR)/drivers/$(TARGETNAME).sys
|
||||
endif
|
||||
|
||||
#WITH_DEBUGGING = yes
|
||||
#WIN32_LEAN_AND_MEAN = yes
|
||||
#WARNINGS_ARE_ERRORS = yes
|
||||
include ../../../rules.mak
|
|
@ -1,7 +0,0 @@
|
|||
#
|
||||
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
|
||||
# file to this component. This file merely indirects to the real make file
|
||||
# that is shared by all the driver components of the Windows NT DDK
|
||||
#
|
||||
|
||||
!INCLUDE $(NTMAKEENV)\makefile.def
|
|
@ -1,314 +0,0 @@
|
|||
; NDIS Kernel Module - ReactOS Operating System
|
||||
|
||||
LIBRARY NDIS.SYS
|
||||
|
||||
EXPORTS
|
||||
ArcFilterDprIndicateReceive
|
||||
ArcFilterDprIndicateReceiveComplete
|
||||
EthChangeFilterAddresses
|
||||
EthCreateFilter
|
||||
EthDeleteFilter
|
||||
EthDeleteFilterOpenAdapter
|
||||
EthFilterAdjust
|
||||
;EthFilterDprIndicateReceive ?
|
||||
;EthFilterDprIndicateReceiveComplete ?
|
||||
EthFilterIndicateReceive
|
||||
EthFilterIndicateReceiveComplete
|
||||
EthNoteFilterOpenAdapter
|
||||
EthNumberOfOpenFilterAddresses
|
||||
EthQueryGlobalFilterAddresses
|
||||
EthQueryOpenFilterAddresses
|
||||
EthShouldAddressLoopBack
|
||||
FddiChangeFilterLongAddresses
|
||||
FddiChangeFilterShortAddresses
|
||||
FddiCreateFilter
|
||||
FddiDeleteFilter
|
||||
FddiDeleteFilterOpenAdapter
|
||||
FddiFilterAdjust
|
||||
;FddiFilterDprIndicateReceive ?
|
||||
;FddiFilterDprIndicateReceiveComplete ?
|
||||
FddiFilterIndicateReceive
|
||||
FddiFilterIndicateReceiveComplete
|
||||
FddiNoteFilterOpenAdapter
|
||||
FddiNumberOfOpenFilterLongAddresses
|
||||
FddiNumberOfOpenFilterShortAddresses
|
||||
FddiQueryGlobalFilterLongAddresses
|
||||
FddiQueryGlobalFilterShortAddresses
|
||||
FddiQueryOpenFilterLongAddresses
|
||||
FddiQueryOpenFilterShortAddresses
|
||||
FddiShouldAddressLoopBack
|
||||
NDIS_BUFFER_TO_SPAN_PAGES
|
||||
NdisAcquireReadWriteLock
|
||||
NdisAcquireSpinLock
|
||||
NdisAdjustBufferLength
|
||||
NdisAllocateBuffer
|
||||
NdisAllocateBufferPool
|
||||
NdisAllocateDmaChannel
|
||||
NdisAllocateMemory
|
||||
NdisAllocateMemoryWithTag
|
||||
NdisAllocatePacket
|
||||
NdisAllocatePacketPool
|
||||
NdisAllocatePacketPoolEx
|
||||
NdisAllocateSharedMemory
|
||||
NdisAllocateSpinLock
|
||||
NdisAnsiStringToUnicodeString
|
||||
NdisBufferLength
|
||||
NdisBufferVirtualAddress
|
||||
NdisCancelTimer
|
||||
NdisClAddParty
|
||||
NdisClCloseAddressFamily
|
||||
NdisClCloseCall
|
||||
NdisClDeregisterSap
|
||||
NdisClDropParty
|
||||
NdisClIncomingCallComplete
|
||||
NdisClMakeCall
|
||||
NdisClModifyCallQoS
|
||||
NdisClOpenAddressFamily
|
||||
NdisClRegisterSap
|
||||
NdisCloseAdapter
|
||||
NdisCloseConfiguration
|
||||
NdisCloseFile
|
||||
NdisCmActivateVc
|
||||
NdisCmAddPartyComplete
|
||||
NdisCmCloseAddressFamilyComplete
|
||||
NdisCmCloseCallComplete
|
||||
NdisCmDeactivateVc
|
||||
NdisCmDeregisterSapComplete
|
||||
NdisCmDispatchCallConnected
|
||||
NdisCmDispatchIncomingCall
|
||||
NdisCmDispatchIncomingCallQoSChange
|
||||
NdisCmDispatchIncomingCloseCall
|
||||
NdisCmDispatchIncomingDropParty
|
||||
NdisCmDropPartyComplete
|
||||
NdisCmMakeCallComplete
|
||||
NdisCmModifyCallQoSComplete
|
||||
NdisCmOpenAddressFamilyComplete
|
||||
NdisCmRegisterAddressFamily
|
||||
NdisCmRegisterSapComplete
|
||||
NdisCoCreateVc
|
||||
NdisCoDeleteVc
|
||||
NdisCoRequest
|
||||
NdisCoRequestComplete
|
||||
NdisCoSendPackets
|
||||
;NdisCompareAnsiString ?
|
||||
;NdisCompareUnicodeString ?
|
||||
NdisCompleteBindAdapter
|
||||
NdisCompleteCloseAdapter
|
||||
NdisCompleteDmaTransfer
|
||||
NdisCompleteOpenAdapter
|
||||
NdisCompletePnPEvent
|
||||
NdisCompleteQueryStatistics
|
||||
NdisCompleteUnbindAdapter
|
||||
NdisConvertStringToAtmAddress
|
||||
NdisCopyBuffer
|
||||
NdisCopyFromPacketToPacket
|
||||
NdisDeregisterAdapter
|
||||
NdisDeregisterAdapterShutdownHandler
|
||||
NdisDeregisterMac
|
||||
NdisDeregisterProtocol
|
||||
NdisDprAcquireSpinLock
|
||||
NdisDprAllocatePacket
|
||||
NdisDprAllocatePacketNonInterlocked
|
||||
NdisDprFreePacket
|
||||
NdisDprFreePacketNonInterlocked
|
||||
NdisDprReleaseSpinLock
|
||||
NdisEqualString
|
||||
NdisFlushBuffer
|
||||
NdisFreeBuffer
|
||||
NdisFreeBufferPool
|
||||
NdisFreeDmaChannel
|
||||
NdisFreeMemory
|
||||
NdisFreePacket
|
||||
NdisFreePacketPool
|
||||
NdisFreeSharedMemory
|
||||
NdisFreeSpinLock
|
||||
NdisGetBufferPhysicalArraySize
|
||||
NdisGetCurrentProcessorCounts
|
||||
NdisGetCurrentProcessorCpuUsage
|
||||
NdisGetCurrentSystemTime
|
||||
NdisGetDriverHandle
|
||||
NdisGetFirstBufferFromPacket
|
||||
NdisGetReceivedPacket
|
||||
NdisGetSystemUptime
|
||||
NdisIMAssociateMiniport
|
||||
NdisIMCancelInitializeDeviceInstance
|
||||
NdisIMCopySendCompletePerPacketInfo
|
||||
NdisIMCopySendPerPacketInfo
|
||||
NdisIMDeInitializeDeviceInstance
|
||||
NdisIMDeregisterLayeredMiniport
|
||||
NdisIMGetBindingContext
|
||||
NdisIMGetDeviceContext
|
||||
NdisIMInitializeDeviceInstance
|
||||
NdisIMInitializeDeviceInstanceEx
|
||||
NdisImmediateReadPciSlotInformation
|
||||
NdisImmediateReadPortUchar
|
||||
NdisImmediateReadPortUlong
|
||||
NdisImmediateReadPortUshort
|
||||
NdisImmediateReadSharedMemory
|
||||
NdisImmediateWritePciSlotInformation
|
||||
NdisImmediateWritePortUchar
|
||||
NdisImmediateWritePortUlong
|
||||
NdisImmediateWritePortUshort
|
||||
NdisImmediateWriteSharedMemory
|
||||
NdisIMQueueMiniportCallback
|
||||
NdisIMRegisterLayeredMiniport
|
||||
NdisIMRevertBack
|
||||
NdisIMSwitchToMiniport
|
||||
NdisInitAnsiString
|
||||
NdisInitializeEvent
|
||||
NdisInitializeInterrupt
|
||||
NdisInitializeReadWriteLock
|
||||
NdisInitializeString
|
||||
NdisInitializeTimer
|
||||
NdisInitializeWrapper
|
||||
NdisInitUnicodeString
|
||||
;NdisInterlockedAddLargeInterger ?
|
||||
NdisInterlockedAddUlong
|
||||
NdisInterlockedDecrement
|
||||
NdisInterlockedIncrement
|
||||
NdisInterlockedInsertHeadList
|
||||
NdisInterlockedInsertTailList
|
||||
NdisInterlockedPopEntrySList
|
||||
NdisInterlockedPushEntrySList
|
||||
NdisInterlockedRemoveHeadList
|
||||
NdisMAllocateMapRegisters
|
||||
NdisMAllocateSharedMemory
|
||||
NdisMAllocateSharedMemoryAsync
|
||||
NdisMapFile
|
||||
NdisMapIoSpace
|
||||
;NdisMatchPdoWithPacket ?
|
||||
NdisMCancelTimer
|
||||
NdisMCloseLog
|
||||
NdisMCmActivateVc
|
||||
NdisMCmCreateVc
|
||||
NdisMCmDeactivateVc
|
||||
NdisMCmDeleteVc
|
||||
NdisMCmRegisterAddressFamily
|
||||
NdisMCmRequest
|
||||
NdisMCoActivateVcComplete
|
||||
NdisMCoDeactivateVcComplete
|
||||
NdisMCoIndicateReceivePacket
|
||||
NdisMCoIndicateStatus
|
||||
NdisMCompleteBufferPhysicalMapping
|
||||
NdisMCoReceiveComplete
|
||||
NdisMCoRequestComplete
|
||||
NdisMCoSendComplete
|
||||
NdisMCreateLog
|
||||
NdisMDeregisterAdapterShutdownHandler
|
||||
NdisMDeregisterDevice
|
||||
NdisMDeregisterDmaChannel
|
||||
NdisMDeregisterInterrupt
|
||||
NdisMDeregisterIoPortRange
|
||||
NdisMFlushLog
|
||||
NdisMFreeMapRegisters
|
||||
NdisMFreeSharedMemory
|
||||
NdisMGetDeviceProperty
|
||||
NdisMIndicateStatus
|
||||
NdisMIndicateStatusComplete
|
||||
NdisMInitializeScatterGatherDma
|
||||
NdisMInitializeTimer
|
||||
NdisMMapIoSpace
|
||||
NdisMPciAssignResources
|
||||
NdisMPromoteMiniport
|
||||
NdisMQueryAdapterInstanceName
|
||||
NdisMQueryAdapterResources
|
||||
NdisMQueryInformationComplete
|
||||
NdisMReadDmaCounter
|
||||
NdisMRegisterAdapterShutdownHandler
|
||||
NdisMRegisterDevice
|
||||
NdisMRegisterDmaChannel
|
||||
NdisMRegisterInterrupt
|
||||
NdisMRegisterIoPortRange
|
||||
NdisMRegisterMiniport
|
||||
NdisMRegisterUnloadHandler
|
||||
NdisMRemoveMiniport
|
||||
NdisMResetComplete
|
||||
NdisMSendComplete
|
||||
NdisMSendResourcesAvailable
|
||||
NdisMSetAttributes
|
||||
NdisMSetAttributesEx
|
||||
NdisMSetInformationComplete
|
||||
NdisMSetMiniportSecondary
|
||||
NdisMSetPeriodicTimer
|
||||
NdisMSetTimer
|
||||
NdisMSleep
|
||||
NdisMStartBufferPhysicalMapping
|
||||
NdisMSynchronizeWithInterrupt
|
||||
NdisMTransferDataComplete
|
||||
NdisMUnmapIoSpace
|
||||
NdisMWanIndicateReceive
|
||||
NdisMWanIndicateReceiveComplete
|
||||
NdisMWanSendComplete
|
||||
NdisMWriteLogData
|
||||
NdisOpenAdapter
|
||||
NdisOpenConfiguration
|
||||
NdisOpenConfigurationKeyByIndex
|
||||
NdisOpenConfigurationKeyByName
|
||||
NdisOpenFile
|
||||
NdisOpenProtocolConfiguration
|
||||
;NdisOverrideBusNumber ?
|
||||
NdisPacketPoolUsage
|
||||
NdisPciAssignResources
|
||||
NdisQueryAdapterInstanceName
|
||||
;NdisQueryBindInstanceName?
|
||||
NdisQueryBuffer
|
||||
NdisQueryBufferOffset
|
||||
NdisQueryBufferSafe
|
||||
NdisQueryMapRegisterCount
|
||||
NdisReadConfiguration
|
||||
NdisReadEisaSlotInformation
|
||||
NdisReadEisaSlotInformationEx
|
||||
NdisReadMcaPosInformation
|
||||
NdisReadNetworkAddress
|
||||
NdisReadPciSlotInformation
|
||||
NdisReadPcmciaAttributeMemory
|
||||
;NdisReEnumerateProtocolBindings ?
|
||||
NdisRegisterAdapter
|
||||
NdisRegisterAdapterShutdownHandler
|
||||
NdisRegisterMac
|
||||
NdisRegisterProtocol
|
||||
;NdisRegisterTdiCallBack ?
|
||||
NdisReleaseAdapterResources
|
||||
NdisReleaseReadWriteLock
|
||||
NdisReleaseSpinLock
|
||||
NdisRemoveInterrupt
|
||||
NdisRequest
|
||||
NdisReset
|
||||
NdisResetEvent
|
||||
NdisReturnPackets
|
||||
NdisSend
|
||||
NdisSendPackets
|
||||
NdisSetEvent
|
||||
;NdisSetPacketPoolProtocolId ?
|
||||
;NdisSetProtocolFilter ?
|
||||
NdisSetTimer
|
||||
NdisSetupDmaTransfer
|
||||
NdisSystemProcessorCount
|
||||
NdisTerminateWrapper
|
||||
NdisTransferData
|
||||
NdisUnchainBufferAtBack
|
||||
NdisUnchainBufferAtFront
|
||||
NdisUnicodeStringToAnsiString
|
||||
NdisUnmapFile
|
||||
NdisUpcaseUnicodeString
|
||||
NdisUpdateSharedMemory
|
||||
NdisWaitEvent
|
||||
NdisWriteConfiguration
|
||||
;NdisWriteErrorLogEntry
|
||||
NdisWriteEventLogEntry
|
||||
NdisWritePciSlotInformation
|
||||
NdisWritePcmciaAttributeMemory
|
||||
TrChangeFunctionalAddress
|
||||
TrChangeGroupAddress
|
||||
TrCreateFilter
|
||||
TrDeleteFilter
|
||||
TrDeleteFilterOpenAdapter
|
||||
TrFilterAdjust
|
||||
;TrFilterDprIndicateReceive
|
||||
;TrFilterDprIndicateReceiveComplete
|
||||
TrFilterIndicateReceive
|
||||
TrFilterIndicateReceiveComplete
|
||||
TrNoteFilterOpenAdapter
|
||||
TrShouldAddressLoopBack
|
||||
|
||||
; EOF
|
|
@ -1,10 +0,0 @@
|
|||
#include <windows.h>
|
||||
#include <ntverp.h>
|
||||
|
||||
#define VER_FILETYPE VFT_DRV
|
||||
#define VER_FILESUBTYPE VFT2_DRV_NETWORK
|
||||
#define VER_FILEDESCRIPTION_STR "NDIS library"
|
||||
#define VER_INTERNALNAME_STR "NDIS.SYS"
|
||||
#define VER_ORIGINALFILENAME_STR "NDIS.SYS"
|
||||
|
||||
#include "common.ver"
|
|
@ -308,15 +308,15 @@ NdisMRegisterMiniport(
|
|||
|
||||
switch (MiniportCharacteristics->MajorNdisVersion) {
|
||||
case 0x03:
|
||||
MinSize = sizeof(NDIS30_MINIPORT_CHARACTERISTICS);
|
||||
MinSize = sizeof(NDIS30_MINIPORT_CHARACTERISTICS_S);
|
||||
break;
|
||||
|
||||
case 0x04:
|
||||
MinSize = sizeof(NDIS40_MINIPORT_CHARACTERISTICS);
|
||||
MinSize = sizeof(NDIS40_MINIPORT_CHARACTERISTICS_S);
|
||||
break;
|
||||
|
||||
case 0x05:
|
||||
MinSize = sizeof(NDIS50_MINIPORT_CHARACTERISTICS);
|
||||
MinSize = sizeof(NDIS50_MINIPORT_CHARACTERISTICS_S);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -340,13 +340,13 @@ NdisMRegisterMiniport(
|
|||
}
|
||||
|
||||
if (MiniportCharacteristics->MajorNdisVersion == 0x03) {
|
||||
if (!MiniportCharacteristics->SendHandler) {
|
||||
if (!MiniportCharacteristics->u1.SendHandler) {
|
||||
NDIS_DbgPrint(DEBUG_MINIPORT, ("Bad miniport characteristics.\n"));
|
||||
return NDIS_STATUS_BAD_CHARACTERISTICS;
|
||||
}
|
||||
} else if (MiniportCharacteristics->MajorNdisVersion >= 0x04) {
|
||||
/* NDIS 4.0+ */
|
||||
if ((!MiniportCharacteristics->SendHandler) &&
|
||||
if ((!MiniportCharacteristics->u1.SendHandler) &&
|
||||
(!MiniportCharacteristics->SendPacketsHandler)) {
|
||||
NDIS_DbgPrint(DEBUG_MINIPORT, ("Bad miniport characteristics.\n"));
|
||||
return NDIS_STATUS_BAD_CHARACTERISTICS;
|
||||
|
|
|
@ -28,6 +28,7 @@ VOID ProtocolWorker(
|
|||
|
||||
VOID
|
||||
EXPORT
|
||||
STDCALL
|
||||
NdisCloseAdapter(
|
||||
OUT PNDIS_STATUS Status,
|
||||
IN NDIS_HANDLE NdisBindingHandle)
|
||||
|
@ -188,15 +189,15 @@ NdisRegisterProtocol(
|
|||
|
||||
switch (ProtocolCharacteristics->MajorNdisVersion) {
|
||||
case 0x03:
|
||||
MinSize = sizeof(NDIS30_PROTOCOL_CHARACTERISTICS);
|
||||
MinSize = sizeof(NDIS30_PROTOCOL_CHARACTERISTICS_S);
|
||||
break;
|
||||
|
||||
case 0x04:
|
||||
MinSize = sizeof(NDIS40_PROTOCOL_CHARACTERISTICS);
|
||||
MinSize = sizeof(NDIS40_PROTOCOL_CHARACTERISTICS_S);
|
||||
break;
|
||||
|
||||
case 0x05:
|
||||
MinSize = sizeof(NDIS50_PROTOCOL_CHARACTERISTICS);
|
||||
MinSize = sizeof(NDIS50_PROTOCOL_CHARACTERISTICS_S);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -862,9 +862,9 @@ NTSTATUS LANRegisterProtocol(
|
|||
ProtChars.CloseAdapterCompleteHandler = ProtocolCloseAdapterComplete;
|
||||
ProtChars.ResetCompleteHandler = ProtocolResetComplete;
|
||||
ProtChars.RequestCompleteHandler = ProtocolRequestComplete;
|
||||
ProtChars.SendCompleteHandler = ProtocolSendComplete;
|
||||
ProtChars.TransferDataCompleteHandler = ProtocolTransferDataComplete;
|
||||
ProtChars.ReceiveHandler = ProtocolReceive;
|
||||
ProtChars.u2.SendCompleteHandler = ProtocolSendComplete;
|
||||
ProtChars.u3.TransferDataCompleteHandler = ProtocolTransferDataComplete;
|
||||
ProtChars.u4.ReceiveHandler = ProtocolReceive;
|
||||
ProtChars.ReceiveCompleteHandler = ProtocolReceiveComplete;
|
||||
ProtChars.StatusHandler = ProtocolStatus;
|
||||
ProtChars.StatusCompleteHandler = ProtocolStatusComplete;
|
||||
|
|
|
@ -52,7 +52,7 @@ VOID RealTransmit(
|
|||
if (!NdisPacket)
|
||||
break;
|
||||
|
||||
LoopQueueHead = *(PNDIS_PACKET*)NdisPacket->MacReserved;
|
||||
LoopQueueHead = *(PNDIS_PACKET*)NdisPacket->u.s3.MacReserved;
|
||||
|
||||
KeReleaseSpinLockFromDpcLevel(&LoopLock);
|
||||
|
||||
|
@ -114,7 +114,7 @@ VOID LoopTransmit(
|
|||
AdjustPacket(NdisPacket, Offset, 0);
|
||||
PC(NdisPacket)->DLOffset = Offset;
|
||||
|
||||
pNdisPacket = (PNDIS_PACKET*)NdisPacket->MacReserved;
|
||||
pNdisPacket = (PNDIS_PACKET*)NdisPacket->u.s3.MacReserved;
|
||||
*pNdisPacket = NULL;
|
||||
|
||||
KeAcquireSpinLock(&LoopLock, &OldIrql);
|
||||
|
@ -122,7 +122,7 @@ VOID LoopTransmit(
|
|||
/* Add packet to transmit queue */
|
||||
if (LoopQueueHead) {
|
||||
/* Transmit queue is not empty */
|
||||
pNdisPacket = (PNDIS_PACKET*)LoopQueueTail->MacReserved;
|
||||
pNdisPacket = (PNDIS_PACKET*)LoopQueueTail->u.s3.MacReserved;
|
||||
*pNdisPacket = NdisPacket;
|
||||
} else
|
||||
/* Transmit queue is empty */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.5 2000/03/08 22:37:02 ea Exp $
|
||||
# $Id: Makefile,v 1.6 2000/08/05 18:01:56 dwelch Exp $
|
||||
#
|
||||
# TDI.SYS build spec
|
||||
#
|
||||
|
@ -16,7 +16,7 @@ OBJECTS = $(OBJECTS_CTE) $(OBJECTS_TDI) $(OBJECTS_MISC)
|
|||
|
||||
all: $(TARGETNAME).sys
|
||||
|
||||
misc/$(TARGETNAME).coff: misc/$(TARGETNAME).rc ../../include/reactos/resource.h
|
||||
misc/$(TARGETNAME).coff: misc/$(TARGETNAME).rc ../../../include/reactos/resource.h
|
||||
|
||||
ifeq ($(DOSCLI),yes)
|
||||
CLEAN_FILES = \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: tdi.def,v 1.2 1999/11/21 23:48:13 ea Exp $
|
||||
; $Id: tdi.def,v 1.3 2000/08/05 18:01:57 dwelch Exp $
|
||||
;
|
||||
; TDI.SYS Kernel Module - ReactOS Operating System
|
||||
;
|
||||
|
@ -34,7 +34,7 @@ TdiDeregisterAddressChangeHandler@4
|
|||
TdiDeregisterDeviceObject@4
|
||||
TdiDeregisterNetAddress@4
|
||||
TdiDeregisterNotificationHandler@4
|
||||
TdiInitialize@0
|
||||
TdiInitialize@4
|
||||
TdiMapBuffer@4
|
||||
TdiMapUserRequest@12
|
||||
TdiOpenNetbiosAddress@16
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: tdi.edf,v 1.1 1999/11/21 23:48:13 ea Exp $
|
||||
; $Id: tdi.edf,v 1.2 2000/08/05 18:01:57 dwelch Exp $
|
||||
;
|
||||
; TDI.SYS Kernel Module - ReactOS Operating System
|
||||
;
|
||||
|
@ -34,7 +34,7 @@ TdiDeregisterAddressChangeHandler=TdiDeregisterAddressChangeHandler@4
|
|||
TdiDeregisterDeviceObject=TdiDeregisterDeviceObject@4
|
||||
TdiDeregisterNetAddress=TdiDeregisterNetAddress@4
|
||||
TdiDeregisterNotificationHandler=TdiDeregisterNotificationHandler@4
|
||||
TdiInitialize=TdiInitialize@0
|
||||
TdiInitialize=TdiInitialize@4
|
||||
TdiMapBuffer=TdiMapBuffer@4
|
||||
TdiMapUserRequest=TdiMapUserRequest@12
|
||||
TdiOpenNetbiosAddress=TdiOpenNetbiosAddress@16
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: dereg.c,v 1.1 1999/11/28 07:59:29 ea Exp $
|
||||
/* $Id: dereg.c,v 1.2 2000/08/05 18:01:57 dwelch Exp $
|
||||
*
|
||||
*/
|
||||
#include <ntos.h>
|
||||
|
||||
#include <net/tdi.h>
|
||||
|
||||
/* De-/Register Action IDs for TdiDeRegister */
|
||||
|
||||
|
@ -10,7 +10,7 @@ typedef
|
|||
enum
|
||||
{
|
||||
R_NOTIFICATION_HANDLER = 0,
|
||||
D_NOTIFICATION_HANDLER,
|
||||
DT_NOTIFICATION_HANDLER,
|
||||
R_DEVICE_OBJECT,
|
||||
D_DEVICE_OBJECT,
|
||||
R_ADDRESS_CHANGE_HANDLER,
|
||||
|
@ -40,7 +40,7 @@ STDCALL
|
|||
TdiRegisterAddressChangeHandler (
|
||||
DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown2
|
||||
)
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
@ -83,7 +83,7 @@ TdiRegisterDeviceObject (
|
|||
DeviceObject
|
||||
);
|
||||
#endif
|
||||
return = STATUS_NOT_IMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* $Id: handler.c,v 1.1 1999/11/20 20:41:29 ea Exp $
|
||||
/* $Id: handler.c,v 1.2 2000/08/05 18:01:57 dwelch Exp $
|
||||
*
|
||||
* DESCRIPTION: Default TDI event handlers.
|
||||
*/
|
||||
#include <ntos.h>
|
||||
|
||||
#include <net/tdi.h>
|
||||
|
||||
|
||||
/* ClientEventChainedReceiveDatagram */
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
/* $Id: obsolete.c,v 1.2 1999/11/21 23:48:14 ea Exp $
|
||||
/* $Id: obsolete.c,v 1.3 2000/08/05 18:01:57 dwelch Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ntos.h>
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
TdiMapBuffer (
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
/* $Id: stubs.c,v 1.3 1999/11/28 07:59:29 ea Exp $
|
||||
|
||||
/* $Id: stubs.c,v 1.4 2000/08/05 18:01:57 dwelch Exp $
|
||||
*
|
||||
*/
|
||||
#include <ntos.h>
|
||||
#include <net/tdi.h>
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
|
|
|
@ -2088,6 +2088,18 @@ GetStartupInfoA(
|
|||
LPSTARTUPINFOA lpStartupInfo
|
||||
);
|
||||
|
||||
WINBASEAPI
|
||||
HANDLE
|
||||
WINAPI
|
||||
FindFirstFileExA (
|
||||
LPCSTR lpFileName,
|
||||
FINDEX_INFO_LEVELS fInfoLevelId,
|
||||
LPVOID lpFindFileData,
|
||||
FINDEX_SEARCH_OPS fSearchOp,
|
||||
LPVOID lpSearchFilter,
|
||||
DWORD dwAdditionalFlags
|
||||
);
|
||||
|
||||
HANDLE
|
||||
STDCALL
|
||||
FindFirstFileA(
|
||||
|
|
|
@ -335,6 +335,7 @@ extern "C" {
|
|||
#define GetFileAttributes GetFileAttributesW
|
||||
#define GetCompressedFileSize GetCompressedFileSizeW
|
||||
#define DeleteFile DeleteFileW
|
||||
#define FindFirstFileEx FindFirstFileExW
|
||||
#define FindFirstFile FindFirstFileW
|
||||
#define FindNextFile FindNextFileW
|
||||
#define SearchPath SearchPathW
|
||||
|
@ -736,6 +737,7 @@ extern "C" {
|
|||
#define GetFileAttributes GetFileAttributesA
|
||||
#define GetCompressedFileSize GetCompressedFileSizeA
|
||||
#define DeleteFile DeleteFileA
|
||||
#define FindFirstFileEx FindFirstFileExA
|
||||
#define FindFirstFile FindFirstFileA
|
||||
#define FindNextFile FindNextFileA
|
||||
#define SearchPath SearchPathA
|
||||
|
|
|
@ -77,6 +77,8 @@ typedef struct _PEB_LDR_DATA
|
|||
LIST_ENTRY InInitializationOrderModuleList;
|
||||
} PEB_LDR_DATA, *PPEB_LDR_DATA;
|
||||
|
||||
typedef VOID STDCALL (*PPEBLOCKROUTINE)(PVOID);
|
||||
|
||||
typedef struct _PEB
|
||||
{
|
||||
UCHAR InheritedAddressSpace; // 00h
|
||||
|
@ -90,8 +92,8 @@ typedef struct _PEB
|
|||
PVOID SubSystemData; // 14h
|
||||
PVOID ProcessHeap; // 18h
|
||||
PVOID FastPebLock; // 1Ch
|
||||
PVOID FastPebLockRoutine; // 20h
|
||||
PVOID FastPebUnlockRoutine; // 24h
|
||||
PPEBLOCKROUTINE FastPebLockRoutine; // 20h
|
||||
PPEBLOCKROUTINE FastPebUnlockRoutine; // 24h
|
||||
ULONG EnvironmentUpdateCount; // 28h
|
||||
PVOID* KernelCallbackTable; // 2Ch
|
||||
PVOID EventLogSection; // 30h
|
||||
|
@ -225,7 +227,7 @@ static inline PNT_TEB NtCurrentTeb(VOID)
|
|||
int x;
|
||||
|
||||
__asm__ __volatile__("movl %%fs:0x18, %0\n\t"
|
||||
: "=a" (x)
|
||||
: "=g" (x)
|
||||
: /* no inputs */
|
||||
);
|
||||
|
||||
|
|
|
@ -375,9 +375,9 @@ typedef struct _NDIS_RW_LOCK
|
|||
{
|
||||
KSPIN_LOCK SpinLock;
|
||||
PVOID Context;
|
||||
};
|
||||
} s;
|
||||
UCHAR Reserved[16];
|
||||
};
|
||||
} u;
|
||||
|
||||
NDIS_RW_LOCK_REFCOUNT RefCount[MAXIMUM_PROCESSORS];
|
||||
} NDIS_RW_LOCK, *PNDIS_RW_LOCK;
|
||||
|
@ -508,7 +508,7 @@ typedef struct _NDIS_GUID
|
|||
{
|
||||
NDIS_OID Oid;
|
||||
NDIS_STATUS Status;
|
||||
};
|
||||
} u;
|
||||
ULONG Size;
|
||||
ULONG Flags;
|
||||
} NDIS_GUID, *PNDIS_GUID;
|
||||
|
@ -552,15 +552,15 @@ typedef struct _NDIS_PACKET {
|
|||
struct {
|
||||
UCHAR MiniportReserved[2*sizeof(PVOID)];
|
||||
UCHAR WrapperReserved[2*sizeof(PVOID)];
|
||||
};
|
||||
} s1;
|
||||
struct {
|
||||
UCHAR MiniportReservedEx[3*sizeof(PVOID)];
|
||||
UCHAR WrapperReservedEx[sizeof(PVOID)];
|
||||
};
|
||||
} s2;
|
||||
struct {
|
||||
UCHAR MacReserved[4*sizeof(PVOID)];
|
||||
};
|
||||
};
|
||||
} s3;
|
||||
} u;
|
||||
ULONG_PTR Reserved[2];
|
||||
UCHAR ProtocolReserved[1];
|
||||
} NDIS_PACKET, *PNDIS_PACKET, **PPNDIS_PACKET;
|
||||
|
@ -569,7 +569,7 @@ typedef struct _NDIS_PACKET_OOB_DATA {
|
|||
union {
|
||||
ULONGLONG TimeToSend;
|
||||
ULONGLONG TimeSent;
|
||||
};
|
||||
} u;
|
||||
ULONGLONG TimeReceived;
|
||||
UINT HeaderSize;
|
||||
UINT SizeMediaSpecificInfo;
|
||||
|
@ -1105,7 +1105,7 @@ typedef struct _NDIS_IPSEC_PACKET_INFO
|
|||
ULONG NEXT_CRYPTO_DONE:1;
|
||||
ULONG CryptoStatus;
|
||||
} Receive;
|
||||
};
|
||||
} u;
|
||||
} NDIS_IPSEC_PACKET_INFO, *PNDIS_IPSEC_PACKET_INFO;
|
||||
|
||||
|
||||
|
@ -1473,6 +1473,7 @@ typedef VOID (*RECEIVE_COMPLETE_HANDLER)(
|
|||
|
||||
|
||||
/* Protocol characteristics for NDIS 3.0 protocols */
|
||||
#if 0
|
||||
typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS
|
||||
{
|
||||
UCHAR MajorNdisVersion;
|
||||
|
@ -1481,19 +1482,19 @@ typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS
|
|||
{
|
||||
UINT Reserved;
|
||||
UINT Flags;
|
||||
};
|
||||
} u1;
|
||||
OPEN_ADAPTER_COMPLETE_HANDLER OpenAdapterCompleteHandler;
|
||||
CLOSE_ADAPTER_COMPLETE_HANDLER CloseAdapterCompleteHandler;
|
||||
union
|
||||
{
|
||||
SEND_COMPLETE_HANDLER SendCompleteHandler;
|
||||
WAN_SEND_COMPLETE_HANDLER WanSendCompleteHandler;
|
||||
};
|
||||
} u2;
|
||||
union
|
||||
{
|
||||
TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler;
|
||||
WAN_TRANSFER_DATA_COMPLETE_HANDLER WanTransferDataCompleteHandler;
|
||||
};
|
||||
} u3;
|
||||
|
||||
RESET_COMPLETE_HANDLER ResetCompleteHandler;
|
||||
REQUEST_COMPLETE_HANDLER RequestCompleteHandler;
|
||||
|
@ -1501,13 +1502,49 @@ typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS
|
|||
{
|
||||
RECEIVE_HANDLER ReceiveHandler;
|
||||
WAN_RECEIVE_HANDLER WanReceiveHandler;
|
||||
};
|
||||
} u4;
|
||||
RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler;
|
||||
STATUS_HANDLER StatusHandler;
|
||||
STATUS_COMPLETE_HANDLER StatusCompleteHandler;
|
||||
NDIS_STRING Name;
|
||||
} NDIS30_PROTOCOL_CHARACTERISTICS;
|
||||
|
||||
#else
|
||||
#define NDIS30_PROTOCOL_CHARACTERISTICS \
|
||||
UCHAR MajorNdisVersion; \
|
||||
UCHAR MinorNdisVersion; \
|
||||
union \
|
||||
{ \
|
||||
UINT Reserved; \
|
||||
UINT Flags; \
|
||||
} u1; \
|
||||
OPEN_ADAPTER_COMPLETE_HANDLER OpenAdapterCompleteHandler; \
|
||||
CLOSE_ADAPTER_COMPLETE_HANDLER CloseAdapterCompleteHandler; \
|
||||
union \
|
||||
{ \
|
||||
SEND_COMPLETE_HANDLER SendCompleteHandler; \
|
||||
WAN_SEND_COMPLETE_HANDLER WanSendCompleteHandler; \
|
||||
} u2; \
|
||||
union \
|
||||
{ \
|
||||
TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler; \
|
||||
WAN_TRANSFER_DATA_COMPLETE_HANDLER WanTransferDataCompleteHandler; \
|
||||
} u3; \
|
||||
RESET_COMPLETE_HANDLER ResetCompleteHandler; \
|
||||
REQUEST_COMPLETE_HANDLER RequestCompleteHandler; \
|
||||
union \
|
||||
{ \
|
||||
RECEIVE_HANDLER ReceiveHandler; \
|
||||
WAN_RECEIVE_HANDLER WanReceiveHandler; \
|
||||
} u4; \
|
||||
RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler; \
|
||||
STATUS_HANDLER StatusHandler; \
|
||||
STATUS_COMPLETE_HANDLER StatusCompleteHandler; \
|
||||
NDIS_STRING Name;
|
||||
typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS_S
|
||||
{
|
||||
NDIS30_PROTOCOL_CHARACTERISTICS;
|
||||
} NDIS30_PROTOCOL_CHARACTERISTICS_S, *PNDIS30_PROTOCOL_CHARACTERISTICS_S;
|
||||
#endif
|
||||
|
||||
/* Prototypes for NDIS 4.0 protocol characteristics */
|
||||
|
||||
|
@ -1539,7 +1576,7 @@ typedef VOID (*UNLOAD_PROTOCOL_HANDLER)(
|
|||
|
||||
|
||||
/* Protocol characteristics for NDIS 4.0 protocols */
|
||||
|
||||
#if 0
|
||||
typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS
|
||||
{
|
||||
NDIS30_PROTOCOL_CHARACTERISTICS;
|
||||
|
@ -1550,7 +1587,19 @@ typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS
|
|||
TRANSLATE_HANDLER TranslateHandler;
|
||||
UNLOAD_PROTOCOL_HANDLER UnloadHandler;
|
||||
} NDIS40_PROTOCOL_CHARACTERISTICS;
|
||||
|
||||
#else
|
||||
#define NDIS40_PROTOCOL_CHARACTERISTICS \
|
||||
NDIS30_PROTOCOL_CHARACTERISTICS; \
|
||||
RECEIVE_PACKET_HANDLER ReceivePacketHandler; \
|
||||
BIND_HANDLER BindAdapterHandler; \
|
||||
UNBIND_HANDLER UnbindAdapterHandler; \
|
||||
TRANSLATE_HANDLER TranslateHandler; \
|
||||
UNLOAD_PROTOCOL_HANDLER UnloadHandler;
|
||||
typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS_S
|
||||
{
|
||||
NDIS40_PROTOCOL_CHARACTERISTICS;
|
||||
} NDIS40_PROTOCOL_CHARACTERISTICS_S, *PNDIS40_PROTOCOL_CHARACTERISTICS_S;
|
||||
#endif
|
||||
|
||||
|
||||
/* Prototypes for NDIS 5.0 protocol characteristics */
|
||||
|
@ -1578,7 +1627,7 @@ typedef VOID (*CO_AF_REGISTER_NOTIFY_HANDLER)(
|
|||
IN NDIS_HANDLE ProtocolBindingContext,
|
||||
IN PCO_ADDRESS_FAMILY AddressFamily);
|
||||
|
||||
|
||||
#if 0
|
||||
typedef struct _NDIS50_PROTOCOL_CHARACTERISTICS
|
||||
{
|
||||
NDIS40_PROTOCOL_CHARACTERISTICS;
|
||||
|
@ -1590,18 +1639,39 @@ typedef struct _NDIS50_PROTOCOL_CHARACTERISTICS
|
|||
CO_RECEIVE_PACKET_HANDLER CoReceivePacketHandler;
|
||||
CO_AF_REGISTER_NOTIFY_HANDLER CoAfRegisterNotifyHandler;
|
||||
} NDIS50_PROTOCOL_CHARACTERISTICS;
|
||||
|
||||
#else
|
||||
#define NDIS50_PROTOCOL_CHARACTERISTICS \
|
||||
NDIS40_PROTOCOL_CHARACTERISTICS; \
|
||||
PVOID ReservedHandlers[4]; \
|
||||
CO_SEND_COMPLETE_HANDLER CoSendCompleteHandler; \
|
||||
CO_STATUS_HANDLER CoStatusHandler; \
|
||||
CO_RECEIVE_PACKET_HANDLER CoReceivePacketHandler; \
|
||||
CO_AF_REGISTER_NOTIFY_HANDLER CoAfRegisterNotifyHandler;
|
||||
typedef struct _NDIS50_PROTOCOL_CHARACTERISTICS_S
|
||||
{
|
||||
NDIS50_PROTOCOL_CHARACTERISTICS;
|
||||
} NDIS50_PROTOCOL_CHARACTERISTICS_S, *PNDIS50_PROTOCOL_CHARACTERISTICS_S;
|
||||
#endif
|
||||
#endif /* NDIS50 */
|
||||
|
||||
|
||||
#ifndef NDIS50
|
||||
#ifndef NDIS40
|
||||
typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS NDIS_PROTOCOL_CHARACTERISTICS;
|
||||
typedef struct _NDIS_PROTOCOL_CHARACTERISTICS
|
||||
{
|
||||
NDIS30_PROTOCOL_CHARACTERISTICS;
|
||||
} NDIS_PROTOCOL_CHARACTERISTICS;
|
||||
#else /* NDIS40 */
|
||||
typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS NDIS_PROTOCOL_CHARACTERISTICS;
|
||||
typedef struct _NDIS_PROTOCOL_CHARACTERISTICS
|
||||
{
|
||||
NDIS40_PROTOCOL_CHARACTERISTICS;
|
||||
} NDIS_PROTOCOL_CHARACTERISTICS;
|
||||
#endif /* NDIS40 */
|
||||
#else /* NDIS50 */
|
||||
typedef struct _NDIS50_PROTOCOL_CHARACTERISTICS NDIS_PROTOCOL_CHARACTERISTICS;
|
||||
typedef struct _NDIS_PROTOCOL_CHARACTERISTICS
|
||||
{
|
||||
NDIS50_PROTOCOL_CHARACTERISTICS;
|
||||
} NDIS_PROTOCOL_CHARACTERISTICS;
|
||||
#endif /* NDIS50 */
|
||||
|
||||
typedef NDIS_PROTOCOL_CHARACTERISTICS *PNDIS_PROTOCOL_CHARACTERISTICS;
|
||||
|
@ -3971,6 +4041,7 @@ typedef NDIS_STATUS (*W_TRANSFER_DATA_HANDLER)(
|
|||
typedef NDIS_STATUS (*WM_TRANSFER_DATA_HANDLER)(
|
||||
VOID);
|
||||
|
||||
#if 0
|
||||
typedef struct _NDIS30_MINIPORT_CHARACTERISTICS
|
||||
{
|
||||
UCHAR MajorNdisVersion;
|
||||
|
@ -3990,15 +4061,45 @@ typedef struct _NDIS30_MINIPORT_CHARACTERISTICS
|
|||
{
|
||||
W_SEND_HANDLER SendHandler;
|
||||
WM_SEND_HANDLER WanSendHandler;
|
||||
};
|
||||
} u1;
|
||||
W_SET_INFORMATION_HANDLER SetInformationHandler;
|
||||
union
|
||||
{
|
||||
W_TRANSFER_DATA_HANDLER TransferDataHandler;
|
||||
WM_TRANSFER_DATA_HANDLER WanTransferDataHandler;
|
||||
};
|
||||
} u2;
|
||||
} NDIS30_MINIPORT_CHARACTERISTICS;
|
||||
|
||||
#else
|
||||
#define NDIS30_MINIPORT_CHARACTERISTICS \
|
||||
UCHAR MajorNdisVersion; \
|
||||
UCHAR MinorNdisVersion; \
|
||||
UINT Reserved; \
|
||||
W_CHECK_FOR_HANG_HANDLER CheckForHangHandler; \
|
||||
W_DISABLE_INTERRUPT_HANDLER DisableInterruptHandler; \
|
||||
W_ENABLE_INTERRUPT_HANDLER EnableInterruptHandler; \
|
||||
W_HALT_HANDLER HaltHandler; \
|
||||
W_HANDLE_INTERRUPT_HANDLER HandleInterruptHandler; \
|
||||
W_INITIALIZE_HANDLER InitializeHandler; \
|
||||
W_ISR_HANDLER ISRHandler; \
|
||||
W_QUERY_INFORMATION_HANDLER QueryInformationHandler; \
|
||||
W_RECONFIGURE_HANDLER ReconfigureHandler; \
|
||||
W_RESET_HANDLER ResetHandler; \
|
||||
union \
|
||||
{ \
|
||||
W_SEND_HANDLER SendHandler; \
|
||||
WM_SEND_HANDLER WanSendHandler; \
|
||||
} u1; \
|
||||
W_SET_INFORMATION_HANDLER SetInformationHandler; \
|
||||
union \
|
||||
{ \
|
||||
W_TRANSFER_DATA_HANDLER TransferDataHandler; \
|
||||
WM_TRANSFER_DATA_HANDLER WanTransferDataHandler; \
|
||||
} u2;
|
||||
typedef struct _NDIS30_MINIPORT_CHARACTERISTICS_S
|
||||
{
|
||||
NDIS30_MINIPORT_CHARACTERISTICS;
|
||||
} NDIS30_MINIPORT_CHARACTERISTICS_S, *PSNDIS30_MINIPORT_CHARACTERISTICS_S;
|
||||
#endif
|
||||
|
||||
/* Extensions for NDIS 4.0 miniports */
|
||||
#ifdef NDIS40
|
||||
|
@ -4019,6 +4120,7 @@ typedef VOID (*W_ALLOCATE_COMPLETE_HANDLER)(
|
|||
IN ULONG Length,
|
||||
IN PVOID Context);
|
||||
|
||||
#if 0
|
||||
typedef struct _NDIS40_MINIPORT_CHARACTERISTICS
|
||||
{
|
||||
NDIS30_MINIPORT_CHARACTERISTICS;
|
||||
|
@ -4027,6 +4129,17 @@ typedef struct _NDIS40_MINIPORT_CHARACTERISTICS
|
|||
W_SEND_PACKETS_HANDLER SendPacketsHandler;
|
||||
W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler;
|
||||
} NDIS40_MINIPORT_CHARACTERISTICS;
|
||||
#else
|
||||
#define NDIS40_MINIPORT_CHARACTERISTICS \
|
||||
NDIS30_MINIPORT_CHARACTERISTICS; \
|
||||
W_RETURN_PACKET_HANDLER ReturnPacketHandler; \
|
||||
W_SEND_PACKETS_HANDLER SendPacketsHandler; \
|
||||
W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler;
|
||||
typedef struct _NDIS40_MINIPORT_CHARACTERISTICS_S
|
||||
{
|
||||
NDIS40_MINIPORT_CHARACTERISTICS;
|
||||
} NDIS40_MINIPORT_CHARACTERISTICS_S, *PSNDIS40_MINIPORT_CHARACTERISTICS_S;
|
||||
#endif
|
||||
|
||||
#endif /* NDIS40 */
|
||||
|
||||
|
@ -4059,6 +4172,7 @@ typedef NDIS_STATUS (*W_CO_REQUEST_HANDLER)(
|
|||
IN NDIS_HANDLE MiniportVcContext OPTIONAL,
|
||||
IN OUT PNDIS_REQUEST NdisRequest);
|
||||
|
||||
#if 0
|
||||
typedef struct _NDIS50_MINIPORT_CHARACTERISTICS
|
||||
{
|
||||
NDIS40_MINIPORT_CHARACTERISTICS;
|
||||
|
@ -4070,18 +4184,41 @@ typedef struct _NDIS50_MINIPORT_CHARACTERISTICS
|
|||
W_CO_SEND_PACKETS_HANDLER CoSendPacketsHandler;
|
||||
W_CO_REQUEST_HANDLER CoRequestHandler;
|
||||
} NDIS50_MINIPORT_CHARACTERISTICS;
|
||||
#else
|
||||
#define NDIS50_MINIPORT_CHARACTERISTICS \
|
||||
NDIS40_MINIPORT_CHARACTERISTICS; \
|
||||
W_CO_CREATE_VC_HANDLER CoCreateVcHandler; \
|
||||
W_CO_DELETE_VC_HANDLER CoDeleteVcHandler; \
|
||||
W_CO_ACTIVATE_VC_HANDLER CoActivateVcHandler; \
|
||||
W_CO_DEACTIVATE_VC_HANDLER CoDeactivateVcHandler; \
|
||||
W_CO_SEND_PACKETS_HANDLER CoSendPacketsHandler; \
|
||||
W_CO_REQUEST_HANDLER CoRequestHandler;
|
||||
typedef struct _NDIS50_MINIPORT_CHARACTERISTICS_S
|
||||
{
|
||||
NDIS50_MINIPORT_CHARACTERISTICS;
|
||||
} NDIS50_MINIPORT_CHARACTERISTICS_S, *PSNDIS50_MINIPORT_CHARACTERISTICS_S;
|
||||
#endif
|
||||
|
||||
#endif /* NDIS50 */
|
||||
|
||||
|
||||
#ifndef NDIS50
|
||||
#ifndef NDIS40
|
||||
typedef struct _NDIS30_MINIPORT_CHARACTERISTICS NDIS_MINIPORT_CHARACTERISTICS;
|
||||
typedef struct _NDIS_MINIPORT_CHARACTERISTICS
|
||||
{
|
||||
NDIS30_MINIPORT_CHARACTERISTICS;
|
||||
} NDIS_MINIPORT_CHARACTERISTICS;
|
||||
#else /* NDIS40 */
|
||||
typedef struct _NDIS40_MINIPORT_CHARACTERISTICS NDIS_MINIPORT_CHARACTERISTICS;
|
||||
typedef struct _NDIS_MINIPORT_CHARACTERISTICS
|
||||
{
|
||||
NDIS40_MINIPORT_CHARACTERISTICS;
|
||||
} NDIS_MINIPORT_CHARACTERISTICS;
|
||||
#endif /* NDIS40 */
|
||||
#else /* NDIS50 */
|
||||
typedef struct _NDIS50_MINIPORT_CHARACTERISTICS NDIS_MINIPORT_CHARACTERISTICS;
|
||||
typedef struct _NDIS_MINIPORT_CHARACTERISTICS
|
||||
{
|
||||
NDIS50_MINIPORT_CHARACTERISTICS;
|
||||
} NDIS_MINIPORT_CHARACTERISTICS;
|
||||
#endif /* NDIS50 */
|
||||
|
||||
typedef NDIS_MINIPORT_CHARACTERISTICS *PNDIS_MINIPORT_CHARACTERISTICS;
|
||||
|
|
|
@ -27,16 +27,23 @@ LdrLoadDll (PDLL* Dll,PCHAR Name);
|
|||
|
||||
NTSTATUS LdrUnloadDll(PDLL Dll);
|
||||
|
||||
|
||||
PVOID
|
||||
LdrGetExportByOrdinal (PDLL Module, ULONG Ordinal );
|
||||
|
||||
PVOID
|
||||
LdrGetExportByName (PDLL Module, PUCHAR SymbolName );
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
LdrDisableThreadCalloutsForDll (
|
||||
PVOID IN ImageBase,
|
||||
BOOLEAN IN Disable
|
||||
);
|
||||
|
||||
NTSTATUS STDCALL
|
||||
LdrGetProcedureAddress (IN PVOID BaseAddress,
|
||||
IN PANSI_STRING Name,
|
||||
IN ULONG Ordinal,
|
||||
OUT PVOID *ProcedureAddress);
|
||||
|
||||
VOID STDCALL
|
||||
LdrInitializeThunk (ULONG Unknown1,
|
||||
ULONG Unknown2,
|
||||
ULONG Unknown3,
|
||||
ULONG Unknown4);
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: version.h,v 1.3 2000/01/19 07:05:04 rex Exp $
|
||||
/* $Id: version.h,v 1.4 2000/08/05 18:01:48 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -16,11 +16,11 @@
|
|||
|
||||
#define KERNEL_VERSION_MAJOR 0
|
||||
#define KERNEL_VERSION_MINOR 0
|
||||
#define KERNEL_VERSION_PATCH_LEVEL 15
|
||||
#define KERNEL_VERSION_PATCH_LEVEL 16
|
||||
/* Edit each time a new release is out: format is YYYYMMDD (UTC) */
|
||||
#define KERNEL_RELEASE_DATE 20000118L
|
||||
#define KERNEL_RELEASE_DATE 20000805L
|
||||
|
||||
#define KERNEL_VERSION "0.0.15"
|
||||
#define KERNEL_VERSION "0.0.16"
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1930,6 +1930,25 @@ typedef struct _FIND_NAME_HEADER {
|
|||
UCHAR unique_group;
|
||||
} FIND_NAME_HEADER;
|
||||
|
||||
typedef
|
||||
enum _FINDEX_INFO_LEVELS
|
||||
{
|
||||
FindExInfoStandard,
|
||||
FindExInfoMaxInfoLevel
|
||||
} FINDEX_INFO_LEVELS;
|
||||
|
||||
typedef
|
||||
enum _FINDEX_SEARCH_OPS
|
||||
{
|
||||
FindExSearchNameMatch,
|
||||
FindExSearchLimitToDirectories,
|
||||
FindExSearchLimitToDevices,
|
||||
FindExSearchMaxSearchOp
|
||||
|
||||
} FINDEX_SEARCH_OPS;
|
||||
|
||||
#define FIND_FIRST_EX_CASE_SENSITIVE 0x00000001
|
||||
|
||||
typedef struct {
|
||||
DWORD lStructSize;
|
||||
HWND hwndOwner;
|
||||
|
@ -4217,3 +4236,4 @@ typedef struct
|
|||
|
||||
#endif /* _GNU_H_WINDOWS32_STRUCTURES */
|
||||
|
||||
|
||||
|
|
|
@ -2103,6 +2103,18 @@ GetStartupInfoW(
|
|||
LPSTARTUPINFOW lpStartupInfo
|
||||
);
|
||||
|
||||
WINBASEAPI
|
||||
HANDLE
|
||||
WINAPI
|
||||
FindFirstFileExW (
|
||||
LPCWSTR lpFileName,
|
||||
FINDEX_INFO_LEVELS fInfoLevelId,
|
||||
LPVOID lpFindFileData,
|
||||
FINDEX_SEARCH_OPS fSearchOp,
|
||||
LPVOID lpSearchFilter,
|
||||
DWORD dwAdditionalFlags
|
||||
);
|
||||
|
||||
HANDLE
|
||||
STDCALL
|
||||
FindFirstFileW(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.35 2000/01/20 22:49:12 ekohl Exp $
|
||||
# $Id: makefile,v 1.36 2000/08/05 18:01:48 dwelch Exp $
|
||||
#
|
||||
# ReactOS Operating System
|
||||
#
|
||||
|
@ -163,7 +163,7 @@ CLEAN_FILES = assert/*.o conio/*.o ctype/*.o direct/*.o dirent/*.o \
|
|||
math/*.o mbstring/*.o misc/*.o process/*.o quad/*.o search/*.o \
|
||||
setjmp/*.o stdio/*.o stdlib/*.o string/*.o sys_stat/*.o tchar/*.o \
|
||||
time/*.o wchar/*.o $(TARGET).a $(TARGET).o $(TARGET).dll $(TARGET).sym \
|
||||
$(TARGET).coff
|
||||
$(TARGET).coff $(SIGNAL_OBJECTS)
|
||||
endif
|
||||
|
||||
$(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.12 2000/07/07 10:30:54 dwelch Exp $
|
||||
# $Id: makefile,v 1.13 2000/08/05 18:01:48 dwelch Exp $
|
||||
#
|
||||
# Makefile for ReactOS gdi32.dll
|
||||
#
|
||||
|
@ -67,9 +67,9 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
|
|||
$(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
|
||||
|
||||
ifeq ($(DOSCLI),yes)
|
||||
CLEAN_FILES = *.a *.o *.coff *.sym *.tmp *.dll main\*.o misc\*.o
|
||||
CLEAN_FILES = *.a *.o *.coff *.sym *.tmp *.dll main\*.o misc\*.o objects\*.o
|
||||
else
|
||||
CLEAN_FILES = *.a *.o *.coff *.sym *.tmp *.dll main/*.o misc/*.o
|
||||
CLEAN_FILES = *.a *.o *.coff *.sym *.tmp *.dll main/*.o misc/*.o objects/*.o
|
||||
endif
|
||||
|
||||
clean: $(CLEAN_FILES:%=%_clean)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: find.c,v 1.26 2000/06/03 14:47:32 ea Exp $
|
||||
/* $Id: find.c,v 1.27 2000/08/05 18:01:49 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -446,4 +446,37 @@ FindNextFileW (
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
HANDLE
|
||||
STDCALL
|
||||
FindFirstFileExW (
|
||||
LPCWSTR lpFileName,
|
||||
FINDEX_INFO_LEVELS fInfoLevelId,
|
||||
LPVOID lpFindFileData,
|
||||
FINDEX_SEARCH_OPS fSearchOp,
|
||||
LPVOID lpSearchFilter,
|
||||
DWORD dwAdditionalFlags
|
||||
)
|
||||
{
|
||||
/* FIXME */
|
||||
return (HANDLE) 0;
|
||||
}
|
||||
|
||||
|
||||
HANDLE
|
||||
STDCALL
|
||||
FindFirstFileExA (
|
||||
LPCSTR lpFileName,
|
||||
FINDEX_INFO_LEVELS fInfoLevelId,
|
||||
LPVOID lpFindFileData,
|
||||
FINDEX_SEARCH_OPS fSearchOp,
|
||||
LPVOID lpSearchFilter,
|
||||
DWORD dwAdditionalFlags
|
||||
)
|
||||
{
|
||||
/* FIXME */
|
||||
return (HANDLE) 0;
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -49,6 +49,7 @@ BuildCommDCBAndTimeoutsW@12
|
|||
BuildCommDCBW@8
|
||||
CallNamedPipeA@28
|
||||
CallNamedPipeW@28
|
||||
CancelWaitableTimer@4
|
||||
ClearCommBreak@4
|
||||
ClearCommError@12
|
||||
CloseConsoleHandle@4
|
||||
|
@ -95,6 +96,8 @@ CreateSemaphoreW@16
|
|||
CreateTapePartition@16
|
||||
CreateThread@24
|
||||
CreateVirtualBuffer@12
|
||||
CreateWaitableTimerA@12
|
||||
CreateWaitableTimerW@12
|
||||
DebugActiveProcess@4
|
||||
DebugBreak@0
|
||||
DefineDosDeviceA@12
|
||||
|
@ -390,8 +393,10 @@ HeapValidate@12
|
|||
HeapWalk@8
|
||||
InitAtomTable@4
|
||||
InitializeCriticalSection@4
|
||||
InterlockedCompareExchange@12
|
||||
InterlockedDecrement@4
|
||||
InterlockedExchange@8
|
||||
InterlockedExchangeAdd@8
|
||||
InterlockedIncrement@4
|
||||
InvalidateConsoleDIBits@8
|
||||
IsBadCodePtr@4
|
||||
|
@ -449,6 +454,8 @@ OpenProcess@12
|
|||
OpenProfileUserMapping@0
|
||||
OpenSemaphoreA@12
|
||||
OpenSemaphoreW@12
|
||||
OpenWaitableTimerA@12
|
||||
OpenWaitableTimerW@12
|
||||
OutputDebugStringA@4
|
||||
OutputDebugStringW@4
|
||||
PeekConsoleInputA@16
|
||||
|
@ -566,12 +573,14 @@ SetUnhandledExceptionFilter@4
|
|||
SetVDMCurrentDirectories@8
|
||||
SetVolumeLabelA@8
|
||||
SetVolumeLabelW@8
|
||||
SetWaitableTimer@24
|
||||
SetupComm@12
|
||||
ShowConsoleCursor@8
|
||||
SizeofResource@8
|
||||
Sleep@4
|
||||
SleepEx@8
|
||||
SuspendThread@4
|
||||
SwitchToThread@0
|
||||
SystemTimeToFileTime@8
|
||||
SystemTimeToTzSpecificLocalTime@12
|
||||
TerminateProcess@8
|
||||
|
@ -583,6 +592,7 @@ TlsSetValue@8
|
|||
TransactNamedPipe@28
|
||||
TransmitCommChar@8
|
||||
TrimVirtualBuffer@4
|
||||
TryEnterCriticalSection@4
|
||||
UnhandledExceptionFilter@4
|
||||
UnlockFile@20
|
||||
UnlockFileEx@20
|
||||
|
@ -595,8 +605,10 @@ VerLanguageNameA@12
|
|||
VerLanguageNameW@12
|
||||
VerifyConsoleIoHandle@4
|
||||
VirtualAlloc@16
|
||||
VirtualAllocEx@20
|
||||
VirtualBufferExceptionHandler@12
|
||||
VirtualFree@12
|
||||
VirtualFreeEx@16
|
||||
VirtualLock@8
|
||||
VirtualProtect@16
|
||||
VirtualProtectEx@20
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: kernel32.edf,v 1.6 2000/04/14 01:46:20 ekohl Exp $
|
||||
; $Id: kernel32.edf,v 1.7 2000/08/05 18:01:49 dwelch Exp $
|
||||
;
|
||||
; kernel32.edf
|
||||
;
|
||||
|
@ -53,6 +53,7 @@ BuildCommDCBAndTimeoutsW=BuildCommDCBAndTimeoutsW@12
|
|||
BuildCommDCBW=BuildCommDCBW@8
|
||||
CallNamedPipeA=CallNamedPipeA@28
|
||||
CallNamedPipeW=CallNamedPipeW@28
|
||||
CancelWaitableTimer=CancelWaitableTimer@4
|
||||
ClearCommBreak=ClearCommBreak@4
|
||||
ClearCommError=ClearCommError@12
|
||||
CloseConsoleHandle=CloseConsoleHandle@4
|
||||
|
@ -99,6 +100,8 @@ CreateSemaphoreW=CreateSemaphoreW@16
|
|||
CreateTapePartition=CreateTapePartition@16
|
||||
CreateThread=CreateThread@24
|
||||
CreateVirtualBuffer=CreateVirtualBuffer@12
|
||||
CreateWaitableTimerA=CreateWaitableTimerA@12
|
||||
CreateWaitableTimerW=CreateWaitableTimerW@12
|
||||
DebugActiveProcess=DebugActiveProcess@4
|
||||
DebugBreak=DebugBreak@0
|
||||
DefineDosDeviceA=DefineDosDeviceA@12
|
||||
|
@ -395,8 +398,10 @@ HeapValidate=HeapValidate@12
|
|||
HeapWalk=HeapWalk@8
|
||||
InitAtomTable=InitAtomTable@4
|
||||
InitializeCriticalSection=InitializeCriticalSection@4
|
||||
InterlockedCompareExchange=InterlockedCompareExchange@12
|
||||
InterlockedDecrement=InterlockedDecrement@4
|
||||
InterlockedExchange=InterlockedExchange@8
|
||||
InterlockedExchangeAdd=InterlockedExchangeAdd@8
|
||||
InterlockedIncrement=InterlockedIncrement@4
|
||||
InvalidateConsoleDIBits=InvalidateConsoleDIBits@8
|
||||
IsBadCodePtr=IsBadCodePtr@4
|
||||
|
@ -417,6 +422,7 @@ LeaveCriticalSection=LeaveCriticalSection@4
|
|||
LoadLibraryA=LoadLibraryA@4
|
||||
LoadLibraryExA=LoadLibraryExA@12
|
||||
LoadLibraryExW=LoadLibraryExW@12
|
||||
LoadLibraryW=LoadLibraryW@4
|
||||
LoadModule=LoadModule@8
|
||||
LoadResource=LoadResource@8
|
||||
LocalAlloc=LocalAlloc@8
|
||||
|
@ -453,6 +459,8 @@ OpenProcess=OpenProcess@12
|
|||
OpenProfileUserMapping=OpenProfileUserMapping@0
|
||||
OpenSemaphoreA=OpenSemaphoreA@12
|
||||
OpenSemaphoreW=OpenSemaphoreW@12
|
||||
OpenWaitableTimerA=OpenWaitableTimerA@12
|
||||
OpenWaitableTimerW=OpenWaitableTimerW@12
|
||||
OutputDebugStringA=OutputDebugStringA@4
|
||||
OutputDebugStringW=OutputDebugStringW@4
|
||||
PeekConsoleInputA=PeekConsoleInputA@16
|
||||
|
@ -570,12 +578,14 @@ SetUnhandledExceptionFilter=SetUnhandledExceptionFilter@4
|
|||
SetVDMCurrentDirectories=SetVDMCurrentDirectories@8
|
||||
SetVolumeLabelA=SetVolumeLabelA@8
|
||||
SetVolumeLabelW=SetVolumeLabelW@8
|
||||
SetWaitableTimer=SetWaitableTimer@24
|
||||
SetupComm=SetupComm@12
|
||||
ShowConsoleCursor=ShowConsoleCursor@8
|
||||
SizeofResource=SizeofResource@8
|
||||
Sleep=Sleep@4
|
||||
SleepEx=SleepEx@8
|
||||
SuspendThread=SuspendThread@4
|
||||
SwitchToThread=SwitchToThread@0
|
||||
SystemTimeToFileTime=SystemTimeToFileTime@8
|
||||
SystemTimeToTzSpecificLocalTime=SystemTimeToTzSpecificLocalTime@12
|
||||
TerminateProcess=TerminateProcess@8
|
||||
|
@ -587,6 +597,7 @@ TlsSetValue=TlsSetValue@8
|
|||
TransactNamedPipe=TransactNamedPipe@28
|
||||
TransmitCommChar=TransmitCommChar@8
|
||||
TrimVirtualBuffer=TrimVirtualBuffer@4
|
||||
TryEnterCriticalSection=TryEnterCriticalSection@4
|
||||
UnhandledExceptionFilter=UnhandledExceptionFilter@4
|
||||
UnlockFile=UnlockFile@20
|
||||
UnlockFileEx=UnlockFileEx@20
|
||||
|
@ -599,8 +610,10 @@ VerLanguageNameA=VerLanguageNameA@12
|
|||
VerLanguageNameW=VerLanguageNameW@12
|
||||
VerifyConsoleIoHandle=VerifyConsoleIoHandle@4
|
||||
VirtualAlloc=VirtualAlloc@16
|
||||
VirtualAllocEx=VirtualAllocEx@20
|
||||
VirtualBufferExceptionHandler=VirtualBufferExceptionHandler@12
|
||||
VirtualFree=VirtualFree@12
|
||||
VirtualFreeEx=VirtualFreeEx@16
|
||||
VirtualLock=VirtualLock@8
|
||||
VirtualProtect=VirtualProtect@16
|
||||
VirtualProtectEx=VirtualProtectEx@20
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.34 2000/05/13 13:50:56 dwelch Exp $
|
||||
# $Id: makefile,v 1.35 2000/08/05 18:01:49 dwelch Exp $
|
||||
#
|
||||
# ReactOS Operating System
|
||||
#
|
||||
|
@ -60,8 +60,10 @@ NLS_OBJECTS = nls/codepage.o nls/cpmisc.o nls/cptable.o\
|
|||
|
||||
THREAD_OBJECTS = thread/thread.o thread/tls.o
|
||||
|
||||
PROCESS_OBJECTS = process/proc.o process/cmdline.o process/create.o \
|
||||
process/lib.o
|
||||
PROCESS_OBJECTS = \
|
||||
process/proc.o \
|
||||
process/cmdline.o \
|
||||
process/create.o
|
||||
|
||||
STRING_OBJECTS = string/lstring.o
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ldr.c,v 1.6 2000/07/01 17:07:00 ea Exp $
|
||||
/* $Id: ldr.c,v 1.7 2000/08/05 18:01:50 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT : ReactOS user mode libraries
|
||||
|
@ -129,12 +129,25 @@ FARPROC
|
|||
STDCALL
|
||||
GetProcAddress( HMODULE hModule, LPCSTR lpProcName )
|
||||
{
|
||||
FARPROC fnExp;
|
||||
ANSI_STRING ProcedureName;
|
||||
FARPROC fnExp = NULL;
|
||||
|
||||
if (HIWORD(lpProcName) != 0)
|
||||
fnExp = LdrGetExportByName (hModule,(LPSTR)lpProcName);
|
||||
{
|
||||
RtlInitAnsiString (&ProcedureName,
|
||||
(LPSTR)lpProcName);
|
||||
LdrGetProcedureAddress ((PVOID)hModule,
|
||||
&ProcedureName,
|
||||
0,
|
||||
(PVOID*)&fnExp);
|
||||
}
|
||||
else
|
||||
fnExp = LdrGetExportByOrdinal (hModule,(ULONG)lpProcName);
|
||||
{
|
||||
LdrGetProcedureAddress ((PVOID)hModule,
|
||||
NULL,
|
||||
(ULONG)lpProcName,
|
||||
(PVOID*)&fnExp);
|
||||
}
|
||||
|
||||
return fnExp;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: timer.c,v 1.5 2000/07/01 17:07:02 ea Exp $
|
||||
/* $Id: timer.c,v 1.6 2000/08/05 18:01:50 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -16,6 +16,7 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
HANDLE
|
||||
STDCALL
|
||||
CreateWaitableTimerW (
|
||||
LPSECURITY_ATTRIBUTES lpTimerAttributes,
|
||||
WINBOOL bManualReset,
|
||||
|
@ -51,6 +52,7 @@ CreateWaitableTimerW (
|
|||
|
||||
|
||||
HANDLE
|
||||
STDCALL
|
||||
CreateWaitableTimerA (
|
||||
LPSECURITY_ATTRIBUTES lpTimerAttributes,
|
||||
WINBOOL bManualReset,
|
||||
|
@ -78,6 +80,7 @@ CreateWaitableTimerA (
|
|||
|
||||
|
||||
HANDLE
|
||||
STDCALL
|
||||
OpenWaitableTimerW (
|
||||
DWORD dwDesiredAccess,
|
||||
WINBOOL bInheritHandle,
|
||||
|
@ -112,6 +115,7 @@ OpenWaitableTimerW (
|
|||
|
||||
|
||||
HANDLE
|
||||
STDCALL
|
||||
OpenWaitableTimerA (
|
||||
DWORD dwDesiredAccess,
|
||||
WINBOOL bInheritHandle,
|
||||
|
@ -138,7 +142,7 @@ OpenWaitableTimerA (
|
|||
}
|
||||
|
||||
|
||||
WINBOOL SetWaitableTimer(
|
||||
WINBOOL STDCALL SetWaitableTimer(
|
||||
HANDLE hTimer,
|
||||
LARGE_INTEGER *pDueTime,
|
||||
LONG lPeriod,
|
||||
|
@ -161,7 +165,7 @@ WINBOOL SetWaitableTimer(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
WINBOOL CancelWaitableTimer(HANDLE hTimer)
|
||||
WINBOOL STDCALL CancelWaitableTimer(HANDLE hTimer)
|
||||
{
|
||||
NTSTATUS errCode;
|
||||
BOOLEAN CurrentState;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntdll.def,v 1.57 2000/07/06 14:34:48 dwelch Exp $
|
||||
; $Id: ntdll.def,v 1.58 2000/08/05 18:01:51 dwelch Exp $
|
||||
;
|
||||
; ReactOS Operating System
|
||||
;
|
||||
|
@ -38,8 +38,8 @@ LdrDisableThreadCalloutsForDll@8
|
|||
;LdrFindResourceDirectory_U
|
||||
LdrFindResource_U
|
||||
;LdrGetDllHandle
|
||||
;LdrGetProcedureAddress
|
||||
;LdrInitializeThunk
|
||||
LdrGetProcedureAddress@16
|
||||
LdrInitializeThunk@16
|
||||
LdrLoadDll
|
||||
;LdrProcessRelocationBlock
|
||||
;LdrQueryImageFileExecutionOptions
|
||||
|
@ -929,5 +929,4 @@ wcsstr
|
|||
wcstol
|
||||
wcstombs
|
||||
wcstoul
|
||||
LdrGetExportByName
|
||||
LdrGetExportByOrdinal
|
||||
;EOF
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntdll.edf,v 1.46 2000/07/06 14:34:48 dwelch Exp $
|
||||
; $Id: ntdll.edf,v 1.47 2000/08/05 18:01:51 dwelch Exp $
|
||||
;
|
||||
; ReactOS Operating System
|
||||
;
|
||||
|
@ -38,8 +38,8 @@ LdrDisableThreadCalloutsForDll=LdrDisableThreadCalloutsForDll@8
|
|||
;LdrFindResourceDirectory_U
|
||||
LdrFindResource_U
|
||||
;LdrGetDllHandle
|
||||
;LdrGetProcedureAddress
|
||||
;LdrInitializeThunk
|
||||
LdrGetProcedureAddress=LdrGetProcedureAddress@16
|
||||
LdrInitializeThunk=LdrInitializeThunk@16
|
||||
LdrLoadDll
|
||||
;LdrProcessRelocationBlock
|
||||
;LdrQueryImageFileExecutionOptions
|
||||
|
@ -775,5 +775,4 @@ wcsstr
|
|||
wcstol
|
||||
wcstombs
|
||||
wcstoul
|
||||
LdrGetExportByName
|
||||
LdrGetExportByOrdinal
|
||||
;EOF
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: startup.c,v 1.26 2000/07/06 14:34:49 dwelch Exp $
|
||||
/* $Id: startup.c,v 1.27 2000/08/05 18:01:51 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -36,7 +36,11 @@ ULONG NtGlobalFlag = 0;
|
|||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID LdrStartup(VOID)
|
||||
VOID STDCALL
|
||||
LdrInitializeThunk (ULONG Unknown1,
|
||||
ULONG Unknown2,
|
||||
ULONG Unknown3,
|
||||
ULONG Unknown4)
|
||||
{
|
||||
PEPFUNC EntryPoint;
|
||||
PIMAGE_DOS_HEADER PEDosHeader;
|
||||
|
@ -45,7 +49,7 @@ VOID LdrStartup(VOID)
|
|||
PVOID ImageBase;
|
||||
PPEB Peb;
|
||||
|
||||
DPRINT("LdrStartup()\n");
|
||||
DPRINT("LdrInitializeThunk()\n");
|
||||
|
||||
LdrDllListHead.BaseAddress = (PVOID)&_image_base__;
|
||||
LdrDllListHead.Prev = &LdrDllListHead;
|
||||
|
@ -111,8 +115,8 @@ VOID LdrStartup(VOID)
|
|||
/* initalize peb lock support */
|
||||
RtlInitializeCriticalSection (&PebLock);
|
||||
Peb->FastPebLock = &PebLock;
|
||||
Peb->FastPebLockRoutine = RtlEnterCriticalSection;
|
||||
Peb->FastPebUnlockRoutine = RtlLeaveCriticalSection;
|
||||
Peb->FastPebLockRoutine = (PPEBLOCKROUTINE)RtlEnterCriticalSection;
|
||||
Peb->FastPebUnlockRoutine = (PPEBLOCKROUTINE)RtlLeaveCriticalSection;
|
||||
|
||||
EntryPoint = LdrPEStartup((PVOID)ImageBase, NULL);
|
||||
if (EntryPoint == NULL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: utils.c,v 1.27 2000/07/01 17:06:22 ea Exp $
|
||||
/* $Id: utils.c,v 1.28 2000/08/05 18:01:51 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -67,13 +67,12 @@ NTSTATUS LdrLoadDll (PDLL* Dll,
|
|||
PIMAGE_DOS_HEADER DosHeader;
|
||||
NTSTATUS Status;
|
||||
PIMAGE_NT_HEADERS NTHeaders;
|
||||
PEPFUNC DllStartupAddr;
|
||||
ULONG ImageSize;
|
||||
ULONG InitialViewSize;
|
||||
PVOID ImageBase;
|
||||
HANDLE FileHandle;
|
||||
HANDLE SectionHandle;
|
||||
PDLLMAIN_FUNC Entrypoint;
|
||||
PDLLMAIN_FUNC Entrypoint = NULL;
|
||||
|
||||
if ( Dll == NULL )
|
||||
return -1;
|
||||
|
@ -183,11 +182,6 @@ NTSTATUS LdrLoadDll (PDLL* Dll,
|
|||
|
||||
DPRINT("ImageBase 0x%08x\n", ImageBase);
|
||||
|
||||
DllStartupAddr =
|
||||
(PEPFUNC) (
|
||||
ImageBase
|
||||
+ NTHeaders->OptionalHeader.AddressOfEntryPoint
|
||||
);
|
||||
/*
|
||||
* Create a section for NTDLL.
|
||||
*/
|
||||
|
@ -427,7 +421,7 @@ NTSTATUS LdrMapSections(HANDLE ProcessHandle,
|
|||
*
|
||||
*/
|
||||
|
||||
PVOID
|
||||
static PVOID
|
||||
LdrGetExportByOrdinal (
|
||||
PDLL Module,
|
||||
ULONG Ordinal
|
||||
|
@ -480,7 +474,7 @@ LdrGetExportByOrdinal (
|
|||
*
|
||||
*/
|
||||
|
||||
PVOID
|
||||
static PVOID
|
||||
LdrGetExportByName (
|
||||
PDLL Module,
|
||||
PUCHAR SymbolName
|
||||
|
@ -819,7 +813,7 @@ PEPFUNC LdrPEStartup (PVOID ImageBase,
|
|||
HANDLE SectionHandle)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PEPFUNC EntryPoint;
|
||||
PEPFUNC EntryPoint = NULL;
|
||||
PIMAGE_DOS_HEADER DosHeader;
|
||||
PIMAGE_NT_HEADERS NTHeaders;
|
||||
|
||||
|
@ -876,8 +870,11 @@ PEPFUNC LdrPEStartup (PVOID ImageBase,
|
|||
/*
|
||||
* Compute the DLL's entry point's address.
|
||||
*/
|
||||
if (NTHeaders->OptionalHeader.AddressOfEntryPoint != 0)
|
||||
{
|
||||
EntryPoint = (PEPFUNC) (ImageBase
|
||||
+ NTHeaders->OptionalHeader.AddressOfEntryPoint);
|
||||
}
|
||||
DPRINT("LdrPEStartup() = %x\n",EntryPoint);
|
||||
return EntryPoint;
|
||||
}
|
||||
|
@ -1091,4 +1088,59 @@ LdrDisableThreadCalloutsForDll (
|
|||
}
|
||||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
LdrGetProcedureAddress (IN PVOID BaseAddress,
|
||||
IN PANSI_STRING Name,
|
||||
IN ULONG Ordinal,
|
||||
OUT PVOID *ProcedureAddress)
|
||||
{
|
||||
PIMAGE_EXPORT_DIRECTORY ExportDir;
|
||||
PUSHORT OrdinalPtr;
|
||||
PULONG NamePtr;
|
||||
PULONG AddressPtr;
|
||||
ULONG i = 0;
|
||||
|
||||
/* Get the pointer to the export directory */
|
||||
ExportDir = (PIMAGE_EXPORT_DIRECTORY)
|
||||
RtlImageDirectoryEntryToData (BaseAddress,
|
||||
TRUE,
|
||||
IMAGE_DIRECTORY_ENTRY_EXPORT,
|
||||
&i);
|
||||
|
||||
if (!ExportDir || !i || !ProcedureAddress)
|
||||
{
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
AddressPtr = (PULONG)((ULONG)BaseAddress + (ULONG)ExportDir->AddressOfFunctions);
|
||||
if (Name && Name->Length)
|
||||
{
|
||||
/* by name */
|
||||
OrdinalPtr = (PUSHORT)((ULONG)BaseAddress + (ULONG)ExportDir->AddressOfNameOrdinals);
|
||||
NamePtr = (PULONG)((ULONG)BaseAddress + (ULONG)ExportDir->AddressOfNames);
|
||||
for( i = 0; i < ExportDir->NumberOfNames; i++, NamePtr++, OrdinalPtr++)
|
||||
{
|
||||
if (!_strnicmp(Name->Buffer, (char*)(BaseAddress + *NamePtr), Name->Length))
|
||||
{
|
||||
*ProcedureAddress = (PVOID)((ULONG)BaseAddress + (ULONG)AddressPtr[*OrdinalPtr]);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
DbgPrint("LdrGetProcedureAddress: Can't resolve symbol '%Z'\n", Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* by ordinal */
|
||||
Ordinal &= 0x0000FFFF;
|
||||
if (Ordinal - ExportDir->Base < ExportDir->NumberOfFunctions)
|
||||
{
|
||||
*ProcedureAddress = (PVOID)((ULONG)BaseAddress + (ULONG)AddressPtr[Ordinal - ExportDir->Base]);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
DbgPrint("LdrGetProcedureAddress: Can't resolve symbol @%d\n", Ordinal);
|
||||
}
|
||||
|
||||
return STATUS_PROCEDURE_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.49 2000/07/19 14:18:17 dwelch Exp $
|
||||
# $Id: makefile,v 1.50 2000/08/05 18:01:50 dwelch Exp $
|
||||
#
|
||||
# ReactOS Operating System
|
||||
#
|
||||
|
@ -88,7 +88,7 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) def/ntdll.def def/ntdll.edf
|
|||
-mdll \
|
||||
-o $(TARGET).dll \
|
||||
$(TARGET).o \
|
||||
-Wl,--entry=_LdrStartup \
|
||||
-Wl,--entry=_LdrInitializeThunk@16 \
|
||||
-Wl,--image-base,$(IMAGE_BASE) \
|
||||
-Wl,--file-alignment,0x1000 \
|
||||
-Wl,--section-alignment,0x1000 \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: critical.c,v 1.7 2000/06/29 23:35:29 dwelch Exp $
|
||||
/* $Id: critical.c,v 1.8 2000/08/05 18:01:52 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -19,8 +19,7 @@
|
|||
|
||||
/* shouldn't these have correct Rtl equivalents? I just copied from kernel32 */
|
||||
|
||||
PVOID
|
||||
STDCALL
|
||||
PVOID STDCALL
|
||||
InterlockedCompareExchange(
|
||||
PVOID *Destination,
|
||||
PVOID Exchange,
|
||||
|
@ -37,8 +36,7 @@ InterlockedCompareExchange(
|
|||
|
||||
}
|
||||
|
||||
LONG
|
||||
STDCALL
|
||||
LONG STDCALL
|
||||
InterlockedIncrement(PLONG Addend)
|
||||
{
|
||||
long ret = 0;
|
||||
|
@ -57,8 +55,7 @@ InterlockedIncrement(PLONG Addend)
|
|||
return ret;
|
||||
}
|
||||
|
||||
LONG
|
||||
STDCALL
|
||||
LONG STDCALL
|
||||
InterlockedDecrement(PLONG lpAddend)
|
||||
{
|
||||
long ret;
|
||||
|
@ -79,49 +76,117 @@ InterlockedDecrement(PLONG lpAddend)
|
|||
|
||||
}
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
VOID STDCALL
|
||||
RtlDeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
{
|
||||
NtClose(lpCriticalSection->LockSemaphore);
|
||||
lpCriticalSection->Reserved = -1;
|
||||
}
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
VOID STDCALL
|
||||
RtlEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
{
|
||||
HANDLE Thread = (HANDLE)NtCurrentTeb()->Cid.UniqueThread;
|
||||
ULONG ret;
|
||||
if( (ret = InterlockedIncrement(&(lpCriticalSection->LockCount) )) != 1 ) {
|
||||
if (lpCriticalSection->OwningThread != Thread ) {
|
||||
NtWaitForSingleObject( lpCriticalSection->LockSemaphore, 0, FALSE );
|
||||
|
||||
if (InterlockedIncrement(&lpCriticalSection->LockCount))
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
if (lpCriticalSection->OwningThread == Thread)
|
||||
{
|
||||
lpCriticalSection->RecursionCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
// DbgPrint("Entering wait for critical section\n");
|
||||
Status = NtWaitForSingleObject(lpCriticalSection->LockSemaphore,
|
||||
0, FALSE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("RtlEnterCriticalSection: Failed to wait (Status %x)\n",
|
||||
Status);
|
||||
}
|
||||
// DbgPrint("Left wait for critical section\n");
|
||||
}
|
||||
lpCriticalSection->OwningThread = Thread;
|
||||
lpCriticalSection->RecursionCount = 1;
|
||||
|
||||
#if 0
|
||||
if ((ret = InterlockedIncrement(&(lpCriticalSection->LockCount) )) != 1)
|
||||
{
|
||||
if (lpCriticalSection->OwningThread != Thread)
|
||||
{
|
||||
NtWaitForSingleObject(lpCriticalSection->LockSemaphore,
|
||||
0,
|
||||
FALSE);
|
||||
lpCriticalSection->OwningThread = Thread;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lpCriticalSection->OwningThread = Thread;
|
||||
|
||||
lpCriticalSection->RecursionCount++;
|
||||
}
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
lpCriticalSection->RecursionCount++;
|
||||
#endif
|
||||
}
|
||||
|
||||
VOID STDCALL
|
||||
RtlInitializeCriticalSection(LPCRITICAL_SECTION pcritical)
|
||||
{
|
||||
pcritical->LockCount = 0;
|
||||
NTSTATUS Status;
|
||||
|
||||
pcritical->LockCount = -1;
|
||||
pcritical->RecursionCount = 0;
|
||||
NtCreateSemaphore( &pcritical->LockSemaphore, STANDARD_RIGHTS_ALL, NULL, 0, 1 );
|
||||
Status = NtCreateSemaphore(&pcritical->LockSemaphore,
|
||||
STANDARD_RIGHTS_ALL,
|
||||
NULL,
|
||||
0,
|
||||
1);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("Failed to create semaphore (Status %x)\n", Status);
|
||||
/* FIXME: Throw exception */
|
||||
}
|
||||
pcritical->OwningThread = (HANDLE)-1; // critical section has no owner yet
|
||||
pcritical->Reserved = 0;
|
||||
}
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
VOID STDCALL
|
||||
RtlLeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
{
|
||||
HANDLE Thread = (HANDLE)NtCurrentTeb()->Cid.UniqueThread;
|
||||
|
||||
if (lpCriticalSection->OwningThread != Thread)
|
||||
{
|
||||
DbgPrint("Freeing critical section not owned\n");
|
||||
return;
|
||||
}
|
||||
|
||||
lpCriticalSection->RecursionCount--;
|
||||
if ( lpCriticalSection->RecursionCount == 0 ) {
|
||||
if (lpCriticalSection->RecursionCount > 0)
|
||||
{
|
||||
InterlockedDecrement(&lpCriticalSection->LockCount);
|
||||
return;
|
||||
}
|
||||
lpCriticalSection->OwningThread = 0;
|
||||
if (InterlockedIncrement(&lpCriticalSection->LockCount) >= 0)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = NtReleaseSemaphore(lpCriticalSection->LockSemaphore, 1, NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("Failed to release semaphore (Status %x)\n",
|
||||
Status);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
lpCriticalSection->RecursionCount--;
|
||||
if (lpCriticalSection->RecursionCount == 0)
|
||||
{
|
||||
lpCriticalSection->OwningThread = (HANDLE)-1;
|
||||
// if LockCount > 0 and RecursionCount == 0 there
|
||||
// is a waiting thread
|
||||
|
@ -132,19 +197,22 @@ RtlLeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
|||
}
|
||||
}
|
||||
else InterlockedDecrement( &lpCriticalSection->LockCount );
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
BOOLEAN STDCALL
|
||||
RtlTryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
{
|
||||
if( InterlockedCompareExchange( (PVOID *)&lpCriticalSection->LockCount, (PVOID)1, (PVOID)0 ) == 0 )
|
||||
if (InterlockedCompareExchange((PVOID*)&lpCriticalSection->LockCount,
|
||||
(PVOID)1, (PVOID)0 ) == 0)
|
||||
{
|
||||
lpCriticalSection->OwningThread = (HANDLE) NtCurrentTeb()->Cid.UniqueThread;
|
||||
lpCriticalSection->OwningThread =
|
||||
(HANDLE) NtCurrentTeb()->Cid.UniqueThread;
|
||||
lpCriticalSection->RecursionCount++;
|
||||
return TRUE;
|
||||
}
|
||||
if( lpCriticalSection->OwningThread == (HANDLE)NtCurrentTeb()->Cid.UniqueThread )
|
||||
if (lpCriticalSection->OwningThread ==
|
||||
(HANDLE)NtCurrentTeb()->Cid.UniqueThread)
|
||||
{
|
||||
lpCriticalSection->RecursionCount++;
|
||||
return TRUE;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: env.c,v 1.10 2000/06/29 23:35:29 dwelch Exp $
|
||||
/* $Id: env.c,v 1.11 2000/08/05 18:01:52 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -321,8 +321,11 @@ found:
|
|||
sizeof(mbi),
|
||||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
if (Environment == NULL)
|
||||
{
|
||||
RtlReleasePebLock ();
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
@ -337,8 +340,11 @@ found:
|
|||
MEM_COMMIT,
|
||||
PAGE_READWRITE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
if (Environment == NULL)
|
||||
{
|
||||
RtlReleasePebLock ();
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -404,8 +410,10 @@ found:
|
|||
else
|
||||
Status = STATUS_VARIABLE_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (Environment == NULL)
|
||||
{
|
||||
RtlReleasePebLock ();
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ppb.c,v 1.7 2000/06/29 23:35:31 dwelch Exp $
|
||||
/* $Id: ppb.c,v 1.8 2000/08/05 18:01:52 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -31,13 +31,15 @@
|
|||
|
||||
VOID STDCALL RtlAcquirePebLock(VOID)
|
||||
{
|
||||
|
||||
PPEB Peb = NtCurrentPeb ();
|
||||
Peb->FastPebLockRoutine (Peb->FastPebLock);
|
||||
}
|
||||
|
||||
|
||||
VOID STDCALL RtlReleasePebLock(VOID)
|
||||
{
|
||||
|
||||
PPEB Peb = NtCurrentPeb ();
|
||||
Peb->FastPebUnlockRoutine (Peb->FastPebLock);
|
||||
}
|
||||
|
||||
static
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: process.c,v 1.19 2000/06/29 23:35:31 dwelch Exp $
|
||||
/* $Id: process.c,v 1.20 2000/08/05 18:01:52 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -304,6 +304,7 @@ RtlCreateUserProcess (
|
|||
PROCESS_BASIC_INFORMATION ProcessBasicInfo;
|
||||
ULONG retlen;
|
||||
CHAR ImageFileName[8];
|
||||
ANSI_STRING ProcedureName;
|
||||
|
||||
DPRINT("RtlCreateUserProcess\n");
|
||||
|
||||
|
@ -333,7 +334,7 @@ RtlCreateUserProcess (
|
|||
* Get some information about the process
|
||||
*/
|
||||
|
||||
ZwQueryInformationProcess(ProcessInfo->ProcessHandle,
|
||||
NtQueryInformationProcess(ProcessInfo->ProcessHandle,
|
||||
ProcessBasicInformation,
|
||||
&ProcessBasicInfo,
|
||||
sizeof(ProcessBasicInfo),
|
||||
|
@ -353,12 +354,20 @@ RtlCreateUserProcess (
|
|||
DPRINT("Creating peb\n");
|
||||
KlInitPeb(ProcessInfo->ProcessHandle, Ppb);
|
||||
|
||||
DPRINT("Creating thread for process\n");
|
||||
lpStartAddress = (LPTHREAD_START_ROUTINE)
|
||||
((PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET(NTDLL_BASE))->
|
||||
AddressOfEntryPoint +
|
||||
((PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET(NTDLL_BASE))->ImageBase;
|
||||
DPRINT("Retrieving entry point address\n");
|
||||
RtlInitAnsiString (&ProcedureName, "LdrInitializeThunk");
|
||||
Status = LdrGetProcedureAddress ((PVOID)NTDLL_BASE,
|
||||
&ProcedureName,
|
||||
0,
|
||||
(PVOID*)&lpStartAddress);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status);
|
||||
return (Status);
|
||||
}
|
||||
DPRINT("lpStartAddress 0x%08lx\n", (ULONG)lpStartAddress);
|
||||
|
||||
DPRINT("Creating thread for process\n");
|
||||
hThread = KlCreateFirstThread(ProcessInfo->ProcessHandle,
|
||||
// Headers.OptionalHeader.SizeOfStackReserve,
|
||||
0x200000,
|
||||
|
|
|
@ -33,7 +33,7 @@ STUB(LdrFindEntryForAddress)
|
|||
STUB(LdrFindResourceDirectory_U)
|
||||
|
||||
STUB(LdrGetDllHandle)
|
||||
STUB(LdrGetProcedureAddress)
|
||||
//STUB(LdrGetProcedureAddress)
|
||||
STUB(LdrInitializeThunk)
|
||||
STUB(LdrProcessRelocationBlock)
|
||||
STUB(LdrQueryImageFileExecutionOptions)
|
||||
|
|
|
@ -34,7 +34,7 @@ org 100h
|
|||
;
|
||||
BITS 16
|
||||
|
||||
;%define NDEBUG 1
|
||||
%define NDEBUG 1
|
||||
|
||||
%macro DPRINT 1+
|
||||
%ifndef NDEBUG
|
||||
|
@ -195,7 +195,7 @@ l16:
|
|||
;
|
||||
; Begin the pmode initalization
|
||||
;
|
||||
;jmp _to_pmode
|
||||
jmp _to_pmode
|
||||
|
||||
exit:
|
||||
mov ax,04c00h
|
||||
|
|
|
@ -46,4 +46,20 @@ LdrpMapImage (
|
|||
PVOID * ImageBase
|
||||
);
|
||||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
LdrGetProcedureAddress (IN PVOID BaseAddress,
|
||||
IN PANSI_STRING Name,
|
||||
IN ULONG Ordinal,
|
||||
OUT PVOID *ProcedureAddress);
|
||||
|
||||
|
||||
PVOID STDCALL
|
||||
RtlImageDirectoryEntryToData (
|
||||
IN PVOID BaseAddress,
|
||||
IN BOOLEAN ImageLoaded,
|
||||
IN ULONG Directory,
|
||||
OUT PULONG Size);
|
||||
|
||||
|
||||
#endif /* __INCLUDE_INTERNAL_LDR_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rtl.c,v 1.8 2000/06/29 23:35:40 dwelch Exp $
|
||||
/* $Id: rtl.c,v 1.9 2000/08/05 18:01:53 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -24,78 +24,6 @@
|
|||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
#if 0
|
||||
static PVOID LdrGetExportAddress(PMODULE_OBJECT ModuleObject,
|
||||
PUCHAR Name,
|
||||
USHORT Hint)
|
||||
{
|
||||
WORD Idx;
|
||||
DWORD ExportsStartRVA, ExportsEndRVA;
|
||||
PVOID ExportAddress;
|
||||
PWORD OrdinalList;
|
||||
PDWORD FunctionList, NameList;
|
||||
PIMAGE_SECTION_HEADER SectionHeader;
|
||||
PIMAGE_EXPORT_DIRECTORY ExportDirectory;
|
||||
|
||||
ExportsStartRVA = ModuleObject->Image.PE.OptionalHeader->DataDirectory
|
||||
[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress;
|
||||
ExportsEndRVA = ExportsStartRVA +
|
||||
ModuleObject->Image.PE.OptionalHeader->DataDirectory
|
||||
[IMAGE_DIRECTORY_ENTRY_EXPORT].Size;
|
||||
|
||||
/* Get the IMAGE_SECTION_HEADER that contains the exports. This is
|
||||
usually the .edata section, but doesn't have to be. */
|
||||
SectionHeader = LdrPEGetEnclosingSectionHeader(ExportsStartRVA, ModuleObject);
|
||||
|
||||
if (!SectionHeader)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ExportDirectory = MakePtr(PIMAGE_EXPORT_DIRECTORY,
|
||||
ModuleObject->Base,
|
||||
SectionHeader->VirtualAddress);
|
||||
|
||||
FunctionList = (PDWORD)((DWORD)ExportDirectory->AddressOfFunctions + ModuleObject->Base);
|
||||
NameList = (PDWORD)((DWORD)ExportDirectory->AddressOfNames + ModuleObject->Base);
|
||||
OrdinalList = (PWORD)((DWORD)ExportDirectory->AddressOfNameOrdinals + ModuleObject->Base);
|
||||
|
||||
ExportAddress = 0;
|
||||
|
||||
if (Name != NULL)
|
||||
{
|
||||
for (Idx = 0; Idx < ExportDirectory->NumberOfNames; Idx++)
|
||||
{
|
||||
#if 0
|
||||
DPRINT(" Name:%s NameList[%d]:%s\n",
|
||||
Name,
|
||||
Idx,
|
||||
(DWORD) ModuleObject->Base + NameList[Idx]);
|
||||
|
||||
#endif
|
||||
if (!strcmp(Name, (PCHAR) ((DWORD)ModuleObject->Base + NameList[Idx])))
|
||||
{
|
||||
ExportAddress = (PVOID) ((DWORD)ModuleObject->Base +
|
||||
FunctionList[OrdinalList[Idx]]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else /* use hint */
|
||||
{
|
||||
ExportAddress = (PVOID) ((DWORD)ModuleObject->Base +
|
||||
FunctionList[Hint - ExportDirectory->Base]);
|
||||
}
|
||||
if (ExportAddress == 0)
|
||||
{
|
||||
DbgPrint("Export not found for %d:%s\n", Hint,
|
||||
Name != NULL ? Name : "(Ordinal)");
|
||||
KeBugCheck(0);
|
||||
}
|
||||
|
||||
return ExportAddress;
|
||||
}
|
||||
#endif
|
||||
|
||||
PIMAGE_NT_HEADERS STDCALL RtlImageNtHeader (IN PVOID BaseAddress)
|
||||
{
|
||||
|
@ -120,4 +48,100 @@ PIMAGE_NT_HEADERS STDCALL RtlImageNtHeader (IN PVOID BaseAddress)
|
|||
}
|
||||
|
||||
|
||||
PVOID STDCALL
|
||||
RtlImageDirectoryEntryToData (
|
||||
IN PVOID BaseAddress,
|
||||
IN BOOLEAN ImageLoaded,
|
||||
IN ULONG Directory,
|
||||
OUT PULONG Size
|
||||
)
|
||||
{
|
||||
PIMAGE_NT_HEADERS NtHeader;
|
||||
PIMAGE_SECTION_HEADER SectionHeader;
|
||||
ULONG Va;
|
||||
ULONG Count;
|
||||
|
||||
NtHeader = RtlImageNtHeader (BaseAddress);
|
||||
if (NtHeader == NULL)
|
||||
return NULL;
|
||||
|
||||
if (Directory >= NtHeader->OptionalHeader.NumberOfRvaAndSizes)
|
||||
return NULL;
|
||||
|
||||
Va = NtHeader->OptionalHeader.DataDirectory[Directory].VirtualAddress;
|
||||
if (Va == 0)
|
||||
return NULL;
|
||||
|
||||
if (Size)
|
||||
*Size = NtHeader->OptionalHeader.DataDirectory[Directory].Size;
|
||||
|
||||
if (ImageLoaded)
|
||||
return (PVOID)(BaseAddress + Va);
|
||||
|
||||
/* image mapped as ordinary file, we must find raw pointer */
|
||||
SectionHeader = (PIMAGE_SECTION_HEADER)(NtHeader + 1);
|
||||
Count = NtHeader->FileHeader.NumberOfSections;
|
||||
while (Count--)
|
||||
{
|
||||
if (SectionHeader->VirtualAddress == Va)
|
||||
return (PVOID)(BaseAddress + SectionHeader->PointerToRawData);
|
||||
SectionHeader++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
LdrGetProcedureAddress (IN PVOID BaseAddress,
|
||||
IN PANSI_STRING Name,
|
||||
IN ULONG Ordinal,
|
||||
OUT PVOID *ProcedureAddress)
|
||||
{
|
||||
PIMAGE_EXPORT_DIRECTORY ExportDir;
|
||||
PUSHORT OrdinalPtr;
|
||||
PULONG NamePtr;
|
||||
PULONG AddressPtr;
|
||||
ULONG i = 0;
|
||||
|
||||
/* get the pointer to the export directory */
|
||||
ExportDir = (PIMAGE_EXPORT_DIRECTORY)
|
||||
RtlImageDirectoryEntryToData (BaseAddress, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &i);
|
||||
|
||||
if (!ExportDir || !i || !ProcedureAddress)
|
||||
{
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
AddressPtr = (PULONG)((ULONG)BaseAddress + (ULONG)ExportDir->AddressOfFunctions);
|
||||
if (Name && Name->Length)
|
||||
{
|
||||
/* by name */
|
||||
OrdinalPtr = (PUSHORT)((ULONG)BaseAddress + (ULONG)ExportDir->AddressOfNameOrdinals);
|
||||
NamePtr = (PULONG)((ULONG)BaseAddress + (ULONG)ExportDir->AddressOfNames);
|
||||
for (i = 0; i < ExportDir->NumberOfNames; i++, NamePtr++, OrdinalPtr++)
|
||||
{
|
||||
if (!_strnicmp(Name->Buffer, (char*)(BaseAddress + *NamePtr), Name->Length))
|
||||
{
|
||||
*ProcedureAddress = (PVOID)((ULONG)BaseAddress + (ULONG)AddressPtr[*OrdinalPtr]);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
DbgPrint("LdrGetProcedureAddress: Can't resolve symbol '%Z'\n", Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* by ordinal */
|
||||
Ordinal &= 0x0000FFFF;
|
||||
if (Ordinal - ExportDir->Base < ExportDir->NumberOfFunctions)
|
||||
{
|
||||
*ProcedureAddress = (PVOID)((ULONG)BaseAddress + (ULONG)AddressPtr[Ordinal - ExportDir->Base]);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
DbgPrint("LdrGetProcedureAddress: Can't resolve symbol @%d\n", Ordinal);
|
||||
}
|
||||
|
||||
return STATUS_PROCEDURE_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ldr.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
@ -69,6 +70,8 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
|
|||
PIMAGE_NT_HEADERS NTHeaders;
|
||||
ULONG InitialViewSize;
|
||||
ULONG i;
|
||||
PEPROCESS Process;
|
||||
ANSI_STRING ProcedureName;
|
||||
|
||||
/*
|
||||
* Locate and open NTDLL to determine ImageBase
|
||||
|
@ -126,20 +129,6 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
|
|||
ImageBase = NTHeaders->OptionalHeader.ImageBase;
|
||||
ImageSize = NTHeaders->OptionalHeader.SizeOfImage;
|
||||
|
||||
/*
|
||||
* FIXME: retrieve the offset of LdrStartup from NTDLL
|
||||
*/
|
||||
DPRINT("ImageBase %x\n",ImageBase);
|
||||
*LdrStartupAddr =
|
||||
(PVOID)ImageBase + NTHeaders->OptionalHeader.AddressOfEntryPoint;
|
||||
DPRINT("LdrStartupAddr %x\n", LdrStartupAddr);
|
||||
SystemDllEntryPoint = *LdrStartupAddr;
|
||||
|
||||
/*
|
||||
* FIXME: retrieve the offset of the APC dispatcher from NTDLL
|
||||
*/
|
||||
SystemDllApcDispatcher = NULL;
|
||||
|
||||
/*
|
||||
* Create a section for NTDLL
|
||||
*/
|
||||
|
@ -215,7 +204,72 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
|
|||
}
|
||||
}
|
||||
DPRINT("Finished mapping\n");
|
||||
|
||||
|
||||
DPRINT("Referencing process\n");
|
||||
Status = ObReferenceObjectByHandle(ProcessHandle,
|
||||
PROCESS_ALL_ACCESS,
|
||||
PsProcessType,
|
||||
KernelMode,
|
||||
(PVOID*)&Process,
|
||||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("ObReferenceObjectByProcess() failed (Status %x)\n", Status);
|
||||
return(Status);
|
||||
}
|
||||
|
||||
DPRINT("Attaching to Process\n");
|
||||
KeAttachProcess(Process);
|
||||
|
||||
/*
|
||||
* retrieve ntdll's startup address
|
||||
*/
|
||||
RtlInitAnsiString (&ProcedureName,
|
||||
"LdrInitializeThunk");
|
||||
Status = LdrGetProcedureAddress ((PVOID)ImageBase,
|
||||
&ProcedureName,
|
||||
0,
|
||||
&SystemDllEntryPoint);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status);
|
||||
KeDetachProcess();
|
||||
ObDereferenceObject(Process);
|
||||
ZwClose(NTDllSectionHandle);
|
||||
return (Status);
|
||||
}
|
||||
DPRINT("SystemDllEntryPoint 0x%08lx\n",
|
||||
SystemDllEntryPoint);
|
||||
*LdrStartupAddr = SystemDllEntryPoint;
|
||||
|
||||
/*
|
||||
* FIXME: retrieve the offset of the APC dispatcher from NTDLL
|
||||
*/
|
||||
/*
|
||||
RtlInitAnsiString (&ProcedureName,
|
||||
"KiUserApcDispatcher");
|
||||
Status = LdrGetProcedureAddress ((PVOID)ImageBase,
|
||||
&ProcedureName,
|
||||
0,
|
||||
(PULONG)&SystemDllApcDispatcher);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status);
|
||||
KeDetachProcess();
|
||||
ObDereferenceObject(Process);
|
||||
ZwClose(NTDllSectionHandle);
|
||||
return (Status);
|
||||
}
|
||||
*/
|
||||
SystemDllApcDispatcher = NULL;
|
||||
|
||||
KeDetachProcess();
|
||||
ObDereferenceObject(Process);
|
||||
|
||||
ZwClose(NTDllSectionHandle);
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.20 2000/07/07 00:49:02 phreak Exp $
|
||||
/* $Id: create.c,v 1.21 2000/08/05 18:01:54 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -44,8 +44,7 @@ extern LIST_ENTRY PiThreadListHead;
|
|||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NTSTATUS STDCALL
|
||||
PsAssignImpersonationToken(PETHREAD Thread,
|
||||
HANDLE TokenHandle)
|
||||
{
|
||||
|
@ -404,18 +403,32 @@ static NTSTATUS PsCreateTeb (HANDLE ProcessHandle,
|
|||
PETHREAD Thread,
|
||||
PINITIAL_TEB InitialTeb)
|
||||
{
|
||||
// MEMORY_BASIC_INFORMATION Info;
|
||||
MEMORY_BASIC_INFORMATION Info;
|
||||
NTSTATUS Status;
|
||||
ULONG ByteCount;
|
||||
ULONG RegionSize;
|
||||
ULONG TebSize;
|
||||
PVOID TebBase;
|
||||
NT_TEB Teb;
|
||||
ULONG ResultLength;
|
||||
|
||||
TebBase = (PVOID)0x7FFDE000;
|
||||
TebSize = PAGESIZE;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
Status = NtQueryVirtualMemory(ProcessHandle,
|
||||
TebBase,
|
||||
MemoryBasicInformation,
|
||||
&Info,
|
||||
sizeof(Info),
|
||||
&ResultLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("NtQueryVirtualMemory (Status %x)\n", Status);
|
||||
KeBugCheck(0);
|
||||
}
|
||||
if (Info.State == MEM_FREE)
|
||||
{
|
||||
/* The TEB must reside in user space */
|
||||
Status = NtAllocateVirtualMemory(ProcessHandle,
|
||||
|
@ -426,17 +439,10 @@ static NTSTATUS PsCreateTeb (HANDLE ProcessHandle,
|
|||
PAGE_READWRITE);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
// DPRINT1 ("TEB allocated at %x\n", TebBase);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT ("TEB allocation failed! Status %x\n",Status);
|
||||
for(;;);
|
||||
return(Status);
|
||||
}
|
||||
|
||||
// TebBase = Info.BaseAddress - TebSize;
|
||||
TebBase = TebBase - TebSize;
|
||||
}
|
||||
|
||||
|
@ -527,6 +533,20 @@ NTSTATUS STDCALL NtCreateThread (PHANDLE ThreadHandle,
|
|||
return(Status);
|
||||
}
|
||||
|
||||
#if 0
|
||||
Status = NtWriteVirtualMemory(ProcessHandle,
|
||||
(PVOID)(((ULONG)ThreadContext->Esp) - 8),
|
||||
&ThreadContext->Eip,
|
||||
sizeof(ULONG),
|
||||
&Length);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("NtWriteVirtualMemory failed\n");
|
||||
KeBugCheck(0);
|
||||
}
|
||||
ThreadContext->Eip = LdrpGetSystemDllEntryPoint;
|
||||
#endif
|
||||
|
||||
Status = HalInitTaskWithContext(Thread,ThreadContext);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: conio.c,v 1.10 2000/07/11 04:09:25 phreak Exp $
|
||||
/* $Id: conio.c,v 1.11 2000/08/05 18:01:58 dwelch Exp $
|
||||
*
|
||||
* reactos/subsys/csrss/api/conio.c
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.6 2000/03/22 18:35:58 dwelch Exp $
|
||||
# $Id: makefile,v 1.7 2000/08/05 18:01:57 dwelch Exp $
|
||||
#
|
||||
# CSRSS: Client/server runtime subsystem
|
||||
#
|
||||
|
@ -63,7 +63,7 @@ else
|
|||
$(CP) $(TARGET).exe ../../$(DIST_DIR)/subsys/$(TARGET).exe
|
||||
endif
|
||||
|
||||
|
||||
WITH_DEBUGGING = yes
|
||||
include ../../rules.mak
|
||||
|
||||
# EOF
|
||||
|
|
Loading…
Reference in a new issue