![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 2
Rep Power: 0
![]() |
Using StringCchPrintfEx() instead of sprintf()
Hi everyone.
This one may be a stickler. I downloaded some sample source code from MSDN from the below link: http://msdn.microsoft.com/library/en...asp?frame=true The project 'BandObjs' is a simple example that demonstrates the implementation of the three types of band objects. These are Desk Bands, Explorer Bars and Communication Bands. In the source code 'BandObjs.cpp' I encountered the following line: hr = StringCchPrintfEx(szSubKey,
MAX_PATH,
ClsidEntries[i].szSubKey,
szCLSID);error C2065: 'StringCchPrintfEx' : undeclared identifier. So, since it wasn't included in the download I was able to find it in my Microsoft SDK\Include\strsafe.h file. So, I included this file in the project and recompiled it. After that I get the following error: error C2660: 'StringCchPrintfExA' : function does not take 4 parameters The definition of the function is given below: STRSAFEAPI StringCchPrintfExA(char* pszDest,
size_t cchDest,
char** ppszDestEnd,
size_t* pcchRemaining,
unsigned long dwFlags,
const char* pszFormat, ...)The problem that I am up against is that I don't know how to make it work. Does anyone know what I can do to the code so that I can get the desired results, either by changing the function definition or changing the function implementation? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|