ExternalCallback w/o return value

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ExternalCallback w/o return value

Udo Schneider
Hi,

Is there any possibility to create an ExternalCallback which does not
return anything it all (a "void function" to use C slang here).

I'm getting GPFs here with the callback. The callback itself works fine
  - only if the callbacks block ends (and is returning the block value
as DWORD) the GPF appears.

CU,

Udo


Reply | Threaded
Open this post in threaded view
|

Re: ExternalCallback w/o return value

Chris Uppal-3
Udo Schneider wrote:

> Is there any possibility to create an ExternalCallback which does not
> return anything it all (a "void function" to use C slang here).

I use ExternalCallbacks with #descriptors like:
    'stdcall: void sdword'
and it seems to work for me.

> I'm getting GPFs here with the callback. The callback itself works fine
>   - only if the callbacks block ends (and is returning the block value
> as DWORD) the GPF appears.

Are you sure you have the stdcall/cdecl choice correct ?  Getting that wrong
would cause a trashed stack as "function call" has returns, which might be what
you are seeing.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: ExternalCallback w/o return value

Udo Schneider
Chris Uppal wrote:
>>Is there any possibility to create an ExternalCallback which does not
>>return anything it all (a "void function" to use C slang here).
>
>
> I use ExternalCallbacks with #descriptors like:
>     'stdcall: void sdword'
> and it seems to work for me.
This was the solution. Thanks.

The EC says it's only possible to have DWORD like return types. I assume
this is only true if you are using ExternalCallback
class>>block:argumentTypes.

Using customized ExternalDescriptors gives you greater freedom :-)

Thanks for your help.

CU,

Udo