Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Custom GDI+ class
Splash Screen for the VFP application
Subclassing CommandButton control to create BackColor property
Obtaining names and positions for shortcuts located on the Windows Desktop
Enumerating devices installed on the local machine
How to make a VFP form fading out when released (GDI version)
Displaying dimmed window behind VFP top-level form
How to put a vertical text scrolling on the form (a movie cast)
GDI+: Implementing image scrolling with inertia
Printing text with the Escape function
Moving shortcut to a specified position on the Windows Desktop
How to put a horizontal text scrolling on the form (a news line, marquee)
Storing content of the Clipboard to a bitmap file
Vertical Label control
Disconnecting USB Mass Storage Device programmatically
Monitoring clipboard content changes (VFP9)
System Image List Viewer
Detecting changes in connections to removable drives (VFP9)
How to play AVI file on the _screen
How to enable the SE_SHUTDOWN_NAME privilege for the application
Creating a console window for Visual FoxPro application
How to ping a remote site using ICMP API calls
Class library providing access to the System Registry
Enumerating Processes -- WinNT
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: 70  
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-2018 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.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.167.126.106)
5 sec.Function: 'GetDriveType'
Function group: 'File Management'
7 sec.Function: 'AVIFileWriteData'
Function group: 'Windows Multimedia'
10 sec.Function: 'capGetDriverDescription'
Function group: 'Windows Multimedia'
12 sec.Function: 'RollbackTransaction'
15 sec.Function: 'MoveFile'
Function group: 'File Management'
17 sec.Example: 'Pocket PC: custom RAPI class for operating with files and folders on mobile device'
23 sec.Function: 'StrFromTimeInterval'
Function group: 'String'
25 sec.Function: 'GetPriorityClass'
Function group: 'Process and Thread'
27 sec.Function: 'CeEnumDBVolumes'
Function group: 'Remote Application Programming (RAPI)'
29 sec.Function: 'OpenFile'
Function group: 'File Management'
Google
Advertise here!