neatgadgets
Programmer
I have been trying for months to sort this problem out.
I have a dll that I use with an Authorware application. The dll has a set of functions and procedures that process a word document. The function in question gets a specific bookmark label in the document. The function works fine but it is not returning the result back.
The code interface seems the same as others that work fine. And I have setup the .rc correctly but the error returned is that it is non zero terminated.
I tried putting #0 on the string but that did not help.
The function is:
function Word_Get_Bookmark(oW:TWord; strDocNamechar; intSequence:Integer): Pchar;
var
strResult:WideString;
begin
strResult := '';
try strResult := oW.Get_Bookmark(strDocName, intSequence);
except on E: Exception do oW.DebugExceptionResult(E, 'Word Get_Bookmark failed') end;
Result := PChar(String(strResult));
end;
I have a dll that I use with an Authorware application. The dll has a set of functions and procedures that process a word document. The function in question gets a specific bookmark label in the document. The function works fine but it is not returning the result back.
The code interface seems the same as others that work fine. And I have setup the .rc correctly but the error returned is that it is non zero terminated.
I tried putting #0 on the string but that did not help.
The function is:
function Word_Get_Bookmark(oW:TWord; strDocNamechar; intSequence:Integer): Pchar;
var
strResult:WideString;
begin
strResult := '';
try strResult := oW.Get_Bookmark(strDocName, intSequence);
except on E: Exception do oW.DebugExceptionResult(E, 'Word Get_Bookmark failed') end;
Result := PChar(String(strResult));
end;