How can programmatically check which version of the WMI is installed
How can programmatically check wich version of the WMI (Windows Management Instrumentation) is installed using delphi or C# ? thanks in advance. ...
How can programmatically check wich version of the WMI (Windows Management Instrumentation) is installed using delphi or C# ? thanks in advance. ...
I want to develop windows service in Delphi that communicates with an Oracle server via ADO. Wich guidelines should I follow? i really knew ADO, but i dont have experience with the windows services. Thanks in advance. ...
I recently had to work around the different default sizes used for enumerations in Delphi and c++ since i have to use a c++ dll from a delphi application. One function call returns an array of structs (or records in delphi), the first element of which is an enum. To make this work, I use packed records (or aligned(1)-structs). However,...
As I known, there are two common kinds of practices to ensure the thread safety of lazy-initialization: Double-checked locking (Marks the variable as volatile to avoid the memory ordering) InterlockedCompareExchangePointer It seems VCL uses the second practice. Is there any reason? class function TEncoding.GetUTF8: TEncoding; var ...
I use a service application I created in Delphi. My problem is that it is sometimes terminated by the operating system and I don't know why this happens. When I go the the system events, I can find a piece of information like this one: Event ID: 7034, The [...] service terminated unexpectedly. It has done this [...] time(s). I know yo...
Is it safe for a thread to READ a variable set by a Delphi VCL event? When a user clicks on a VCL TCheckbox, the main thread sets a boolean to the checkbox's Checked state. CheckboxState := CheckBox1.Checked; At any time, a thread reads that variable if CheckBoxState then ... It doesn't matter if the thread "misses" a change to th...
I am using this routine to list the local printers installed on on a machine: var p: pointer; hpi: _PRINTER_INFO_2A; hGlobal: cardinal; dwNeeded, dwReturned: DWORD; bFlag: boolean; i: dword; begin p := nil; EnumPrinters(PRINTER_ENUM_LOCAL, nil, 2, p, 0, dwNeeded, dwReturned); if (dwNeeded = 0) then exit; GetMem(p,dwN...
I have a TPageControl whose pages are all various forms that are attached using ManualDock(). The user should be able to rearrange the tabs by dragging them, which works already. It should however also be possible to undock the docked forms. For now I have the following code: procedure TMainForm.PageControlMouseDown(Sender: TObject; Bu...
I have a TWebBrowser placed on a form with the designMode enabled. Bellow the browser I have a close button with the Caption set to 'Clos&e'. When I am editing the contents of a document inside the WebBrowser and I press the key E the button close is called. It appears that it is treating TWebBrowser like other controls that don't handle...
This is an odd behaviour by my D2006 as it happens sometimes only. I have a project I want to debug. The file I want to debug is named 'Main.pas'. I have another unrelated project with the same Unit name and sometimes the Debug prompt me the wrong Main file instead of the Main unit from the current project. This have happened to me with ...
Im trying to write a server/service that broadcasts a message on the lan ever second or so, Kind of like a service discovery. The message needs to be received by multiple client programs that could be on the same machine or different machines. But there could be more than one program on each machine running at the same time...
I'm Looking for Web Service develop(by delphi) tutorials, including the development of services and clients. Thanks! ...
i' ve a problem in doing my final project... i'm having trouble with how to save multiple wav files into 1 wav file.. let's take an example: i have 3 wav files which are the syllables of the word "hospital" : "hos.wav", "pi.wav", and "tal.wav" (sorry if i'm wrong in determining the syllables of the words).. each of those syllable wav fi...
Hello, Sorry for the poor title,I'm new to OOP so I don't know what is the term for what I need to do. I have, say, 10 different Objects that inherit one Object.They have different amount and type of class members,but all of them have one property in common - Visible. type TSObject=class(TObject); protected Visible:boolean; en...
Can anyone advise how to change a bitmap from 32-bit BGR to 32-bit BGRA using TWICImage? ...
There is another way to load MSHTML documents without use Application.ProcessMessages? To load a document into a IHTMLDocument I need to do this: while Doc.readyState <> 'complete' do Application.ProcessMessages; I want not to process all the message queue during the loading, because I would be changing my application flow, in ...
Came by a curious case today, that got me thinking about how the object model in delphi really works. The case: We have imported a SOAP service that expose a couple of methods, taking objects as parameters. Delphi generates classes/interfaces that we use to communicate with the soap service, and the objects used as parameters all inher...
i have a form, which you can pretend is laid out like Windows Explorer: panel on the left splitter client panel +------------+#+-----------------------+ | |#| | | |#| | | |#| | | |#| | | Left |#| ...
In Delphi, consider var i: integer; begin for i := 0 to N do begin { Code } end; One might think that i = N after the for loop, but does the Delphi compiler guarantee this? Can one make the assumption that the loop variable is equal to its last value inside the loop, after a Delphi if loop? Update After trying a few si...
I have 2 adoconnections and 2 datatables in each connection (Local Table1_master Table1_Detail) (Network Table1_master Table1_Detail). I show them in a DBgrid and now I would like to update the (Local Table1_master Table1_Detail) from the tables in (Network Table1_master Table1_Detail). How can I update the selected records? I have tr...