Article View: borland.public.cppbuilder.nativeapi
Article #11315Re: Loaded DLL function won't work
From: Remy Lebeau (TeamB)
Date: Wed, 18 Feb 2004 21:50
Date: Wed, 18 Feb 2004 21:50
22 lines
1662 bytes
1662 bytes
"Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> wrote in message
news:4033d84d@newsgroups.borland.com...
> int (*__stdcall Proc)(szRunTypes, char*&);
Shouldn't be be more like this instead?
int __stdcall (*Proc)(char*, char*);
From Peter's description, szRunTypes is a variable, not a data type. And
there is no reference used for the second parameter.
> Proc = (int(*__stdcall)(szRunTypes,char*&))
> GetProcAddress(Lib, "SITE");
You declared the Proc variable to be FARPROC. Wouldn't that cast fail then?
Also, since it is a FARPROC, wouldn't you need to past the pointer again
when actually calling the exported function?
Gambit
Technical Details
Message-ID:
<4033dc64$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4033d5c9$1@newsgroups.borland.com> <4033d84d@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5a8f68731742a0dc X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-18 13:55:52 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4033d5c9$1@newsgroups.borland.com> <4033d84d@newsgroups.borland.com> Subject: Re: Loaded DLL function won't work Date: Wed, 18 Feb 2004 13:50:53 -0800 Lines: 24 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.1165 NNTP-Posting-Host: 67.22.138.253 Message-ID: <4033dc64$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077140580 67.22.138.253 (18 Feb 2004 13:43:00 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail