Re: ODBC API translation - some problems
"Robert Marquardt" <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.jedi |
|---|---|
| Message-ID | <[email protected]> |
> The function is translated as > function SQLAllocHandle(HandleType: SQLSMALLINT; > InputHandle: SQLHANDLE; > OutputHandle: PSQLHANDLE > ): SQLRETURN; stdcall; I bet "var OutputHandle: PSQLHANDLE" is a better conversion. > SQLHANDLE is defined in Microsoft's SQLTYPES.h as > typedef void* SQLHANDLE; > and is translated as > SQLHANDLE = Pointer; > Correct conversion. > SQL_NULL_HANDLE is defined in Microsoft's SQL.h as > #define SQL_NULL_HANDLE 0L > The translator translates as > SQL_NULL_HANDLE = LongInt(0); Wrong conversion. Use SQL_NULL_HANDLE = nil; > Well, I don't know the way how to pass a string where a byte is > expected. Should I pass a pointer to its first Char? Use PChar(S) where S is a string. If the compiler complains then use Pointer(PChar(S)) to make the pointer compatible. > If this translation is un-tested and/or there are some bugs in it > where can I find a credible one? If you can send me the C headers i can do that. -- Robert Marquardt (Team JEDI) http://delphi-jedi.org NEU FÃR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-GruÃ, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++ ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/i7folB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/