Microsoft MVP성태의 닷넷 이야기
Vista : 8. Property System 사용 코드 예 [링크 복사], [링크+제목 복사],
조회: 11351
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
부모글 보이기/감추기

Property consumerism
; https://learn.microsoft.com/en-us/archive/blogs/benkaras/property-consumerism

약속대로 코드 예제를 공개했습니다.

별로 많은 내용이 아니니, 여기에 복사해 넣습니다.


Reading properties is rather simple. First, bind to the item. SHCreateItemFromIDList and SHCreateItemFromParsingName are appropriate for this. Then read your properties. Be sure to clean up after yourself.

IShellItem2 *psi;
if (SUCCEEDED(SHCreateItemFromParsingName(L"c:\tortoise.doc", NULL, IID_IShellItem2, (void**)&psi)))
{
IPropertyStore *pps;
if (SUCCEEDED(psi->GetPropertyStore(GPS_DEFAULT, IID_IPropertyStore, (void**)&pps)))
{
PROPVARIANT propvar = {0};
if (SUCCEEDED(pps->GetValue(PKEY_Title, &propvar)))
{
wprintf(L"Title: %s\n", PropVariantToStringWithDefault(propvar, L""));
PropVariantClear(&propvar);
}
pps->Release();
}
psi->Release();
}

Not bad for reading the title of a document! And I even checked the return results.

---

Constable Umer walked down the narrow flagstone path, then onto cobblestones and finally gravel stones. Turning a corner, Cons. Umer found a door with a small card pinned to next to it. "Great Flying Tortoise: Purveyor of fine, proper teas."








[최초 등록일: ]
[최종 수정일: 4/26/2024]


비밀번호

댓글 작성자
 



2006-10-06 10시35분
Properties coding expedition #1 - Binding to an item
; https://learn.microsoft.com/en-us/archive/blogs/benkaras/properties-coding-expedition-1-binding-to-an-item

Properties coding expedition #2 - printing the IPropertyStore
; https://learn.microsoft.com/en-us/archive/blogs/benkaras/properties-coding-expedition-2-printing-the-ipropertystore

Properties coding expedition #3 - Printing a value
; https://learn.microsoft.com/en-us/archive/blogs/benkaras/properties-coding-expedition-3-printing-a-value

Properties coding expedition #4 - The output
; https://learn.microsoft.com/en-us/archive/blogs/benkaras/properties-coding-expedition-4-the-output

Properties coding expedition #5 - Stripping characters
; https://learn.microsoft.com/en-us/archive/blogs/benkaras/properties-coding-expedition-5-stripping-characters

Properties coding expedition #6 - Developer friendly output
; https://learn.microsoft.com/en-us/archive/blogs/benkaras/properties-coding-expedition-6-developer-friendly-output

Properties coding expedition #7 - The final output
; https://learn.microsoft.com/en-us/archive/blogs/benkaras/properties-coding-expedition-7-the-final-output
kevin25

... [46]  47 
NoWriterDateCnt.TitleFile(s)
43정성태12/28/200410136VSMT 소개: Physical Server to Virtual Server
68정성태3/2/200510137    답변글 [추가]: VSMT 소개: ADS 1.0
42정성태12/27/20049506VS.NET 2005 : What should I do if I get a message that says, "Team system server is not available; please contact your system administrator."?
41정성태12/25/20049960Ten things to know before starting VSTS Foundation Server Installation
40정성태12/25/20049802SQL Server 2005 에서 반가운 기능 : 재귀 SELECT 와 ROW_NUMBER
39정성태12/24/20049006VS.NET 2005 : Navigate the .NET Framework and Your Projects with "My"파일 다운로드1
38정성태12/24/20049078Smart Client Architecture and Design Guide
37정성태12/24/20049688Translation Guide: Moving Your Programs from Managed Extensions for C++ to C++/CLI
36정성태12/23/2004939113가지 주의 사항: Visual C++ .NET 프로그램을 Visual Studio 2005로 이식하기 전에 알아야 할 13가지 내용
35정성태12/26/20049843Windows Sharepoint Services 를 설치한 이후 ASP.NET 오류 문제파일 다운로드1
34정성태12/9/200410014SQL Server 구성이 실패파일 다운로드1
33정성태12/7/20049895RSS 에 대한 자세한 설명
32정성태12/5/20049608How To Troubleshoot MS DTC Firewall Issues
31정성태12/5/20049387HOWTO: Enable DTC Between Web Servers and SQL Servers Running Windows Server 2003
29정성태12/4/20049419IP 변경하는 NETSH 명령
28정성태11/20/20049591혼합 DLL 로드 문제
27정성태11/20/20049332Web Services Enhancements 2.0을 사용한 프로그래밍
26정성태11/20/20049740SQL 주입 공격을 사전에 차단하는 방법
25정성태10/20/20049369Invoking .NET Events from Native C++
24정성태10/16/20048758Windows Rights Management 서비스(RMS) 1.0
23정성태10/16/20049507[ASP.NET] Working with Client-Side Script
21정성태10/3/20049562HOWTO: ASP.NET 유틸리티를 사용하여 자격 증명 및 세션 상태 연결 문자열 암호화
20정성태10/3/20049526IE 에서 XML 파일을 보는 경우, XMLDocument 를 얻어내는 방법.
22정성태10/3/200410263    답변글 [내용 보강] .NET 언어에서 IE에 보여진 XMLDocument 개체 접근하기
19정성태10/3/20049231.NET 리모팅에서 MBR 개체를 전송하는 경우의 xxx.exe.config 파일 설정방법
18정성태9/19/20049976HTML SELECT 요소에 OPTION 요소를 채우는 C/C++ 예제파일 다운로드1
... [46]  47