MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / GetNumFileHardLinks

Function GetNumFileHardLinks

Explorer++/Helper/Helper.cpp:343–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343DWORD GetNumFileHardLinks(const TCHAR *lpszFileName)
344{
345 DWORD nLinks = 0;
346
347 wil::unique_hfile file(CreateFile(lpszFileName, FILE_READ_ATTRIBUTES,
348 FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, NULL));
349
350 if(file)
351 {
352 BY_HANDLE_FILE_INFORMATION fileInfo;
353 BOOL bRet = GetFileInformationByHandle(file.get(), &fileInfo);
354
355 if(bRet)
356 {
357 nLinks = fileInfo.nNumberOfLinks;
358 }
359 }
360
361 return nLinks;
362}
363
364BOOL ReadImageProperty(const TCHAR *lpszImage, PROPID propId, TCHAR *szProperty, int cchMax)
365{

Callers 2

TEST_FFunction · 0.85

Calls 1

getMethod · 0.45

Tested by 1

TEST_FFunction · 0.68