|
Here's the code snippet that reads the file:
BYTE *pData = new BYTE[dwRemoteSize];
pHttpFile->Read(pData, dwRemoteSize);
and dwRemoteSize is set via:
pHttpFile->QueryInfo(HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_CONTENT_LENGTH, &dwRemoteSize, &dwLen, 0)
I have stepped through the code on my dev box, however the dev box does not throw this exception. It appears to be related purely to the server box..
|
|
|
|
|
I've just done some investigation on my dev box (with Apache 2.2 as a web server).
This indicates that CHttpFile::Read doesn't want to read more than 67,151,821 bytes at a time. However, it would seem you can read the file in chunks, the same way you would off disk, something like:
unsigned __int64 totalRead(0);
while (1)
{
const DWORD toRead = 1<<20;
const DWORD nRead = httpFile->Read(pData + totalRead, toRead);
totalRead += nRead;
if (nRead != dwRemoteSize) break;
}
_ASSERTE(totalRead == dwRemoteSize);
HTH!!!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Interesting I'll give it a spin and let you know!
|
|
|
|
|
Fantastic
Got the file to download in chunks! Thanks for your help Stuart!
|
|
|
|
|
Hi,
I am using SHGetSpecialFolderPath with CSIDL_SYSTEM to get system folder path. But for Window32 and Window64 I am getting the same path "C:\Windows\System32" But I window64 I should be "C:\Windows\SysWOW64"
What is the problem?
|
|
|
|
|
Nope - this page[^] says that you use CSIDL_SYSTEMX86 to get the WOW64 directory.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
That is because System32 is the system directory for Windows64. This is the directory where the 64 bit DLLs reside. SysWow64 is the directory where the 32 bit DLLs reside. What's in a name.
CSIDL_SYSTEMX86 will probably give you SysWow64 .
«_Superman_»
|
|
|
|
|
Hallo all,
Please help me to write the algorithm in step by step way , it would be better if u send the c++ code for Niblack binarization algorithm in c++.
thanks ,
|
|
|
|
|
Bindas Samanta wrote: Please help me to write the algorithm in step by step way
Bindas Samanta wrote: it would be better if u send the c++ code
So, you want to full code or you want to do it step by step ?
Anyway, this is not the place to ask for 'full codezz'. Start by implementing that yourself and once you are stuck with a specific problem, then come back to ask specific questions.
|
|
|
|
|
- Background: some C/C++ knowledge.
- Step 1: study the algorithm of the book.
Let us know about your progress in order to suggest you the next steps.
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]
|
|
|
|
|
Hi all,
i m using SDI type MFC application, my exe size is 4.61 MB.
Is this possible to decrease the size of exe.
please tell me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Suggestion 1.
1> Use ATL instead of MFC and don't link to libraries you don't really need.
Suggestion 2.
1) Dynamically link your program with the MFC library. This will give you a minimum reduce of at least 2031%.
2) Go to Project Settings dialog.
3) Click the 'C/C++' tab.
4) In the 'Optimizations' combo box, choose 'Minimize size'. Click OK to close this dialog. The file size is decreased now
5) Build and compile your executable.
Now check the file size.
Suggestion 3.
Download and use some tool to decrease the size of your exe.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: Dynamically link your program with the MFC library.
PLease tell me how can i dynamically link.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
IF you are using VS 2005, then go to Project>Properties. Under this go to Configuration properties>General option. Under "project defaults" change to "Use MFC in a Shared DLL"
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
By building your application in "Win32 Release MinSize" mode.
|
|
|
|
|
Have you embedded lot of bitmaps in your application??
Regards,
Sandip.
|
|
|
|
|
I have used 10 images in my application and total size of all images are 1.81MB.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: total size of all images are 1.81MB.
This is one of the reasons of bigger executable size. I don't think you can do anything about it. You can try reducing the size as mentioned in other replies. Also try to remove incremental link option.
Check following links for more options
Techniques to reduce exe size[^]
Reduce the size of your final exe[^]
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
Are you using Release setting to build? Or Debug?
Do you have any images (BMPs) added to the resource?
- ns ami -
|
|
|
|
|
I m using Release setting to build and I have used 10 images in my application and total size of all images are 1.81MB.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
If possible, it is better to keep the images separately (as image files along the exe) and load them when required at runtime.
- ns ami -
|
|
|
|
|
How can i set image on buttons at runtime.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: How can i set image on buttons at runtime.
Use LoadImage() instead of LoadBitmap() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
HI,
Currently i am signing my code binaries with the help of microsoft signing tool(signtool). But now i am tring to add two digital signature to the binary. Can any one will help me to find out any solution.
Thanks in advance.
birajendu
CyberG India
Delhi
India
|
|
|
|
|
I want to Bring a window to top. I am using BringWindowToTop() function. But its not working.How can i do it.
|
|
|
|