delphi-xe

Problems with extracting file summary information

孤人 提交于 2020-01-04 06:14:57
问题 I apologize for my English, it's not good, but I hope you will understand my question. I have problem with usage of WinAPI function StgOpenStorageEx . I need to get file's summary information. I found some solutions, but in all of them I need to use StgOpenStorageEx . Because it is not in standard modules, I declared it myself as exported from ole32.dll like this function StgOpenStorageEx ( const pwcsName : POleStr; //Pointer to the path of the //file containing storage object grfMode :

Delphi Login Form using App Tethering by Connecting to SQLite Database

余生长醉 提交于 2020-01-04 05:53:30
问题 Hi, EveryBody! I'm new to programming! I need your help plz. I've 2 project: 1. Project Login page. Using App Tethering and 2 buttons(Connect button =>connects to the server AND Login button=>Sends request to the Server to check Valid username and password). 2. Project Server page. In a Server Page using App tethering and FDQuery +( SQLite database test.db). When Client Connects to the Server and sends request to the Server to check valid username and password it gives wrong result. plz help

Is there a easier way to define a Enum type based on a boolean value?

为君一笑 提交于 2020-01-03 10:59:08
问题 Overview Not entirely sure if the question is worded appropriately or not, but I previously asked this question which relates to this one: How do I correctly implement a Set in a class as a property? I like to keep code as short, minimal and readible as possible, and this is where I think some code could be written better but I am running into problems. An example first of 2 ways to read the value in a Set: The long way: if (Delphi1 in IDECompatibility) then CheckListBox1.Checked[0] := True;

NSIS Plugin “nsScreenshot” not working in Windows NT 6.x

人走茶凉 提交于 2020-01-03 10:45:26
问题 I added a code that was published 3 years later than original plugin, but it still returns error... Code is straight forward imho ... but still I most likely miss some aspect ... See this code: { nsScreenshot NSIS Plugin (c) 2003: Leon Zandman (leon@wirwar.com) Re-compiled by: Linards Liepins (linards.liepins@gmail.com) Code by: http://www.delphitricks.com/source-code/forms/make_a_desktop_screenshot.html (e) 2012. } library nsScreenshot; uses nsis in './nsis.pas', Windows, Jpeg, graphics,

NSIS Plugin “nsScreenshot” not working in Windows NT 6.x

无人久伴 提交于 2020-01-03 10:45:01
问题 I added a code that was published 3 years later than original plugin, but it still returns error... Code is straight forward imho ... but still I most likely miss some aspect ... See this code: { nsScreenshot NSIS Plugin (c) 2003: Leon Zandman (leon@wirwar.com) Re-compiled by: Linards Liepins (linards.liepins@gmail.com) Code by: http://www.delphitricks.com/source-code/forms/make_a_desktop_screenshot.html (e) 2012. } library nsScreenshot; uses nsis in './nsis.pas', Windows, Jpeg, graphics,

Delphi (-XE) : casting to a record type with implicit conversion

倖福魔咒の 提交于 2020-01-02 04:40:10
问题 I have a record type with methods, representing an specific hardware measurement type, read from the instrument as a string. The record contains implicit coversion to (and from) a string. If I cast a string as a record type, it seems to work, but is this safe? That is, does casting a string to a record with implicit string conversion call the implicit conversion as per assigning a temporary value? var a: MeasurementRecord; // record type with implicit string conversion & decode methods b:

Shouldn't calling Free on an object reference set to nil throw an Access Violation every time it is called?

倾然丶 夕夏残阳落幕 提交于 2020-01-02 03:14:07
问题 I'm getting access violations from the unit DBXCommon.pas (in Delphi XE). When I look at the code I see things like the following (at the exclamation marks): function TDBXConnectionFactory.GetConnection(const DBXContext: TDBXContext; const ConnectionProperties: TDBXProperties): TDBXConnection; var ConnectionBuilder: TDBXConnectionBuilder; DelegatePath: TDBXDelegateItem; Connection: TDBXConnection; CombinedProperties: TDBXProperties; begin //... ConnectionBuilder := TDBXConnectionBuilder

Delphi XE: idHttp & Request.Range, a bug?

青春壹個敷衍的年華 提交于 2020-01-01 18:16:13
问题 I have Delphi XE. I try to set Request.Range of idHttp but I cannot do this. Delphi doesn't allow me to do this neither at design time nor at run time. E.g. I set '6000-' in a design time -> a property gets empty all time. I do (in a thread): Downloader.Request.Range:=(IntToStr(DFileStream.Position) + '-'); synchronize(procedure begin showmessage(Downloader.Request.Range) end); showmessage(Downloader.Request.Range) shows me nothing (an empty string). I checked a request in HTTPAnalyzer -> my

Scan all classes for a given custom attribute

ぃ、小莉子 提交于 2020-01-01 17:28:06
问题 I'm looking for a way of scanning all loaded classes for classes which contain a custom attribute, if possible, without using RegisterClass(). 回答1: at first you have to create TRttiContext , then get all loaded classes using getTypes . after that you can filter types by TypeKind = tkClass ; next step is to enumerate attributes and check if it has your attribute; attribute and test-class delcaration: unit Unit3; interface type TMyAttribute = class(TCustomAttribute) end; [TMyAttribute] TTest =

Delphi XE – Datasnap Filter problems

為{幸葍}努か 提交于 2020-01-01 07:00:27
问题 I have a tcp/ip Datasnap -XE Server that uses a PC1 and Zlib filter On the Client both of these filters are defined in DataSnap TSqlConnection When the client connects to the server I get a "Connection Closed Gracefully” error message If I only use the PC1 filter on its own - there is no problem If I only use the Zlib filter on its own - there is no problem Any Ideas on how I can get both filters working at the same time? 回答1: You need to deploy the libeay32.dll and ssleay32.dll with your