OpenBindery

Opens the bindery (For cross-platform functionality, see Developing NLMs with Cross-Platform Functions ( NDK: NLM Development Concepts, Tools, and Functions) and call NWOpenBindery )

Local Servers:blocking
Remote Servers:blocking
Classification:3.x, 4.x, 5.x, 6.x
Service:Server-Based Bindery

Syntax

   #include <\nlm\nit\nwbindry.h>  
    
   int OpenBindery (void); 
   

Return Values

0

(0x00)

ESUCCESS

Remarks

The bindery files are normally kept open and locked. Therefore, this function is only required after CloseBindery is called. No other bindery calls can be serviced while the bindery is closed.

See Also

CloseBindery

OpenBindery Example

   #include <stdio.h>  
   #include <\nlm\nit\nwbindry.h>  
    
   main()  
   {  
   int  completionCode;  
    
   /*  NOTE: When the bindery is closed, most network functions  
       are disabled. Use the CloseBindery function with care.  
       Also, be sure to call OpenBindery before an endofjob  
       (EOJ) occurs. 
   */  
    
      completionCode = CloseBindery ();  
      printf ("completionCode = %d\n", completionCode);  
    
   /*  At this point, perform the steps you need (such as backing  
       up a networked system); then reopen the bindery before an  
       endofjob (EOJ) occurs. 
   */  
    
      completionCode = OpenBindery ();  
      printf ("completionCode from Open Bindery = %d\n",  
      completionCode);  
   }