简体   繁体   中英

Windows Phone 7 - Use Native DLL - Need GUID of Class and Interface

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM