uwp

Inject a dll file to UWP

懵懂的女人 提交于 2020-01-03 05:06:06
问题 I make simple a UWP app and a desktop app. This code inject the ConsoleApplication1.dll file to the desktop is normal, but I cannot inject to UWP app. I have two question : Why this code cannot inject to UWP app? and How fix it? This code inject a DLL file #include "pch.h" #include <vector> #include <string> #include <windows.h> #include <Tlhelp32.h> using std::vector; using std::string; int main(void) { while (true) { vector<string>processNames; PROCESSENTRY32 pe32; pe32.dwSize = sizeof

Run Background Task Indefinitely in UWP

ぐ巨炮叔叔 提交于 2020-01-03 05:04:08
问题 I have a requirement to constantly poll an API and provide notifications in UWP app irrespective of whether it is Visible to user OR minimized OR Not in focus OR Suspended . If I choose to write it in the app itself, it stopped working while app is suspended and resumed while again app is opened or kept in focus. So I chosen Background Task so that it runs everytime even when app is suspended (ex: minimized). But now any background task is limited to short span of 30secs and if it is

HEVC VIdeo Extensions keep taking memory until UWP app crashes

帅比萌擦擦* 提交于 2020-01-03 04:16:19
问题 I am using HEVC Video Extensions in order to decode video on my UWP video app. The problem is that the HEVC app takes so much memory during playback that I am unable to play large 4k files without crashing. If I use the HEVC hardware only I am able to have better use of memory but limited in 4k on it. I have tried HEVC Extension and tried to see if there is garbage cleanup I can do but have not been successful in lowering the memory Just setting my video like this: MediaSource ams_02 =

UWP app does not copy file to AppData folder

时光毁灭记忆、已成空白 提交于 2020-01-03 03:23:12
问题 I made a C# executable which make a test folder and copy test.txt file from it's execution folder to AppData folder. Here is my code: static void Main() { string fullPath = $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\test"; string destination = $"{fullPath}\\test.txt"; Directory.CreateDirectory(fullPath); string location = System.Reflection.Assembly.GetExecutingAssembly().Location; int index = location.LastIndexOf("\\"); string source = $"{location.Substring(0,

How to deploy a file in UWP

假装没事ソ 提交于 2020-01-03 03:13:10
问题 My UWP needs to load a file and I want to know: Where to put this file, in the package installation folder or the application data folder? How to deploy this file to the folder I want when I deploy my app using VS 2015? 回答1: You can add files either as resources or content files to your project. If the file is something like a Image, SQLite Database or text file, the best approach will be the Content build action. You can then access the file using StorageFile.GetFromApplicationUriAsync : var

Sending and receiving images via a socket

笑着哭i 提交于 2020-01-02 19:14:54
问题 I have a C# desktop app. It connects to another PC on my network which is a UWP C# app. I am trying to send an image or 2 to my listening socket and to test this I get the listening socket to send me the image back. The trouble is that even though my server recieves all the bytes that were orginally sent the recieved image back to the client is not of the same size. To make this even more weird is sometimes the returned bytes are correct and I get the whole image and when I attempt to send 2

How to set a full-screen splash screen image

十年热恋 提交于 2020-01-02 19:11:27
问题 First,I think I should explain what is the splash screen. For example, the image below is the windows store splash screen: However,I think it is so samey. I wanna use a big image as the splash screen, such as: But when I set the image as the splash screen, it does not fill up the screen: I want it to be like this, the image full and centered on the screen. (I made this mock-up using Photoshop): How can I achieve this? 回答1: Windows startup screen is not fixed and it depends on the window size,

Change what devices a UWP app targets

隐身守侯 提交于 2020-01-02 16:09:18
问题 I want to my Windows UWP app to target only specific devices e.g. desktop and mobile. How do I specify that my app should only target these devices? I have found nothing of interest in the Package.appxmanifest file, and project.json only specifies what SDK's the app should use. 回答1: There are two ways you can do it. 1 . Right click Package.appxmanifest , and click View code , you can find the following code in the Package.appxmanifest . <Dependencies> <TargetDeviceFamily Name="Windows

UWP Place TextBlocks on Image

寵の児 提交于 2020-01-02 13:12:30
问题 I'm currently developing universal application that can run on both mobiles and desktops. But I have a little trouble. In my application I have a page to add new credit card to the user profile. So, I set the text on the image using margins, but when my application runs on the device with different resolution, the text will change its position (it's obvious). My question is, how can I do that to let text take its position according to the screen resolution? Here is the correct variant of the

UWP Place TextBlocks on Image

落花浮王杯 提交于 2020-01-02 13:12:22
问题 I'm currently developing universal application that can run on both mobiles and desktops. But I have a little trouble. In my application I have a page to add new credit card to the user profile. So, I set the text on the image using margins, but when my application runs on the device with different resolution, the text will change its position (it's obvious). My question is, how can I do that to let text take its position according to the screen resolution? Here is the correct variant of the