1

I need to use C++ Native DLL in Windows Phone 7 application. I am using DllImport project which shows the way to include native code in Windows Phone 7 Application. It uses FileSystem.dll file to perform actios using Native Code. I need to use my Encryption dll instead of that. The code given uses following way to import functions from FileSystem.dll:

[ComImport, Guid("F0D5AFD8-DA24-4e85-9335-BEBCADE5B92A"), ClassInterface(ClassInterfaceType.None)]
public class FileSystemClass { }

[ComImport, Guid("2C49FA3D-C6B7-4168-BE80-D044A9C0D9DD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public partial interface IFileSystemIO { ... }

Only problem is that, I am not able to get the Guid used in ComImport attribute. Anyone knows, how to get the Guid for Class and Interface from Native C++ code?

M'vy
  • 5,696
  • 2
  • 30
  • 43
Let me Ask
  • 1,029
  • 1
  • 8
  • 33
  • Can you actually use a native/COM DLL in a WP7 app now?! – Rudi Visser Jul 21 '11 at 08:45
  • Removed the [tag:com-interop] for [tag:windows-phone-7]. Prioritise the communities over the functionalities. This should bring more expert audience to your question. (And [tag:interop] includes the removed one). – M'vy Jul 21 '11 at 11:24

1 Answers1

0

You can try to lookup the GUID from your C++ library with an editor or hex viewer, it should be somewhere at the top. See this link.

Markus Rudel
  • 1,318
  • 15
  • 30