WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Attach and Map

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

n3Map - n3MapRoot - n3MapDir

Keywords: n3Map	 n3maproot  n3MapDir

Question:

I'm getting an error 145, no Network Resource, when using n3MapDir, under Windows 3.1 with VLM. It works fine with n3Map, but that's not what I want.

Here's my code:

        DirChange("C:")
        n3MapDelete("J:")
        n3Map(OldJ,"J:")     ;This Works
          ;n3MapDir(OldJ,"J:") ;This does not!
          ;n3MapDelete("K:")
          ;n3MapDir("%OldK%","K:")
        n3MapDelete("F:")
        n3MapRoot("%TempServ%","F:")
        DirChange("F:%TempPath%")

          ;n3MapDelete("J:")
      
        n3Detach(MyServer)

        :CANCEL
        %ONCANCEL%
        if n3GetMapped(MyServer)=="" then n3Detach(MyServer)
        EXIT

Answer:

Try...
        n3MapDir(OldJ,"J:\") 
The n3MapDir needs a directory (OR A SHARE) to map to. The \ should make it happy.

Some Background on n3Map - n3MapRoot - n3MapDir:

n3map and n3maproot do exactly the same thing. They are exactly the same API call, and n3map will eventually disappear from the help files (although not from the Winbatch DLL).

n3MapDir maps you so you can see all the nested directories underneath a directory. Use this to map to a SHARED DIRECTORY, for example, rather than to the root of your server.

Use n3Map to map to the root of your server.

If you're having a problem with the n3map causing a root mapping rather than dynamic mapping in Windows 3.1:

This occurs in approximately 1% of our users, and we don't exactly know why. The n3map is supposed to do a dynamic mapping, while the user is getting a root mapping instead.

The solution is to map to a directory a level above, and then use DirChange to change to the desired directory.


Article ID:   W13614
Filename:   n3map and Mapping to Root.txt
File Created: 1999:04:15:16:55:12
Last Updated: 1999:04:15:16:55:12