Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/compiler/PervEnv/Win32/win32-general.sml
ViewVC logotype

View of /sml/trunk/src/compiler/PervEnv/Win32/win32-general.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 114 - (download) (annotate)
Fri Jun 5 19:41:21 1998 UTC (22 years, 1 month ago) by monnier
File size: 1181 byte(s)
This commit was generated by cvs2svn to compensate for changes in r113,
which included commits to RCS files with non-trunk default branches.
(* win32-general.sml
 *
 * COPYRIGHT (c) 1996 Bell Laboratories.
 *
 * General Win32 stuff.
 *
 *)

structure Win32_General : WIN32_GENERAL = 
    struct
	structure Word = Word32
	type word = Word.word

	type hndl = word
	type system_time = {year: int,
			    month: int,
			    dayOfWeek: int,
			    day: int,
			    hour: int,
			    minute: int,
			    second: int,
			    milliSeconds: int}
	
	val arcSepChar = #"\\"

	local
	    fun cfun' lib name = CInterface.c_function lib name
	    val sayDebug' : string -> unit = cfun' "WIN32" "debug"
	in
	    val sayDebug = (* sayDebug' *) fn _ => ()
	    val log : string list ref = ref []
	    fun logMsg s = (log := s :: (!log);
			    sayDebug s)
	    fun cfun lib name = 
		(logMsg ("binding C function <"^lib^":"^name^">...");
		 cfun' lib name
		   before
		 logMsg "bound\n")
	end

	val getConst' : (string * string) -> word = 
	    cfun "WIN32" "get_const"
	fun getConst kind name = getConst'(kind,name)

	val getLastError : unit -> word = cfun "WIN32" "get_last_error"

	val INVALID_HANDLE_VALUE = getConst "GENERAL" "INVALID_HANDLE_VALUE"
	fun isValidHandle (h : word) = h <> INVALID_HANDLE_VALUE

    end

(*
 * $Log$
 *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0