Rede - funcoes genericas da api |
Top Previous Next |
{ Some networking functions may be accessed without calling any NetWare DLLs at all: since Windows provides some basic networking functions that can be called from third-party applications, you could simply build a network-aware Windows application using these network functions.
WnetGetConnection, WNetAddConnection and WNetGetUser belong to the more frequently used generic network Windows functions that can be accessed to retrieve mappings, printer redirection, and user names without requiring one of the NetWare SDKs. These Windows functions may be called from both, 16 and 32-bit Delphi applications.
Sample lines could look like this: } WnetGetConnection('F:', RemoteName, 255); // Get Mapping WNetGetConnection('LPT1:', RemoteName, 255); // Get Printer redirection WNetCancelConnection('F:', True); // Delete Mapping WNetCancelConnection('LPT1:', True); // Cancel Capture WNetAddConnection('F:', '', '\\FS1\VOL1\DATA'); // Create Mapping / Attach WNetAddConnection('LPT1:', True); // Cancel Capture WNetGetUser'"F:', UserName, 255); // Get User name { In most cases, however, you will want to take use of the NetWare- specific APIs that give you access to all NetWare functions; this means you will want to access functions declared in one of the NetWare DLLs. } |