About Terminal Server, Citrix, Delphi and other stuff
22 Feb
My hoster has had some problems with the simulatesas.com domain that I use for SasLibEx enquiries. If you have sent mail to
that has not been answered I kindly request you to send it again.
I would also like to briefly tell you about an upcoming new release of SasLib, version 2.0. There is so much I would like to tell you about it but I will limit it to a few highlights here and save the rest for the upcoming website on SimulateSAS.com.
I feel especially good about 2.0 because further improvements were made to the code, again some highlights:
17 Feb
Delphi 2010 crashed when starting, it was clear that this was happening when opening the welcome page.
Just before the crash an error message “Message from webpage, displayNotification: Out of memory” was displayed.
This post on the Embarcadero Developer Network which was one of the first hits in Google showed that the solution was to clear Internet Explorer’s Browsing History (Temporary Internet Files). This fixed it for me.
10 Feb
I am writing a class that wraps Active Directory into Objects that live in an Objectlist, much like my Terminal Server class in the Jedi Windows Security Library.
One of the classes is TJwADUser that represents an Active Directory user with all kinds of properties. So while I was implementing them I stumbled upon the accountExpires attribute which is implemented as an 8 byte integer so I figured I could read it as Int64, cast this to TFileTime (FILETIME) and convert to TDateTime.
This raised an error however (EVariantTypeCastError with message ‘Could not convert variant of type (Dispatch) into type (Double)’.).
So I checked what kind of variant Active Directory returns and it is not the expected varInt64 but varDispatch.
It turns out that we need the IADsLargeInteger interface to obtain the correct values. The code below works for me:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
function TJwADUser.GetExpirationDate: TDateTime;
var
LargeInteger: IADsLargeInteger;
ft: TFileTime;
v: Variant;
begin
if Get('accountExpires', v) then
begin
LargeInteger := IDispatch(v) as IADsLargeInteger;
ft.dwLowDateTime := LargeInteger.LowPart;
ft.dwHighDateTime := LargeInteger.HighPart;
if Int64(ft) = 0 then
Result := 0
else
Result := FileTime2DateTime(ft)
end
else begin
Result := 0;
end;
end; |
Notes: The Get function is a wrapper for IADs(User).Get(Ex) so you can ignore that and my function returns 0 when the value is empty or on read failure.
Active Directory Altiris Automation Manager bug Citrix Dell Delphi Exchange Exchange2003 Exchange2010 Hack Hewlett-Packard HP iOS Jailbreak Java LinkedIn Linux Lync McAfee MSI MySQL Navigation Objects Office Outlook Passat Password PowerPoint PowerShell RES RNS315 RNS510 SasLibEx Terminal Server ThinApp TSAdminEx VBS VCDS Vista VMWare Volkswagen Windows PE Wordpress XenApp
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.