|
I am trying to get a program to download from an ftp site, this works fine, but i need the program to be able to resume, i have used the REST command and sent it the start point to resume from, but it doesnt seem to work. i open the file i am downloading to and set the start point, this seem ok, but the download file start point doesnt seem to work, this just starts downloading from the begining again, so what i end up with is a file that is bigger than the file been downloaded...
can anyone shed some light on where i may be going wrong ??
Thanks
Lee
|
|
|
|
|
Hai To All Members,
Can Any one Explain if select one the predefined Registry Root Key then monitor all sub keys of that root registry key . i Know one thing by using threads it is easy to monitor but i dont know how ?
And display if any changes occures when begin the monitoring in a list control..........
Plz Help Me........
|
|
|
|
|
To enumerate the subkeys, use this function:
LONG RegEnumKeyEx(
HKEY hKey,
DWORD dwIndex,
LPTSTR lpName,
LPDWORD lpcbName,
LPDWORD lpReserved,
LPTSTR lpClass,
LPDWORD lpcbClass,
PFILETIME lpftLastWriteTime
);
To monitor keys, use this function:
LONG RegNotifyChangeKeyValue(
HKEY hKey,
BOOL bWatchSubtree,
DWORD dwNotifyFilter,
HANDLE hEvent,
BOOL fAsynchronous
);
~RaGE();
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I have a function in a DLL which takes varargs. I only have the header file of the DLL. Is there a way how i can provide a wrapper for the function with varargs?
For e.g. if the function definition is as follows:
<br />
int average( int first, ... );
..how can i provide a wrapper for it? I'm stuck here:
<br />
int averageWrap(int first, ...)<br />
{<br />
return average(first, ... );<br />
}<br />
Thanks
_________________________
Kri5
-- modified at 5:50 Thursday 13th April, 2006
|
|
|
|
|
Have a look at the functions va_arg, va_end, va_start .
~RaGE();
|
|
|
|
|
Those are for iterating through the parameters one by one. I need to be able to fetch them and pass them on to the function i am wrapping...i don't think those functions can help me.
_________________________
Kri5
-- modified at 9:04 Thursday 13th April, 2006
|
|
|
|
|
i'm not sure you can.
many libraries that export "..." functions also export va_list versions specifically so people can build layers on top of those functions.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
I am looking for Flat CDateTimePicker class to use with Visual c++ 6.0 .
|
|
|
|
|
|
This class is not for VIsual c++ 6.0 It's for Visual c++ .NET.(FlatDateTimePicker.cs)
I am looking for Visual c++ 6.0 (.cpp and .h files)
I learn my self
-- modified at 3:28 Saturday 15th April, 2006
|
|
|
|
|
I am sending the FAX using the FAX API FaxSendDocument(). It works fine. But the quality of the sent FAX is not good. How can I improve its quality i.e how can I improve the resolution.
aasstt
|
|
|
|
|
I am writing a simple client server program (client sends data to server and server accepts it and displays it).
I have taken the example from the article:
http://www.codeproject.com/internet/server_client_sockets.asp#xx1332585xx[^]
described in this website. Server is working fine.
Problem with my client is that i am going to "embed" the client code in an already existing .c file, but it gives me errors on compilation.
if i change the file extension to .cpp it gives me different error messages (because it is connected with different other projects), so i dont want to change the extension into .cpp.
(i m a begginer and needs guidence!!)
how can i change client code given below, such that it will work in my .c file.
i am using visual c++6. (.c & .cpp are windows console applications)!
plz help
thanks
<br />
#include <br />
#include <br />
#include <br />
<br />
using namespace std;<br />
<br />
#pragma comment(lib, "wsock32.lib")<br />
<br />
#define CS_ERROR 1<br />
#define CS_OK 0<br />
<br />
void sError(char*);<br />
<br />
int main()<br />
{<br />
<br />
WORD version;<br />
WSADATA wsaData;<br />
int rVal=0;<br />
<br />
version = MAKEWORD(1,1);<br />
<br />
WSAStartup(version,(LPWSADATA)&wsaData);<br />
<br />
LPHOSTENT hostEntry;<br />
<br />
hostEntry = gethostbyname("hibbert");<br />
<br />
if(!hostEntry)<br />
{<br />
sError("Failed gethostbyname()");<br />
return CS_ERROR;<br />
}<br />
<br />
SOCKET theSocket = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);<br />
<br />
if(theSocket == SOCKET_ERROR)<br />
{<br />
sError("Failed socket()");<br />
return CS_ERROR;<br />
}<br />
<br />
SOCKADDR_IN serverInfo;<br />
<br />
serverInfo.sin_family = PF_INET;<br />
serverInfo.sin_addr = *((LPIN_ADDR)*hostEntry->h_addr_list);<br />
<br />
serverInfo.sin_port = htons(8888);<br />
<br />
rVal=connect(theSocket,(LPSOCKADDR)&serverInfo, sizeof(serverInfo));<br />
if(rVal==SOCKET_ERROR)<br />
{<br />
sError("Failed connect()");<br />
return CS_ERROR;<br />
}<br />
<br />
char *buf = "simpleservermessage\n";<br />
<br />
rVal = send(theSocket, buf, strlen(buf), 0);<br />
<br />
if(rVal == SOCKET_ERROR)<br />
{<br />
sError("Failed send()");<br />
return CS_ERROR;<br />
}<br />
<br />
<br />
closesocket(theSocket);<br />
cout << "closing client"<< endl;<br />
WSACleanup();<br />
<br />
return CS_OK;<br />
}<br />
<br />
void sError(char *str)<br />
{<br />
MessageBox(NULL, str, "SOCKET ERROR", MB_OK);<br />
WSACleanup();<br />
}<br />
|
|
|
|
|
From what I can see, you can rename the file to .c
It's written i plain C.
But you might have to remove this line:
using namespace std;
What errors do you get?
|
|
|
|
|
cout is not plain C
but effectively, there nothing else to do but changing cout with printf() , and removing the C++ headers included and the std namespace.
|
|
|
|
|
Sorry, I missed that. You are right.
|
|
|
|
|
it is very awful C++ code... i conceed
|
|
|
|
|
thanks
|
|
|
|
|
I have several data files and wanf to compress and decompress using BC++.
Is any body knows the class lib that will help me
|
|
|
|
|
As you don't give much details (what kind of compression for example), take a look here[^]. Maybe you'll find something usefull.
|
|
|
|
|
|
|
i want to make a dialog with a CTabControl(TC1) which has a CTabControl(TC2) in one of its pages, but TC2 can't be shown, i'm sure that i have added some pages into TC2. Does anyone know how to solve that? thanks.
|
|
|
|
|
If I understand your problem.
You are taking the tabcontrol on one of the dialog then you would have created the no. of child dialogs equal to the no. of tabs.
Now you add the another tab control on the one of the child dialog and add some pages to it. I think this will solve your problem
Cheers
"Peace of mind through Technology"
|
|
|
|
|
yes, you understand my problem, and the tab control on the child dialog can't be seen, pages added into that tab control also can't be seen.
|
|
|
|