|
I finally decided to use inheritance in my WinRT C++ library, by exposing interface, such as
public interface class IA
{
property int ID { int get(); }
};
ref class A : IA
{
public:
virtual property int ID { int get() { return 0; } }
};
public interface class IB : IA {};
ref class B : A, IB {};
public ref class Create sealed {
public:
static IB^ CreateB() { return ref new B(); }
};
However when I try to compile that code I got the following error messages:
Quote: 1>c:\dev\tests\windowsruntimecomponent1\windowsruntimecomponent1\class1.h(16): error C3766: 'WindowsRuntimeComponent1::B' must provide an implementation for the interface method 'int WindowsRuntimeComponent1::IA::ID::get(void)'
1> c:\dev\tests\windowsruntimecomponent1\windowsruntimecomponent1\class1.h(7) : see declaration of 'WindowsRuntimeComponent1::IA::ID::get'
1>c:\dev\tests\windowsruntimecomponent1\windowsruntimecomponent1\class1.h(16): warning C4570: 'WindowsRuntimeComponent1::B' : is not explicitly declared as abstract but has abstract functions
1>c:\dev\tests\windowsruntimecomponent1\windowsruntimecomponent1\class1.h(20): error C2259: 'WindowsRuntimeComponent1::B' : cannot instantiate abstract class
Now I can fix it by rewriting B as follows
ref class B : A, public IB
{
public:
virtual property int ID { int get() override { return A::ID; } }
};
But that's quickly becoming cumbersome with a big hierarchy. Isn't there a way to avoid repeating all parent interface members?
|
|
|
|
|
No, that is the rule. When you inherit an interface you must provide implementations for all of its methods.
Veni, vidi, abiit domum
|
|
|
|
|
But.. the B also inherits A which already implement IA, doesn't that make the implementation redundant?
Indeed, I have to specify 'override' for my must implement method to compile!
|
|
|
|
|
|
Is windows defender truly the best antivirus for windows 8?
|
|
|
|
|
How do you measure "best"?
Veni, vidi, abiit domum
|
|
|
|
|
It's the one that uninstalls Windows 8 and installs Windows 7 for you.
|
|
|
|
|
Veni, vidi, abiit domum
|
|
|
|
|
The anti virus that's the least likely to crash the pc, can detect a virus in a removable disk ASAP e.t.c
|
|
|
|
|
Well they all (claim to) do that.
This is a technical forum for programming questions. If you want advice on the quality of different products then search for web sites that offer product reviews.
Veni, vidi, abiit domum
|
|
|
|
|
I hear it's pretty good at detecting and defending systems, though i myself use Avast mainly because i would rather have an third party program protecting me rather then something that comes with the OS.
|
|
|
|
|
|
Hi all, I just wanted to announce the release of Grouper[^], a Windows Store app to help you organize all those app tiles on your Start screen.
If you use Windows 8, please try it out.
It would mean a lot to me if you would rate and review it.
Thanks.
|
|
|
|
|
hi ,
i need a Powershell script to get total processor percentage (without using performance counters)
Note: the value get same as '\\Processor(_Total)\\% Processor Time' counter
thank you
|
|
|
|
|
Please stop posting this message everywhere. If you need some code then try writing it for yourself.
Veni, vidi, abiit domum
|
|
|
|
|
I cannot get Windows 8 to remove a device. I have the proceudre fully documented with screencaps Here On SuperUser[^]
Evidently, I'm not the only one with this problem. It occurs frequently enough that I found it again Here[^] on Microsoft's site.
I found that it was described a another place, again with instructions on how to fix it Here[^] which also leaves me with a "...remove failed..." result.
Can anyone who is running Windows'8 tell me how to remove the device ? A video with screen caps would be great. A pictorial made of screen caps would be nice. A written step by step explanation (if it works) would be okay, but what I'm finding is that the written word is becoming less and less effective, in and of itself, to communicate the steps that are required with respect to operating a visually oriented graphical user interface.
At any rate, does anyone know why I'm getting the "Remove Fails" message on Windows 8 ? Does anyone know how to actually remove a device when this behavior presents itself ?
|
|
|
|
|
|
|
Actually I have asked for Windows 8 Desktop App publishing steps. not the windows 8 metro app. you can check app store that antivirus and other types of software are published in windows 8 metro app store as Desktop app which we can not download from app store rather we need to go to that developer's web site to download and install like desktop application. I am looking for any material to publish desktop app in metro app store.
|
|
|
|
|
Here is a blog link[^] that might be helpful.
Hope this helps.
Frazzle the name say's it all
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
John F. Woods
|
|
|
|
|
Thanks a lot. This is what I was looking for. Wonderful job man ... 
|
|
|
|
|
No problem. I just used My BING-foo.
Frazzle the name say's it all
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
John F. Woods
|
|
|
|
|
I have developed an application which uses SetWindowsHookEx to capture keyboard's key stroke and filters some blacklisted words. This works fine in Win7 and Windows8 desktop application.
Now I would like to make a windows 8 metro style app which will also supports same. But in metro app I found that SetWindowsHookEx only capture key events on that application, It can not capture key event of another metro application's or desktop application's.
Can anyone tell me how to overcome this problem ?
|
|
|
|
|
Realistically you can't. Metro apps are designed to run independently and have no knowledge of the other applications that might be installed. This is one of the reasons that communicating between a store app and the desktop is so problematic.
|
|
|
|
|
But if I use SetWindowsHookEx in desktop application then that desktop application can hook key event of all metro application and desktop application as well? Is there any other way to use it using metro application ?
|
|
|
|