0

Reading through the Microsoft Implementation of ODBC header file sql.h, the parameters of almost all the declarations of the APIs are qualified with __IN__ or __OUT__.

Example

SQLRETURN  SQL_API SQLRowCount(_In_ SQLHSTMT StatementHandle,
                               _Out_ SQLLEN* RowCount);

I understand, such usage is usually used to determined the direction for transport optimization particularly used in COM world where data needs to be marshaled and UN-marshalled but such usage seems odd in ODBC context.

What is the significance of these qualifiers from ODBC perspective?

Abhijit
  • 62,056
  • 18
  • 131
  • 204

1 Answers1

0

Syntactically, there is probably no significance at all. They both are probably #defined to be nothing someplace. They're just for helping make the API more readable in isolation from the documentation - simply marking which parameters are inputs to the function and which are outputs.

Carl Norum
  • 219,201
  • 40
  • 422
  • 469
  • I fear not. If you have access to the header file, you can see a chain of macro definitions are in place. – Abhijit May 21 '13 at 16:06
  • I don't here, no. Can you show what the ultimate definition ends up being? – Carl Norum May 21 '13 at 16:07
  • I just compiled with /P option and as you suspected the macro chains ultimately ended up to nothing. But I am still curious if they are just there for documentation or have some ulterior motive? – Abhijit May 21 '13 at 16:11
  • I'm pretty sure it's just for documentation. [UEFI](http://www.uefi.org/home/) does something similar. – Carl Norum May 21 '13 at 16:56