Sample.mc

다음은 이벤트 로그에 이벤트를 쓸 때 서비스 샘플과 함께 사용할 리소스 전용 DLL을 빌드하는 데 사용할 수 있는 예제 메시지 파일입니다.

다음 단계를 사용하여 DLL을 빌드합니다.

  1. mc -U sample.mc
  2. rc -r sample.rc
  3. link -dll -noentry -out:sample.dll sample.res
MessageIdTypedef=DWORD

SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
    Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
    Warning=0x2:STATUS_SEVERITY_WARNING
    Error=0x3:STATUS_SEVERITY_ERROR
    )


FacilityNames=(System=0x0:FACILITY_SYSTEM
    Runtime=0x2:FACILITY_RUNTIME
    Stubs=0x3:FACILITY_STUBS
    Io=0x4:FACILITY_IO_ERROR_CODE
)

LanguageNames=(English=0x409:MSG00409)

; // The following are message definitions.

MessageId=0x1
Severity=Error
Facility=Runtime
SymbolicName=SVC_ERROR
Language=English
An error has occurred (%2).
.

; // A message file must end with a period on its own line
; // followed by a blank line.

전체 서비스 샘플