Ignore:
Timestamp:
Nov 7, 2008, 1:15:15 AM (17 years ago)
Author:
pr
Message:

Add missing xprf() functions. Fix broken ones also.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cppbase/bs_logger.cpp

    r341 r371  
    1515
    1616/*
    17  *      This file Copyright (C) 1999-2006 Ulrich M”ller.
     17 *      This file Copyright (C) 1999-2008 Ulrich M”ller.
    1818 *      This program is free software; you can redistribute it and/or modify
    1919 *      it under the terms of the GNU General Public License as published by
     
    4848// include's from helpers
    4949#include "helpers\prfh.h"
     50#include "helpers\xprf.h"
    5051#include "helpers\xstring.h"
    5152
     
    273274 *      Note: if the logger is currently empty, this will delete
    274275 *      the given INI key.
     276 *
     277 *@@changed WarpIN V1.0.18 (2008-10-06) [pr]: added Store(PXINI...)
    275278 */
    276279
     
    283286}
    284287
     288BOOL BSMemLoggerBase::Store(PXINI pXIni,            // in: INI handle
     289                            const char *pszApp,   // in: INI application
     290                            const char *pszKey)   // in: INI key
     291                   const
     292{
     293    return (xprfWriteProfileData(pXIni, pszApp, pszKey, _pabLogString, _cbLogString));
     294}
     295
    285296/*
    286297 *@@ Load:
     
    289300 *
    290301 *      Returns TRUE if data was found.
    291  */
    292 
    293 BOOL BSMemLoggerBase::Load(HINI hini,             // in: INI handle
     302 *
     303 *@@changed WarpIN V1.0.18 (2008-10-06) [pr]: added Load(PXINI...)
     304 */
     305
     306BOOL BSMemLoggerBase::Load(HINI hini,          // in: INI handle
    294307                        const char *pszApp,    // in: INI application
    295308                        const char *pszKey)    // in: INI key
     
    301314                                         (PSZ)pszKey,
    302315                                         &_cbLogString);
     316    return (_pabLogString != 0);
     317}
     318
     319BOOL BSMemLoggerBase::Load(PXINI pXIni,        // in: INI handle
     320                        const char *pszApp,    // in: INI application
     321                        const char *pszKey)    // in: INI key
     322{
     323    if (_pabLogString)
     324        free(_pabLogString);
     325    _pabLogString = xprfhQueryProfileData(pXIni,
     326                                          (PSZ)pszApp,
     327                                          (PSZ)pszKey,
     328                                          &_cbLogString);
    303329    return (_pabLogString != 0);
    304330}
Note: See TracChangeset for help on using the changeset viewer.