delphi 2010 variant to unicode problem
- by Crudler
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?