Re: Dll function which return a Pointer
- From: Ante Smolcic <supersmola@xxxxxxx>
- Date: Fri, 30 Sep 2005 17:34:34 +0200
In article <1128091361.850039.66000@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
aleicaro@xxxxxxxxx says...
> Hi,
> I've a funcion in a DLL which return a pointer to a structure (Record)
> of mine.
> I've a problem:
> When I return the pointer from my DLL, I've the Pointer with the right
> value, but if I go in MyPointer^.myField, it gives me "Access
> violation".
>
> The definition of my function is right (with stdcall) both in the exe
> and in the dll.
> I haven't many experience with dlls, but in my opinion, the problem, is
> that the memory where is stored my record valued from the dll is
> cleaned when I return to my exe?
>
> Is it right?
>
> How can I solve it?
> Thank you
Where do you create your record?
I always create the record in my main application, not the dll, and pass
to dll the address of the record.
Post the DLL code.
--
I'm not having these two shag while I'm tied to a chair three feet away.
.
- References:
- Dll function which return a Pointer
- From: aleicaro
- Dll function which return a Pointer
- Prev by Date: Dll function which return a Pointer
- Next by Date: Re: Win XP Search for "File Containing Word" is Broken
- Previous by thread: Dll function which return a Pointer
- Index(es):
Relevant Pages
|
|