` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Mapping a network drive
1999-12-22 -- Leonid Chudakov
 
Try the following: ---------- !global equates NETRESOURCE GROUP dwScope ULONG dwType ULONG dwDisplayType ULONG dwUsage ULONG lpLocalName ULONG lpRemoteName ULONG lpComment ULONG lpProvider ULONG END CONNECT_UPDATE_PROFILE EQUATE(01h) RESOURCETYPE_DISK EQUATE(01h) RESOURCETYPE_PRINT EQUATE(02h) RESOURCETYPE_ANY EQUATE(00h) !global prototypes MODULE('WNET API') WNetAddConnection(*NETRESOURCE,*CSTRING,*CSTRING,ULONG),SIGNED,PASCAL,RAW,NA ME('WNetAddConnection2A') END !local data LOC:NetRes LIKE(NETRESOURCE) LOC:lpPassword CSTRING(20) LOC:lpUserName CSTRING(20) LOC:dwFlags ULONG LOC:lpLocalName CSTRING(10) LOC:lpRemoteName CSTRING(260) LOC:lpComment CSTRING(10) LOC:lpProvider CSTRING(10) !map network drive CLEAR(LOC:NetRes) LOC:NetRes.dwType = RESOURCETYPE_DISK LOC:lpLocalName = 'F:' LOC:lpRemoteName = '\\III-NTServer\C' LOC:NetRes.lpLocalName = ADDRESS(LOC:lpLocalName) LOC:NetRes.lpRemoteName = ADDRESS(LOC:lpRemoteName) CLEAR(LOC:lpPassword) CLEAR(LOC:lpUserName) LOC:dwFlags = CONNECT_UPDATE_PROFILE Erc# = WNetAddConnection(LOC:NetRes,LOC:lpPassword,LOC:lpUserName,LOC:dwFlags)


Today is May 1, 2024, 3:27 am
This article has been viewed 35123 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: