ocaml / otherlibs / win32unix / startup.c

xleroy 97fb777 

doligez 6cd742a 
xleroy 97fb777 



xleroy 06a1e11 
xleroy 0357d04 

xleroy 97fb777 






frisch 9cc8769 
xleroy a417f48 
xleroy 97fb777 


xleroy 9eaedc5 
xleroy 97fb777 











xleroy a417f48 

xleroy 97fb777 


xleroy 9eaedc5 
xleroy 97fb777 

xleroy a417f48 

xleroy 97fb777 
xleroy a417f48 
xleroy 97fb777 
/***********************************************************************/
/*                                                                     */
/*                                OCaml                                */
/*                                                                     */
/*  Xavier Leroy and Pascal Cuoq, projet Cristal, INRIA Rocquencourt   */
/*                                                                     */
/*  Copyright 1996 Institut National de Recherche en Informatique et   */
/*  en Automatique.  All rights reserved.  This file is distributed    */
/*  under the terms of the GNU Library General Public License, with    */
/*  the special exception on linking described in file ../../LICENSE.  */
/*                                                                     */
/***********************************************************************/

#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <mlvalues.h>
#include "winworker.h"
#include "windbug.h"

value val_process_id;

CAMLprim value win_startup(unit)
     value unit;
{
  WSADATA wsaData;
  int i;
  HANDLE h;

  (void) WSAStartup(MAKEWORD(2, 0), &wsaData);
  DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(),
                  GetCurrentProcess(), &h, 0, TRUE,
                  DUPLICATE_SAME_ACCESS);
  val_process_id = Val_int(h);

  worker_init();

  return Val_unit;
}

CAMLprim value win_cleanup(unit)
     value unit;
{
  worker_cleanup();

  (void) WSACleanup();

  return Val_unit;
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.