(Adding to the already useful info given by @bitmask and @dasblinkenlight)
In C a function prototype is, roughly, the declaration of a function signature, i.e. the declaration of the function name, return type and parameter list types (i.e. the types of the parameters the function accepts, in their respective order).
Therefore, in a sense, the prototype of a function can be viewed as the interface of the function towards client code (in this case the term interface is used in a general way, unlike what it means in OOP and Java in particular).
As a simpler example, suppose you defined a function like this:
int MyFunc( double x, char * z )
{
// function body code
}
then its prototype would be:
int MyFunc( double x, char * z );
or even
int MyFunc( double, char * );
since parameter names are optional in function prototypes.
There is no mechanism in C for creating an equivalent replica to Java interfaces, although often programmers refer to specially crafted C header files as "interfaces". These header files are filled with function prototypes and other declarations that represent the "interface" of the library they belong toward client code.
Therefore client code can #include
those header files to access the facilities offered by the library without knowing its implementation (here is the "interface" thing), which usually is resolved at link time (or at run-time if dynamic linking is involved).
Edit (to answer a comment)
What you see before function name is probably some macro trick. Since I don't know what's the context I can only guess. The two identifiers VisionAPI_RETURN
VisionAPI
are most probably defined as macros. From their names I guess that the first expands to the actual return type, while the second could be either an empty macro (usually used to mark some category of declarations) or expands to some compiler-specific keyword combination, usually used to declare the function low-level calling convention.
For example, somewhere there could be these macro definitions:
#define VisionAPI_RETURN int
#define VisionAPI
so that, after the preprocessor has finished its work, the compiler will see this:
int VisionInterf_ImageAttach(
VisionAPI_HANDLE ImageHandle,
uint32_t NumImages
);
Another example - if those macros are defined like this:
#define VisionAPI_RETURN struct MyReturn
#define VisionAPI __stdcall
then the prototype will be expanded like this:
struct MyReturn __stdcall VisionInterf_ImageAttach(
VisionAPI_HANDLE ImageHandle,
uint32_t NumImages
);
In this case the return type would be struct MyReturn
, while the __stdcall
keyword would indicate the "stdcall" calling convention (the __stdcall
keyword is used by Microsoft compilers). This resulting syntax is an extension to standard C syntax (many compilers have some kind of such extensions).