delphi-2010

Delphi annotations

我的未来我决定 提交于 2019-12-24 17:19:56
问题 I was looking at the implementation of the TCustomComboBoxEx object since I need to create a custom combo box in delphi and I was triying to get what I needed, when suddenly I came over this piece of code: ... [UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.AllWindows)] procedure TCustomComboBoxEx.CreateWnd; var ChildHandle: THandle; I: Integer; StrEnum: IEnumString; EditHandle: THandle; begin ... What is that upon the procedure name? What is its purpose? Code like that

Is there any way to find out which form a TCustomForm reference refers to?

天涯浪子 提交于 2019-12-24 16:05:20
问题 I have added madExcept support to my application referenced in this question. When the program hangs I get the following report from madTraceProcess: date/time : 2015-07-28, 09:21:06, 350ms computer name : ENG_LAB user name : user registered owner : Eng_Lab_2 operating system : Windows 7 x64 Service Pack 1 build 7601 system language : English system up time : 1 hour 3 minutes program up time : 54 minutes 6 seconds processors : 2x AMD A6-5350M APU with Radeon(tm) HD Graphics physical memory :

Can I build WCF servers using Delphi 2010?

人盡茶涼 提交于 2019-12-24 09:58:06
问题 We would like to build new application as multi tiers, we can do it as web service, but we prefer to use more advanced features as WCF, which not found in datasnap too. can we do that with Delphi 2010 win32? the clients will be Delphi win32, Asp.Net (C#) and maybe windows mobile phones too. 回答1: Using Delphi Prism you can, see http://www.drbob42.com/examines/examinB4.htm 回答2: Since WCF is a .NET only technology, you will need to bridge to cross from the unmanaged Win32 world to the managed

Delphi2010-IDE keeps stoping on CPU debug window

≡放荡痞女 提交于 2019-12-23 12:34:29
问题 I keep getting the CPU-debug window in D2010 IDE, i noticed this appears on some Breakepoints, some others doesnt cause this effect. Can't explain when exactly this happends or which Breakpoints cause this but it seems like when the debugger can't reach a breackpoint on code it stops on the beginaddress of the method, and it gets in an endless loop so even removing the Breakpoint doesnt help, only solution is break debugging, remove breakpoint and restart again. I had the same issue with D7

delphi check internet connection

百般思念 提交于 2019-12-23 06:36:05
问题 I need a working function for Delphi 2010 to check if there is Internet connection available. I say working because so far I tried 4 different methods e.g. http://delphi.about.com/b/2005/04/22/how-to-check-for-internet-connection-using-delphi-code.htm but neither worked. For example one method alway gave back that there was internet connection even when the cable was not in the pc, the other the opposite (it always said there was no connection). procedure TForm1.Button1Click(Sender: TObject)

CreateFile not returning a proper Handle - devices in Delphi

泪湿孤枕 提交于 2019-12-23 04:38:16
问题 Hoping to find somebody that has experience with services in windows. I am trying to use the NdisProt driver for ethernet adapters in Delphi my_Handle := CreateFile(PChar('\\.\NdisProt'), GENERIC_WRITE or GENERIC_READ, 0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); (have tried with \\.\\NdisProt too) After execution my_Handle always has the value '4008' decimal and GetLastError always returns 0 If I try to read or write to the file I get acces violation, anybody knows why I'm getting this

How to pass string parameters to an TADOQuery?

徘徊边缘 提交于 2019-12-23 03:15:12
问题 Using Delphi 2010 Can anyone tell me what I am doing wrong here with my code. The comments show the errors that I receive with the particular methods that I tried to pass parameters to my ADOQuery procedure CreateAdminLogin(const APasswd: string); var qry: TADOQuery; //P1, P2: TParameter; begin qry := TADOQuery.Create(nil); try qry.Connection := frmDataModule.conMain; qry.SQL.Text := 'INSERT INTO Users (User_Id, Password) VALUES (:u, :p)'; //Syntax error in INTO statement qry.Parameters

How to pass string parameters to an TADOQuery?

混江龙づ霸主 提交于 2019-12-23 03:15:07
问题 Using Delphi 2010 Can anyone tell me what I am doing wrong here with my code. The comments show the errors that I receive with the particular methods that I tried to pass parameters to my ADOQuery procedure CreateAdminLogin(const APasswd: string); var qry: TADOQuery; //P1, P2: TParameter; begin qry := TADOQuery.Create(nil); try qry.Connection := frmDataModule.conMain; qry.SQL.Text := 'INSERT INTO Users (User_Id, Password) VALUES (:u, :p)'; //Syntax error in INTO statement qry.Parameters

Improve speed on Crc16 calculation

你。 提交于 2019-12-22 15:55:12
问题 I need to calculate Crc16 checksums with a $1021 polynom over large files, below is my current implementation but it's rather slow on large files (eg a 90 MB file takes about 9 seconds). So my question is how to improve my current implementation (to make it faster), I have googled and looked at some samples implementing a table lookup but my problem is that I don't understand how to modify them to include the polynom (probably my math is failing). { based on http://miscel.dk/MiscEl

Rtti data manipulation and consistency in Delphi 2010

两盒软妹~` 提交于 2019-12-22 10:55:16
问题 Has anyone an idea, how I can make TValue using a reference to the original data? In my serialization project, I use (as suggested in XML-Serialization) a generic serializer which stores TValues in an internal tree-structure (similar to the MemberMap in the example). This member-tree should also be used to create a dynamic setup form and manipulate the data. My idea was to define a property for the Data: TDataModel <T> = class {...} private FData : TValue; function GetData : T; procedure