|
Try to make that task with a mate from your class. First develop the mathematical logic for the decrypting and than look for the coding.
You like mathematics and hate programming? I find that obscure.
You have a bad attitude in doing "your job"!!!
SCNR
Greetings from Germany
|
|
|
|
|
Hello all,
I'm facing a problem with CHttpFile, and exactly with its QueryInfo method. I'm trying to connect to a server which gives an id to the 'conversation' that will take place; so I POST some data, and it responds me with an HTML page with an id that I can later reuse for asking more data.
The problem is that this id has been put in the HTML header, and the HTML data is empty. So after I called
CHttpFile *file=myConnection->OpenRequest and everything went allright, file->Read doesn't return anything.
I had instead to make something like this:
CString headers;
file->QueryInfo(HTTP_QUERY_RAW_HEADERS_CRLF,headers);
to get the headers and then parse them to find the id I'm searching.
Well, now the problem is that this id has been put in the Content-type header; intercepting the raw HTML data, I saw things look like: "Content-type: multipart/x-mixed-replace\r\n\r\nid=the_id_i_want_to_have\r\n".
Sorry to say, but headers comes out to be "HTTP/1.0 200 Push Service\r\nContent-type: multipart/x-mixed-replace\r\n\r\n"; it ends exactly at the beginning of the section I'm interested to.
I tried all I could to get the whole headers out of a CHttpFile, using all the HTTP_QUERY_XXX constants, but with no success.
Can somebody help me?
Thank you very much,
Piero.
|
|
|
|
|
I writing some application that need to run until the machine is shutdown.
This application need to run like service but without been a service.
I dont know what technics to use to let the application run all the time without stop ( when return from the main thread ).
I can use GUI application and not show the main dialog - but i prefer some other technique.
|
|
|
|
|
You can create a win32 project which by default wont create any window or console. how ever it will terminate when the main thread exits. BTW, why do you want to run the application even after it returns from the main thread.
|
|
|
|
|
In Windows, there is no such thing as a Terminate and Stay Resident program.
If you want your program to run all the time, you must make it a service.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Yanshof wrote: This application need to run like service but without been a service.
Why?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yanshof wrote: I can use GUI application and not show the main dialog - but i prefer some other technique.
Like an application that doesn't even create a window?
Last time I checked, apps can run just fine without a UI.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I want to move one control over the top of another; the objective being that only one of the controls will be displayed (in the same place) depending upon possible modes of operation. In the following code all I want to do is move the IDC_GAINSLIDE control up on the y axis to the same position as the IDC_AGCTIMECONST control. It will remain in the same x axis position and retain its size. In the following code the window coordinates obtained via GetWindowRect are:
src.left 332, (IDC_AGCTIMECONST window)
src.top 103,
targ.left 332, (IDC_GAINSLIDE window)
targ.top 143
CRect src, targ;
pCtrl = GetDlgItem(IDC_AGCTIMECONST);
pCtrl->GetWindowRect(&src);
pCtrl->ShowWindow(SW_HIDE);
pCtrl = GetDlgItem(IDC_GAINSLIDE);
pCtrl->GetWindowRect(&targ);
pCtrl->SetWindowPos(NULL, targ.left, src.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
Nothing happens to the position of the IDC_GAINSLIDE control when I do the above. However when I change the 3rd (y) parameter of SetWindowPos to 'src.top-60' the IDC_GAINSLIDE window is moved up to pretty much where I want it. I must be missing something obvious but I can't see it. Any ideas?
Thanks,
Wayne King
|
|
|
|
|
Going back to your actual initial specification - you want to bring one of a pair of windows to the top of the local z-order, so you can only see the "chosen one"...
Assuming they're both created at the same place, why can't you do...
BOOL CMyDlg::ChangeMode (int nMode)
{
CWnd *wndMode = LookupWindowFromModeSomehow (nMode);
return wndMode->>SetWindowPos (&wndTop, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
}
?
Iain.
|
|
|
|
|
I have MFC dialog application. How can I write something to current console when it is ecexuted by "cmd"? It seems AllocConsole() creates new console which is closed after program exit.
Thank you.
|
|
|
|
|
What about AttachConsole() ?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
It requires Windows Vista or Windows XP. I'd like to have it running on Win98 too.
|
|
|
|
|
rrrado wrote: I'd like to have it running on Win98 too.
Sorry. I must've missed that requirement in your initial post.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
You didn't
Ok thanks anyway
|
|
|
|
|
Hi all,
I am trying to allocate memory of more than 2GB using the system boot flag /3G and also i set the linker option /LARGEADDRESSAWARE. This should let me have atmost 3GB of allocation. After doing that, i try allocating slighly more memory than 2GB
BYTE* m_pDIB = (BYTE *)VirtualAlloc(NULL, (size_t)0x81000000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
UINT32 ui32Err = GetLastError();
printf("\nVirtualAlloc(NULL, (size_t)0x81000000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); Results: Address is %Xh and error is %d", m_pDIB, ui32Err);
I have also set the system virual memory(swap) to have bigger size than 3GB.
The error code returned is ERROR_NOT_ENOUGH_MEMORY with the VirtualAlloc returning NULL.
Any help in this regard would be greatly appreciated.
Best regards,
RUI
|
|
|
|
|
umarcool wrote: Any help in this regard would be greatly appreciated.
There has to be 2GB of contiguous memory available.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Why the hell would you allocate soooo much memory
|
|
|
|
|
Yes i have increased the virtual memory to 15 GB now but this still does not work
I am trying using the code given below:
BYTE* m_pDIB = (BYTE *)VirtualAlloc(NULL, (size_t)0x81000000, MEM_COMMIT | MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE);
UINT32 ui32Err = GetLastError();
printf("\nVirtualAlloc(NULL, (size_t)0x81000000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); Results: Address is %Xh and error is %d", m_pDIB, ui32Err);
m_pDIB = (BYTE *)VirtualAlloc((LPVOID)0x81000011, 0x100, MEM_COMMIT | MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE);
ui32Err = GetLastError();
printf("\nVirtualAlloc(LPVOID(0x81000000), 0x1000, MEM_COMMIT | MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE); Results: Address is %Xh and error is %d", m_pDIB, ui32Err);
|
|
|
|
|
Hi all,
I want to enable Auto logon feature through my application. I got help for doing so manually from the below link.
http://support.microsoft.com/kb/315231[^]
But if i try to do it programmatically then i am not being succeeded in that. I made all three registry entries(AutoAdminLogon, DefaultUserName, DefaultPassword) correctly through programming as mentioned in manual steps in above link. If i do it manually it works.
But somehow it is not happening. can anyone please throw some light on this? It would be a great help to me. Please help me out.
Thanks
Hemang
|
|
|
|
|
When you add those value through code, can't you just open the registry and see if they are correct? The registry does not care how keys and values are created. If they are correct, something else other than your code is wrong.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello,
I have to use a smoothing algorithm in my COde. I am using Visual C++ .Net 2008 with 3.5 framwork.
I am reading a data through serial port from a target device and this data is store into a XML file. I have to display(plot) this data on the window. For ploting the waveform, i read the data from the XML file, and draw(Plot) the point using "Drawline" function. but the curve generated is not in Smooth shape. It shows some noise(like steps).So in this case I want to use smoothing algorithm but dont know how to use it.So plz can anyone tell me how to use smoothing algorithm? its urgent so plz help me out.
Thanks and Regards,
Abhijit
|
|
|
|
|
For urgent questions key plz into Google. For 'smoothing algorithm' you might try Googling for 'smoothing algorithm' or even for Bezier. Good Luck.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
how create a shortcut key of each button control mfc code
|
|
|
|
|
Put an ampersand (&) character before the shortcut key you want in the button's text.
For example: "&Cancel". 'C' is the shortcut key, and the button with this text can be invoked with Alt-C. The ampersand won't be displayed.
|
|
|
|
|
thank Alan Balkany,
that is working perfectly
thank u very much.
|
|
|
|