Thread: calling fastcall functions

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    105

    calling fastcall functions

    Greets!

    Now I ran into the problem of fastcall function.
    There is a form with some functions which are called when pushing a button (fastcall function).

    What should I do if I'd like to use this function somewhere else? How can I Call it?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    105
    I almost forgot it...
    How long can an AnsiString be?
    My help says that "It's the same as the Delphi Long String type". Thanks a lot, where shoud I know that????
    Phew....

  3. #3
    Amateur
    Join Date
    Sep 2003
    Posts
    228
    Well, you call fastcall functions like all others but as stdcall, you need to indicate that you want to use that convention. (in the protrotype)

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    105
    Would you please post a code example?

  5. #5
    Amateur
    Join Date
    Sep 2003
    Posts
    228
    Quite simple, just like when you use WINAPI for example:
    Code:
    void __fastcall f();
    
    // ...
    
    f();

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    105
    Does it work if there's a

    Code:
    void _fastcall Tform::memo(Sender *TObject ....
    style fastcall function?
    Can I call it like
    TForm::memo(Sender *TObject.... ?

  7. #7
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    No, you must use the class instance, rather than the class name, and replace :: with . or -> depending on whether it's a object pointer reference or not.

    Eg.

    Form1->Memo (NULL);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 04-12-2009, 05:49 PM
  2. Replies: 9
    Last Post: 01-26-2008, 03:12 AM
  3. calling functions: exit and return
    By 911help in forum C Programming
    Replies: 3
    Last Post: 12-28-2007, 01:24 PM
  4. I Need Help Defining and Calling Functions
    By jonbuckets in forum C++ Programming
    Replies: 6
    Last Post: 10-25-2007, 09:46 AM
  5. Calling functions help
    By ForlornOdium in forum C++ Programming
    Replies: 14
    Last Post: 09-29-2003, 08:40 PM