none
VSS Provider and .NET

    Question

  • Hello,

    I am trying to write my own implementation for vss provider. I took the sample code and and tried to modify it, but no matter how much I tried I can't integrate my .NET code into the provider:

    1. Write a separate C# COM+ dll and access it from a provider compiled as a native code - Fail.

    2. Write a mixed managed/unmanaged C++ to access my .NET code from the provider - Fail.

    3. Write my C# implementation to the provider - Fail (as expected).

    Any thought? I know Microsoft require the provider to be compiled as Native code. Does it mean that the only way to integrate my .NET code it to use a different process and communicate it via TCP for instance? 

    Any help would be appreciated!!

    Thanks :)

    • Moved by CoolDadTxMVP Wednesday, April 15, 2015 6:38 PM Extensibility related
    • Moved by Caillen Friday, April 17, 2015 9:38 AM
    Tuesday, April 14, 2015 8:53 PM

Answers

All replies

  •  I took the sample code and and tried to modify it, but no matter how much I tried I can't integrate my .NET code into the provider

    Hi,

    Do you mean "Visual SourceSafe" or "Volume Shadow Copy Service" by VSS? Is the sample code from this link?

    Volume Shadow Copy Service hardware provider sample


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Caillen Thursday, April 16, 2015 1:38 AM
    Thursday, April 16, 2015 1:38 AM
  • Exactly. As my implementation to VSS is already written in C#, I need to somehow be able to call managed C# functions from the unmanaged VSS, or to write the entire provider in C#, which I am not sure is feasible. I have tried as explained above to

    1.  Write a C# com dll and load it from a native provider (changing the default implementation), but I fail to create an instance of the c# com dll in the native vss code (CoCreateInstance fails). 

    2. Write a dll in C++.Net (option 2 above). I followed the instruction explained in https://msdn.microsoft.com/en-us/library/ms235211.aspx, but when I add even an empty managed (/clr) cpp file to the project, DllRegisterServer is not called (when registering it by calling InstallComponent of COMAdmin.COMAdminCatalog).

    3. Write a dll in C#: I managed to export the provider com interfaces to implement, but I am facing issues registering it in IVssAdmin from the C# code, in the requested format.

    It seems like option 2 is my safest bet at the moment, but any help would be appreciated.

    Thanks!!


    • Edited by poochie10 Thursday, April 16, 2015 11:42 PM
    Thursday, April 16, 2015 11:39 PM
  • Then I don't think it's suitable for Visual Studio Integration forum, but I'm not sure where it should belongs to. Maybe Windows Desktop Development forum or Visual C# forum or C++ forum is better. I move your question to [where is the forum for...] where the moderator may direct you to the right place.

    Thanks for your understanding.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 17, 2015 9:38 AM
  • Might try them over here.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral%2Cvcgeneral%2Cvcgeneral%2Cwindowsgeneraldevelopmentissues&filter=alltypes&sort=lastpostdesc

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Friday, April 17, 2015 3:18 PM
    Moderator