次の方法で共有


Update on “Using POOM with .Net Compact Framework Whidbey”

Last summer I wrote a post about how to access the PocketOutlook Object Model (POOM) using the Beta1 build of the .Net Compact Framework (https://blogs.msdn.com/stevenpr/archive/2004/08/05/209390.aspx ). A few things have changed since then that make this scenario even easier.

Specifically, last summer’s post included instructions for registering the POOM type library on your device. This was Step 5 in the sequence of steps. Fortunately, if you are using Beta2 or later, this step is no longer needed.

The reason you no longer need to register the type library is that the Compact Framework now calls through the IUnknown-derived (vtable) portion of a dual interface by default instead of calling through IDispatch by default.

The reason we used IDispatch by default in Beta1 was because we had richer marshaling support in that code path. However, the marshaling support in our vtable marshaler now matches that of our IDispatch marshaler.

VTable is now the default because:

1) It’s simpler to use (no type libraries are needed at runtime), and

2) It performs better

 

Also, last summer’s post described a registry key that you could use to tell the Compact Framework which marshaler to use for dual interfaces (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework\UseVTable). We’ve since removed the ability to indicate which marshaler you’d like to use, so this registry key no longer applies.

 

Remember too that Windows Mobile 5.0 includes managed APIs for access POOM, so you don't need to use Com Interop at all if Windows Mobile 5.0 is the only platform you are targeting.

 

Email as always with questions….

 

Thanks,

Steven

 

This posting is provided "AS IS" with no warranties, and confers no rights.

Comments

  • Anonymous
    June 15, 2005
    Unfortunately the download link for the .idl file is no longer valid.

    Ah well, at least there's still WM5...
  • Anonymous
    June 16, 2005
    I'll try to get the WindowsMobile team to restore the link to the idl file. If I don't succeed, I'll find a place to post it myself. In the mean time, feel free to email me at stevenpr@microsoft.com if you'd like the file.

    Sorry about the hassle,
    Steven
  • Anonymous
    June 17, 2009
    PingBack from http://pooltoysite.info/story.php?id=8011