$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
18 Dec // php the_time('Y') ?>
Just a very quick note: I was just installing RAD Studio 10.2.2 when I noticed the installer has an Options button:
So I clicked it to see what options are available and noticed that the "Embarcadero Customer Experience Program" is opted-in by default:
28 Nov // php the_time('Y') ?>
Sometimes you need to know the Process Id (PID) of a running service. Since Windows 2003 you can use the tasklist.exe tool with the /SVC switch. But how to do this programmatically?
The QueryServiceStatusEx API returns a SERVICE_STATUS_PROCESS structure that contains the PID.
The code is not very complicated:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | uses JwaWinSvc; function GetServicePid(const Servicename: String): DWORD; var hScm: THandle; hSvc: THandle; ssp: SERVICE_STATUS_PROCESS; dwSize: DWORD; begin hScm := OpenSCManager(nil, nil, SC_MANAGER_CONNECT); if hScm = 0 then Exit(0); try hSvc := OpenService(hScm, PChar(Servicename), SERVICE_QUERY_STATUS); if hSvc = 0 then Exit(0); try if not QueryServiceStatusEx(hSvc, SC_STATUS_PROCESS_INFO, @ssp, SizeOf(ssp), dwSize) then Exit(0); Result := ssp.dwProcessId; finally CloseServiceHandle(hSvc); end; finally CloseServiceHandle(hScm); end; end; |
17 May // php the_time('Y') ?>
After figuring out how to encode and decode the Citrix passwords my next step for the upcoming Citrix Launcher is experiment with config.xml and authenticating to the Citrix Web Interface.
I imported the NFuse.dtd from the Citrix Web Interface into Delphi with the XML Data Binding Wizard. The results in an NFuse Unit so I can easily create the XML data.
To create an authentication packet I use the following code:
16 Aug // php the_time('Y') ?>
Today I was reusing some old (pre vista) code the retrieves the Logon SID that I wrote a few years ago. The Logon SID is a special SID that identifies a logon session that has the form S-1-5-5-X-Y.
You can view your Logon SID with Process Explorer, right click a GUI process, select Properties and goto the Security Tab:
21 Jun // php the_time('Y') ?>
In my SATA Controller Identification tool I was using the TSaveDialog (Delphi 2010) but I got a report that under Windows PE the dialog is never shown.
There’s no exception and I didn’t really bother to check why it fails. Instead I decided to replace it with the GetSaveFileName API which does work under Windows PE.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | var sl: TStringList; ofn: OPENFILENAME; Buf: array[0..MAX_PATH] of Char; ZeroMemory(@ofn, SizeOf(ofn)); ofn.lStructSize := SizeOf(ofn); ofn.hWndOwner := Form1.Handle; ofn.lpstrFile := @Buf[0]; ofn.nMaxFile := Length(Buf); ofn.lpstrInitialDir := PChar(GetCurrentDir); ofn.lpstrFilter := 'Any File'#0'*.*'#0'Registry file'#0'*.reg'#0#0; ofn.nFilterIndex := 0; ZeroMemory(@Buf, SizeOf(Buf)); if GetSaveFileName(ofn) then begin // Buf now contains the filename end; |