"*.idl", ".cs" and "c++", I need more information of what I am working with to figure out what I need to know, please help.

  • Thread starter Thread starter RookieFrankie
  • Start date Start date
R

RookieFrankie

Guest
Hi guys:


I am currently in a project that calls c++winrt from c# thru IDL, I have a const static string from C++ side and I am returning it as an winrt::hstring thru idl to C#. However, when I try to access this const static I am getting a cast error. This is very confusing, since if I move these static strings to another runtime class in the IDL, I wasn't getting this cast error, the only difference that can remotely hint the culprit to me is the using of optional template class in C++, but I am a very rookie windows developer and don't know anything about windows. I have tried a lot of googling and it all landed me in sandbox jail.


An exception of type 'System.InvalidCastException' occurred in App1.exe but was not handled in user code
Unable to cast object of type 'System.__ComObject' to type 'MySDK.IMyInformationStatics'.


I would also want to know where would I be able to find a systematic tutorial that I can learn windows development, I know a bit of C# and around 2 years of dedicated C++, I have been working with using C++winrt in C#, any recommendation would be greatly appreciated.

Continue reading...
 
Back
Top