Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Printing text with the Escape function
Quering waveform-audio output devices
Creating a clipping region from the path selected into the device context of a form
Enumerating the subkeys of a user-specific key
How to download this reference`s archive through WinInet functions using InternetOpenUrl
MapiSendMail class for Visual FoxPro application
Storing registration key in the resources of an executable file
Terminating all running applications from a VFP program
Using the RestartDialog function -- restarting Windows
Converting a hexadecimal string to an integer
Creating a device context for the specified printer
Displaying Windows shell folders in TreeView control with Visual FoxPro FLL
Using FtpCommand
Disabling drawing in the VFP form
Enumerating the subkeys for a given registry key
Changing pitch and speed of a wave file
How to create a desktop shortcut (shell link)
Pocket PC: base class
Reading metrics for the currently selected font
Retrieving IP statistics for the computer
Comparing dimensions of the VFP main window with _SCREEN properties
Pocket PC: enumerating mounted database volumes and databases in the Object Store
URL: splitting into its component parts
Using the heap of the calling process to allocate memory blocks
Obtaining provider name for a specific type of network

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
 
DECLARE INTEGER WNetGetProviderName IN mpr;
    INTEGER dwNetType, STRING @lpProviderName,;
    INTEGER @lpBufferSize
 
#DEFINE NO_ERROR 0
 
#DEFINE WNNC_NET_MSNET      0x00010000
#DEFINE WNNC_NET_LANMAN     0x00020000
#DEFINE WNNC_NET_NETWARE    0x00030000
#DEFINE WNNC_NET_VINES      0x00040000
#DEFINE WNNC_NET_10NET      0x00050000
#DEFINE WNNC_NET_LOCUS      0x00060000
#DEFINE WNNC_NET_SUN_PC_NFS 0x00070000
#DEFINE WNNC_NET_LANSTEP    0x00080000
#DEFINE WNNC_NET_9TILES     0x00090000
#DEFINE WNNC_NET_LANTASTIC  0x000A0000
#DEFINE WNNC_NET_AS400      0x000B0000
#DEFINE WNNC_NET_FTP_NFS    0x000C0000
#DEFINE WNNC_NET_PATHWORKS  0x000D0000
#DEFINE WNNC_NET_LIFENET    0x000E0000
#DEFINE WNNC_NET_POWERLAN   0x000F0000
#DEFINE WNNC_NET_BWNFS      0x00100000
#DEFINE WNNC_NET_COGENT     0x00110000
#DEFINE WNNC_NET_FARALLON   0x00120000
#DEFINE WNNC_NET_APPLETALK  0x00130000
#DEFINE WNNC_NET_INTERGRAPH 0x00140000
#DEFINE WNNC_NET_SYMFONET   0x00150000
#DEFINE WNNC_NET_CLEARCASE  0x00160000
#DEFINE WNNC_NET_FRONTIER   0x00170000
#DEFINE WNNC_NET_BMC        0x00180000
#DEFINE WNNC_NET_DCE        0x00190000
#DEFINE WNNC_NET_DECORB     0x00200000
#DEFINE WNNC_NET_PROTSTOR   0x00210000
#DEFINE WNNC_NET_FJ_REDIR   0x00220000
#DEFINE WNNC_NET_DISTINCT   0x00230000
#DEFINE WNNC_NET_TWINS      0x00240000
#DEFINE WNNC_NET_RDR2SAMPLE 0x00250000
 
LOCAL lcProvider, lnBufsize, lnResult
lnBufsize = 250
lcProvider = Repli(Chr(0), lnBufsize)
 
lnResult = WNetGetProviderName (WNNC_NET_MSNET, @lcProvider, @lnBufsize)
IF lnResult = NO_ERROR
    ? "Provider name:", SUBSTR(lcProvider, 1, AT(Chr(0),lcProvider)-1)
ELSE
* 1222 -- ERROR_NO_NETWORK
*  234 -- ERROR_MORE_DATA
    ? "Error code:", lnResult
ENDIF
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1739 bytes  
Created: 2002-06-06 08:52:17  
Modified: 2002-06-06 08:52:32  
Visits in 7 days: 108  
Listed functions:
WNetGetProviderName
Printer friendly API declarations
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.22.76.170)
7 sec.Example: 'Enumerating network resources'
10 sec.Example: 'Configuring DEVMODE structure for a printer'
4.26 hrs.Function: 'CeRegOpenKeyEx'
4.27 hrs.Example: 'Verifying a file using the Authenticode policy provider'
4.5 hrs.Example: 'Confining Windows calculator inside the VFP main window'
 Function: 'NetGroupEnum'
7.33 hrs.Example: 'GetProcessVersion points at target OS'
18.03 hrs.Example: 'Displaying Windows shell folders in TreeView control with Visual FoxPro FLL'
 Example: 'Uploading file to the FTP server using InternetWriteFile'
23.46 hrs.Example: 'How to empty the Recycle Bin'
Google
Advertise here!