Click here to Skip to main content
15,886,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Rename a folder? Pin
Arrin24-Jan-11 2:38
Arrin24-Jan-11 2:38 
AnswerRe: Rename a folder? Pin
Nuri Ismail20-Jan-11 4:01
Nuri Ismail20-Jan-11 4:01 
GeneralRe: Rename a folder? Pin
Arrin20-Jan-11 4:07
Arrin20-Jan-11 4:07 
GeneralRe: Rename a folder? Pin
ShadowUz20-Jan-11 18:20
ShadowUz20-Jan-11 18:20 
QuestionFile Path error [SOLVED] Pin
goldenrose920-Jan-11 3:00
goldenrose920-Jan-11 3:00 
AnswerRe: File Path error PinPopular
Maximilien20-Jan-11 3:10
Maximilien20-Jan-11 3:10 
GeneralRe: File Path error Pin
CPallini20-Jan-11 3:17
mveCPallini20-Jan-11 3:17 
GeneralRe: File Path error Pin
goldenrose920-Jan-11 3:20
goldenrose920-Jan-11 3:20 
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
 IsFolderExists(lpCmdLine)
 return TRUE;
}

void IsFolderExists(LPTSTR str)
{	
	
	WIN32_FIND_DATA wfd;
	HANDLE hFile;

	hFile = FindFirstFile(str,&wfd);
	if ( hFile != INVALID_HANDLE_VALUE )
	{
		if ((wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)!=0)  
			MessageBox(NULL,_T("Is Directory"),_T(""),MB_OK);  
		else
			
			MessageBox(NULL,_T("Is File"),_T(""),MB_OK);  
	}
	else
	{
		MessageBox(NULL,_T("Neither File or Folder"),_T(""),MB_OK);  
	}
	
}


When i pass the Folder name from command line like,
myapp.exe C:\Windows -result is neither file or folder but when used as
myapp.exe C:\\Windows -result is Is Directory.
How to solve this. Help.
Some Day I Will Prove MySelf :: GOLD

GeneralRe: File Path error Pin
Richard MacCutchan20-Jan-11 4:11
mveRichard MacCutchan20-Jan-11 4:11 
GeneralRe: File Path error Pin
goldenrose920-Jan-11 19:10
goldenrose920-Jan-11 19:10 
GeneralRe: File Path error Pin
Andrew Brock20-Jan-11 19:51
Andrew Brock20-Jan-11 19:51 
GeneralRe: File Path error Pin
goldenrose921-Jan-11 18:42
goldenrose921-Jan-11 18:42 
Questionhow to draw oscilloscope graph when we import wmp3 file in vc++ Pin
rajniyadav1a19-Jan-11 23:15
rajniyadav1a19-Jan-11 23:15 
AnswerRe: how to draw oscilloscope graph when we import wmp3 file in vc++ Pin
Cedric Moonen19-Jan-11 23:23
Cedric Moonen19-Jan-11 23:23 
QuestionDavAddConnection example [modified] Pin
ShadowUz19-Jan-11 22:14
ShadowUz19-Jan-11 22:14 
AnswerRe: DavAddConnection examle Pin
Andrew Brock19-Jan-11 22:30
Andrew Brock19-Jan-11 22:30 
GeneralRe: DavAddConnection examle Pin
ShadowUz19-Jan-11 22:37
ShadowUz19-Jan-11 22:37 
GeneralRe: DavAddConnection examle Pin
Andrew Brock19-Jan-11 22:46
Andrew Brock19-Jan-11 22:46 
AnswerRe: DavAddConnection examle Pin
Andrew Brock19-Jan-11 22:53
Andrew Brock19-Jan-11 22:53 
GeneralRe: DavAddConnection example Pin
ShadowUz20-Jan-11 18:14
ShadowUz20-Jan-11 18:14 
GeneralRe: DavAddConnection example Pin
Andrew Brock20-Jan-11 18:37
Andrew Brock20-Jan-11 18:37 
GeneralRe: DavAddConnection example Pin
ShadowUz20-Jan-11 18:50
ShadowUz20-Jan-11 18:50 
GeneralRe: DavAddConnection example Pin
Andrew Brock20-Jan-11 19:05
Andrew Brock20-Jan-11 19:05 
AnswerRe: DavAddConnection example Pin
micktsai21-Jan-11 0:55
micktsai21-Jan-11 0:55 
QuestionHow to use ActiveX control in win32? Pin
mathivanaan19-Jan-11 22:12
mathivanaan19-Jan-11 22:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.