Click here to Skip to main content

VS 2012/2013 & .NET 4.5.1

 
GeneralRe: WInRT component and event grief PinmemberSuper Lloyd15-Dec-12 2:57 
GeneralRe: WInRT component and event grief PinprotectorPete O'Hanlon15-Dec-12 11:34 
GeneralRe: WInRT component and event grief PinmemberSuper Lloyd15-Dec-12 19:26 
GeneralRe: WInRT component and event grief PinmemberSuper Lloyd15-Dec-12 19:30 
QuestionWinRT: C++ C# interop grief PinmemberSuper Lloyd5-Dec-12 5:37 
AnswerRe: WinRT: C++ C# interop grief PinmemberSuper Lloyd5-Dec-12 6:20 
GeneralRe: WinRT: C++ C# interop grief PinmemberFrankLavigne3-Jan-13 6:14 
QuestionHow to throw a usable error from a WinRT C++ component to a C# code PinmemberSuper Lloyd5-Dec-12 4:59 
I'm trying to write a C++ component that is going to be used in C#
 
Apparently I can't use custom exception or custom error message but it SHOULD be possible (according to the documentation) to use COMException with custom code.
 
well I tried to do just that, as shown in my component code below:
 
// MSDN http://msdn.microsoft.com/en-us/library/windows/desktop/ms679751
// say that code range is free: 0x0200-0xFFFF
public enum class ErrorCodes
{
	CodeStart = 0x0200, CodeEnd = CodeStart + 100,
	StupideError1 = CodeStart + 1,
	StupideError2 = CodeStart + 2,
};
 
public ref class Class1 sealed
{
public:
	Class1() {}
 
	void Throw()
	{
		throw ref new Platform::COMException((int)ErrorCodes::StupideError2);
	}
};
 
Yet, when I consume that method from C# I always get an ArgumentException with and HRESULT which doesn't seems related to my code :/
 
How could I produce a usable COMException?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

AnswerRe: How to throw a usable error from a WinRT C++ component to a C# code PinmemberSuper Lloyd5-Dec-12 5:22 
Questionstill no lambdas debugging ? :( Pinmemberpip01021-Nov-12 23:16 
QuestionIntelliTrace only in Ultimate edition for VS11? Pinmemberdevvvy5-Nov-12 23:41 
AnswerRe: IntelliTrace only in Ultimate edition for VS11? PinprotectorPete O'Hanlon6-Nov-12 0:00 
GeneralRe: IntelliTrace only in Ultimate edition for VS11? Pinmemberdevvvy6-Nov-12 17:52 
GeneralRe: IntelliTrace only in Ultimate edition for VS11? PinprotectorPete O'Hanlon6-Nov-12 21:25 
GeneralRe: IntelliTrace only in Ultimate edition for VS11? Pinmemberdevvvy6-Nov-12 21:43 
NewsWindows XP & Framework 4.5 [modified] PinmemberClifford Nelson26-Oct-12 16:19 
GeneralRe: Windows XP & Framework 4.5 PinmemberRichard Deeming29-Oct-12 3:13 
GeneralRe: Windows XP & Framework 4.5 PinmemberClifford Nelson29-Oct-12 6:16 
GeneralRe: Windows XP & Framework 4.5 Pinmemberpip01021-Nov-12 23:17 
GeneralRe: Windows XP & Framework 4.5 PinmemberClifford Nelson22-Nov-12 10:49 
GeneralRe: Windows XP & Framework 4.5 PinprotectorPete O'Hanlon22-Nov-12 11:38 
GeneralRe: Windows XP & Framework 4.5 PinmemberClifford Nelson22-Nov-12 12:06 
GeneralRe: Windows XP & Framework 4.5 PinmemberExpert Coming2-Dec-12 12:59 
QuestionUnable to consume WCF Pinmembermsameh97625-Oct-12 15:08 
AnswerRe: Unable to consume WCF PinmemberNitin Sawant26-Nov-12 1:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 14 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid