我要一个双字变量赋值 'XVID',请问怎么实现。
即:
FccType:DWord;
我要令FccType='XVID'菜鸟问题,先谢谢了。

解决方案 »

  1.   

    问一下,如果另FccType='XVID'那么,FccType里的值到底是多少?
      

  2.   

    FccType的值就是'XVID'.
    这个是API函数里用的.
    FccType定义用Dword,但实际是四个字节,每个字节代表一个字母.
    下面是delphi 中Win32 SDK中的声明:
    The ICInfo function retrieves information about specific installed compressors or enumerates the installed compressors.BOOL ICInfo(    DWORD fccType,
        DWORD fccHandler,
        ICINFO * lpicinfo
       );
     ParametersfccTypeFour-character code indicating the type of compressor. Specify zero to match all compressor types.fccHandlerFour-character code identifying a specific compressor or a number between zero and the number of installed compressors of the type specified by fccType.lpicinfoAddress of a ICINFO structure to return information about the compressor.
      

  3.   

    你可以用变体记录来完成
    或先把'XVID'写到一个字符串中,在用move把值移植你的双字变量中
      

  4.   

    这样做
    var
      recs: packed Record
        case integer of
          0: (dw: DWord);
          1: (barr: array [0..3] of Char);
      end;begin
      recs.barr := 'XVID';
      fccType := recs.dw;
      ......
    end;