Darren Ferguson wrote:
> Thanks Rob, that makes sense. I'd wondered if something like that was
> happening, but wasn't sure. I'd love to just use WideStrings, but I need
> the DLLs to be callable from other programming languages.

Then you're in luck: Delphi's WideString type is nothing more than the 
Microsoft BSTR type. Any programming language that can call 
SysAllocString and SysFreeString can use Delphi's WideStrings.

> This all works nicely and the troublesome ID value from before is now
> correctly returned to the calling application. With the slight exception
> that when it trys to free the memory for the ID it raises an "invalid
> pointer operation" error.

That often indicates that you're trying to free something that wasn't 
allocated using the same memory manager. That could also happen when 
trying to free something that wasn't allocated at all, such as a string 
literal.

-- 
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to