typedef struct tagSCCB
{
WORD                wCmd; 
short               siRet;  
union
{
LPVOID          lpObject; 
LPSCANNERCAPS lpCaps;
LPLENSINFO      lpLensInfo;
LPSWINFO        lpSwInfo;
LPCROPINFO      lpCropInfo;
LPMAPINFO       lpMapInfo;
LPSCANINFO      lpScanInfo;
LPMAPMERGE      lpMapMerge;
LPFN_MSGPROC    lpfnMsg;
LPMODESUPPORT   lpModeInfo;
PDEVCMD         pDevCmd;
HPBYTE          hpBuf;
LPIMGDEF pImgDef;
PJPEGHEADER pJPEGHeader;
};
union
{
DWORD           dwInput; 
LENSPARAM       inLensParam; 
DWORD dwCalibrationTimes;
};
union
{
DWORD           dwOutput; 
LENSPARAM       outLensParam; 
LPVOID pCalibratedData;
};
WORD                wIDOwner;
} SCCB, FAR* LPSCCB;
怎么把这个结构转换成delphi的数据结构啊????
我只有10分了!!

解决方案 »

  1.   

    TtagSCCB = Packed Record
        wCmd: WORD;
        siRec: SHORT;    Case Integer of
          0: (lpObject: Pointer;
              dwOutput: Word;
              dwInput: Word;
             );
          1: ( //.
               //.
               //.
             );
          2: (lpLensInfo: ...;
              pCalibratedData: Pointer;
              dwCalibrationTimes: Word;
             );
          3: (lpSwInfo: ...);
          4: (lpCropInfo: ...);
          ....
      end;
      

  2.   

    pLPSCCB = ^TLPSCCB;
      TLPSCCB = packed record
        wCmd : WORD;
        siRet : smallint;
        case integer of
          0:(lpObject: Pointer;
             dwInput:longword;
             dwOutput:longWORD;);
          1:(lpCaps  : PSCANNERCAPS;
             inLensParam:pLENSPARAM;
             outLensParam:pLENSPARAM;);
          2:(lpLensInfo : pLENSINFO;
            dwCalibrationTimes:longWORD;
            pCalibratedData:pointer;);
          3:(lpSwInfo : pSWINFO;);
          4:(lpCropInfo : pCROPINFO;);
          5:(lpMapInfo : pMAPINFO;);
          6:(lpScanInfo : pSCANINFO;);
          7:(lpMapMerge : pMAPMERGE;);
          8:(LPFN_MSGPROC : TLPFN_MSGPROC;);
          9:(lpModeInfo:pMODESUPPORT;);
          10:(pDevCmd : pDEVCMD;);       
          11:(hpBuf : PChar;);
          12:(pImgDef: pTLPIMGDEF;);
          13:(pJPEGHeader :pJPEGHEDAER;);
          
          wIDOwner:word;
      end;
    我这样会报错!!为什么??wIDOwner:word;//????
      

  3.   

    13:(pJPEGHeader :pJPEGHEDAER;);
          
          wIDOwner:word;---------------
    13:(pJPEGHeader :pJPEGHEDAER;     
          wIDOwner:word)