Im getting the directory of where my prog is from argv[0]. It comes like "C:\BLAH\FOOBAR\PASS.EXE", how do i cut it into this, "C:\BLAH\FOOBAR"?