refuses to open file

rbtwms at digitalpath.net rbtwms at digitalpath.net
Wed Apr 17 14:57:55 PDT 2013


I had made so many changes truing to solve the problem that I included a
older version. another problem is that with the file name: efile =
File("l:\\filepro\\mvmammach\\key") with no space before the drive letter
the silently quits with no error but as you can see efile name is just a hex
number.(see (1))  putting a space before the drive letter causes the
exception (see (2)).


(1)
command line ["eqipfile"]
defile name is File(2002FE0)
WITHOUT SPACE!

(2)
command line ["eqipfile"]
std.exception.ErrnoException at std\stdio.d(289): Cannot open file `
l:\filepro\mvammach\key ' in mode `rb' (Invalid argument)
----------------
0x0041B478
0x0041B303
0x004101E3
0x0040BB04
0x0040BB3E
0x0040B760
0x00422AED
0x770133AA in BaseThreadInitThunk
0x77DB9EF2 in RtlInitializeExceptionChain
0x77DB9EC5 in RtlInitializeExceptionChain


WITH SPACE!

code excerpt follows:

writefln("command line %s", args[]);
  efile = File(" l:\\filepro\\mvammach\\key");
writefln("efile name is %s", efile);  	    	
  char[4600] buf;
  string[int] list;
	efile.rawRead(buf);
  while(efile.rawRead(buf)){
    if(buf[0] != 0x01) continue;
    string c = to!string (buf[107..111]);
    if (c == "    ") break;
    int z = to!int(c);
    string s = to!string(buf[67..92]);
    list[z] = s;
    }
Sorry I seen to have had my identity set up wrong it is corrected now.


More information about the Digitalmars-d-learn mailing list