Hello again. I'm trying to port turtle's ftp stuff from the archive ( http://www.blitzbasic.com/codearcs/codearcs.php?code=1444 ) which is pretty spanking. In fact it even allows me to upload to my webspace when other ftp programs don't. I'm not sure how but that program is my only way of uploading. Therefore I'd like to attempt to port it to bmx so I can write some useful utils with it. I'm stuck though. I'm not adept at porting (my first time) and I was wondering whether any of you kind souls could help me out with a few things.
Turtle has the following decls entries. I can add them to a decls with blitz3d and the ftp program runs fine. I'm not sure how they translate across to bmx.
Something like this:
What does :Byte Ptr mean in this situtation? And also, in the bb code what does the * mean?
I'd love to use them. Any help is greatly appreciated. Also, thanks to turtle for this code in the first place. You da man.
Turtle has the following decls entries. I can add them to a decls with blitz3d and the ftp program runs fine. I'm not sure how they translate across to bmx.
;Add to decls file ;------------------ ;.lib "wininet.dll" ;FtpCreateDirectory%(hFTPSession%,lpszDirectory$):"FtpCreateDirectoryA" ;FtpDeleteFile%(hFTPSession%,lpszFileName$) : "FtpDeleteFileA" ;FtpFindFirstFile%(hFTPSession%,lpszFileName$,lpFindFileData*,dwFlags%,dwContext%) : "FtpFindFirstFileA" ;FtpGetCurrentDirectory%(hFTPSession%,lpszCurrentDirectory*,neededLength*):"FtpGetCurrentDirectoryA" ;FtpGetFile%(hFTPSession%,RemoteFile$,LocalFile$,fFailIfExists%,dwFlagsAndAttributes%,dwFlags%,dwContext%):"FtpGetFileA" ;FtpPutFile%(hFTPSession%,LocalFile$,NewRemoteFile$,dwFlags%,dwContext%):"FtpPutFileA" ;FtpRemoveDirectory%(hFTPSession%,lpszDirectory$) : "FtpRemoveDirectoryA" ;FtpRenameFile%(hFTPSession%,lpszExisting$,lpszNew$) : "FtpRenameFileA" ;FtpSetCurrentDirectory%(hFTPSession%,lpszDirectory$) : "FtpSetCurrentDirectoryA" ;InternetCloseHandle%(hInternet%):"InternetCloseHandle" ;InternetConnect%(hInternet%, ServerName$, ServerPort%, Username$, Password$, Service%, Flags%, dwContext%):"InternetConnectA" ;InternetFindNextFile%(hInternet%,lpvFindData*) : "InternetFindNextFileA" ;InternetOpen%(Agent$, AccessType%, ProxyName%, ProxyBypass%, Flags%):"InternetOpenA" ;InternetGetLastResponseInfo%(lpdwError*,lpszBuffer*,lpdwBufferLength*) : "InternetGetLastResponseInfoA"
Something like this:
Global wininetLib = LoadLibraryA("wininet.dll") Global FtpCreateDirectory(hFTPSession:Int, lpszDirectory$)"win32"=GetProcAddress(wininetLib,"FtpCreateDirectoryA")
What does :Byte Ptr mean in this situtation? And also, in the bb code what does the * mean?
InternetGetLastResponseInfo%(lpdwError*,lpszBuffer*,lpdwBufferLength*) : "InternetGetLastResponseInfoA"
I'd love to use them. Any help is greatly appreciated. Also, thanks to turtle for this code in the first place. You da man.