Most native string implementations use null pointer semantics, which means that they differentiate between empty strings (pointers to "") and null strings (null pointers).
To write wrapper functions for external functions in BDL that have optional string parameters, null pointer semantics are also implemented for BDL strings.
dll "some.dll"
"ApiFunc"
function ApiFunc(in dstring optional);
dclfunc
function ApiFuncWrapper(theString : string optional)
begin
ApiFunc(theString);
end T1;
dcltrans
transaction TMain
begin
ApiFuncWrapper();
end TMain;In cases where the optional parameter is omitted, external functions expect a NULL as the optional dstring parameter. Also if a string variable is set to NULLusing the StrSetNull() function, external functions expect NULL rather than DSTRING objects.