2005年6月17日

P2P

蚂蚁突然想到WOW中的游戏副本是不是P2P在MMORPG中的一个体现呢?

这是一个多么高明的设计决策啊!

15:26 | 评论 (0)

IoAttachDevice establishes layering between drivers so that the same 
IRPs can be sent to each driver in the chain.

This routine is used by intermediate drivers during initialization. 
It allows such a driver to attach its own device object to another 
device in such a way that any requests being made to the original 
device are given first to the intermediate driver.

The caller can be layered only at the

* top of an existing chain of layered drivers. *

IoAttachDevice searches for the highest device 
object layered over TargetDevice and attaches to * that * object 
(that can be the TargetDevice). 

? Therefore, this routine must not be called if a driver that must 
be higher-level has already layered itself over the target device. ?

...

This routine sets the AlignmentRequirement in SourceDevice to the 
value in the next-lower device object and sets the StackSize 
to the value in the next-lower object plus one.

*********************************************************************
Warning:  AttachedDevice must point to a global memory location, such
as the driver's device extension. IoAttachDevice opens the file 
object for the target device, updates AttachedDevice, performs the 
attach, and then closes the file object. Thus, 

! the source device receives the IRP_MJ_CLEANUP and IRP_MJ_CLOSE 
requests for the file object before IoAttachDevice returns.  !

The driver must forward these requests to the target device, and 
AttachedDevice must be a memory location accessible to the driver's
DispatchCleanup and DispatchClose routines.
*********************************************************************

14:43 | 评论 (0)

8:49 | 评论 (0)

2005年6月16日

"
CCHAR StackSize

Specifies the minimum number of stack locations in IRPs to be sent to
this driver.

IoCreateDevice sets this field to one in newly created device objects;
lowest-level drivers can therefore ignore this field.

The I/O manager automatically sets the StackSize field in a
higher-level driver's device object to the appropriate value if the
driver calls IoAttachDevice or IoAttachDeviceToDeviceStack. Only a
higher-level driver that chains itself over another driver with
IoGetDeviceObjectPointer must explicitly set the value of StackSize
in its own device object(s) to (1 + the StackSize value of the
next-lower driver's device object).
"

From MSDN

18:18 | 评论 (0)

wow

蚂蚁一向敬重有专业精神的公司,在搜索引擎公司里是Google,在游戏开发商
里,是暴雪。

所以蚂蚁支持Google,把它作为自己的搜索第一选择。

现在蚂蚁也开始支持暴雪,蚂蚁开始玩魔兽世界了^_^。

5级的人类术士,每天休闲1个小时也不错……

15:30 | 评论 (0)

10:14 | 评论 (0)

2005年6月15日

In VB6, Integer is 16bit signed number.

...

Always define your own data type.

11:22 | 评论 (0)

8:48 | 评论 (0)

2005年6月14日

15:58 | 评论 (0)

2005年6月13日

Tree-View Control Reference

15:52 | 评论 (0)

TARGETNAME=Foo
TARGETPATH=obj

TARGETTYPE=PROGRAM
UMTYPE=windows
# Must define this when using GUI entry
UMENTRY=winmain

SOURCES=Entry.cpp\
        $(TARGETNAME).rc




11:09 | 评论 (0)

!include <win32.mak>

OBJS=$(SRCS:cpp=obj)

all: $(OUTDIR) $(OUTDIR)\$(PROJ).exe

$(OUTDIR):
    if not exist "$(OUTDIR)/$(NULL)" mkdir $(OUTDIR)
    
$(OUTDIR)\$(PROJ).exe: $(OUTDIR)\$(OBJS)
    $(link) $(linkdebug) $(guiflags) \
    -out:$(OUTDIR)\$(PROJ).exe \
    $(OUTDIR)\$(OBJS) $(guilibs) $(LIBS)
    
.cpp{$(OUTDIR)}.obj::
    $(cc) $(cdebug) $(cflags) $(cvars) /WX /Fo"$(OUTDIR)\\" /Fd"$(OUTDIR)\\" $<

clean:
    $(CLEANUP)

10:02 | 评论 (0)

<<  61 62 63 64 65 66 67 68 69 70 71 72 73 >>

Copyright twinsant.