Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to upload a local file to FTP server using FtpPutFile
Listing child windows for the Windows desktop
Obtaining list of tables stored in an ODBC Data Source
Reading header information from AVI file
The DetectAutoProxyUrl function identifies the auto-config script location
Drawing cursors for the classes defined by the system (preregistered): BUTTON, EDIT, LISTBOX etc.
How to make the caption of a VFP application flashing in the Windows task bar
Opening the Page Setup dialog box to specify the attributes of a printed page
Shortcut Menu Class
Using custom Simple MapiSendMail class
How to control Adobe Reader 9.0 (SDI mode) from VFP application
Obtaining names and positions for shortcuts located on the Windows Desktop
Simple Window Viewer
Winsock: resolving an address to a host name
Enumerating print processors and supporting data types installed on the specified server
GDI+: Drawing a Pie Chart
GDI+: printing vertical text on VFP reports via generated images (VFP8)
How to create transparent areas inside a form -- punching holes in the form
How to read email messages using Simple MAPI
Setting the volume label
Using mailslots to send messages on the network
Using Path functions from Shell Lightweight Utility APIs (shlapi.dll)
Using the heap of the calling process to allocate memory blocks
Using vendor-neutral SQL constructs
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: 110  
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 (54.234.180.187)
4 sec.Function: 'PathFileExists'
Function group: 'Shell Lightweight Utility APIs -- Path Functions'
7 sec.Function: 'GetTempFileName'
1.61 hrs.Function: 'SQLBindCol'
Function group: 'ODBC API'
 Example: 'Power capabilities of the system: battery, UPS, sleep and hibernation modes, processor throttling'
2.76 hrs.Function: 'RegOpenKeyEx'
 Example: 'Obtaining the System and Windows folder names'
 Function: 'CreateProcess'
Function group: 'Process and Thread'
5.59 hrs.Example: 'How to retrieve number of objects in the Recycle Bin'
8.55 hrs.Function: 'GetTickCount'
 Function: 'GetActiveWindow'
Google
Advertise here!