Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Switching between keyboard layouts
How to control Adobe Reader 9.0 (SDI mode) from VFP application
Extensible Storage Engine class library
Moving shortcut to a specified position on the Windows Desktop
Retrieving local computer and user names
GDI+: reading and writing metadata in JPEG and TIFF files
Terminating all running applications from a VFP program
Writing entries to custom Event Log
Bitmap Class for Visual FoxPro application
How to display a user-defined icon in the MessageBox dialog
Setting the date and time that a file was created
Using Font and Text functions
How to print picture stored in enhanced-format metafile (*.emf)
Reading the structure of VFP main menu
Using WM_COPYDATA for interprocess communication (VFP9)
Detecting changes in connections to removable drives (VFP9)
How to activate Windows Calculator
How to display the Properties dialog box for a file (ShellExecuteEx)
How to make a VFP form fading out when released (GDI+ version)
Simple Window Viewer
Creating the Open dialog box to specify the drive, directory, and name of a file to open
Winsock: retrieving Web pages using sockets (HTTP, port 80)
Displaying the associated icons and descriptions for files and folders
Form Magnifier
Winsock: connecting to a news server (NNTP, port 119)

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
Before you begin:
This sample shows how to retrieve a list of newsgroups stored on a news server. The base class contains practically all methods to extend this code for reading and posting messages to a newsgroup.



The code connects to NNTP server news.microsoft.com. Any other NNTP server can be used.
 
  Members area. Log in to view this example.
 
  User name:
  Password:
 
 
  Forgot your password?
 
  Sign up for
the Membership
 
 


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
9824 bytes  
Created: 2003-02-23 10:42:07  
Modified: 2011-12-10 09:20:22  
Visits in 7 days: 184  
Listed functions:
closesocket
gethostbyname
GlobalAlloc
GlobalFree
GlobalSize
htons
inet_addr
inet_ntoa
recv
send
socket
WSACleanup
WSACloseEvent
WSAConnect
WSACreateEvent
WSAEventSelect
WSAGetLastError
WSARecv
WSASend
WSAStartup
WSAWaitForMultipleEvents
Printer friendly API declarations
My comment:
Some useful links:
  • RFC977. Network News Transfer Protocol
  • Network News Transfer Protocol on freesoft.org
  • How to use Winsock Control in order to build Internet applications


    #kwd: sln_winsock.
  • Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    User Contributed Notes:
    johnk@spectrumdata.com | 2006-05-15 15:39:40
    This example does not work. WS_Connect cannot find entry point in dll
    A.M. | 2006-05-15 16:11:30
    Replace line
    nResult = ws_connect(hSocket, @cBuffer, Len(cBuffer))

    with
    DECLARE INTEGER WSAConnect IN ws2_32;
        INTEGER s, STRING @sname, INTEGER namelen,;
        INTEGER lpCallerData, INTEGER lpCalleeData,;
        INTEGER lpSQOS, INTEGER lpGQOS

    nResult = WSAConnect(hSocket, @cBuffer, Len(cBuffer), 0, 0, 0, 0)

    It may work better.

    Copyright 2001-2017 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.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.198.35.26)
    11 sec.Example: 'How to retrieve adapter information for the local computer (including MAC address)'
    21 sec.Function: 'bind'
    Function group: 'Windows Sockets 2 (Winsock)'
    33 sec.Example: 'Using FrameRgn for displaying system colors'
    46 sec.Function: 'RtlCompressBuffer'
    57 sec.Function: 'CeDeleteFile'
    Function group: 'Remote Application Programming (RAPI)'
    1.12 min.Function: 'RegCreateKeyEx'
    1.27 min.Example: 'Creating the Save dialog box to specify the drive, directory, and name of a file to save'
    1.45 min.Example: 'GDI+: sending image of FoxPro form to printer'
    1.65 min.Function: 'FindText'
    1.82 min.Function: 'GetForegroundWindow'
    Function group: 'Window'
    Google
    Advertise here!