My Doc's Got No Nodes

Looking for a punchline since 2002

Original article here

Recently, Google announced that they now support email over ActiveSync. So in theory you could set the phone to get email, calendar and contacts via ActiveSync and not use IMAP for email.

I tried setting this up, but found the email part of ActiveSync to be unreliable (at least with my “Google apps for your domain” account) – it complained about keys and lost the email from the phone’s inbox.

To be fair, they’re targeting the ActiveSync support at the iPhone and Windows Mobile, not Android.

Perhaps reliability will improve when the system has been running a bit longer, it would be nice not to have to use IMAP and ActiveSync to access the second Google account.

If you’ve got an Android phone, and you want to get your contacts, email and calendar from two Google accounts (e.g. work and home) it’s possible but a bit clunky.

Set up the phone with the Google account you want to use most, this will be the account that the phone’s built-in Google apps will use. Note that if you change your mind about which account this should be you’ll need to reset you phone and so lose all your settings.

For the other account, add an Exchange/ActiveSync account for the server m.google.com (as if you were using Windows Mobile, as shown here) and set it to sync calendar and contacts (not email because Google sync currently support it). To pick up email, add an imap account as shown here.

Now your contacts and calendar entries that came from the main Google account will show up as from “Google” and the items from the second account will show up as “Exchange”.

Not perfect, but it works OK. Now I just need to figure out how to stop it from listing all the ActiveSync’d contacts in “lastname, firstname” format.

Also note that either of these Google accounts can be Google Apps For Your Domain (gafyd) accounts if imap and sync are enabled by your domain administrator.

Searching the net to find out if it’s possible to make a cable without an RJ45 crimp tool yielded lots of people saying it’s not practical.

If you’ve only got a couple of ends to fit and don’t mind wasting a connector (or two) it’s not that bad.

Just splay the inner cores of the cable in the correct order and cut straight across the ends. Then feed the cores into the plug (making sure they go down to the ends of the correct holes). While keeping the wires pushed firmly into the plug, push down each metal piece in turn with a small flat-blade screwdriver.

Finally, give the cable a half-hearted tug to make sure they’re all fairly firmly stuck.

Obviously a crimp tool would give a much more reliable result, but at a push…

If a test framework has loaded a shadow copy of your test assembly, and you need the path it was built to, you can use the following:

           
var codebase = new Uri(Assembly.GetExecutingAssembly().CodeBase);
var assembly = new FileInfo(codebase.LocalPath);

This is one of those problems that I couldn’t find the answer with google.

Trying to load a C++ mixed mode assembly (like a CLR class library) from a byte array instead of a file throws a FileLoadException.

// ClassLib.dll is a mixed-mode assembly (from a C++ CLR Class Library project

Assembly.Load("ClassLib"); // Works

using (var stream = new FileStream("ClassLib.dll", FileMode.Open, FileAccess.Read))
{
    var bytes = new byte[stream.Length];
    stream.Read(bytes, 0, bytes.Length);
    Assembly.Load(bytes); // System.IO.FileLoadException "Unverifiable code failed policy check. (Exception from HRESULT: 0x80131402)"
}

Comments


Hi, Did you find an answer to this ? This is anno…

Anonymous - May 12, 2009

Hi,
Did you find an answer to this ? This is annoying, and I have come across it too. Basically it seems you have to stream the files from your binary stream to disk, then use Assembly.Load. I am remoting and wanted to stream DLLs, not have to write them to disk, but cannot if they have native code inside.

Sean.


Since I couldn't build the C++ assembly with /clr:…

Mark - May 12, 2009

Since I couldn't build the C++ assembly with /clr:safe (apparently that will fix the problem) I had to load it from disk like you're doing.


Same probleme here :(

Anonymous - Aug 03, 2009

Same probleme here :(


Yes, you can't do that, and here's why: ht…

Anonymous - Mar 31, 2010

Yes, you can't do that, and here's why: http://connect.microsoft.com/VisualStudio/feedback/details/97801/loading-mixed-assembly-with-assembly-load-byte-throw-exception-changed-behaviour


I guess the mechanisms that windows uses to load a…

Mark - Mar 31, 2010

I guess the mechanisms that windows uses to load a native/mixed-mode dll from disk can't be applied to an arbitrary set of pages in memory - probably because there's no API equivalent to LoadLibrary to do it.


Previous 7 of 8 Next