delphi-2010

How to properly Sign XML in Delphi

老子叫甜甜 提交于 2019-12-13 06:49:22
问题 I'm trying to sign XML in Delphi with certificate, but all I'm getting are some unrecognized characters. I'm using this function var xmlData, signature: PByte; data: array[0..0] of PByte; msgCert: array[0..0] of PCCERT_CONTEXT; dwDataSizeArray: array[0..0] of DWORD; sigParams: CRYPT_SIGN_MESSAGE_PARA; cbSignedBlob: DWORD; begin if PCertContext = nil then Exit; GetMem(xmlData, Length(AXml)); try system.Move(Pointer(AXml)^, xmlData^, Length(AXml)); ZeroMemory(@sigParams, SizeOf(CRYPT_SIGN

Install both Delphi 2010 and XE3 on the same Windows?

风流意气都作罢 提交于 2019-12-13 04:27:33
问题 My Win7 now installed RAD Studio 2010 with Delphi 2010, can I install Delphi XE3 separately? So both Delphi 2010 and XE3 work on the same Windows? Thanks! 回答1: Yes you can. You can install all versions of Delphi side by side on a single machine. I'm currently sitting at a machine with D6, 2010, XE, XE2 and XE3. Different people have different ways to organise side by side installations. I personally remove all references to Delphi from my system PATH variable. Then if I need to do anything at

dumping word document ( *.doc) to Text?

大兔子大兔子 提交于 2019-12-13 03:38:46
问题 I'm looking for help in dumping word document ( *.doc) to Text? I am using Delphi 2010. If the solution is a component or library, it should be a free or opensource component or code library. 回答1: you don't need a third party component. check these samples Using the Range function wich comes with a Text property uses ComObj; function ExtractTextFromWordFile(const FileName:string):string; var WordApp : Variant; CharsCount : integer; begin WordApp := CreateOleObject('Word.Application'); try

Using FastMM4, how to register leaked string?

感情迁移 提交于 2019-12-13 01:03:08
问题 With FastMM4 one can easily register a leaked pointer, but not a leaked string. Apparently the @ operator applied to a string is not really giving us the whole string, nor is PChar(string) ; What can I use to nicely register a leaked string? For now I found this works: FastMM4.RegisterExpectedMemoryLeak(Pointer(NativeInt(PChar(StringVariable))-12)); But it relies on the magic number 12 , and that's version-dependent, and the code really doesn't express what's going on. I hope there's a RTL

Delphi: StringGrid, position and Context Menu

ⅰ亾dé卋堺 提交于 2019-12-12 16:40:26
问题 I'm having a problem with using a TStringGrid and Popup menu I want to know the Row / Column of the cell that was last active when select an item from my Popup menu. However when I click on the popup menu, the StringGrid.Row is returned as -1. I've tried using MouseToCell as part of OnClick, but even after setting SG.Row it still returns as -1 in the PopUp menus routines... I suspect that the problem is the Grid losing the focus. Are there any solutions to this that don't require OnClick

Installing Rad Studio 2007 and Rad Studio 2010 in same machine

拈花ヽ惹草 提交于 2019-12-12 15:41:23
问题 I want to install Rad Studio 2010 on a machine that already has installed Rad Studio 2007, There is some compatibility problem? thanks in advance, Bye. 回答1: See this answer from Nick Hodges. There is no problem with installing a newer version of Delphi/RAD Studio on a machine that has an older version. As Mason says, the reverse is not necessarily true. 回答2: Trying to install an older version of Delphi when a newer version already exists can cause problems. If you have to have both, either

How to Handle Exceptions thrown in AsyncCalls function without calling .Sync?

自作多情 提交于 2019-12-12 14:22:10
问题 When I am using AsyncCalls, how do you best get the exception into the main thread? For example: procedure TUpdater.needsToGoFirst(); begin asyncCall := TAsyncCalls.Invoke(procedure begin //some stuff if (possiblyTrueCondition = True) then raise Exception.Create('Error Message'); //more stuff TAsyncCalls.VCLSync(procedure begin notifyUpdates(); end); end); end; procedure TUpdater.needsToGoSecond(); begin asyncCall2 := TAsyncCalls.Invoke(procedure begin //initial stuff asyncCall.Sync(); /

How do I put a form in to help mode?

怎甘沉沦 提交于 2019-12-12 11:29:12
问题 I am trying to put form into "help mode" in Delphi 2010. I have a button which the user clicks, and I want the cursor to change to the help cursor, then when a user clicks onto a control, the help for the control is displayed Is there a window message that I can send? 回答1: Send a WM_SYSCOMMAND message to the form passing SC_CONTEXTHELP as lParam . Changes the cursor to a question mark with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message.

How to make a basic Media player to play a video in avi format?

橙三吉。 提交于 2019-12-12 04:54:31
问题 I want to play a video in Delphi. This is the code that I've got: if OpenDialog1.Execute then begin MediaPlayer1.FileName:=OpenDialog1.FileName; MediaPlayer1.Open; MediaPlayer1.Display:=pnlVideo; MediaPlayer1.Play; end; But I get an error message:'The specified file cannot be played on the specified MCI device.The file may be corrupt, not in the correct format or no available file handler available for this format.' The format of the video that I use is avi. All help is appreciated. 回答1:

delphi 2010 and dbexpress firebird driver

半腔热情 提交于 2019-12-12 03:41:40
问题 I am getting to know the dbexpress firebird driver from Chau Chee-Yang (http://sites.google.com/site/dbxfirebird/) I find it hard to install because there is very little information, I succeded making a connection, but several questions arise: When using the data explorer and I want to connect to the database sends me the following error: --------------------------- Database Explorer --------------------------- The located assembly's manifest definition does not match the assembly reference.