此处所列的文章均是我自己从国外的网站摘抄并翻译的,由于英文水平有限,里面肯定有不少错漏.翻译这些东西没有其他的什么用途,只是提高自己的英语阅读能力和编程技术水平而已     
摘要: The GlobalAlloc function allocates the specified number of bytes from the heap. In the linear Win32 API environment, there is no difference between the local heap and the global heap. HGLOBAL GlobalAl... 阅读全文
posted @ 2010-11-14 21:32 AppleAndPear 阅读(462) 评论(0) 推荐(0) 编辑
摘要: function FileOpen(const FileName: string; Mode: LongWord): Integer;{$IFDEF MSWINDOWS}const AccessMode: array[0..2] of LongWord = ( GENERIC_READ, //DWORD($80000000); GENERIC_WRITE, //$40000000; GENERIC... 阅读全文
posted @ 2010-11-14 20:09 AppleAndPear 阅读(266) 评论(0) 推荐(0) 编辑
摘要: TStringStream = class(TStream) //字符串流 private FDataString: string; //内存的数据 FPosition: Integer; protected procedure SetSize(NewSize: Longint); override; public constructor Create(const AString: string)... 阅读全文
posted @ 2010-11-13 20:46 AppleAndPear 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 读文件和写文件函数。返回值是Bool类型。创建文件。constructor Create(AHandle: Integer);constructor THandleStream.Create(AHandle: Integer);begin inherited Create; FHandle := AHandle;end;//直接调用的文件读。function FileRead(Handle: In... 阅读全文
posted @ 2010-11-12 20:14 AppleAndPear 阅读(316) 评论(0) 推荐(0) 编辑
摘要: function TComponent.GetComponentCount: Integer;begin if FComponents <> nil then Result := FComponents.Count else Result := 0;end;procedure TComponent.Insert(AComponent: TComponent);begin if FCom... 阅读全文
posted @ 2010-11-11 22:13 AppleAndPear 阅读(226) 评论(0) 推荐(0) 编辑
摘要: function TryEncodeTime(Hour, Min, Sec, MSec: Word; out Time: TDateTime): Boolean;begin Result := False; if (Hour < HoursPerDay) and (Min < MinsPerHour) and (Sec < SecsPerMin) and (MSec < M... 阅读全文
posted @ 2010-11-09 21:42 AppleAndPear 阅读(291) 评论(0) 推荐(0) 编辑
摘要: Delphi BasicsArrayKeywordA data type holding indexable collections of data1 type Name = array[Index type|Ordinal..Ordinal {,...}] of Base type; // Static array 2 type Name = array of {array of ...} Ba... 阅读全文
posted @ 2010-11-09 21:11 AppleAndPear 阅读(219) 评论(0) 推荐(0) 编辑
摘要: About arraysArrays are ordered collections of data of one type. Each data item is called an element, and is accessed by its position (index) in the array. They are very useful for storing lists of dat... 阅读全文
posted @ 2010-11-09 20:52 AppleAndPear 阅读(154) 评论(0) 推荐(0) 编辑
摘要: function TryEncodeTime(Hour, Min, Sec, MSec: Word; out Time: TDateTime): Boolean;begin Result := False; if (Hour < HoursPerDay) and (Min < MinsPerHour) and (Sec < SecsPerMin) and (MSec < M... 阅读全文
posted @ 2010-11-08 21:01 AppleAndPear 阅读(93) 评论(0) 推荐(0) 编辑
摘要: function XXXCompareText(const S1, S2: string): Integer;Begin Result := CompareString(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, Pchar(s1), Length(s1), Pchar(s2), Length(s2)) - 2;end;function XXXSameStr(c... 阅读全文
posted @ 2010-11-07 20:39 AppleAndPear 阅读(132) 评论(0) 推荐(0) 编辑