Click here to Skip to main content
14,486,366 members

C / C++ / MFC

 
GeneralRe: How to solve the problem with a simple algorithm? Pin
Stefan_Lang26-Mar-20 22:52
mveStefan_Lang26-Mar-20 22:52 
PraiseRe: How to solve the problem with a simple algorithm? Pin
CPallini26-Mar-20 23:16
mveCPallini26-Mar-20 23:16 
AnswerRe: How to solve the problem with a simple algorithm? Pin
Stefan_Lang26-Mar-20 22:47
mveStefan_Lang26-Mar-20 22:47 
Questionplz ans this program Pin
Member 1477930521-Mar-20 16:53
MemberMember 1477930521-Mar-20 16:53 
AnswerRe: plz ans this program Pin
Richard MacCutchan21-Mar-20 21:51
mveRichard MacCutchan21-Mar-20 21:51 
AnswerRe: plz ans this program Pin
Victor Nijegorodov22-Mar-20 0:42
MemberVictor Nijegorodov22-Mar-20 0:42 
QuestionRe: plz ans this program Pin
David Crow23-Mar-20 2:39
MemberDavid Crow23-Mar-20 2:39 
QuestionBaffling Error! Pin
Richard Andrew x6421-Mar-20 11:11
professionalRichard Andrew x6421-Mar-20 11:11 
In Windows File Explorer I'm able to navigate to the folder "C:\Windows\System32\WDI".

However, when I try to open a handle to that directory, it inexplicably says that the path is not found!

The code I'm using is below. Does anyone know what I could be doing wrong? (I'm running Visual Studio as Admin, so that when I debug the program it should also be running as Admin.)

int main()
{
	std::wstring Directory = L"C:\\Windows\\System32\\WDI\\*.*";
	WIN32_FIND_DATA FindData;
	
	HANDLE FINDHANDLE = FindFirstFile(Directory.c_str(), &FindData);

	if (FINDHANDLE != INVALID_HANDLE_VALUE)
	{
		std::cout << "IT WORKED!\r\n";
	}
	else
	{
		std::cout << "DID NOT WORK!\r\n";
		DWORD Error = GetLastError();

		std::cout << "ERROR: " << Error << "\r\n";
	}
}

It prints "Error: 3" which is "The system cannot find the path specified." Note that it does not say "Access is denied".



The difficult we do right away...
...the impossible takes slightly longer.


modified 21-Mar-20 17:19pm.

AnswerRe: Baffling Error! Pin
leon de boer21-Mar-20 19:11
Memberleon de boer21-Mar-20 19:11 
AnswerRe: Baffling Error! Pin
Randor 22-Mar-20 3:20
professional Randor 22-Mar-20 3:20 
GeneralRe: Baffling Error! Pin
Richard Andrew x6422-Mar-20 4:40
professionalRichard Andrew x6422-Mar-20 4:40 
QuestionHow to make flowchart for matrix on C language? Pin
Member 1477750619-Mar-20 8:39
MemberMember 1477750619-Mar-20 8:39 
AnswerRe: How to make flowchart for matrix on C language? Pin
jeron119-Mar-20 11:10
Memberjeron119-Mar-20 11:10 
AnswerRe: How to make flowchart for matrix on C language? Pin
leon de boer19-Mar-20 15:09
Memberleon de boer19-Mar-20 15:09 
GeneralVC++ Error in Visual Studio 2017 After migration of application from VS2010 to VS2017 Professional Pin
Member 1326109416-Mar-20 20:35
MemberMember 1326109416-Mar-20 20:35 
AnswerRe: VC++ Error in Visual Studio 2017 After migration of application from VS2010 to VS2017 Professional Pin
OriginalGriff16-Mar-20 20:47
mveOriginalGriff16-Mar-20 20:47 
GeneralRe: VC++ Error in Visual Studio 2017 After migration of application from VS2010 to VS2017 Professional Pin
Richard MacCutchan17-Mar-20 2:15
mveRichard MacCutchan17-Mar-20 2:15 
GeneralRe: VC++ Error in Visual Studio 2017 After migration of application from VS2010 to VS2017 Professional Pin
leon de boer17-Mar-20 5:04
Memberleon de boer17-Mar-20 5:04 
Questionparsing bitmap files (2) Pin
fearless_14-Mar-20 21:53
Memberfearless_14-Mar-20 21:53 
AnswerRe: parsing bitmap files (2) Pin
Richard MacCutchan14-Mar-20 22:13
mveRichard MacCutchan14-Mar-20 22:13 
GeneralRe: parsing bitmap files (2) Pin
fearless_15-Mar-20 3:09
Memberfearless_15-Mar-20 3:09 
GeneralRe: parsing bitmap files (2) Pin
Richard MacCutchan15-Mar-20 3:34
mveRichard MacCutchan15-Mar-20 3:34 
GeneralRe: parsing bitmap files (2) Pin
fearless_15-Mar-20 4:05
Memberfearless_15-Mar-20 4:05 
GeneralRe: parsing bitmap files (2) Pin
Richard MacCutchan15-Mar-20 4:24
mveRichard MacCutchan15-Mar-20 4:24 
GeneralRe: parsing bitmap files (2) Pin
fearless_15-Mar-20 7:02
Memberfearless_15-Mar-20 7:02 

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.