Sorry, I forgot...
FILE *pfile;
char *receivedmsg;
int bytes_received, bufflen = 4000;
int iFileDescriptor /* valid SOCKET */
receivedmsg = (char *)malloc(sizeof(bufflen));...
Type: Posts; User: Echidna
Sorry, I forgot...
FILE *pfile;
char *receivedmsg;
int bytes_received, bufflen = 4000;
int iFileDescriptor /* valid SOCKET */
receivedmsg = (char *)malloc(sizeof(bufflen));...
Magos wrote, "You never test if malloc() failed to allocate memory..."
Not in the snippet I provided, but I did in my source code, of course. (Notice in the snippet I wrote, "/* checking omitted...
Here is a snippet from the code I wrote that has been causing my console application to crash...
FILE *pfile;
char *receivedmsg;
int bytes_received, bufflen = 4000;
int iFileDescriptor /*...
Thanks, that gave me the lead I needed.
This site was also very helpful: http://www.vbip.com/winsock/winsock_http_08_01.asp
How do you communicate to a remote server, using SOCKETS or WININET, that you wish to resume a download which was broken midway through the download, for example?
Could someone point me in the...
>>>Are you sure you're using the modified string and not the original one when calling CreateFile? >>>
Yes, that was the first thing I checked, thanks.
The problem was actually with the...
Okay, some uri's look like this:
http://www.example:80/files/text.txt
My program is designed to, among other things, take the above uri and create a local directory from it
e.g....
Thanks Ken, I thought no one had a solution.
Funny, there is no mention of PBM_SETBARCOLOR in the Win32 programmers reference.....hmmmm
thanks again
Echidna
I have been trying to create two progress meters, each with a different color. No luck, so far. Can anyone offer a suggestion?
thanks in advance
Thanks a lot "Chorus," that is exactly what I was talking about.
Thanks "Fordy," but the code you provided doesn't differ much from what I have already tried. Still, when I drag a link from Internet Explorer 5.0 to my application it won't allow the drag and drop...
I am wondering if someone could point me in the right direction. I want to drag and drop hyperlinks (.url files) from Internet Explorer to my application, but I can't get any part of my application...
For Win95 non-MFC, I would like the look of the Rebar (Coolbar) control but I don't need it to resize/move. Can this be done in a win95 environment?
Is it wise/possible to use multiple toolbars...
Novacain wrote, "You don't seem to be incrementing the pointer to the buffer, lpBuffer, so the new info is copied to the start each time? "
What you wrote gave me an idea...
Instead of writing...
Here is the prototype...
BOOL InternetReadFile(
HINTERNET hFile,
LPVOID lpBuffer,
DWORD dwNumberOfBytesToRead,
LPDWORD lpdwNumberOfBytesRead
);
Let me explain the...
Thanks, I will try passing a structure.....great idea!
What is the best way to pass more than one argument to the LPVOID parameter of CreateThread -- No MFC? (I am actually using _beginthreadex, which is virtually identical.) I, of course, am assuming...
Thanks for the help.
I found an example here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q218972
...
It doesn't appear as if Windows API has native support for loading .jpg or gif images. So what is the best way to load .jpg or gif images -- from a file, not a resource -- using API?
Could...
nvoigt...wrote, "Use the C function ? Who said you may not use it ?"
"A thread that uses functions from the C run-time libraries should use the beginthread and endthread C run-time functions for...
Uraldor Wrote:
<<<write your own?!
something like
code:
int MyToLower(char* string)
{
int len = ::lstrlen(string);
for(int i = 0; i < len; i++)
{
if(string[i] >= 'A' &&...
Thanks Novacain!
I don't have the MSDN help files since I just borrowed the Visual C++ CD from a friend...
I will have to use CreateThread() then...I was trying to avoid that since it leaks...
I am trying to use the _beginthreadex function instead of CreateThread (because I am more comfortable using older C functions), but even when I include <process.h> I get "...cpp(764) : error C2065:...
Is there anyway to prevent the URLDownloadToFile function from adding files to the Internet Explorer cache??
If not, is there another non-MFC function I can use for downloading files?
thanks
Normally, I would use wParam of WM_SETCURSOR message to identify the child window the cursor is over.
Something like this...
hwndChildWindow = CreateWindow(.....WS_CHILD...
case...