Having a hard time understanding something...
- Posted by Monty King <boot_me at GEOCITIES.COM> May 07, 1998
- 645 views
Hi, I have been trying to add more features to Daniel Berstien's euftp.e file, and succesfully added a delete remote file routine... but don't understand the basics of a few things... I can get the routine to execute without causing an error, but can't get any data from it...I'm not doing something right. Bear in mind that there is an entire framework of buttons, starting the program logs on, send sends a file, receive recieves a file (and sometimes deletes the local file it seems... (a little side effect) and also now I am working on ... from ftp.e FtpGetCurrentDirectory = link_c_func(wininet, --BOOL FtpGetCurrentDirectory( -- IN HINTERNET hFtpSession, --OUT LPSTR lpszCurrentDirectory, --IN OUT LPDWORD lpdwCurrentDirectory --); In my main program... sequence buffer buffer = repeat(0,5000) integer b, sz object size size = length(buffer) size = size & "0" --a null terminated string and further down, activated by a button... --try to get current directory procedure FGD(integer mouseX, integer mouseY) b = allocate_string(buffer) sz = allocate_string(size) err = c_func(FtpGetCurrentDirectory,{ftp,b,sz}) if err = 0 then err = message_box("Error, Error Mr.Bill","EuFTP error", or_all({MB_APPLMODAL,MB_ICONERROR,MB_OK})) else err = message_box("Directory Info Gotten","Great!", or_all({MB_APPLMODAL,MB_ICONERROR,MB_OK})) end if free(b) free(sz) end procedure What am I doing wrong? My variable types are all screwed up, I am sure. The sequence "buffer" ends up empty, even if I check it before I free up its handls? I am wondering if I need to grab the info that is in the 5000 spaces after the address that "b" is pointing to. Is that right? Could you tell me if my variables need changing, and also where I can find out what each of these variable types can be found to be defined? such as LPCSTRG and DWORD etc... Thanks... Monty in Oregon