Based on the number of postings to comp.lang.pascal, it would seem that by
far the largest number of problems calling Windows API functions or non-
Delphi DLLs are caused by passing Pascal-style strings to functions that
expect null-terminated (PChar) strings. This is the first thing you should
check if you get a GPF or other strange results when calling an external
function. See section 5.12 for more information on which type of strings
go where.