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); When I first compiled the project I got the following error:
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, ...) From what I can gather from reading the 'strsafe.h' file about the function it is a replacement for the 'sprintf()' function. As you can see the function takes 6 parameters while the implementation of it is only passes 4 parameters. I tried using NULLs as the last two parameters but that didn't work. I just got another compiler error message.
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?