AgentOrange44
Programmer
I'm trying to use the Directory class to do some enumeration and the example code I found contains:
#include <stdafx.h>
#using <mscorlib.dll>
using namespace System;
my code looks like:
#define _WIN32_DCOM
#include <Wbemidl.h>
#include <iostream>
#include <string>
#include <Windows.h>
#include <IADS.h>
#include <Adshlp.h>
#include <Activeds.h>
#include <TCHAR.h>
#include <stdafx.h>
#using <mscorlib.dll>
using namespace std;
using namespace System;
The first problem I have is the compiler says that #using is an "invalid preprocessor command". If I comment that out, I get "System does not exist or is not a namespace". I get the same error if I try "System:irectory *objDir;"
Any help would be greatly appreciated.
#include <stdafx.h>
#using <mscorlib.dll>
using namespace System;
my code looks like:
#define _WIN32_DCOM
#include <Wbemidl.h>
#include <iostream>
#include <string>
#include <Windows.h>
#include <IADS.h>
#include <Adshlp.h>
#include <Activeds.h>
#include <TCHAR.h>
#include <stdafx.h>
#using <mscorlib.dll>
using namespace std;
using namespace System;
The first problem I have is the compiler says that #using is an "invalid preprocessor command". If I comment that out, I get "System does not exist or is not a namespace". I get the same error if I try "System:irectory *objDir;"
Any help would be greatly appreciated.