propget 특성

[propget] 특성은 속성 접근자 함수를 지정합니다. 속성은 함수와 이름이 같아야 합니다.

[propget [,optional-property-attributes]] return-type function-name( parameters);

매개 변수

optional-property-attributes

속성 특성이 0개 이상입니다.

return-type

원격 프로시저에서 반환된 데이터의 형식입니다.

function-name

원격 프로시저의 이름입니다.

parameters

원격 프로시저에 대한 매개 변수가 0개 이상입니다.

설명

propget 특성이 있는 함수에는 마지막 매개 변수인 [out][retval] 특성이 있는 포인터 형식도 있어야 합니다. 마지막 매개 변수에 [out, retval] 특성이 없으면 함수의 반환 값이 [out, retval] 매개 변수로 처리됩니다. 예를 들어 프로토타입을 사용하는 함수

[propget] short MyFunction([in] long aLongValue);

은 로 처리됩니다.

[propget] HRESULT MyFunction([in] long aLongValue, [out,retval] short *outValue);

함수에 대해 [ propget], [propput][propputref] 중 하나를 지정할 수 있습니다.

[propput] 특성이 있는 매개 변수가 포함된 함수의 매개 변수 목록에서 [lcid] 특성을 사용하는 경우 [lcid] 매개 변수는 마지막 매개 변수 중 두 번째여야 합니다.

플래그

INVOKE_PROPERTYGET

interface MyInterface : IDispatch                         
{                
    [propget, 
     helpstring("A meaningful comment.")] HRESULT Method1(
         [out, retval] int* ReturnVal); 

    [propput, 
     helpstring("Another meaningful comment.")] HRESULT Method1(
         [in] int Value);
        
    [propget, 
     helpstring("A meaningful comment."), id(1)] HRESULT Method2(
         [out, retval] YourInterface** ReturnVal); 

    [propputref, 
     helpstring("Another meaningful comment."), 
     id(1)] HRESULT Method2([in] YourPoint* Point);
}                 

참고 항목

MIDL을 사용하여 형식 라이브러리 생성

ODL 파일 예제

ODL 파일 구문

out

retval

propput

propputref

TYPEFLAGS