Article View: borland.public.cppbuilder.nativeapi
Article #15844Point to function in package
From: Gareth
Date: Mon, 09 Jun 2003 16:33
Date: Mon, 09 Jun 2003 16:33
29 lines
1709 bytes
1709 bytes
Hello,
Not too sure if this is the correct group (if not can someone please point me in the right direction!) Is it possible to pass a function pointer to a package, so that the package can call the function at a later time?
The code I have written compiles ok, but when the function is called to pass the function pointer to the package an exception is thrown.
The package is dynamically loaded.
The function that causes the exception:
void TAl::SetCreatedC(void (__closure *tm)(int, int)){
LiSetCreatedC(tm);
}
Where LiSetCreatedC is defined as:
typedef void __declspec(dllimport) LSetLiCreatedC(void (__clousure *)(int, int));
LSetLiCreatedC *LSetLiCreatedC;
All other function calls to the package work, just the one with the function pointer causes an exception.
Anyone any ideas or hints?
Thanks,
Gareth.
Technical Details
Message-ID:
<3ee4b6e1$1@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!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,539fe3b8aca8f5df,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-09 09:37:31 PST From: "Gareth" <spam@twichy.demon.co.uk> Sender: "Gareth" <spam@twichy.demon.co.uk> Reply-To: "Gareth" <spam@twichy.demon.co.uk> Subject: Point to function in package Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 80.177.4.119 80.177.4.119 X-Forwarded-For: 10.0.0.99 NNTP-Posting-Host: 207.105.83.65 Message-ID: <3ee4b6e1$1@newsgroups.borland.com> Date: 9 Jun 2003 09:33:37 -0700 X-Trace: newsgroups.borland.com 1055176417 207.105.83.65 (9 Jun 2003 09:33:37 -0700) Lines: 29 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail