Hi All,
I have a build an application which uses file names from a directory.
to get these file names I used the following code from MSDN.

FILE * fp;
String *extension;

// Create a reference to the current directory.
DirectoryInfo* di = new DirectoryInfo("C:\Sachin");
// Create an array representing the files in the current directory.
FileInfo* fi[] = di->GetFiles();
//Console::WriteLine(S"The following files exist in the current directory:");
// write the names of the files in the current directory.
Collections::IEnumerator* myEnum = fi->GetEnumerator();
fp = fopen("nest.lst","w+");
while (myEnum->MoveNext())
FileInfo* fiTemp = __try_cast<FileInfo*>(myEnum->Current);
extension = Path::GetExtension(fiTemp->Name);



this code works using
#using <mscorlib.dll> with /clr option.
but i fail to run this application on another machine that doesnt have visual studio installed. As i dont how to specify this dll at run time.
thanks in advance for any help

This article has been dead for over six months. Start a new discussion instead.