Search:
Type: Posts; User: AlexanderBB
Search:
Search took 0.05 seconds.
-
I'm trying to close a Form in code to save an extra click on "X"
But Hide, Unload, Close all seem to fail or give errors.
Is there a bulletprof way to do this. Form is called from another form.
-
Many thanks, would never have figured that out. Now all working spot on :)
-
That sounds promising, think I meant FtpGetFile not 'Put' so tried this
ret = FtpGetFile(hFTP, Filename, DestFileSpec, 0, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_BINARY, INTERNET_FLAG_RELOAD)
but...
-
I've run into a strange issue using fafalones FtpPutFile routine.
While everything appears to work perfectly, something odd happens which (dumb as I may be) is beyond belief.
Here's the scenario:
...
-
Yes, you had, sorry. Not sure why I didn't get it, but all working great now. Many thanks.
-
The only solution is to answer someone's question, surely. Otherwise, what's the point?
-
Fafalone,
Dim hFile As LongPtr
hFile = FtpOpenFileW(hFTP, StrPtr("filename"), GENERIC_READ, FTP_TRANSFER_TYPE_BINARY, 0)
I don't have any FtpOpenFileW or GENERIC_READ.
Presumably I need another...
-
Ah, I had no example for FtpOpenFileW or may have thought of that. I'll try to replace what I have, thank you.
TBH I don't "understand" these instructions, just see them working, so Viola! I do...
-
The dark and mysterious world of APIs, DLLs, handles etc are a minefield I prefer to avoid. I do Google quite a lot... amazing how many dead ends you reach.
I have occasionally tried to figure...
-
You guys know so much you've forgotten what it's like to not know. I can't get anything from your replies, sorry to say.
Too much info, too complex, not specific with an example of usage for just...
-
Going back to much earlier message when fafalone showed these examples
ret = FtpSetCurrentDirectory(hFTP,...
ret = FtpGetFile(hFTP,..
ret = FtpPutFile(hFTP, ...
ret = FtpDeleteFile(hFTP,......
-
Apologies but ERROR_ACCESS_DENIED is undefined here.
I haven't got mApiErr2.zip (if needed?) as something there was user-undefined also.
Everythings's working nicely, but even better to show what...
-
I really don't want to seem ungrateful for your help, but I was unable to try your code. When when I copied it in some of it stayed Red.
Now I'm committed to using fafalones code and it's working....
-
Had some trouble figuring out your last msg fafalone. If I don't use/need mApiErr2.bas why pass Err.LastDllError to it ?
And I'm not sure what you mean by "Make Blocks"
Can Err.LastDllError...
-
I see what you mean! Do I add mApiErr3.bas into the project?
At the moment Declare Function FormatMessageW is giving User defined type not defined.
And I presume Err.LastDllError is passed as...
-
Is there a list of definitions for Err.LastDllError ? I tried Err.description but that was empty.
-
I am indeed an amateur, what you think I might know - I only know one tenth of. And API knowledge is zero or less.
But I do know what I want to achieve, and thanks to the forum and fafalone in...
-
Thanks again fafalone. I had to guess at the construction of the line starting ret=FTPGetFile.... but managed it.
I presume its similar command to delete and Rename via FTP. Would you have them ?
-
More Success :)
I had to change Public Declare to Private and apply the Passive flag. Now it is working 100% thanks to you.
But 2 more questions if I may - what is the instruction to Send a file -...
-
Congrats fafalone! This is now connecting... now starts soime other things to sort.
I attempted to get a file in the root folder and was told
150 Opening data channel for file download from...
-
ahhh was the Overflow because my port number was too large?
I changed it to 21 (which won;t work) and it continued without crashing finally showing
ret=0, lastErr=6
-
I'll use anything that works, but I haven't the knowledge to create it myself, hence asking here.
Fafalone I've added a new project as you advised. When run, I get an Overflow error on the line...
-
I copied all the code you gave me, some of it stayed red meaning some kind of problem. Is yours ok if you do the same thing?
Until it compiled I can't run it.
-
But your code (the class) would not compile.
-
I don't know how to resolve this, but I remmed out that line and now get User -deifined type not defined on
Public Declare Function InternetConnect Lib "wininet" Alias "InternetConnectA" (ByVal...
-
That's resolved that one but the same error now on
SECURITY_IGNORE_ERROR_MASK = (INTERNET_FLAG_IGNORE_CERT_CN_INVALID Or INTERNET_FLAG_IGNORE_CERT_DATE_INVALID Or SECURITY_FLAG_IGNORE_UNKNOWN_CA Or...
-
All done but on running error "Constant Expression Required" on line
INTERNET_FLAG_TRANSFER_ASCII = FTP_TRANSFER_TYPE_ASCII ' 0x00000001
-
Well I'm newly 74 and have no tutor!
Thanks fafalone, I've put your Code into Sub Main and everything else into the declarations area of Module 1 . Ok so Far?
But now some guesswork, I change ...
-
Thanks anyway nebelem, I really wanted something that worked not something that needed work. You're right about learning API but I'm just too old!
-
Yes I did, fafalone. It ran up without errors and showed the Form but couldn't get it to connect to the FTP server.
-
I haven't got a project, just a new VB6 with the two components from you. Maybe it's time to call it quits ?
-
Are you using VB6? The class module won't compile here.
But if it did I cannot see what the startup object is?
-
I appreciate the help but I'm not getting very far. I copied the code into a new class module but several lines at the start didn't compile (stayed red).
My experience with VB6 isn't sufficient to...
-
nebelm, is that code I should be able to run ?
-
Thanks, I was setting sHost to the IP numbers as you showed. Suspect problem may be dwServiceType As Internet_Service_Type = INTERNET_SERVICE_FTP
As that says User-defined type not defined.
-
I'm having a bit of trouble entering data for line 1, and getting an overflow error so have done something wrong...
I have a IP address (numbers), user, Pass and Port number. Could you show how...
-
Yes indeed with CuteFTP. I am using XP although could (probably) compile and try with Win 10 if that may be an issue.
-
I downloaded FTP-revised2.zip and ran it but again, nothing.
Would it be a missing Port number,tried :number after the address but didn't help
In case anyone knows, I'm looking to Get/Put just the...
-
Their seems a lot about this but I haven't found anything definitive, and it's easy to get lost.
I did try the code in Msg 5 here...
-
@fafalone if you were developing something, how's progress ?
|
Click Here to Expand Forum to Full Width
|