Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

getlasterror

138 views
Skip to first unread message

Steve DeWitt

unread,
Jul 21, 2003, 4:38:13 PM7/21/03
to
why would I be getting error codes like 1447(the window does not have
scroll bars),1445(cannot process a message from a window that is not an
mdi), and 1401(invalid menu handle) when my window does not have scroll
bars, mdi, or a menu? The window is basically just a test window. I am
using the wininet api to do ftp functions.

I call the getlasterror() function from the KERNEL32.DLL. I was hoping
to get the ftp error messges.

Tyler Craft

unread,
Jul 22, 2003, 7:51:52 AM7/22/03
to
I have no solid answer for you, but I do have another thing for you to think
about. The GetLastError doesn't always get called so there are times it has
an error from something else sitting in the buffer. I have been doing an
explicit SetError before doing any processing so that I am a little more
comfortable that the error that is in the buffer is the one that I want.


I would also use a dllspy to see what else is being called from the wininet
api.

Tyler


"Steve DeWitt" <everythi...@hotmail.com> wrote in message
news:#Ec2kk8TDHA.145@forums-2-dub...

Chris Keating (iAnywhere Solutions)

unread,
Jul 22, 2003, 1:55:51 PM7/22/03
to
Remember that GetLastError( ) returns the calling thread's last-error code
value. I suspect that these error codes are processed after your ftp
activity.

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

Sybase TechWave User Training and Solutions conference -- August 4 - 8, 2003
in Orlando, FL. -- A great place for education and in-depth discussions
on all our technology, future trends in the market, not to mention getting
time with the engineers who create the products! For more information,
visit http://www.ianywhere.com/techwave2003

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

"Steve DeWitt" <everythi...@hotmail.com> wrote in message
news:#Ec2kk8TDHA.145@forums-2-dub...

Steve DeWitt

unread,
Jul 24, 2003, 11:55:50 AM7/24/03
to
Function boolean InternetCloseHandle (ulong hInternet) Library "WININET.DLL"

return InternetCloseHandle(au_session)

iul_errorcode = GetLastError()

is this what you are asking for?

> Can you post your code where you get the error including the external
> declaration of the ftp function.
>
> Are you declaring the return value in PB from GetLastError as a long?
>
> Are you calling GetLastError() immediately in response to an error return
> value from the ftp call?
>
> steve
> [TeamSybase]

0 new messages