bcc and TurboDebugger. TWindow. Good times. And, again, thanks for pointing out how old I am.
onwards and upwards...
bcc and TurboDebugger. TWindow. Good times. And, again, thanks for pointing out how old I am.
onwards and upwards...
This is what I use: keyboard duh[^]
onwards and upwards...
Could it be different default palettes?
onwards and upwards...
Disables warnings for "non-secure" functions such as strcpy, strcat, sprintf, etc. that have been "deprecated" due to the MS secure initiative, pushing people to strcat_s that is length validated to help prevent buffer overflows. These didn't exist in VC6.
onwards and upwards...
You probably will need to add _CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS; to your preprocessor defs to get it to compile without warnings.
onwards and upwards...
I need to send a client certificate with a web request (via SSL). This client cert is just a public key. I am trying to replicate the Request.ClientCertificates.Add(Cert); .NET method using C++/WinHTTP. I am loading the .cer file successfully and setting the CERT_CONTEXT via WinHttpSetOption/WINHTTP_OPTION_CLIENT_CERT_CONTEXT. This call succeeds, but when I call WinHttpSendRequest, it fails with ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY (12185). So, the question is, how do I send a client cert public key to the server, as the ClientCertificates.Add method does in .NET? Code snippet sample below:
BOOL HTTPCallEx::SendHTTPRequest(int iVerb /*=HTTPCALL_GET*/, LPCTSTR cpUID /*=NULL*/, LPCTSTR cpPWD /*=NULL*/)
{
WCHAR wcaVerb[16];
WCHAR wcaResource[1024];
m_dwLastError = 0;
switch (iVerb)
{
case HTTPCALL_POST:
lstrcpyW(wcaVerb,L"POST");
break;
case HTTPCALL\_HEAD:
lstrcpyW(wcaVerb,L"HEAD");
break;
case HTTPCALL\_PUT:
lstrcpyW(wcaVerb,L"PUT");
break;
case HTTPCALL\_DELETE:
lstrcpyW(wcaVerb,L"DELETE");
break;
case HTTPCALL\_OPTIONS:
lstrcpyW(wcaVerb,L"OPTIONS");
break;
case HTTPCALL\_TRACE:
lstrcpyW(wcaVerb,L"TRACE");
break;
case HTTPCALL\_CONNECT:
lstrcpyW(wcaVerb,L"CONNECT");
break;
case HTTPCALL\_GET:
default:
lstrcpyW(wcaVerb,L"GET");
break;
}
#ifdef UNICODE
_tcscpy(wcaResource,m_caResource);
#else
MultiByteToWideChar(CP_UTF8,0,m_caResource,-1,wcaResource,1024);
#endif
m_hRequest = WinHttpOpenRequest(m_hConnect,wcaVerb,wcaResource,NULL,WINHTTP_NO_REFERER,WINHTTP_DEFAULT_ACCEPT_TYPES,(m_bSSL ? WINHTTP_FLAG_SECURE : 0));
if (!m_hRequest)
{
m_dwLastError = ::GetLastError();
return FALSE;
}
if (cpUID && *cpUID)
{
WCHAR wcaUID[512];
WCHAR wcaPWD[512];
#ifdef UNICODE
_tcscpy(wcaUID,cpUID);
#else
MultiByteToWideChar(CP_UTF8,0,cpUID,-1,wcaUID,512);
#endif
if (cpPWD && \*cpPWD)
#ifdef UNICODE
_tcscpy(wcaPWD,cpPWD);
#else
MultiByteToWideChar(CP_UTF8,0,cpPWD,-1,wcaPWD,512);
#endif
else
wcaPWD[0] = 0;
if (!WinHttpSetCredentials(m\_hRequest,
WINHTTP\_AUTH\_TARGET\_SERVER,
WINHTTP
Ctrl+F5 no help. IE 9/Win7 with no ad blockers, but I do have Script Error reporting turned on as show here http://qa.pubsuite.com/JunkDir/CPErrorSettings.png[^]
onwards and upwards...
It seems that most pages produce the following error: http://qa.pubsuite.com/junkdir/CPerror.png[^] It is really annoying and hopefully can be resolved quickly.
onwards and upwards...
You can always create the modeless dialog via it's own UI thread. The issue is the modal dialog is preventing pumping of your messages.
onwards and upwards...
You would be much better off by using one connection and either returning multiple result sets from a stored procedure or using the MARS feature over a single connection.
onwards and upwards...
Call EndDialog() method to have the second dialog destroyed properly.
onwards and upwards...
pDC->MoveTo(x,y);
while(oPoint in points collection)
{
pDC->LineTo(oPoint.x,oPoint.y);
}
onwards and upwards...
Override the new/delete operators and use "placement new" syntax to alloc in a predetermined location, managed by you.
onwards and upwards...
Below is a code snippet that demonstrates creating a memory DC, calling functions that use std GDI funtions to draw onto the DC, extracting the BMP from the DC and doing something with it, and finally clean up: BOOL DoChart(CallContextObj *pCallContextObj) { CDC oMemDC; CBitmap *pOldBmp; CBitmap oBmp; long lWidth = 300; long lHeight = 200; pCallContextObj->GetParameterValue(_T("ChartWidth"),&lWidth); pCallContextObj->GetParameterValue(_T("ChartHeight"),&lHeight); CRect oBmpSize(0,0,lWidth,lHeight); oMemDC.CreateCompatibleDC(NULL); int iOldMapMode = oMemDC.SetMapMode(MM_TEXT); CWindowDC dcScreen(NULL); oBmp.CreateCompatibleBitmap(&dcScreen,oBmpSize.Width(), oBmpSize.Height()); pOldBmp = oMemDC.SelectObject(&oBmp); WORD wChartType = 88; pCallContextObj->GetParameterValue(_T("ChartType"),&wChartType); BOOL bRetval = FALSE; TCHAR caError[1024]; _tcscpy(caError,_T("Invalid Chart Type")); switch (wChartType) { case 0: bRetval = DoLineChart(pCallContextObj,&oMemDC,caError,oBmpSize); break; case 1: bRetval = DoBarChart(FALSE,pCallContextObj,&oMemDC,caError,oBmpSize); break; case 2: bRetval = DoBarChart(TRUE,pCallContextObj,&oMemDC,caError,oBmpSize); break; case 3: bRetval = DoOpenHiLowCloseChart(pCallContextObj,&oMemDC,caError,oBmpSize); break; case 4: bRetval = DoPieChart(pCallContextObj,&oMemDC,caError,oBmpSize); break; } if (bRetval) { char caHeaders[1024]; #ifdef UNICODE BYTE *cpBuf = (BYTE *)pCallContextObj->GetUTF8OutputBufferPtr(); #else BYTE *cpBuf = (BYTE *)pCallContextObj->GetOutputBufferPtr(); #endif long lQuality = 75; pCallContextObj->GetParameterValue(_T("ImageQuality"),&lQuality); long lDataSize = WriteImage(oBmp,cpBuf,pCallContextObj->GetOutputBufferSize(),caError,(DWORD)lQuality); if (lDataSize > 0) { pCallContextObj->SuppressHeaders(); sprintf(caHeaders,"Content-Type: image/jpeg\r\nContent-Length: %d\r\n\r\n",lDataSize); // write out our custom headers if (pCallContextObj->ServerSupportFunction(HSE_REQ_SEND_RESPONSE_HEADER,"200 OK",0,(LPDWORD)caHeaders) || ::GetLastError() == 10054) pCallContextObj->WriteClient((LPVOID)cpBuf,(LPDWORD)&lDataSize); *cpBu
Thanks! I'll look into that!
onwards and upwards...
Interesting... Thanks!
onwards and upwards...
If you do, I'd be happy to beta it!
onwards and upwards...
I am trying to extract individual SWFs to pump out to a web audience on command in a webcast. Additionally, I am trying to pumping out control messages to advance the next animation on each slide. So, client-side viewers are not an option. Currently, we extract pngs of the slides and generate web pages to reference them, but they are not scalable, nor interactive with builds and animations.
onwards and upwards...
Yes, however, I need the animations/builds to display on command.
onwards and upwards...
After googling for a couple of hours for some code samples, there seems to be no suitable libraries available for generating SWF files from PPT. Yes, there are many free and nearly free desktop tools around, but I need precise control over the output, running on the server-side, in a multi-threaded environment, without relying on PPT being installed. None of these tools provide this. Anyone know of some code libraries out there that do this and are callable from C++?
onwards and upwards...