type
PGUID = ^TGUID;
TGUID = packed record
D1: LongWord;
D2: Word;
D3: Word;
D4: array[0..7] of Byte;
class operator Equal(const Left, Right: TGUID): Boolean;
class operator NotEqual(const Left, Right: TGUID): Boolean;
class function Empty: TGUID; static;
end; IntegerArray = array[0..$effffff] of Integer;
PIntegerArray = ^IntegerArray; function IsEqualGUID(const Guid1, Guid2: TGUID): Boolean;
var
a, b: PIntegerArray;
begin
a := PIntegerArray(@Guid1);
b := PIntegerArray(@Guid2);
Result := (a^[0] = b^[0]) and (a^[1] = b^[1]) and (a^[2] = b^[2]) and (a^[3] = b^[3]);
end;

遗留问题:Word 怎么转换成Ineger的? D2,D3:Word

@Guid1 内存存储结构是什么样的? 0xffff 0xff 0xff 0xff 转到PintegerArray后是什么样的? a^[1]=0xff 还是a^[1]=0xffff 为什么?

Delphi中GUID相等检查中经典指针应用的更多相关文章

  1. 微软的COM中GUID和UUID、CLSID、IID

    摘自:http://blog.csdn.net/zhongguoren666/article/details/6711396 当初微软设计com规范的时候,有两种选择来保证用户的设计的com组件可以全 ...

  2. php中调用这个功能可以在web页面中显示hello world这个经典单词

    php程序写的时间长了,自然对他所提供的功能了如指掌,他所提供的一大堆功能,真是觉得很好用,但有时候会发现php也缺少一些功能,自己总是会产生为php添加一些自定义的功能的想法.久而久之,终于今天憋不 ...

  3. (转)MFC中Doc,View,MainFrmae,App各指针的互相获取

    App是应用域,所有的域中的东西都可以通过全局函数访问到它. MainFrame是主框架,也基本可以用全局函数访问到. MainFrame下是若干个ChildFrame,ChildFrame中若干个V ...

  4. MFC中 SDI/MDI框架各部分指针获取方式

    VC MFC SDI/MDI框架各部分指针获取方式   整理总结一下,希望能帮助到别人.   获得CWinApp 获得CMainFrame 获得CChildFrame 获得CDocument 获得CV ...

  5. cocos2dx中CC_CALLBACK_1等宏中this指针实际指向

    首先看代码,我在Helloworld中添加两个函数. void HelloWorld::addTarget(){ Size visibleSize = Director::getInstance()- ...

  6. sqlserver中GUID的默认值设置

    sqlserver中GUID的默认值设置 YID uniqueidentifier not null default (NEWSEQUENTIALID()), //有序GUID(只能用于表设计的时候的 ...

  7. 问题-delphi 程序在某电脑中显示???问号 乱码

    问题现象:delphi 程序在某电脑中显示???问号 乱码 问题原因:因为语言的原因.不同的国家可能显示的编码不一样. 问题处理:“控制面板”>“区域和语言选项”>“区域选项”>“标 ...

  8. Analyze 静态分析工具中显示 大量的CF类型指针 内存leak 问题, Core Foundation 类型指针内存泄漏

    Analyze 静态分析工具中显示 大量的CF类型指针 内存leak 问题   今天使用Analyze 看了下项目,   解决办法,项目中使用了ARC,OC的指针类型我们完全不考虑release的问题 ...

  9. VC中窗口ID,句柄,指针三者相互转换函数【转】

    ID--HANDLE--HWND三者之间的互相转换id->句柄        hWnd = ::GetDlgItem(hParentWnd,id);id->指针        CWnd:: ...

随机推荐

  1. Using unique option prefix myisam-recover instead of myisam-recover-option

    [转载]关于mysql error.log报"Using unique option prefix myisam-recover instead of myisam-recover-opti ...

  2. postgresql大批量数据导入方法

    一直没有好好关注这个功能,昨天看了一下,数据库插入有瓶颈,今天研究了一下: 主要有以下方案: 1.使用copy从文件导入: copy table_001(a, b, "f", d, ...

  3. CleanMyMac2清理 lanchpad里面的图标没了

    好吧.用CleanMyMac2 清理了系统(10.9)之后图标没了.解决办法是: Launchpad存储在一个SQLite数据库中,存储目录是: ~/Library/Application Suppo ...

  4. JAVA多线程二

    Thread.Join() join()函数表示等待当前线程结束,然后返回. public final synchronized void join(long millis) throws Inter ...

  5. Masonry 固定宽度 等间距

    -(void)makeEqualDisViews:(NSArray *)views inView:(UIView *)containerView LRpadding:(CGFloat)LRpaddin ...

  6. LoadRunner error -27498

    URL=http://172.18.20.70:7001/workflow/bjtel/leasedline/ querystat/ subOrderQuery.do错误分析:这种错误常常是因为并发压 ...

  7. Red and Black ---路线问题

    There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A ...

  8. 多态.xml

    pre{ line-height:1; color:#1e1e1e; background-color:#f0f0f0; font-size:16px;}.sysFunc{color:#627cf6; ...

  9. STL中用erase()方法遍历删除元素 .xml

    pre{ line-height:1; color:#f0caa6; background-color:#2d161d; font-size:16px;}.sysFunc{color:#e54ae9; ...

  10. 俄罗斯方块游戏 --- java

    俄罗斯方块游戏 如有疑问请查看:http://zh.wikipedia.org/zh-tw/%E4%BF%84%E7%BD%97%E6%96%AF%E6%96%B9%E5%9D%97 更多疑问请参考: ...