   Help for MSlot

The Mailslot control provides simple interprocess communcation between programs running on the same or different computers running Windows for Workgroups.

This control enables you to create and use Windows for Workgroups mailslots.  A mailslot is an application-defined buffer that receives and holds messages.  Applications create mailslots so that they can receive text or data from other applications on one or more computers in a network.

Registration Information

Order Form

Getting Custom Controls Written

Properties


Properties

MSlot has the following custom properties:

Action

MailslotName

MailslotSize

Message

MessageSize

NextPriority

NextSize

Priority

Timeout


Action Property

Description

Specifies the type of mailslot function to execute.

Usage

[form.][label.]Angle[=angle%]

Remarks

The Action property settings are:

Setting	Mailslot Action

0	No Action

1	Create - Create a mailslot

2	Delete - Delete a mailslot

3	Write - Write to a mailslot

4	Read - Read from a mailslot

5	Peek - Determine a mailslots status

This property is not available at design time.

Data Type

Integer (enumerated)


Create Action

Creates a new mailslot on the local computer.

Before executing the Create action, you must first set the MailslotName, MailslotSize, and MessageSize properties.


Delete Action

Deletes a mailslot.  An error occurs if the mailslot has not been created.


Write Action

Writes a message to the mailslot.  Before invoking the Write action, you must first set the MailslotName and Message properties.


Read Action

Reads a message from the mailslot.  Before invoking the Read action, you must first create the mailslot.


Peek Action

Checks to see if any messages are available.  Before invoking the Peek action, you must first create the mailslot.


MailslotName Property

Description

Specifies the name of the mailslot.

Usage

[form.][label.]MailslotName[=name$]

Remarks

This specifies the name of the mailslot managed by this control.  The mailslot name can have one of the following formats:

Format	Meaning

\mailslot\mailslotname	This format represents a mailslot named mailslotname on the local computer.

\\computername\mailslot\mailslotname	This format represents a mailslot named mailslotname on the computer specified by computername.

\\workgroupname\mailslot\mailslotname	This format represents a mailslot named mailslotname on all computers in the workgroup specified by workgroupname.  If workgroupname is an asterisk (*), this format creates a mailslot on all computers in the workgroup of the current computer.

Data Type

String


MailslotSize Property

Description

Specifies the maximum number of bytes available in the mailslots buffer.

Usage

[form.][label.]MailslotName[=size%]

Remarks

This property specifies the size, in bytes, of the mailslot.  This parameter must be zero, or it must be equal to or exceed the size of the MessageSize property.  If this value is zero, the Create Action sets a value based on MessageSize.

This property is read-only at run-time.

Data Type

Integer


Message Property

Description

Buffer in which data is transfered.

Usage

[form.][label.]Message[=data$]

Remarks

This property contains the most recently read message after invoking the Read Action.

It also is the buffer where information should be written prior to invoking the Write Action.

This is not available at design time.

Data Type

String


MessageSize Property

Description

Specifies the maximum number of bytes that can be written to a mailslot.

Usage

[form.][label.]MessageSize[=size%]

Remarks

This property is only used when the mailslot is created.

Windows for Workgroups places a limit of 400 bytes on the MessageSize property.

Data Type

Integer (1-400)


NextPriority Property

Description

Gives the priority of the next message, if any, in the mailslot.

Usage

[form.][label.]NextPriority

Remarks

Contains the priority (0 through 9) of the next message in the mailslot.  This priority value is valid only if the NextSize parameter is greater than zero.

This property is updated each time a Read or Peek Action is invoked.  This property is read-only at run-time and is not available at design time.

Data Type

Integer (0-9)


NextSize Property

Description

Gives the size of the next message, if any, in the mailslot.

Usage

[form.][label.]NextSize

Remarks

Contains the size, in bytes, of the next message in the mailslot.  If the mailslot does not contain another message, the NextSize property is set to zero.

This property is updated each time a Read or Peek Action is invoked.  This property is read-only at run-time and is not available at design time.

Data Type

Integer (0-9)


Priority Property

Description

Priority of the next message sent, or the previous message read.

Usage

[form.][label.]NextPriority[ = priority%]

Remarks

Specifies the message priority (0 through 9).  High-priority messages are generally placed ahead of previously stored messages that have lower priority.

This property is not available at design time.

Data Type

Integer (0-9)


Timeout Property

Description

Sets the maximum amount of time to write for a message to be written or read.

Usage

[form.][label.]Timeout[ = time%]

Remarks

Specifies how many milliseconds to wait if a message is not immediately available for a Read Action, or how many milliseconds to wait on a Write Action if the mailslot is full.

If this value is set to zero, Read and Write actions dont wait.  If this is set to -1, an action will wait indefinitely.

Data Type

Integer


 MSlot Order Form

Use the Print Topic... command from the File menu to print this order form.

Mail this	Mabry Software

form to:	Post Office Box 31926

Seattle, WA  98103-1926

Fax: 206-632-0272

CompuServe: 71231,2066

Internet: mabry@halcyon.com

Where did you get this copy of MSlot?

_______________________________________________________________

Ship to:	_______________________________________________________________

_______________________________________________________________

_______________________________________________________________

_______________________________________________________________

_______________________________________________________________

Phone:	_____________________________

Fax:	_____________________________

CompuServe:	_____________________________

Internet:	_____________________________

qty ordered	_____	REGISTRATION

$30 each, postpaid (check or money order in hard currency).  Foreign addressed add $2.00 shipping.  No additional shipping charges to Canada or Mexico.

qty ordered	_____	SOURCE CODE AND REGISTRATION

$50 each, postpaid  (check or money order in hard currency).  Foreign addresses add $5.00 shipping.  No additional shipping charge to Canada.


About MSlot

MSlot was written by Zane Thomas.  He can be reached on CompuServe at 72060,3327 or on Internet at 72060.3327@compuserve.com.  His mailing address is:

Zane Thomas

P.O. Box 300

Indianola, WA  98342

Technical support, inquiries, and general comments about this control should be sent to James Shields.  His address on CompuServe is 71231,2066  His Internet address is mabry@halcyon.com.  If you must send something via U.S. Mail, the address is:

James Shields

Mabry Software

P.O. Box 31926

Seattle, WA  98103-1926

You can register this program by sending $30 ($32 for international orders) and your address.  CompuServe members may register by sending $25 and their account number (the registered version will be E-mailed to you).  CompuServe members may also register this package by going to the SWREG forum.  MSlot is registered there.  MSlot's registration ID number is 1328.

Source code (which includes a registered copy) to this control is available for $50 ($55 for international orders).  With source code you get a registered version of the control.  If you are a CompuServe member, you may get the source code in the Software Registration forum (GO SWREG) for $45.  Its registration number is.

(C) Copyright 1993 by Zane Thomas and James Shields


Getting Custom Controls Written

If you or your organization would like to have custom controls written, contact either me or Zane Thomas (co-author of the Waite Group's VB How-To, 2nd Edition).  Here's how we can be reached:

James Shields

CompuServe: 71231,2066

US Mail: P.O. Box 31926; Seattle, WA 98103-1926

Zane Thomas:

CompuServe: 72060,3327

US Mail: P.O. Box 300; Indianola, WA  98342