$PBExportHeader$f_setfilesrv.srf $PBExportComments$PFC File Service Create/Destroy global type f_setfilesrv from function_object end type forward prototypes global function integer f_setfilesrv (ref n_cst_filesrv anv_filesrv, boolean ab_switch) end prototypes global function integer f_setfilesrv (ref n_cst_filesrv anv_filesrv, boolean ab_switch);////////////////////////////////////////////////////////////////////////////// // // Function: f_SetFileSrv // // Access: public // // Arguments: // anv_Filesrv User Object of type n_cst_filesrv that will be created - passed by reference // ab_Switch True - start (create) the object // False - stop (destroy) the object // // Returns: Integer // 1 - Successful operation. // 0 - No action taken. // -1 - An error was encountered. // // Description: Creates/Destroys the file handler object (platform-specific) // ////////////////////////////////////////////////////////////////////////////// // // Revision History // // Version // 5.0 Initial version // 5.0.02 Added support for Macintosh, Solaris, and Windows NT. // 5.0.02 Added argument and error checking. // 5.0.03 Fixed Creation of 16 bit service for 16 bit exe running under NT // 6.0 Added support for Unix version on AIX (IBM) and HPUX (HP) // 6.0.02 Added support for Unicode. // 7.0 Removed support for 16-bit and Macintosh services ////////////////////////////////////////////////////////////////////////////// // /* * Open Source PowerBuilder Foundation Class Libraries * * Copyright (c) 2004-2005, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted in accordance with the GNU Lesser General * Public License Version 2.1, February 1999 * * http://www.gnu.org/copyleft/lesser.html * * ==================================================================== * * This software consists of voluntary contributions made by many * individuals and was originally based on software copyright (c) * 1996-2004 Sybase, Inc. http://www.sybase.com. For more * information on the Open Source PowerBuilder Foundation Class * Libraries see http://pfc.codexchange.sybase.com */ // ////////////////////////////////////////////////////////////////////////////// // Argument and error checking. If IsNull(ab_switch) Then Return -1 If IsNull(gnv_app) Or Not IsValid(gnv_app) Then Return -1 if ab_switch then if IsNull (anv_filesrv) or not IsValid (anv_filesrv) then // create file service object based on platform choose case gnv_app.ienv_object.ostype case windows!, windowsnt! if gnv_app.ienv_object.CharSet = charsetunicode! then anv_filesrv = create n_cst_filesrvunicode else anv_filesrv = create n_cst_filesrvwin32 end if case sol2! anv_filesrv = create n_cst_filesrvsol2 case hpux! anv_filesrv = create n_cst_filesrvhpux case aix! anv_filesrv = create n_cst_filesrvaix case else anv_filesrv = create n_cst_filesrv end choose return 1 end if else if IsValid (anv_filesrv) then destroy anv_filesrv Return 1 end if end if Return 0 end function
File: f_setfilesrv.srf
Size: 3240
Date: Tue, 22 Jan 2008 23:28:49 +0100
Size: 3240
Date: Tue, 22 Jan 2008 23:28:49 +0100
- function_object f_setfilesrv(srf)