Two geeks coding

It's Monday night. You come home from work. What do you do?
Sit in the lounge and code, of course!

Rob is
working on "fixing" (ha) WordBlogX
and actually writing a "real" setup program for it (he can't help
himself, you see. It's a sickness).

I'm playing around with CryptoAPI
on PocketPC
which is really messy because there's no managed library for it
was one of the things cut from Compact Framework) and the C++ header files
declare everything as DWORD when
some are really ints and some are uints... I had to get a mapping file
from someone else here at Microsoft that had the correct DllImport declarations.

Rob keeps making these horrible groaning sounds and then
asking me "Where did <insert random variable name> come from?"
and I have to explain about UI in Office docs, or what the codespit for VSTO
does (which is quite complicated and maybe I'll get around to talking about
that a bit one day...).

And I keep swearing at CryptoAPI or VS (which pegged the CPU
at 100% with a "Property Window" modal dialog, so I had to kill the
process). And now it's late again... hopefully I'll have write an entry soon
that will describe why I'm futzing around with crypto on the PocketPC. Stay

C89.5 played two Pet Shop Boys (requires Flash) songs this
evening - wow, I'm impressed. One was a recent track from Disco 3 named Try
it (I'm in love with a married man)
(no, not personally; that's the name of
the track) and the other one was an (IMHO) less-than-optimal remix of an
otherwise really good early 80s track, Opportunities
(Let's make lots of money)
from their debut Please
(also on Discography:
The Complete Singles Collection
). The remix was the one from Disco,
which is a pretty cool album if you remember it came out in the mid-80s, but I
just don't like the remix
of Opportunities

BTW, did you know that PSB (which many people consider
"one hit wonders") have actually had 33 top-20 hits in the UK?

Anyway, I was just happy they played one tune... but two?!? And
browsing to the PSB site, I just found out a new compilation album is due out
in a few weeks. Where would I be without blog writing?!?

Anyway, one thing I have to do is answer my own little
question from a few days ago about why we don't install the OfficeDocumentMembershipCondition in
the GAC by default. It was only meant as a joke question (since there's really
no way anyone could have known the answer), but seems at least one person (you
know who you are <g>) actually tried to find the answer, and they'll go
batty if I don't spill the beans.

Soooo... the reason we don't install it into the GAC is
because we would not be able to reliably uninstall it. The reason we can't
reliably uninstall it is because if it is used in policy, then removing it
would break all managed code on the machine.

Yup. All managed code.

The reason for this is that the CLR needs to instantiate all
the objects used by policy (such as ZoneMembershipCondition
or UrlMembershipCondition
objects) in order to resolve the permissions for assemblies. If it can't create
any one of these objects, it has to fail to load any assemblies because (in
theory) the object that is failing to load could be denying permissions to an assembly. So it fails to load anything...
including the code that is supposed to manages policy itself! You can't even
display the policy hierarchy using caspol
if you have references to objects in policy that don't exist in the
Luckily you can still reset policy with caspol
-all -rs
, but that's a bit drastic.

So we don't install because we can't uninstall. Maybe we
could have been tricky in our uninstall and checked if you used the condition
in any policies, but then we'd have to check across all users, and what if you
were using the object at runtime (ie, not in persistent policy, but at the AppDomain
)? Who knows.

I think that's it for now.

Sorry for all the PSB gushing; I
Get Excited
(grrr no sound sample).

Comments (6)
  1. Valery says:

    Just a comment to your "I’m playing around with CryptoAPI on PocketPC…… DllImport declarations":
    you may find following sample to be useful:

  2. Rob says:

    Gosh darn it, WordBlogX will become a useful blogger and it will have a decent setup. Batch file setups are so 1980s (early-1980s!). Okay, that’s it. I’m going to bed. So much for getting back to a solid diurnal sleep schedule today.

  3. Siew Moi Khor says:

    All you have to do was give me the bug number you know. But no, you’ve to give me a whole bug db — that was REALLY helpful. Anyway, you still owe me the bug number (mail it to me when you’ve the time please. Thanks!); want to check it out and show Misha.

    Was it in the 80s that PBS first appeared? i also like PBS but don’t remember as much as you. Gosh, 80s is all a blur now.

    I’d be interested in what crypto you’re trying to do on your PocketPC. In fact i’d be interested in your design. I used to have a thing for crypto and so went and studied it. For my Masters thesis, I built a clientserver notary public system using PKI etc in, ahem, Java.

    Due to US crypto export security restriction, I had to use the CryptoAPI from a provider outside of the US. I used an Australian provider in the end which started a very profound experience with the crypto dev community support system. No matter what time I ping the usenet, someone is at the other end. More than once, some stranger I don’t know stayed with me until the issue is resolved.

  4. Peter Torr says:

    Thanks Valery. I’ll take a look.

    Rob: So my taste in install technologies matches my tast in music, no?

    Siew Moi, PSB first "appeared" in 1981 but didn’t get a hit until "West End Girls" was remixed several years later. The rest is history. I’ll write about the PocketPC stuff soon.

  5. Siew Moi Khor says:

    So I checked out C89.5 tonight since you mentioned it. This is the first time I’m listening to that station. It looks like I chose a good night to check out the station — no commercial night! It’s pretty good. Now, this is a new discovery. So you actually listen to dance music. What do you know 😉

    Ah yes, I remember PSB’s "West End Girls". Re the PocketPC stuff, no hurry, write it when time allows.

  6. Peter Torr says:

    Every night is "No Commercial Night" on c89.5 — it’s run by a local High School.

    90% of my music collection is electronica (trance, house, progressive, ambient, dance, pop, whatever). That’s why I have to go back to Australia every year — to pick up all the good stuff that isn’t released in the USA! 🙂

Comments are closed.

Skip to main content