$PBExportHeader$f_setplatform.srf $PBExportComments$PFC Plaform service Create/Destroy global type f_setplatform from function_object end type forward prototypes global function integer f_setplatform (ref n_cst_platform anv_platform, boolean ab_switch) end prototypes global function integer f_setplatform (ref n_cst_platform anv_platform, boolean ab_switch);////////////////////////////////////////////////////////////////////////////// // // Function: f_SetPlatform // // Access: public // // Arguments: // anv_Platform User Object of type n_cst_platform 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 Cross Platform object // ////////////////////////////////////////////////////////////////////////////// // // 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 // 12.0 Removed support fo ANSI Windows, AIX, HPUX and Solaris // ////////////////////////////////////////////////////////////////////////////// // /* * Open Source PowerBuilder Foundation Class Libraries * * Copyright (c) 2004-2017, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted in accordance with the MIT License * * https://opensource.org/licenses/MIT * * ==================================================================== * * 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 https://github.com/OpenSourcePFCLibraries */ // ////////////////////////////////////////////////////////////////////////////// // 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_platform) or not IsValid (anv_platform) then // create platform object based on platform choose case gnv_app.ienv_object.ostype case windows!, windowsnt! if gnv_app.ienv_object.CharSet = charsetunicode! then anv_platform = create n_cst_platformunicode else anv_platform = create n_cst_platform end if case else anv_platform = create n_cst_platform end choose return 1 end if else if IsValid (anv_platform) then destroy anv_platform return 1 end if end if return 0 end function
- Sources
- PFC2019
- ws_objects
- pfcapsrv
- pfcapsrv.pbl.src
- f_setplatform.srf
File: f_setplatform.srf
Size: 3081
Date: Sat, 08 May 2021 23:34:22 +0200
Size: 3081
Date: Sat, 08 May 2021 23:34:22 +0200
- function_object f_setplatform(srf)