Search Results

Search found 12 results on 1 pages for 'lienau'.

Page 1/1 | 1 

  • InternetReadFile() corrupting donwloads C

    - by Lienau
    I'm able to download text documents (.html, .txt, etc) but I can't download images or exe's. I'm pretty sure that this is because I'm using a char, and thoes files are binary. I know that in C# I would use a byte. But what data-type would I use in this case? char buffer[1]; DWORD dwRead; FILE * pFile; pFile = fopen(file,"w"); while (InternetReadFile(hRequest, buffer, 1, &dwRead)) { if(dwRead != 1) break; fprintf(pFile,"%s",buffer); } fclose(pFile);

    Read the article

  • Passing a var as an argument

    - by Lienau
    On a site I'm making I need to have a progress bar, I found one that suited my needs. By default it will incrementally change the color when a certain percentage is reached (0-30 red, 30-70 orange, etc). My only problem is changing them, I can set them easily with a static number such as 50, but when I try to do it dynamically (ie: 2000*.3 = 600) it fails. I don't know much js/jquery so this is especially difficult for me, if you could help that would be great. I'm pretty sure it's something really simple I'm missing. The code that Fails: var barmax = 2000; var orangeBound = Math.round(barmax * .3); var greenBound = Math.round(barmax * .7); //alert(orangeBound+":"+greenBound); $("#pb1").progressBar({ max: barmax, textFormat: 'fraction', barImage: { 0: 'images/progressbg_red.gif', orangeBound: 'images/progressbg_orange.gif', greenBound: 'images/progressbg_green.gif'} }); The code that works but I can't use because it has to be dynamic: $("#pb1").progressBar({ max: barmax, textFormat: 'fraction', barImage: { 0: 'images/progressbg_red.gif', 600: 'images/progressbg_orange.gif', 1400: 'images/progressbg_green.gif'} }); If you need to see the source, here. Thanks again!

    Read the article

  • C#/VB.Net Web Browser Control Replacement

    - by Lienau
    I've been working on a project that requires that I can go around webpages with different proxies, user-agents, and clear cookies. Now after looking all around the net, it looks like there are some solutions for each of these, but I can never get them working. I was wondering if there was a wrapper for this control that fixed all of these problems or even just a different control I could include. Thanks. Edit: I tried using HTTPWebRequest, it has everything I need -Javascript

    Read the article

  • InternetReadFile() corrupting downloads in C

    - by Lienau
    I'm able to download text documents (.html, .txt, etc) but I can't download images or exe's. I'm pretty sure that this is because I'm using a char, and those files are binary. I know that in C# I would use a byte. But what data-type would I use in this case? char buffer[1]; DWORD dwRead; FILE * pFile; pFile = fopen(file,"w"); while (InternetReadFile(hRequest, buffer, 1, &dwRead)) { if(dwRead != 1) break; fprintf(pFile,"%s",buffer); } fclose(pFile);

    Read the article

  • Dev-C++ Run Program in Background without GUI

    - by Lienau
    I recently began learning C++ in order to reach people w/o .net. I need to run my program in the background(without any visual indication to the user so no window or cmd). I know there a various methods to do this In C#, but I don't know how to do this in C++ (specifically Dev-C++). Any help is greatly appreciated.

    Read the article

  • Is webserver bandwith the entire HTTP Request/Responce?

    - by Lienau
    Just a quick question. I'm making a web application where C++ communicates with a php script over HTTP Requests/Response. The data being set back and forth is quite small ~36 bytes. But I plan to have many computers connected, contacting the server quite often. I did the math, and I could potentially have gigabytes of data transfer a month. This isn't too much of problem, but it would be if the bandwidth included the request/response headers the request size would be about ~560 bytes. That's about 16x more bandwidth than I was planning... That would be a lot. If if any one knew how host determine bandwidth and could share, that'd be great. Thanks.

    Read the article

  • #include <string> adding ~43 KB to my exe

    - by Lienau
    I'm using Code::Blocks to write my program and when I include <string> (or <iostream>) the size of my exe grows. My program is very simple and I need to keep it small <20kb. I'm pretty sure this is happening because of the C++ Standards Committee swapped the old .h versions for many new libraries without the .h. But how would I keep it from adding the ~43kb? Are there settings for Code::Blocks so that it wont add the extra kb or is there another native lib I can use?

    Read the article

  • Compile C++ from VS08/10 without Run Time Library / MFC

    - by Lienau
    Are there settings I can adjust in Visual Studio so that it does not compile with any run time library or MFC. I started learning C++ to get away from C#'s .Net, and this is just as bad. When I execute the program in a Windows XP virtual machine I get an error. I can compile without the dependencies in Code::Blocks, but I'm more familiar with VS, and prefer many of it's features over those of Code::Blocks. If you know of to get past this, it would be greatly appreciated. Thanks.

    Read the article

  • C++ Char without Limit

    - by Lienau
    I'm pretty well versed in C#, but I decided it would be a good idea to learn C++ as well. The only thing I can't figure out is chars. I know you can use the string lib but I also want to figure out chars. I know you can set a char with a limit like this: #include <iostream> using namespace std; int main() { char c[128] = "limited to 128"; cout << c << endl; system("pause"); return 0; } But how would I make a char without a limit? I've seen chars with * but I though that was for pointers. Any help is greatly appreciated.

    Read the article

  • Download File from Web C++ (with winsock?)

    - by Lienau
    I need to download files/read strings from a specified url in C++. I've done some research with this, cURL seems to be the most popular method. Also, I've used it before in PHP. The problem with cURL is that the lib is huge, and my file has to be small. I think you can do it with winsock, but I can't find any simple examples. If you have a simple winsock example, a light cURL/Something else, or anything that could get the job done. I would greatly appreciated. Also, I need this to work with native C++.

    Read the article

1