Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Creating a mailslot
Peer-to-peer LAN messenger built with Mailslot API functions
..msdn    Add comment     W32 Constants      Translate this page
The CreateMailslot function creates a mailslot with the specified name and returns a handle that a mailslot server can use to perform operations on it.
Code examples:
Peer-to-peer LAN messenger built with Mailslot API functions
Creating a mailslot
HANDLE CreateMailslot(
  LPCTSTR lpName,                 // mailslot name
  DWORD nMaxMessageSize,          // maximum message size
  DWORD lReadTimeout,             // read time-out interval
  LPSECURITY_ATTRIBUTES lpSecAttr // inheritance option
FoxPro declaration:
DECLARE INTEGER CreateMailslot IN kernel32;
    STRING  lpName,;
    INTEGER nMaxMessageSize,;
    INTEGER lReadTimeout,;
    INTEGER lpSecurityAttributes
[in] Pointer to a null-terminated string specifying the name of the mailslot.

[in] Specifies the maximum size, in bytes, of a single message that can be written to the mailslots.

[in] Specifies the amount of time, in milliseconds, a read operation can wait for a message to be written to the mailslot before a time-out occurs.

[in] Pointer to a SECURITY_ATTRIBUTES structure.
Return value:
If the function succeeds, the return value is a handle to the mailslot, for use in server mailslot operations.
My comment:
The mailslot exists until one of the following conditions is true:
  • The last (possibly inherited or duplicated) handle to it is closed using the CloseHandle function.
  • The process owning the last (possibly inherited or duplicated) handle exits.

    The system uses the second method to destroy mailslots.
  • Word Index links for the CreateMailslot :
    Translate this page:
      Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
    Created: 2002-01-26 14:23:46
    Modified: 2002-01-26 14:30:31
    Visited in last 7 days: 57
    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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (
    7 sec.
    Function group: 'Multiple Display Monitors'
    13 sec.Function: 'ControlService'
    20 sec.Function: 'DrawDibClose'
    25 sec.
    Function group: 'Registry'
    32 sec.Function: 'GetCapture'
    38 sec.Function: 'GdipTranslateWorldTransform'
    45 sec.
    Function group: 'Printing and Print Spooler'
    52 sec.Function: 'CloseWindow'
    57 sec.Function: 'FindExecutable'
    1.03 min.Function: 'DeleteService'
    Advertise here!