Re: Euphoria DLLs

new topic     » goto parent     » topic index » view thread      » older message » newer message

--=======ED17E4A=======

At 12:34 PM 4/25/03 -0400, you wrote:

>>Ah, it looks as if Topica has fixed the problems ... smile
>
>I think Topica is still screwed up, but ListFilter
>is inserting an extra empty blank line at the start of each
>EUforum message body. That seems to fix the problem.
>In an e-mail message, an empty line marks the end of
>the header and the start of the body.
> From what I've read on the List Owners list,
>Topica is (often) missing this boundary and is
>including the first part of a message in the header.
>
>>Robert Elia had written previously:
>>| The calling program is required to allocate a buffer and pass a pointer
>>| to the function in the DLL.  The DLL must then poke a string into the
>>| buffer.
>>Robert Craig replied:
>>
>>>        procedure GetLastError(integer pErrorDescription)
>>>
>>>In my example, it's important that you declare the parameter as
>>>integer and not atom.
>>
>>Then Robert Elia must write in the documentation of the API of his DLL,
>>that the pointer can only have a value in the 31-bit range, right?
>
>No, that's the point of the trick.
>I believe by doing this little (untested) trick of adding 0.0,
>he will be able to handle 32-bit pointers and other values,
>reliably. The documentation for his .dll needn't
>say anything about 31 vs 32 bits.
>
>Regards,
>    Rob Craig

Sorry to keep you waiting, I've been doing a lot of testing.

         Actually, I wouldn't be expected to write any documentation.  A 
person writing a program to use my DLL would use the same public 
documentation that describes the API as I use to write the DLL.  That's the 
problem.

         I tried your "trick", Rob, but got the same unpredictable 
behavior.  I even tried allocating the buffer with:

         pErrorDescription = c_func(GlobalAlloc, {GMEM_FIXED, 500})
         pErrorDescription = c_func(GlobalLock, {pErrorDescription})

from KERNEL32.DLL.  ...made no difference.  ctrace_d.out shows the poke in 
the DLL function as the last statement executed.

Two days later....

         I've managed to get a stripped down version working okay.  It 
didn't need Rob's trick. The problem must be somewhere else.  If I find it, 
I'll post it.  After that, the next step is to write a test program in C.

                 Thanks again,

                 Bob

--=======ED17E4A=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert;
x-avg-checked=avg-ok-5EF1982
Content-Disposition: inline


---

--=======ED17E4A=======--

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu