Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #3547

Re: Function _WINCALL and CALLBACK

From "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Function _WINCALL and CALLBACK
Date 2012-06-01 07:30 +0000
Organization A noiseless patient Spider
Message-ID <jq9r2f$bot$1@dont-email.me> (permalink)
References <jq7b5o$dhe$1@dont-email.me> <c539450c-660b-4dcf-abb0-66cdfe807452@l5g2000vbo.googlegroups.com>

Show all headers | View raw


Hi Valery,

a) Do you say that there is no difference between CALLBACK and _WINCALL?
b) Is there a difference between
	FUCNTION aaa() AS VOID PASCAL
	FUNCTION bbb() AS VOID PASCAL CALLBACK
	(see following link:à
http://www.codeguru.com/cpp/cpp/cpp_mfc/callbacks/article.php/c10557/Cal
lback-Functions-Tutorial.htm

c) How do you know this things? Have you experience with the
differences?

Thanks for your answners,

Dirk

========================

Valery N. wrote:

> On 31 май, 11:46, "Dirk (Belgium)"
> <dirk.dot.herijg...@pbprojects.dot.be> wrote:
> > Hi Everybody,
> > 
> > Is there someone who could explain to me what the difference is
> > between
> > 
> > FUNCTION xxx() AS VOID
> > FUNCTION yyy() AS VOID CALLBACK
> > FUNCTION zzz() AS VOID _WINCALL
> > 
> > When do we need to use these extra 'words' ?
> > 
> > Thanks for any response.
> > 
> > Dirk
> > 
> > --
> 
> FUNCTION xxx() AS VOID
> => Function returns nothing. I.e., RETURN.
> Actually, function works as procedure. In CA-Vo it is recommended to
> use procedures instead of such functions.
> 
> FUNCTION yyy() AS VOID CALLBACK
> 
> http://www.firststeps.ru/mfc/winapi/r.php?55
> Normally such functions are called as callback functions. It is
> simple. If Windows cause your function, you shall specify it parameter
> passing type as to CALLBACK. This type of a call is described in
> WinDef.H as:
> #define CALLBACK __ stdcall
> 
> That is, parameter passing type - PASCAL. The normal call of functions
> is carried out in WIN32 API style. How Windows learns, what this
> function can be executed? You (knowing it or not) transfer it in
> parameters. If you create a window in Win32, transfer window function.
> Windows causes this function, when controls a window. All is simple.
> Told to system that if it is necessary to address to a window - here
> to you function. After that Windows knows that if it is necessary to
> draw again a window, it will cause this function and transfers to it
> in the WM_PAINT parameters. Idea quite simple. The operating system
> shall be able to cause some functions in application to release you as
> the programmer from tracking the program. Who wrote for DOS – knows,
> how it is inconvenient to think of what window is visible on the
> screen and what isn't present. Let the operating system cares. So, in
> any program for Windows (by the way, and not only in understanding of
> the graphic interface) there are functions which will be caused by an
> operating system. As example principal function of a window. This
> function shall be correctly issued in the program, namely CALLBACK.
> Normally we transfer it in the form of parameters by a call of the
> WIN32 API functions.
> 
> We look the file of the help of CA-Vo (Function statement):
> CALLBACK calling convention:  To specify this calling convention, use
> CALLBACK as the last keyword in the FUNCTION declaration statement.
> This is a special PASCAL calling convention with Windows prologue and
> epilogue.  It is used for low-level interfacing with Windows.
> 
> I hope, it will help you. :)
> 
> Valery.



-- 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Function _WINCALL and CALLBACK "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2012-05-31 08:46 +0000
  Re: Function _WINCALL and CALLBACK "Valery N." <mustangsoftcom@gmail.com> - 2012-05-31 05:30 -0700
    Re: Function _WINCALL and CALLBACK "Valery N." <mustangsoftcom@gmail.com> - 2012-05-31 05:50 -0700
  Re: Function _WINCALL and CALLBACK "Valery N." <mustangsoftcom@gmail.com> - 2012-05-31 05:28 -0700
    Re: Function _WINCALL and CALLBACK "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2012-06-01 07:30 +0000
      Re: Function _WINCALL and CALLBACK "Valery N." <mustangsoftcom@gmail.com> - 2012-06-01 03:00 -0700
      Re: Function _WINCALL and CALLBACK "Valery N." <mustangsoftcom@gmail.com> - 2012-06-01 03:09 -0700
        Re: Function _WINCALL and CALLBACK "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2012-06-04 07:22 +0000

csiph-web