WinDBG error: Win32 error 0n30 [closed]

I have this error while I am debugging using winDBG:
** **

Cannot retrieve information, error Win32 0n30: conference impossible
south le périphérique spécifié.

** **

enter the description of the image here

Graphical user interface design – About commands in applications for UWP. Which dominant approach is the best? office like?, UWP? or classic win32?

I am writing an application with the UWP-Windows 10-1903 (Windows universal) platform, to make electrical circuits, designs and simulations. The user performs an on-screen design with resistors, generators, etc., and runs simulations in the time and frequency domain. It is intended for professional use and is not free.

The target devices are Desktop (keyboard + mouse) and Tablet (finger touch). It might be good to add the phone option, but it might not be possible because Windows Phone died.

I chose the development with the UWP platform because the store helps a lot with the infrastructure to sell the application. The multi-device paradigm is also attractive, the user could work hard at the desk and then check a couple of things in tablet mode when drinking a beer at the bar.

That said, I am trying to design the dominant pattern.

The application will have at least 50 commands, grouped into 10 menus. Remember, the application is meant to be professional, and there are many tools and dialog boxes to help the user make their design. The application is loaded with knowledge in electronics.

(to display the data, I don't use page navigation, I use the SyncFusion window docking manager, because there could be many windows with data, curves and circuits. Navigating back and forth all the time could be annoying)

Possible approaches to command are:

  1. "Classic like win32" MenuBar, with icon + text for menu items. That includes the file menu.
    Classic menu like win32
  2. UWP command bar at the top, with icons and drop-down menus. It seems nice and attractive.
    UWP command bar
  3. Ribbon menu bar and Backstage view (for the file command menu). Like MS Office 2016, 2019 .., etc.

    Office Ribbon Menu
    Backstage view full screen

My question is, what approach should I choose? And why? I'm like hesitant.

I saw many examples of different Windows and UWP applications. But there is no consistency, and each application seems to follow its own preferences.

Examples:

  • Paint 3D: It has a top command bar, but with Backstage view for the "file menu" commands.
  • Win10-1903 Classic painting: it has a ribbon bar for the Start and View Command groups, but without Backstage Vista, only a classic file menu in the upper left corner.
  • Office 2019: full menu of the ribbon, with Backstage view for the "old file menu". Configuration command in the backstage view
  • Microsoft Edge: It has a top command bar, but with most of the commands grouped as secondary commands, it appears as a drop-down menu with the button …
  • Win10-1903 3D viewer application: it has a UWP menu bar (icon + text elements), but the file commands are in a simple menu in classic format! (What happened with the backstage view?), Another strange thing, the configuration command (gear icon) is in the Help menu, not in the file menu.
  • (Store) DrawingBoard-Pro: It has the upper command bar, but the file commands are in the lower command bar.
  • Windows BuildCast UWP example: Navigation pattern with the hamburger icon in the upper left corner, almost without a command. Configuration command at the bottom of the navigation panel.
  • Win10-1903 Video Editor: has a top command bar with some primary commands and other secondary commands. good example

All these different and inconsistent examples gave me doubts about what to do. What approach should I use for my application? For example, should I put a Backstage view?

Next, I add a secondary question, something that worries me a lot.
It seems that many of the applications in MS-Store are like toys or garbage … and are not geared towards serious work. I mean there are no major serious applications like CorelDRAW and AutoCAD, Adobe Photoshop and Autodesk Eagle or so. All those small applications in the Microsoft Store, they look great on your UX, but they are very limited in their capabilities (and cheap). And applications for UWP that have desktop counterparts are inferior to their desktop versions. (The VLC player is an example), why all this?

I mean, in the store, there are many applications to see the atlas of the human body, applications to consult the chemical periodic table, applications to verify physical laws or calculate resistance for a voltage divider, applications such as social networks, applications for listening music, apps to check the weather, watch movies, play games, email, calendar, etc. It is as if the usage pattern was an open application -> use application -> close application.

But there are almost no applications with the classic use for the design pattern, such as: new or open file -> the user edits his design -> saves the file -> shares or sends by email or prints on paper. It seems that applications are no longer "file oriented", is that "outdated"?

If I am willing to develop a serious application to make electrical / electronic designs, are UWP and MS Store not the best approach or option? Should I develop in WPF?

Thanks in advance, and I'm sorry if I made this extremely long.

anaconda – OSError: [WinError 193] % 1 is not a valid Win32 application

I uninstalled Anaconda and Python3.7, and reinstalled them using the anaconda site download and I receive the following error message when I open a .py file that has worked previously. I am using Spyder through Anaconda Navigator.
It's a problem with Numpy. I've been in all StackOverflow and I haven't been able to find an answer. Given the following documentation, what can I do to rectify this situation? I use pandas extensively, so none of my .py files exceed the panda import declaration without the error message.

File "C: /Users/Owner/NFL/nfl_stats_Copy3.py", line 8, in
import pandas as pd

File "C: Users Owner AppData Roaming Python Python37 site-packages pandas__init __. Py", line 11, in
to import(dependence)

File "C: Users Owner AppData Roaming Python Python37 site-packages numpy__init __. Py", line 140, in
since . import _distributor_init

File "C: Users Owner AppData Roaming Python Python37 site-packages numpy_distributor_init.py", line 26, in
WinDLL (os.path.abspath (file name))

File "C: Users Owner Anaconda3 lib ctypes__init __. Py", line 356, in in that
self._handle = _dlopen (self._name, mode)

OSError: (WinError 193)% 1 is not a valid Win32 application

Win32 Excel: Resize the image to the cell while maintaining the aspect ratio

I am writing a script that gives an image and its cell that contains must change the size of the image to fit that cell while preserving its aspect ratio.

The function takes 3 parameters, the image, the width of the cell and the height of the cell.

I have written the following function so far:

def fitToCell(img, width, height):
    ratioX = width / img.Width
    ratioY = height / img.Height

    if ratioX * img.Height > height:
        ratio = ratioY
    else:
        ratio = ratioX

    img.Width = img.Width * ratio
    img.Height = img.Height * ratio

    return img

My registration gives me the following result:

Original Image: (48.0, 35.26598358154297)
Desired Image: (100, 100)
Ratios: (2.0833333333333335, 2.8355936753834547)
Final Ratio: 2.0833333333333335
Final Image: (208.33331298828125, 153.0640869140625)

This does not seem to make any sense to me as 2 * 48 = 96, not 208. The relationship should produce output 100, 73.

I am using the win32com API with Python in xlsx files. I would really appreciate any suggestions.

Windows: this is my work on how to compile the complete project in win32 using a coverity scan

Download "cov-analysis-win32-2017.07" from Coverity Scan

Use CMake to build inside cov bin

Search for "Visual Studio Command Symbol (2010)"
and run as administrator

In "Visual Studio Command Prompt (2010)" type the following commands

CD ..

cd C:  Users  Dady  Desktop  Done_msvc  cov  bin

cov-build --dir cov-int msbuild C:  Users  Dady  Desktop  Done_msvc  cov  bin  Ascemu.sln

Then the construction is 100% made.
find the cov-int folder inside the bin folder, close it, and load it in Coverity Scan
attentively

Active directory – Change password DSRM – Error code WIN32: 0xa90

I am using Windows 2012 R2 with Active Directory.

One of my DC has had hardware failures. I would like to promote another server as DC, but when reading online it seems that I need the DSRM password to do it. I did not configure the domain controller and I can not find the password written anywhere. When I try to reset the password on the server while I am logged in as a domain administrator, I get error 0xa90. Google has not been very helpful, so hope that someone here knows what to do.

I already deleted the dead DC manually from Active Directory, thinking that it might be causing the problem.

C:> Ntdsutil
Ntdsutil: set password dsrm
Reset DSRM administrator password: reset password on null server
Enter the password for the administrator account of DS restore mode: ********
Please confirm the new password: ********
The configuration password failed.
WIN32 Error Code: 0xa90
Error message: (null)

performance – Editing a configuration file using C ++ and Win32

I have created a small and simple tool for Windows with C ++ and the Win32 API to allow people to change their resolution in Fortnite, without having to search for the configuration file and edit it manually. The program has a width and height entry for the user to enter the desired resolution and an application button to save the changes in the configuration file. I've tried it on some machines and it seems to work as expected.

This is my first attempt to use C ++ or the Win32 API, and I would love to launch this project to the Fortnite Community, but I want to make sure there are no obvious problems with it.

My questions / concerns are:

  1. Have I eliminated the system resources correctly? Any possible memory loss? (brushes, fonts, etc)
  2. Do I need more error handling? Any improvement in what I have?
  3. Should I separate the GetFortniteConfiguration (), SetFortniteConfiguration () Y CenterWindow () Does it work in its own file or is the project small enough to keep it the way it is?

I will also add comments to the code shortly, but any other advice, suggestion or learning resource will be welcome.

#include 
#include 
#include 
#include 

#include "alphares.h"
#include "resources.h"
#include "simpleini / simpleini.h"

LRESULT CALLBACK WindowProc (
HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam);

void CenterWindow (HWND window, DWORD style, DWORD exStyle) {
int screen_width = GetSystemMetrics (SM_CXSCREEN);
int screen_height = GetSystemMetrics (SM_CYSCREEN);
RECT client_rect;

GetClientRect (window, & client_rect);
AdjustWindowRectEx (& client_rect, style, FALSE, exStyle);

int client_width = client_rect.right - client_rect.left;
int client_height = client_rect.bottom - client_rect.top;

SetWindowPos (window, NULL,
screen_width / 2 - client_width / 2,
screen_height / 2 - client_height / 2,
client_width, client_height, 0);
}

int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow) {
const wchar_t CLASS_NAME[] = L "alfares";
const wchar_t WINDOW_NAME[] = L "alfares";

WNDCLASS wc = {};
Message from MSG = {};

wc.lpfnWndProc = WindowProc;
wc.hInstance = hInstance;
wc.hbrBackground = CreateSolidBrush (RGB (43, 45, 92));
wc.hIcon = LoadIcon (wc.hInstance, MAKEINTRESOURCE (IDR_ICON));
wc.lpszClassName = CLASS_NAME;

yes (! RegisterClass (& wc)) {
returns 0;
}

HWND hwnd = CreateWindowEx (
0,
NAME OF THE CLASS,
WINDOW_NAME,
WS_OVERLAPPEDWINDOW & ~ WS_MAXIMIZEBOX ^ WS_THICKFRAME,
CW_USEDEFAULT, CW_USEDEFAULT, 250, 150,
NULL,
NULL,
hInstance,
NULL);

CenterWindow (hwnd, WS_OVERLAPPEDWINDOW & ~ WS_MAXIMIZEBOX ^ WS_THICKFRAME, 0);

if (hwnd == NULL) {
returns 0;
}

ShowWindow (hwnd, nCmdShow);
UpdateWindow (hwnd);

while (GetMessage (& message, NULL, 0, 0)) {
if (! IsDialogMessage (hwnd, & message)) {
TranslateMessage (& message);
DispatchMessage (& message);
}
}
returns 0;
}

