native

How do you get DirectShow to play a video from a resource?

喜欢而已 提交于 2019-12-22 00:23:30
问题 I'm extending an application to play one of several videos on a control in a dialog. Starting with the Windowless sample, I've got this working, though the videos have to be separate files from the main executable. The ideal scenario from a packaging standpoint is for the videos to be included with the executable as resources. I did a bit of googling for this, and there's a fair amount of "somebody should do this", and several pointers to the Async sample, though it's not clear how to get

Platform-native preferences dialog with Qt on Mac, Gnome, KDE, and Windows

血红的双手。 提交于 2019-12-21 20:38:38
问题 On Mac and Gnome, native applications use an application preferences dialog that immediately applies the chosen settings as they are selected. On Windows and (I think) KDE, preferences are applied only when an "Apply" or "OK" button is pressed. Are there any built-in Qt goodies to do this for you, or do you have to include several #ifdef 's in the dialog code to handle this ( Q_WS_WIN , Q_WS_MAC , Q_WS_X11 )? If you have done something like this before (even using #ifdef 's), could you share

Why does a Process's “Private Bytes” memory counter never return back to it's original value?

╄→尐↘猪︶ㄣ 提交于 2019-12-21 19:55:18
问题 If I have a native C++ program and look at it's initial "Private bytes" memory counter why would it not go back down to it's original value after an object has been created and then deleted? For example if I have an application (32bit, Native C++ MFC ) that has two buttons. One in a loop that allocates 1,000,000 instances of an object and then the other button that other then deletes those same objects. If I look at my Private bytes counters for the process I have the following 3 values: .

Using Java Reflection, can you detect if a method is Native or not?

百般思念 提交于 2019-12-21 17:49:05
问题 Using Java Reflection, you can detect all methods and their returns type. But is there a way to detect if a method is declared as native or not? 回答1: Yes you can.The method getModifiers() returns an int which applied the right mask can tell you if the method is native or not I would suggest doing it like this, for convenience: int modifiers = myMethod.getModifiers(); boolean isNative = Modifier.isNative(modifiers); The Modifier class is an utility specialized class meant to apply the

Programably make and play a sound through speakers C++

落爺英雄遲暮 提交于 2019-12-21 17:41:06
问题 I'm making a game in native vc++ (not .Net) I'm looking for a way to play a noise (maybe 8 bit or something) through the real speakers (not internal). I know about PlaySound, but I don't want to make my EXE big. I want to program the sound. Is there an api way (kinda like Beep() ) but that plays through the real speakers? Thanks 回答1: You mention that you know about PlaySound . One of the it's flags ( SND_MEMORY ) will allow you to play a WAVE that is already loaded into memory, i.e. a buffer

Usage of native in Java [duplicate]

不问归期 提交于 2019-12-21 12:05:17
问题 This question already has answers here : What is the native keyword in Java for? (9 answers) Closed 4 years ago . Can someone explain the whys and the wherefores for using native keyword in Java? 回答1: In my experience, the downsides of using native code libraries are significant: JNI / JNA have a tendency to destabilize the JVM, especially if you try to do something complicated. If your native code gets native code memory management wrong, there's a chance that you will crash the JVM. If your

Module has no exported member 'IonicNativePlugin', Ionic2 for facebook

天大地大妈咪最大 提交于 2019-12-21 07:57:17
问题 am trying to do facebook login in ionic 2 app, but got this error while building my app. help me to solve this. [13:17:52] transpile started ... [13:17:58] typescript: D:/royalworkspace/newfblogin/node_modules/@ionic-native/facebook/index.d.ts, line: 1 Module '"D:/royalworkspace/newfblogin/node_modules/@ionic-native/core/index"' has no exported member 'IonicNativePlugin'. L1: import { IonicNativePlugin } from '@ionic-native/core'; L2: export interface FacebookLoginResponse { -- Home.ts --

Firefox for Android native app icon (address bar)

冷暖自知 提交于 2019-12-21 06:08:44
问题 I've recently noticed a little half height android appear to the right hand side of the address bar in Firefox for Android. It seems this is an indicator that a native app is available for the website that you are viewing (StackExchange being one such site!) - tapping the icon launches the app and parameters seem to be passed to load the same page in the app or to do something appropriate. Is this part of the HTML markup to alert the browser that an app is available or does Android 'just know

Mac OS X as PhoneGap platform

折月煮酒 提交于 2019-12-21 05:42:18
问题 I have phonegap app and I wish to port it to Mac OS X Is there any similar to phonegap platform that make it possible to build native apps for Mac OS X from web apps. I also interested in Windows and Linux. I wish to be able to hide app in tray and create dialog windows. UPDATE I selected Cordova/PhoneGap that now support Mac OS X. When I asked question PhoneGap had no support on desktop but think change. 回答1: I expermented with MacGap which was a port of Phonegap to OSX. https://github.com

How to understand the JITed code for “using” with exception handling in C#

[亡魂溺海] 提交于 2019-12-21 05:14:14
问题 I've written a very simple class in C#: class DisposableClass : IDisposable { public void Dispose() { } } static void UsingClass() { // line 31 using (var dc = new DisposableClass()) { // line 32 DoSomething(dc); // line 33 } // line 34 } // line 35 I've dumped the native code after JIT with WinDBG for it: 0:000> !u 000007fe87d30120 Normal JIT generated code SimpleConsole.Program.UsingClass() Begin 000007fe87d30120, size 80 c:\projects\SimpleConsole\SimpleConsole\Program.cs @ 32: >>> 000007fe