Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows-CPP-und-C ► ««« »»»

How can I query whether a path is a folder or directory?


Querying whether a path is a folder or directory is quite simple in C ++!

 


BOOL IsThePathFolder(LPCTSTR pfad)
{
if(!pfad)return FALSE;

DWORD dwAttr = GetFileAttributes(pfad);
if (dwAttr != 0xffffffff)
{
if (dwAttr & FILE_ATTRIBUTE_DIRECTORY)
{

return TRUE;

}
}
return FALSE;
}

void main()
{
if(IstDerPfadEinOrdner("C:\Windows"))
printf("The path is a folder ergo directory\n");
else printf("The path is not a folder or directory\n");
}

(Image-1) How can I query whether a path is a folder or directory?
How can I query whether a path is a folder or directory?

-
▲ Back to the top ▲




FAQ 2: Updated on: 16 April 2020 08:05 Windows
Windows-CPP-und-C

How can I query whether my x86 application is currently running on x64?


IsWow64Process query under x64 MS OS whether the exe works in WOW64 mode typedef BOOL WINAPI * LPFN_ISWOW64PROCESS HANDLE, PBOOL; LPFN_ISWOW64PROCESS
Windows-CPP-und-C

Trim string in cpp?


With your own trim string in cpp, simply shorten the strings individually ////////////////////////////////////////////////// ////////////////////// // //
Windows-CPP-und-C

Was with error code -1073741701 (0xc000007b)!


The solution is very simple to fix the error code: "was ended with code -1073741701 0xc000007b error message" Mostly there are errors in the * .manifest
Windows-CPP-und-C

RGB Pixel to Negative!


Here is the solution to make an RGB pixel a negative RGB PIXEL BYTE R = 255-R;  BYTE G = 255-G;  BYTE B = 255-B;    Or with gray scaling:    BYTE gray_value
Windows-CPP-und-C

ListView_GetItemImage, ListView_GetISubtemImage!


The solution is very simple to find out in ListView Get Item Image and List View GetI Subtem Image ////////////////////////////////////////////////// //////////////////////
Windows-CPP-und-C

ShellExecuteEx function, search in LPCITEMIDLIST!


The solution is very easy to start with the ShellExecuteEx function, search for File in in  LPCITEMIDLIST BOOL SearchCmdLPCITEMIDLIST LPCITEMIDLIST item,
Windows-CPP-und-C

Listview set thumbnails size!


You can quickly set the size of the thumbnails in the list view, and there are no restrictions on the size   HIMAGELIST CreateNewImageListHWND m_hWnd,

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, query, whether, path, folder, directory, querying, quite, simple, bool, isthepathfolder, lpctstr, pfad, return, false, dword, dwattr, getfileattributes, Questions, Answers, Software




    

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + TraceRouteOK
  + GetWindowText
  + AutoHideMouseCursor
  + Desktop.Calendar.Tray.OK
  + OK.Its.Raining.Men
  + Run-Command
  + MagicMouseTrails
  + CpuFrequenz
  + MultiClipBoardSlots
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Windows 2021 | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2023 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu
0.093


► Change device installation settings under Windows 11! ◄

► What is Surface Go or Pro? ◄

► How can I uninstall the Internet Explorer 11 or 8 in Windows 7, is this possible? ◄

This website uses cookies to ensure you get the best experience on our website more Infos & Privacy Policy
....