共用方式為


提交佇列

如果要在佇列承諾期間呼叫預設回呼函式,則需使用 SetupInitDefaultQueueCallbackSetupInitDefaultQueueCallbackEx 函式來先初始化它的上下文。 如果您使用永遠不會呼叫預設回呼函式的自定義回呼函式,則不需要此步驟。

建置佇列並初始化將處理佇列通知的回呼函式之後,您可以呼叫 SetupCommitFileQueue 來認可已加入佇列的作業。

下列範例會使用 SetupCommitFileQueue,透過預設回呼例程認可佇列。

test = SetupCommitFileQueue (
     OwnerWindow,          //window that will own dialog boxes
                           //created by the callback routine
     MyQueue,              //the queue to commit
  
                           //use the default callback routine
     SetupDefaultQueueCallback,  
  
     Context               //context information that will be 
                           //  used by the callback routine
);

在上述範例中,MyQueue 是要提交的佇列,OwnerWindow 是將擁有由預設回呼常式建立的任何對話方塊的視窗,SetupDefaultQueueCallback 指定將使用預設回呼函式,而 Context 是先前呼叫 SetupInitDefaultQueueCallback所返回結構體的指標。