|
Hi
I needed to develop HTTP listener in C++. This listener should support SSL. After searching for the technology for this I chose HTTP API which seems to support SSL. First I developed all the functionality of the listener and added request handlers. So now HTTP works well.
I started to add SSL support. Step-by-step I did all the recommendations found in MSDN: added certificate to the store with HttpSetServiceConfiguration (checked with httpcfg - it is there), and changed scheme in URLs to "https".
And... HTTPS does not work. I have absolutely no idea why. I even do not have an idea how to get know why. There are no errors (no errors even in HTTP API logs). HTTP Requests are not accepted. Port is opened but when I try to send data server just disconnects. The requests is not received by the service. Seems like it is rejected inside HTTP API.
Please help! How can I get this work? How, at least, I can get the reason why it does not work?
Thanks,
Andriy
Andriy Lesyuk
|
|
|
|
|
I feel I have to answer your question, since noone else does.
I know nothing about HTTP API, but if it doesn't work, maybe you could use OpenSSL for the https sessions?
That solution is used in one of the programs I'm responsible for maintaining. (I didn't write it, though). Works well.
It uses winsock for http sessions and OpenSSL for https.
|
|
|
|
|
To use winsock + OpenSSL i need to rewrite almost all code. I'm not sure that this is acceptable way out.
|
|
|
|
|
how can i set font to my edit contol
sree.
|
|
|
|
|
|
can u give me some more information,
or any examples or links,
sree.
|
|
|
|
|
I think SetFont can help you.
CFont m_MyFont;
m_MyFont.CreateFont(14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Courier New");
m_cMyEditControl.SetFont(&m_MyFont);
|
|
|
|
|
thank u i got it.
bye
sree.
|
|
|
|
|
see
<br />
CFont m_FontEdit;<br />
CFontDialog m_dlg;<br />
if(m_dlg.DoModal()==IDOK)<br />
{<br />
FontEdit.CreateFontIndirect(&m_dlg.m_lf);<br />
m_Edit.SetFont(&m_FontEdit);<br />
}<br />
whitesky
|
|
|
|
|
While it appears that your CFont object is a member, it might be worth saying that the CFont object used with CWnd::SetFont(...) should not be destroyed until after the control using it is done with it (or has been destroyed). (At least - I think it has to hang around...)
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
how to remove default OK CANCEL APPLY HELP button from bottom of property sheet and our oun button
please mail
rahul
|
|
|
|
|
Hi,
You can't remove those buttons, but can hide. To hide back button use the below code.
CWnd* pWnd = GetDlgItem(ID_WIZBACK);<br />
if(pWnd)<br />
{<br />
pWnd->ShowWindow(SW_HIDE);<br />
}<br />
Adios,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
thanx for solution
prashant jain malviya national institute of technology
|
|
|
|
|
Hi
What would be the best way of comparing two dates, so i am left with the difference in days
between the two dates
thanks
si
|
|
|
|
|
|
See Here[^]maybe it is some helpful to you
whitesky
|
|
|
|
|
I'm developing a piece of equipment that requires me to send data via USB. I open a text file and click another button to send it.
I found CFileDialog crashes with an access violation after about the third 'visit' to my desktop. This happens whether I open a file or not.
I thought it might be something in MFC, so I created a simple SDK app and used the following:
OPENFILENAME ofn; <br />
char szFile[1000];<br />
<br />
szFile[0] = '\0'; <br />
ZeroMemory(&ofn, sizeof(OPENFILENAME));<br />
ofn.lStructSize = sizeof(ofn);<br />
GetOpenFileName(&ofn);
This is the ONLY code I added to the bare app. And this crashes too. Only when visiting the desktop and only on the third or fourth 'visit'. I haven't tried it on other machines / OS. I'm running XP Pro SP2.
RA
|
|
|
|
|
You may have to initialize other members of the OPENFILENAME structure.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I have tried all that! It makes no apparent difference what I initialise and what I don't. It also happens for both CFileDialog and GetOpenFileName.
RA
|
|
|
|
|
your problem is GetOpenFileName or you get a error when use this function
whitesky
|
|
|
|
|
The application crashes. I get a message box: "Unhandled exception in BareSDKTest.exe (SHELL32.DLL): 0xC0000005: Access Violation". When not debugging, the app just ends.
Interestingly, it seems to happen as the little box with the information about the file under the mouse pointer pops up.
It only happens when I access the desktop, only on the third or fourth occasion and only when the mouse goes to select a file. It also happens if I use the tab/cursor keys.
It doesn't happen with other directories. The file type under the mouse makes no difference either.
RA
|
|
|
|
|
|
Thanks! That's really useful. I also have Acrobat 7.0 and have experienced exactly the symptoms described.
At least it's not me!
RA
|
|
|
|
|
im not sure your problem is this but can you run this code ,please and send me that it work or you get previous error
<br />
OPENFILENAME m_ofn;<br />
static char lpFile[260];<br />
LPCSTR szFilter="";<br />
memset(&m_ofn, 0, sizeof(m_ofn));<br />
m_ofn.lStructSize = sizeof(OPENFILENAME);<br />
m_ofn.hwndOwner = m_hWnd;<br />
m_ofn.hInstance = AfxGetApp()->m_hInstance;<br />
m_ofn.lpstrFilter = szFilter;<br />
m_ofn.lpstrCustomFilter = NULL;<br />
m_ofn.nMaxCustFilter = 0;<br />
m_ofn.nFilterIndex = 0;<br />
m_ofn.lpstrFile = lpFile;<br />
<br />
m_ofn.nMaxFile = sizeof(lpFile);<br />
m_ofn.lpstrFileTitle = 0;<br />
m_ofn.nMaxFileTitle = 0;<br />
m_ofn.lpstrInitialDir = NULL;<br />
<br />
m_ofn.lpstrTitle = "Open a File";<br />
m_ofn.nFileOffset = 0;<br />
m_ofn.nFileExtension = 0;<br />
m_ofn.lpstrDefExt = NULL;<br />
m_ofn.lCustData = 0;<br />
m_ofn.lpfnHook = NULL;<br />
m_ofn.lpTemplateName = NULL;<br />
<br />
m_ofn.Flags = OFN_EXPLORER|OFN_HIDEREADONLY;<br />
GetOpenFileName(&m_ofn);<br />
whitesky
|
|
|
|
|
Thank you for your help. I had to slightly alter the code you sent:
char szFilter[256];<br />
OPENFILENAME m_ofn;<br />
<br />
char file[256];<br />
char* lpFile;<br />
.<br />
.<br />
.<br />
case ID_FILE_WHITESKYOPEN:<br />
lpFile = file;<br />
*lpFile = '\0';<br />
ZeroMemory(&m_ofn, sizeof(OPENFILENAME));<br />
<br />
m_ofn.lStructSize = sizeof(ofn);<br />
m_ofn.hInstance = hInst;<br />
m_ofn.lpstrFilter = szFilter;<br />
m_ofn.lpstrCustomFilter = NULL;<br />
m_ofn.nMaxCustFilter = 0;<br />
m_ofn.nFilterIndex = 0;<br />
m_ofn.lpstrFile = lpFile;<br />
<br />
m_ofn.nMaxFile = sizeof(lpFile);<br />
m_ofn.lpstrFileTitle = 0;<br />
m_ofn.nMaxFileTitle = 0;<br />
m_ofn.lpstrInitialDir = NULL;<br />
<br />
m_ofn.lpstrTitle = "Open a File";<br />
m_ofn.nFileOffset = 0;<br />
m_ofn.nFileExtension = 0;<br />
m_ofn.lpstrDefExt = NULL;<br />
m_ofn.lCustData = 0;<br />
m_ofn.lpfnHook = NULL;<br />
m_ofn.lpTemplateName = NULL;<br />
<br />
m_ofn.Flags = OFN_EXPLORER|OFN_HIDEREADONLY;<br />
<br />
GetOpenFileName(&m_ofn);<br />
break;<br />
But I am afraid it still does the same thing. It seems from the other replies I have received to my posting that this is not unique to me and somehow seems to relate to Adobe Acrobat 7.0.
I have not yet tried removing Acrobat 7.0 from my computer to prove the point.
Thank you again for your interest and help.
RA
|
|
|
|