delphi 2010 variant to unicode problem
Posted
by Crudler
on Stack Overflow
See other posts from Stack Overflow
or by Crudler
Published on 2010-03-17T14:57:47Z
Indexed on
2010/03/28
7:13 UTC
Read the original article
Hit count: 509
Please advise how I can achieve this.
I am working in a dll in delphi 2010. This dll has a exported procedure that receives an array of variants. I want to be able to take one of these variants, and convert it into a string, but i keep getting ?????
I cannot change the input variable - it HAS to be an array of variants. The host app that calls the dll cannot be changed. It is written in Delphi2006.
sample dll's code is:
Procedure TestArr(ArrUID : array of variant);stdcall;
var i : integer;
s:string;
begin
s:= string(String(Arruid[0]));
showmessage(s);
end;
obviously in D2006 my dll works fine. I have tried using VartoStr - no luck. When I try test the VaType I am getting a varString Any suggestions?
© Stack Overflow or respective owner