Article View: borland.public.cppbuilder.nativeapi
Article #15167Re: FTPCommand
From: Remy Lebeau (TeamB)
Date: Thu, 17 Jul 2003 16:50
Date: Thu, 17 Jul 2003 16:50
21 lines
1684 bytes
1684 bytes
"Boguslaw Fries" <B.Fries@luca-online.de> wrote in message
news:3f168bd3$1@newsgroups.borland.com...
> typedef BOOL ( *FTPCOMMAND )( HINTERNET, BOOL, DWORD, LPCTSTR, DWORD,
> HINTERNET * );
Your typedef is missing a calling convention. That is very important,
otherwise the retreived function pointer will use the wrong one when you
actually call the function. It should be this instead:
typedef BOOL (WINAPI *FTPCOMMAND)(HINTERNET, BOOL, DWORD, LPCTSTR,
DWORD, HINTERNET *);
> And I got an exception
You're probably not testing the returned pointer from GetProcAddress() for
NULL before actually using it. You need to always do that.
Gambit
Technical Details
Message-ID:
<3f16d299$2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f15bd2f@newsgroups.borland.com> <3f15c6e2$2@newsgroups.borland.com> <3f168bd3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,92530846b9e5d1bb X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-17 10:10:51 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f15bd2f@newsgroups.borland.com> <3f15c6e2$2@newsgroups.borland.com> <3f168bd3$1@newsgroups.borland.com> Subject: Re: FTPCommand Date: Thu, 17 Jul 2003 09:50:29 -0700 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f16d299$2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1058460313 207.175.226.26 (17 Jul 2003 09:45:13 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail