Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / November 2005

Tip: Looking for answers? Try searching our database.

Transfer protected media file license to device

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DKT - 03 Nov 2005 00:48 GMT
Hi,
We are trying to transfer a protected file (with DRM) to a portable device
using Windows Media Device Manager SDK (WMDMsdk) . We have no problem running
this as an ATL application. But since our application is written in C#, we're
trying to  write a DLL in c++ that will enable the c# application to interact
with the WMDM interface through the c++ dll.
What would be the best approach to this problem? What type of c++ project
should we use to allow the above functionality? Is there any documentation
Signature

Thank you,

Dkt

"Peter Huang" [MSFT] - 03 Nov 2005 07:09 GMT
Hi

I think we just need to wrap the C++ DLL as a COM Component and expose the
necessary interface you wants.
Then we can add a COM reference to the COM DLL in C#/VB.NET and use it as
just a common .NET classlibrary.
COM Interoperability in Visual Basic and Visual C#
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbconcominteropinvisualbasicvisualc.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

DKT - 03 Nov 2005 19:13 GMT
Thank you Peter,
However, our problem is not interfacing the c++ dll from our C# application
but rather creating the c++ dll. As i mentioned, the purpose of this dll is
to create a wrapper around Windows Media Device Manger dll. According to the
Windows Media Device Manger documentation, interfacing with it can be done
obly with c++. When we take the sample code from the documentation and try to
compile it as a c++ .net class library, we get all kinds of errors (like
double pointers errors). So the question is how can a c++ class library can
be used to interface with a dll that requires staff like double pointers etc.
Signature

Thank you,

Dkt

> Hi
>
[quoted text clipped - 13 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 04 Nov 2005 02:58 GMT
Hi

I am sorry if I did not make it clearly.
I think we have two steps.
1. To create a legacy C++ COM DLL to wrap what you want.
NOTE: this is totally a pure C++ DLL not related with .NET
2. Use C# add a COM referecne to the COM DLL created in step1, just as we
do with a WebBrowser, or other pure legacy COM Object.

If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.