MS Windows Error Messages

Code Error Message

more..

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 헤즈

2006/12/28 03:26 2006/12/28 03:26
Response
2 Trackbacks , No Comment
RSS :
http://blog.haz3.com/rss/response/31

Packet Filtering

MFC를 사용하여 패킷 필터링을 하는 방법이다.

함수 지원 문제로 vs6에서는 동작하지 않으며,

vs.net 이상에서만 지원한다.



CPacketFilter 클래스는 AddFilter, RemoveFilter 두함수를 가지고있다.

int AddFilter(int nDirection,

  LPCTSTR lpszSrcAddr,

  LPCTSTR lpszSrcMask,

  LPCTSTR lpszDstAddr,

 LPCTSTR lpszDstMask,

  int nSrcPort,

  int nDstPort,

  int nProtocol);



int RemoveFilter(int nDirection,

  LPCTSTR lpszSrcAddr,

 LPCTSTR lpszSrcMask,

 LPCTSTR lpszDstAddr,

  LPCTSTR lpszDstMask,

  int nSrcPort,

  int nDstPort,

  int nProtocol);




MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rras/rras/packet_filtering_functions.asp

참고사이트: http://www.codeproject.com/managedcpp/packetfilteringnet.asp

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 헤즈

2006/12/04 17:56 2006/12/04 17:56
Response
No Trackback , No Comment
RSS :
http://blog.haz3.com/rss/response/25

헝가리안 표기법

Table 1. Some examples for procedure names

Name

Description

InitSy

Takes an sy as its argument and initializes it.

OpenFn

fn is the argument. The procedure will "open" the fn. No value is returned.

FcFromBnRn

Returns the fc corresponding to the bn,rn pair given. (The names cannot tell us what the types sy, fn, fc, and so on, are.)



Table 2. Standard type constructions

pX

Pointer to X.

dX

Difference between two instances of type X. X + dX is of type X.

cX

Count of instances of type X.

mpXY

An array of Ys indexed by X. Read as "map from X to Y."

rgX

An array of Xs. Read as "range X." The indices of the array are called:

iX

index of the array rgX.

dnX

(rare) An array indexed by type X. The elements of the array are called:

eX


(rare) Element of the array dnX.

grpX

A group of Xs stored one after another in storage. Used when the X elements are of variable size and standard array indexing would not apply. Elements of the group must be referenced by means other then direct indexing. A storage allocation zone, for example, is a grp of blocks.

bX

Relative offset to a type X. This is used for field displacements in a data structure with variable size fields. The offset may be given in terms of bytes or words, depending on the base pointer from which the offset is measured.

cbX

Size of instances of X in bytes.

cwX

Size of instances of X in words.



Table 3. Standard qualifiers

XFirst

The first element in an ordered set (interval) of X values.

XLast

The last element in an ordered set of X values. XLast is the upper limit of a closed interval, hence the loop continuation condition should be: X <= XLast.

XLim

The strict upper limit of an ordered set of X values. Loop continuation should be: X < XLim.

XMax

Strict upper limit for all X values (excepting Max, Mac, and Nil) for all other X: X < XMax. If X values start with X=0, XMax is equal to the number of different X values. The allocated length of a dnx vector, for example, will be typically XMax.

XMac

The current (as opposed to constant or allocated) upper limit for all X values. If X values start with 0, XMac is the current number of X values. To iterate through a dnx array, for example:

for x=0 step 1 to xMac-1 do ... dnx[x] ...

or

for ix=0 step 1 to ixMac-1 do ... rgx[ix] ...

XNil

A distinguished Nil value of type X. The value may or may not be 0 or -1.

XT

Temporary X. An easy way to qualify the second quantity of a given type in a scope.



Table 4. Some common primitive types

f

Flag (Boolean, logical). If qualifier is used, it should describe the true state of the flag. Exception: the constants fTrue and fFalse.

w

Word with arbitrary contents.

ch

Character, usually in ASCII text.

b

Byte, not necessarily holding a coded character, more akin to w. Distinguished from the b constructor by the capital letter of the qualifier in immediately following.

sz

Pointer to first character of a zero terminated string.

st

Pointer to a string. First byte is the count of characters cch.

h

pp (in heap).

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 헤즈

2006/12/02 00:05 2006/12/02 00:05
Response
No Trackback , No Comment
RSS :
http://blog.haz3.com/rss/response/22

DebugView를 활용하자~ ㅡ0ㅡ

요즘 MFC를 사용하면서 디버그 메시지를 보기위해 쓰고있다. 예전에도 써~보긴 했지만;;

디버그메시지를 이용해 디버깅을 하기 보다는 출력용 Edit를 하나 만들어서 했던.. ㅡ.ㅡ;;



MFC어플을 만들때 OutputDebugString()을 이용하면 DebugView에서 확인할 수 있다~
VOID OutputDebugString(

  LPCTSTR
lpOutputString // string to be displayed

);


http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx

Download DebugView (301 KB)
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 헤즈

2006/11/30 18:30 2006/11/30 18:30
Response
No Trackback , No Comment
RSS :
http://blog.haz3.com/rss/response/20


블로그 이미지

기억하는 것 보다 잊는 게 어렵다.

- 헤즈

Archives

Calendar

«   2010/03   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Site Stats

Total hits:
105518
Today:
20
Yesterday:
86

141

77

-30 days

today : 20