|
So you're running an FTP server on port 2000 then?
If that's the case you can use the address:port notation
eg: "192.9.200.1:2000"
The FTP connection is trying to use the default target port of 21. If your FTP server is on a different port, then your client needs to know that!
Steve S
|
|
|
|
|
I doubt whether you have an FTP server running on your target machine. GetFTPConnection connected to microsoft.com only b'coz they have an FTP server running in that machine.
So first check it out as to whether you have an FTP server on the target machine.
If not see whether you have an HTTP server running there, and the files you want to download are accessible through HTTP( The folders where the files reside need to be published for doing this). To check this, just give the URL on IE as "http://ipadress"( HTTP server listens on port 80 - default ). If the port number is not 80, give "http://ipadress:8000"( if port no is 8000 )
If you dont have HTTP server, give an exact description of the scenario, may be I can help you in designing the application.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Hi gurus,
I've created a simple class for serial communication.
For a long time everything works fine within all my applications
if I use a real COM-Port.
But know I get problems with virtual COM-ports which are
comming up with some USB/RS232 Converter and bluetooth
dongles.
All manufacturer of this devices says I can use virtual COM-ports
in the same way I'm using the real existing COM-Port.
But unfortunately this seems not to be right.
If I use an USB bluetooth dongle on virtual COM-Port
my app hangs on WriteFile().
WriteFile() never returns.
BTW, all other functions I need before using WrieFile works without an error:
CreateFile()
SetCommMask()
SetupComm()
GetCommState()
SetCommState()
I've tried all day long to find a solution for my problem.
Please help me.
Bye
Joerg
|
|
|
|
|
Your virtual comm port driver may be bugy. A virtual serial port driver that I use is from http://www.eltima.com[^]. It has a 14 day trial period. See your software works using it.
|
|
|
|
|
Guys,
I've created a property sheet and insert two pages in it. By default the tabs appear on the top left corner. I like to place tabs at the bottom or on the sides. How can i do this
|
|
|
|
|
You would have to do this 'by hand', using the tab-control. MSDN has a few examples you can find by searching for CTabControl .
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
I am able to connect to a machine using the foll code. Once it is connected , how do I grab some files from that machine and bring them onto my machine? I was not able to go the GetFTPCOnnection MFC route which has GetFile
( since I have the IP address, not the site and was unable to get the name from IP successfully in that the name came back as "NameOfmyMAchine" with no specifics (used gethostbyaddr) and therefore couldnt connect via CIntnetSession code)
. But the socket() approach works and I need to know how to get the files..........
Thanks,
ns
|
|
|
|
|
Doesn't passing the string version of the IP address eg "10.0.0.10" work?
Steve S
|
|
|
|
|
Wish it did! With
m_pFtpConnection = InternetSession.GetFtpConnection ("130.109.184.xxx" );
I get back a null pointer, and this is a valid ipp addres (my secondary machine). However if I put in 'ftp.microsoft.com' it does go there and gets me a ->GetFile() happily..........
Help!!
Thanks,
ns.
|
|
|
|
|
If you are connecting to the FTP server, then what you need to develop is an FTP client. An FTP client has to adhere to the RFC 959. In short, your application will instruct the FTP server to connect and download the required files for you. Its an ardous job. Think before you leap!!!
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
I have a CDialog derived class MyDialog. In its OnInitDialog() function, I create 10 controls with their create function (keeping the pointers as members). They are showing well.
Now, when I close the dialog, what do I have to do. Do I need to destroy the controls? Deattach them? Delete their pointers? And where do I have to do all this?
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
You probably need to override OnPostNCDestroy and there call delete for each of your 10 pointers... that's it!
|
|
|
|
|
I meant override PostNCDestroy...
|
|
|
|
|
1. The window side of the controls will be destroyed for you, so you don't need to do anything like Destroy or Detach, but you will need to delete the MFC objects you created.
2. The best place is probably in PostNcDestroy for the dialog.
Steve S
|
|
|
|
|
hi guys,
I using Microsoft DateTimePicker Control of CDTPicker Class in VC++. i got invalid property value on statement
m_dtdate.SetValue(var);
my code is
CDTPicker m_dtdate;
COleDateTime CurTime;
CurTime = COleDateTime::GetCurrentTime();
VARIANT var;
DATE ddate;
ddate = CurTime;
var.date = ddate;
m_dttime.SetValue(var);
Thanks in advance
|
|
|
|
|
Try this
VARIANT var;
DATE ddate;
ddate = CurTime;
var.vt = VT_DATE; //
var.date = ddate;
m_dttime.SetValue(var);
This should work!!!
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
it works correctly. thanks for reply.
|
|
|
|
|
im 15 years old,Im iranian.im learning c programming.
i wanted to ask you how can i use for and while.
if you can please make me an example and describe all.
thanks
my mail is khodadad@eminem.com
im waiting you.
thanks
khodadad pakdaman
khodadad@eminem.com
|
|
|
|
|
See this article:
http://howstuffworks.lycoszone.com/c3.htm
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
kh.pakdaman wrote:
im 15 years old,Im iranian
then why is your profile set to "United States"?
Don't try it, just do it!
|
|
|
|
|
Possibly for the same reason that in the room I'm sat in, we have German and French/Portuguese developers, although we're physically located in the United Kingdom...
Nationality is generally determined by birth/statute, rather than by current location, otherwise I'd have been Jamaican for five weeks...
Steve S
|
|
|
|
|
Hi,
I have got a CDialog instance, and it has a Cancel and an OK button, OnOk works, but if I call OnCancel, or EndDialog(x), I'm getting an error (in runtime:mad). It says this:
Debug Assertion Failed!
file: wincore.cpp
line: 4184
Can this be caused by the fact that I've got another CDialog instance wich calls the DoModal of the one above? Please help me solve this problem!
|
|
|
|
|
Its not possible to figure out what cud be the issue with the above description.
Would like to know from where that dialog created, what happens after the dialog is dismissed, et al.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
You can also check the CallStack by running the program in DEBUG mode, and see from where it got to Wincore.cpp
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
OK,
If I simplify the situation the following happes:
diag2 : diag2.DoModal
diag2 : do some work etc...
diag2 : when ready (or user presses cancel) EndDialog()
or
diag2 : when ready (or user presses cancel) OnCancel()
|
|
|
|