Using Win32 functions in Visual FoxPro Image Gallery
Message and Message Queue
..msdn
BroadcastSystemMessage
GetQueueStatus
MQCloseQueue
MQDeleteQueue
MQHandleToFormatName
MQOpenQueue
MQPathNameToFormatName
MQPurgeQueue
PeekMessage
PostMessage
PostQuitMessage
SendMessage
Code examples:
MQPurgeQueue
..msdn    Add comment     W32 Constants      Translate this page
Deletes all of the messages in a queue.
Code examples:
Declaration:
HRESULT APIENTRY MQPurgeQueue(
  HANDLE hQueue
);
FoxPro declaration:
DECLARE INTEGER MQPurgeQueue IN mqrt;
    INTEGER hQueue
Parameters:
hQueue
[in] The handle to the queue to be purged.
Return value:
MQ_OK (0) indicates success.
Usage:
cQueueName = STRCONV("DIRECT=OS:mycomputer\private$\samplequeue", 5)

hQueue = 0
nResult = MQOpenQueue(;
    m.cQueueName,;
    MQ_RECEIVE_ACCESS,;
    MQ_DENY_NONE, @hQueue)

IF nResult <> MQ_OK
    ? "MQOpenQueue failed:", TRANSFORM(nResult, "@0")
    RETURN
ENDIF

nResult = MQPurgeQueue(m.hQueue)
? "nResult:", TRANSFORM(m.nResult, "@0")

= MQCloseQueue(hQueue)
My comment:
See also: MQOpenQueue, MQCloseQueue

#DEFINE MQ_ERROR_INVALID_HANDLE 0xC00E0007
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2015-06-29 16:27:07
Modified: 2015-06-29 16:31:35
Visited in last 7 days: 7
User Contributed Notes:
There are no notes on this subject.


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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.226.34.209)
15 sec.Function: 'GetProcessHeaps'
Google
Advertise here!