LPCSTR GetFortniteConfiguration () {
char * way;
length size_t;
_dupenv_s (& path, & length, "LOCALAPPDATA");
std :: string fortnite = "\ FortniteGame \ Saved \ Config \ WindowsClient \ GameUserSettings.ini";
std :: string fullpath = path + fortnite;
free (path);

returns fullpath.c_str ();
}

void SetFortniteConfiguration (LPCSTR file, int user_width, int user_height) {
std :: string width_string = std :: to_string (user_width);
std :: string height_string = std :: to_string (user_height);
char const * width = width_string.c_str ();
char const * height = height_string.c_str ();

Attributes DWORD = GetFileAttributesA (file);

if (attributes & FILE_ATTRIBUTE_READONLY) {
attributes & = ~ FILE_ATTRIBUTE_READONLY;
SetFileAttributesA (file, attributes);
}

const char * section = "/Script/FortniteGame.FortGameUserSettings";

CSimpleIniA ini;
ini.SetSpaces (false);
ini.SetUnicode ();
ini.LoadFile (file);

ini.SetValue (section, "ResolutionSizeX", width);
ini.SetValue (section, "ResolutionSizeY", height);
ini.SetValue (section, "LastUserConfirmedResolutionSizeX", width);
ini.SetValue (section, "LastUserConfirmedResolutionSizeY", height);
ini.SetValue (section, "DesiredScreenWidth", width);
ini.SetValue (section, "DesiredScreenHeight", height);
ini.SetValue (section, "LastUserConfirmedDesiredScreenWidth", width);
ini.SetValue (section, "LastUserConfirmedDesiredScreenHeight", height);

ini.SaveFile (file);
}

