Re: Calling a "procedure of object" routine w/variable parameters

From: Sterling Bates (sterlingb_at_bigbangmapsonco.com)
Date: 10/29/03

  • Next message: Sergio: "Re: Calling a "procedure of object" routine w/variable parameters"
    Date: Wed, 29 Oct 2003 12:33:46 -0700
    
    

    "Peter Below (TeamB)" <100113.1101@compuXXserve.com> wrote in message
    news:VA.0000a5ea.00955699@nomail.please...
    > Which calling convention are you using for your routines? This is of
    course
    > utterly crucial for this type of coding. The C varargs mechanism only
    works
    > due to the way cdecl functions put parameters on the stack. That
    guarantees
    > that the constant parameters are always at the lowest stack positions, at
    > known offsets in the stack frame.

    It's a stdcall convention. Basically a Delphi routine is called from C,
    with the parameter count & parameters passed in through a pointer. I need
    to turn these parameters around into a standard Delphi method call.
    Solerman Kaplon pointed me to Innerfuse Pascal, which appears to have
    related code, though I'd have to trim the framework considerably :-)

    I want Delphi developers to create classes that descend from my class, and
    are instantly interactive with both native and SpiderMonkey code.
    Properties are working, and parameterless functions are good as well, I just
    need to get the parameters to work now. (Returning results from the
    functions are the next target :-)

    Sterling


  • Next message: Sergio: "Re: Calling a "procedure of object" routine w/variable parameters"

    Relevant Pages

    • Re: you cant bash Microsoft enough
      ... all the regs onto the current stack on a hardware interrupt or an SWI. ... writing a set of 32 bit integer math routines and doing your own ... there needs to be a VMT for each type. ...
      (sci.electronics.design)
    • Re: Delphi 7 vs 2007
      ... I have a project written in Delphi 7. ... You can use the FastCode routines without upgrading, ... rebuilding the VCL/RTL or by patching the to redirect all calls to ...
      (borland.public.delphi.thirdpartytools.general)
    • Re: StdCall vs. CDecl
      ... __cdecl means that the caller needs to remove the args. ... caller to clean up the stack, while the caller will expect the function to ... why does our VB.NET code work well when the calling convention ...
      (microsoft.public.dotnet.framework.interop)
    • HC08 and RAM bootloader routine
      ... self-contained S19 file for a RAM-based message loop. ... contains FLASH programming routines and acts upon subsequent messages ... -nothing else uses this block of RAM and my stack is located at the ...
      (comp.arch.embedded)
    • Re: printf doubt
      ... If the format is exhausted while arguments remain, ... same stack, like the old 6502, manage this. ... At least one popular compiler does not. ... The __stdcall calling convention is used to call Win32 API functions. ...
      (comp.lang.c)