?
Solved

How to get FtpCommand working or do chmod via FTP?

Posted on 2002-06-15
8
Medium Priority
?
898 Views
Last Modified: 2007-11-27
How to get FtpCommand working?
I can't seem to compile this function.

I've added #include <Wininet.h>, and I added Wininet.lib to my project settings, but I still get the following compiler error:
error C2065: 'FtpCommand' : undeclared identifier

If this command is not functional, how can I do a chmod command via FTP using Wininet functions or CFtpConnection class?

I'm compiling to NT and Win98.
0
Comment
Question by:Hill8982
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 7080569
I find the following in WININET.H:

BOOLAPI FtpCommandA(
    IN HINTERNET hConnect,
    IN BOOL fExpectResponse,
    IN DWORD dwFlags,
    IN LPCSTR lpszCommand,
    IN DWORD_PTR dwContext,
    OUT HINTERNET *phFtpCommand OPTIONAL
    );
BOOLAPI FtpCommandW(
    IN HINTERNET hConnect,
    IN BOOL fExpectResponse,
    IN DWORD dwFlags,
    IN LPCWSTR lpszCommand,
    IN DWORD_PTR dwContext,
    OUT HINTERNET *phFtpCommand OPTIONAL
    );
#ifdef UNICODE
#define FtpCommand  FtpCommandW
#else
#define FtpCommand  FtpCommandA
#endif // !UNICODE

I think that the problem is:

1) You are not properly including WININET.H in your build.
2) Your SDK header files are incorrect or out-of-date.

Have you checked YOUR WININET.H to verify that this declaration is present?
0
 

Author Comment

by:Hill8982
ID: 7080855
That's not in my version of Wininet.

What version of VC++ do you have?

I'm using version 6.0
0
 

Author Comment

by:Hill8982
ID: 7080856
If you're using 6.0, what service pack do you have?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 32

Accepted Solution

by:
jhance earned 1200 total points
ID: 7081500
It doesn't matter what version of VC++ or what SP of VC++ you have.  The SDK is not the same as VC++.

Download the latest Windows SDK from Microsoft.

See:

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

0
 

Author Comment

by:Hill8982
ID: 7081543
Which Windows SDK?
There are seven listed.
0
 

Author Comment

by:Hill8982
ID: 7081888
I installed all the SDK (except .NET), and I still get the same compiler error
0
 

Author Comment

by:Hill8982
ID: 7081897
I found the path for the new wininet.h in this path
C:\Program Files\Microsoft SDK\include

And the new lib is in this path
C:\Program Files\Microsoft SDK\Lib

So how do I get VC++ to see the new header and libs over the old?

Shouldn't this have been done automatically when installing the new SDK?
0
 
LVL 30

Expert Comment

by:Axter
ID: 7081933
Go to Tools->Options
Select directories
Add the following:
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE
Move the newly added directory to the top of the list, by using the little arrows.

Change the "Show directories for" field to LIBRARY-FILES
Then add the following to the list:
c:\PROGRAM FILES\MICROSOFT SDK\LIB
Again, move then newly added directory to the top of the list.

That should do it.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question