Export to GitHub

miranda - issue #1700

Question about the MS_DB_GETPROFILENAME / MS_DB_GETPROFILEPATH


Posted on Mar 16, 2013 by Happy Horse

Hi, as in the documentation of that file:

/**************************************************************/ /********************* SERVICES ***************************/ /**************************************************************/

/* DB/Contact/GetProfileName service Gets the name of the profile currently being used by the database module. This is the same as the filename of the database wParam=(WPARAM)(UINT)cbName lParam=(LPARAM)(char*)pszName pszName is a pointer to the buffer that receives the name of the profile cbName is the size in bytes of the pszName buffer Returns 0 on success or nonzero otherwise */

define MS_DB_GETPROFILENAME "DB/GetProfileName"

define MS_DB_GETPROFILENAMEW "DB/GetProfileNameW"

/* DB/Contact/GetProfilePath service Get the path of the base folder where Miranda will store all individual profiles The returned path does NOT include a trailing backslash. Essentially this is what has been set in mirandaboot.ini as ProfileDir. For more options to retrieve profile paths check MS_UTILS_REPLACEVARS wParam=(WPARAM)(UINT)cbName lParam=(LPARAM)(char*)pszName pszName is a pointer to the buffer that receives the path of the profile cbName is the size in bytes of the pszName buffer Returns 0 on success or nonzero otherwise */

define MS_DB_GETPROFILEPATH "DB/GetProfilePath"

define MS_DB_GETPROFILEPATHW "DB/GetProfilePathW"

if defined( _UNICODE )

    #define MS_DB_GETPROFILEPATHT MS_DB_GETPROFILEPATHW
    #define MS_DB_GETPROFILENAMET MS_DB_GETPROFILENAMEW

else

    #define MS_DB_GETPROFILEPATHT MS_DB_GETPROFILEPATH
    #define MS_DB_GETPROFILENAMET MS_DB_GETPROFILENAME

endif

The documentation seems to be wrong. wParam seems to be the size in CHARACTERS, NOT the size in BYTES.

Status: New

Labels:
Type-Bug Priority-Medium