Advertisement

03.13.2008 at 12:20PM PDT, ID: 23239808
[x]
Attachment Details

Variant Records in Delphi.Net

Asked by wtfinc in Delphi.net Programming, Delphi Programming

Tags: Delphi.net

How do you convert Variant Records to a safe type in Delphi.Net?  For example, I want to use the following type in a .Net program

type
  TMyDate = packed record
    case boolean of
      true  : (date : integer);
      false : (day : byte;
               month : byte;
               year : smallint);
  end;

I've seen references to using a StructLayout and FieldOffset attribute but I can't find any examples.
Start Free Trial
 
 
[+][-]03.14.2008 at 03:51PM PDT, ID: 21130323

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Delphi.net Programming, Delphi Programming
Tags: Delphi.net
Sign Up Now!
Solution Provided By: wtfinc
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628