Remko Weijnen's Blog (Remko's Blog)

About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like

Archive for February, 2010

Did you make a SasLibEx enquiry? And… news!

My hoster has had some problems with the simulatesas.com domain that I use for SasLibEx enquiries. If you have sent mail to mail 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.

  • A new option to simulate Control-Alt-Delete with only user permissions (no need to be admin or even system).
  • New Switch console function to reconnect closed RDP sessions for remote control.
  • Supports Windows Vista, Server 2008, Windows 7 and Server 2008 R2.
  • Support for Delphi 2010, C++ Builder 2010 and will support MS Visual C++ 2010 once it reaches RTM.
  • Native x64 support.

I feel especially good about 2.0 because further improvements were made to the code, again some highlights:

  • Full documentation of all functions, parameters and known possible errors.
  • 80% of the code was rewritten from scratch.
  • Uses techniques like annotations to further reduce the chance of programing errors.
  • Structured testing.

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.

  • 6 Comments
  • Filed under: Delphi
  • 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:

    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.

    Blogroll


    Categories


    Archives