ValentijnNK / miranda

Automatically exported from code.google.com/p/miranda
0 stars 0 forks source link

Question about the MS_DB_GETPROFILENAME / MS_DB_GETPROFILEPATH #1700

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by wishmaster51 on 16 Mar 2013 at 11:38