LRESULT CALLBACK WindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof (ncm);
SystemParametersInfo (SPI_GETNONCLIENTMETRICS, sizeof (ncm), & ncm, 0);

HISTORY HISTORY;
static HFONT hFont = CreateFontIndirect (& ncm.lfMessageFont);
static HBRUSH hBrushStatic = CreateSolidBrush (RGB (43, 45, 92));
static HBRUSH hBrushEdit = CreateSolidBrush (RGB (35, 35, 79));
static HBRUSH hBrushButton = CreateSolidBrush (RGB (93, 107, 238));

switch (message) {
WM_CREATE case:
hInstance = GetModuleHandle (nullptr);

CreateWindowEx (
NULL,
TEXT ("Static"),
TEXT ("Width"),
WS_CHILD | WS_VISIBLE | ES_CENTER,
50, 15, 60, 20,
hwnd
(HMENU) IDC_WIDTH_LABEL,
hInstance,
NULL);

Send Message(
GetDlgItem (hwnd, IDC_WIDTH_LABEL),
WM_SETFONT,
(WPARAM) hFont,
TRUE);

CreateWindowEx (
NULL,
TEXT ("Static"),
Height of the text "),
WS_CHILD | WS_VISIBLE | ES_CENTER,
125, 15, 60, 20,
hwnd
(HMENU) IDC_HEIGHT_LABEL,
hInstance,
NULL);

Send Message(
GetDlgItem (hwnd, IDC_HEIGHT_LABEL),
WM_SETFONT,
(WPARAM) hFont,
TRUE);

CreateWindowEx (
NULL,
TEXT ("Edit"),
TEXT ("1920"),
WS_CHILD | WS_VISIBLE | ES_NUMBER | ES_CENTER | WS_TABSTOP,
50, 35, 60, 15,
hwnd
(HMENU) IDC_WIDTH_EDIT,
hInstance,
NULL);

Send Message(
GetDlgItem (hwnd, IDC_WIDTH_EDIT),
WM_SETFONT,
(WPARAM) hFont,
TRUE);

Send Message(
GetDlgItem (hwnd, IDC_HEIGHT_EDIT),
EM_SETLIMITTEXT,
4, 0);

CreateWindowEx (
NULL,
TEXT ("Edit"),
TEXT ("1080"),
WS_CHILD | WS_VISIBLE | ES_NUMBER | ES_CENTER | WS_TABSTOP,
125, 35, 60, 15,
hwnd
(HMENU) IDC_HEIGHT_EDIT,
hInstance,
NULL);

Send Message(
GetDlgItem (hwnd, IDC_HEIGHT_EDIT),
WM_SETFONT,
(WPARAM) hFont,
TRUE);

Send Message(
GetDlgItem (hwnd, IDC_WIDTH_EDIT),
EM_SETLIMITTEXT,
4, 0);

CreateWindowEx (
NULL,
TEXT ("Button"),
TEXT ("Apply"),
WS_CHILD | WS_VISIBLE | BS_OWNERDRAW,
50, 65, 135, 25,
hwnd
(HMENU) IDC_APPLY_BUTTON,
hInstance,
NULL);

Send Message(
GetDlgItem (hwnd, IDC_APPLY_BUTTON),
WM_SETFONT,
(WPARAM) hFont,
TRUE);

break;

WM_CTLCOLORSTATIC case:
{
HDC hdcStatic = (HDC) wParam;
SetTextColor (hdcStatic, RGB (93, 107, 238));
SetBkColor (hdcStatic, RGB (43, 45, 92));
return (INT_PTR) hBrushStatic;
}

WM_CTLCOLOREDIT case:
{
HDC hdcEdit = (HDC) wParam;
SetTextColor (hdcEdit, RGB (255, 255, 255));
SetBkColor (hdcEdit, RGB (35, 35, 79));
return (INT_PTR) hBrushEdit;
}

WM_CTLCOLORBTN case:
{
HDC hdcButton = (HDC) wParam;
SetTextColor (hdcButton, RGB (255, 255, 255));
SetBkColor (hdcButton, RGB (93, 107, 238));
return (INT_PTR) hBrushButton;
}

WM_COMMAND case:
if (LOWORD (wParam) == IDC_APPLY_BUTTON) {
File LPCSTR = GetFortniteConfiguration ();
struct stat buffer;

if (stat (file, & buffer) == 0) {
Success BOOL;

int width = GetDlgItemInt (
hwnd
IDC_WIDTH_EDIT,
&success,
FALSE);

int height = GetDlgItemInt (
hwnd
IDC_HEIGHT_EDIT,
&success,
FALSE);

if (success == TRUE) {
SetFortniteConfiguration (file, width, height);

MessageBoxA
hwnd
"His resolution was saved successfully."
"Success",
MB_OK);
} else {
MessageBoxA
hwnd
"Please, enter a resolution."
"Warning",
MB_OK | MB_ICONWARNING);
}
} else {
MessageBoxA
hwnd
"There was an error finding your configuration file.",
"Error",
MB_OK | MB_ICONERROR);
}
}
break;

WM_DRAWITEM case:
if (wParam == IDC_APPLY_BUTTON) {
LPDRAWITEMSTRUCT pdis = (LPDRAWITEMSTRUCT) lParam;
RECT rect = pdis-> rcItem;

DrawTextA (
pdis-> hDC,
"Apply",
5,
and rect
DT_CENTER | DT_SINGLELINE | DT_VCENTER);

return TRUE
}
break;

WM_DESTROY case:
DeleteObject (hFont);
DeleteObject (hBrushStatic);
DeleteObject (hBrushEdit);
DeleteObject (hBrushButton);
PostQuitMessage (0);
returns 0;

WM_PAINT case:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint (hwnd, & ps);
EndPaint (hwnd, & ps);
break;
}
returns 0;
}
returns DefWindowProc (hwnd, message, wParam, lParam);
}