Win 11 Only Crash when using a File Browser (GetOpenFileName) and 3rd party memory management - heap-memory

This one's already been discussed on github
Application using scalable allocator crashes on Windows 11 when opening a file dialog · Issue #665 · oneapi-src/oneTBB · GitHub
To reproduce
Windows 11 Only
Software needs to be linked to 3rd party memory manager, we use SmartHeap. This is MVC C/ C++ Win32.
OneDrive is setup so that the Desktop is included in the OneDrive sync
Using any file browser (I've tried GetOpenFileName and the Vista Common Item Dialog) the app. falls over. More details in that github link (it's a bit over my head!)
I've been in touch with SmartHeap who are investigating workarounds. Static linking to ucrt has been mentioned
I'm trying to get a KB number out of Microsoft. My post there has had very little traffic
If anyone can suggest what else I could do to support customers who are migrating to Windows 11 I'd be grateful for any suggestions.

Related

Load PDF in a WPF application?

I've been searching around and I can't find any clean ways to render PDFs in a native WPF application. Most solutions are either paid or run with errors or cannot load PDFs for my particular use case in Civil Construction.
Does WPF have any built in PDF renderers?
There's a built in PDF API in the UWP Runtime under the following nuget package:
Microsoft.Windows.SDK.Contracts
If you check under Windows.Data.Pdf there's actually an example link to GITHub for a very barebones PDF Renderer--that just so happens to be robust enough to load up Civil Construction PDFs: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/PdfDocument
Of course the example is running on UWP so you'll need to go into the Windows settings (which should be auto-prompted if you've never installed UWP developer packages) and enable developer mode. This will give VS access to run UWP applications on your computer. You can search "developer" in the Windows settings or they're located under:
Settings -> Update & Security -> For developers -> "Developer Mode"
For the build platform in the configuration manager change from ARM to x64 (or x86 if you're on a 32-bit machine) and the program should run (works in VS Community 2019).

Best approach to implement Help feature in Windows Desktop Application - Restrict the App knowledge base to authorize access

The best approach to implement Help feature in Windows Desktop Application, below are the list of the options I have come across:
Ref: https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help#cite_note-2
Microsoft Compiled HTML Help is a Microsoft proprietary online help format
Can be Decompiled(Tools 7-Zip,Sumatra etc)
Predecessor Microsoft WinHelp / Successor Microsoft Help 2
Support Win 10
Ref: https://en.wikipedia.org/wiki/WinHelp
.hlp Microsoft WinHelp is a proprietary format for online help files that can be displayed by the Microsoft Help browser winhelp.exe or winhlp32.exe.
-decompile a WinHelp file into its source documents: HPJ, CNT, RTF, BMP, and SHG
-WinHelp file opens in a separate window(The Help author can control whether the Help file stores the user's settings between sessions or always opens in the default size and position.)
HAs Title, a row of Menu(File, Edit, Bookmark, Options, and Help)
Typical buttons include Contents, Index, Back, and Print, along with << and >> buttons to browse through the file. Help authors can also create custom buttons to jump to specific topics or perform other actions.
-End of support - The open-source version of winhlp32 from Wine also works on Windows 10. It is included as part of WineVDM.
Ref: https://en.wikipedia.org/wiki/Microsoft_Help_2
Microsoft_Help_2 is a proprietary format for online help files, developed by Microsoft and first released in 2001 as a help system for Visual Studio .NET (2002) and MSDN Library.
Microsoft Help 2.x is the help engine used in Microsoft Visual Studio 2002/2003/2005/2008 and Office 2007 and Office 2010
Microsoft Help 2.x file has a ".hxs" extension
An open-source "convertlit" tool can be used to decompile the hxs file.
Ref: https://en.wikipedia.org/wiki/Microsoft_Help_Viewer
Microsoft Help Viewer (HV) is the offline help system (local help) developed by Microsoft that ships with Visual Studio 2010 and its associated MSDN Library.
All the above approaches have the limitation that the compiled Help file can be decompiled and further redistributed which I want to restrict.
I want to allow access to the Knowledge-base to an only authorized users, and authorized users should also not be able to further copy or decompile the knowledge base and share it further with unauthorized users.
The short story - you cannot prevent decompiling, if you compile into WinHelp (.hlp), HTMLHelp (.chm), Help2 (.hxs) or Help Viewer files (.mshc).
Winhelp is about 30 years old and HTMLHelp about 23 years old! Please note, the decompiler for HTMLHelp (CHM files) is still an integrated part of the Windows 10 operating system.
You know Microsoft have created other help systems since WinHelp (.hlp) and HTML Help (.chm) but they are tied to various systems:
MS Help 2.0 for Visual Studio 2002/2003/2005/2008 & Office help.
AP Help for Windows Vista OS/OEM help (based on MS Help 2)
MS Help Viewer 1.0 for Visual Studio 2010 help.
MS Help Viewer 2.0 for Visual Studio 2012 & Windows 8 OS/OEM help.
These formats are not fully disclosed and documented. They are to be regarded as Microsoft internal.
Some notes:
The WinHelp (.hlp) format has been around since the very early 1990s and is superseded by HTML Help 1.x (.chm). Microsoft strongly advised you move away from WinHelp about ten years ago.
You are still well advised to use HTML HELP (.chm) for Windows application help unless integrating into Visual Studio help.
Today, however, there is an increasing transition to web-based help (e.g. using Markdown text => HTML)
Depending on your requirements you could experiment with the following ideas:
Web-based help: Use a password protected area for web-based help (knowledge base)
Encrypt and convert CHM to exe by using CHM to EXE Converter 2.0 with password protected, prevent from editing, copying and printing. You can only convert chm to exe without password, and you can also set a password with PC-binding to your users. Only you can create open password for your users. Easily distribute CHM files and protect it.
EDIT:
Your first requirement "I want to allow access to the Knowledge-base to an only authorized users" can be solved by a web-based help. You often come across websites where you don't have free access to all the sections: to be able to view the contents in certain parts of the website you need to register and obtain a login and password to enter these restricted areas.
A classic example is a company site, where access to the Members' Area is reserved for salespeople and partners to view help documents and price lists, or portals that require login access to contents that can be downloaded.
If you really want to create a structured application help for a software on Windows, including context-sensitive help, CHM is usually better. But even that has a learning curve.
Your second requirement ".. and authorized users should also not be able to further copy or decompile the knowledge base." can only be solved with a lot of effort. No idea - maybe encrypt/decrypt to memory stream and pass it to file stream.
Samples for Web-based help:
Sandcastle Help - Dummy sample
FAR HTML - Web Help
Python documentation

Issue involving Silverlight on Windows 10

After installing Windows 10 and then going to my website, that uses Silverlight, I find that Microsoft Edge does not support Silverlight. Has Microsoft killed Silverlight? Is there any way to run Silverlight in some add-in that will run in Edge? I have a lot of code invested in Silverlight. Is my only option to rewrite all of my apps? In What? HTML 5 and javascript?
I can't seem to install IE 11 on windows 10.
Has Microsoft killed Silverlight?
They have killed it for Edge. While you can keep using it in IE 11 and other out-of-browser apps, Microsoft is really discouraging it.
Is there any way to run Silverlight in some add-in that will run in Edge? ... I can't seem to install IE 11 on windows 10.
Within Edge, click the ... in the top right corner. Choose Open with Internet Explorer.
Is my only option to rewrite all of my apps? In What? HTML 5 and javascript?
In the short term, you could encourage users to click on Open with Internet Explorer. In the long term it's HTML5 and JavaScript including DASH, MSE, CENC, and EME.
DASH. Dynamic Adaptive Streaming over HTTP.
MSE. Media Source Extensions.
CENC. Common Encryption.
EME. Encrypted Media Extensions.
References
http://blogs.windows.com/msedgedev/2015/07/02/moving-to-html5-premium-media/
https://developer.mozilla.org/en-US/docs/Web/HTML/DASH_Adaptive_Streaming_for_HTML_5_Video
http://www.w3.org/TR/media-source/
http://docs.unified-streaming.com/documentation/drm/common-encryption.html
http://www.html5rocks.com/en/tutorials/eme/basics/

Can you enable trusted mode in browser for Mac Users in Silverlight 5?

I have a question around Trusted In Browser applications. Are these applications supported on OSX? My team has developed a large educational silverlight package that requires local storage. We'd really like our users to be able to select the folder they save their files in. There's instructions for how to enable this in Windows here: http://msdn.microsoft.com/en-us/library/gg192793(v=vs.95).aspx but no instructions I have found describing how you could enable this on a Mac.
In Mac you can use the System.IO libraries. Read this related thread for more information.

debug an xbap on firefox?

I am starting to write an xbap (wpf web app).
I create a new project and run it and Firefox fails (it just keeps trying to open it with "Windows Presentation Foundation Host).
I know that Firefox and Microsoft don't really see eye to eye, but surely there is a way to do this now days?
Saw this post that shows a hack of copying out a DLL from a Windows XP machine. But my users will not do that (I don't even want to do that!)
Does this mean I have to abandon Firefox as my default browser until I am done developing my xbap?
NOTE: I am using Windows 7 and Visual Studio 2010 Ultimate and Firefox 3.6.12
I don't know what exactly your problem is, but here is a Scott Hanselman blog post detailing a WPF application deployed as an XBAP (not XBAB) using VS 2008 with .NET 3.5. It doesn't say anything about WPF 4 (and the .NET 4 runtime, the post is from 2008) or what version of Firefox he was playing with but I hope this demonstrates it is possible and gives you a starting point for more detailed investigations.
Edit - Well, I should have dug a little deeper. It appears that Windows 7 won't support XBAPs in FireFox. There is a Firefox Add-on to Support XBAPs and Loose XAML that is installed with the .NET 3.5 runtime but it is not included in Windows 7 and this link suggests it can't be installed on Windows 7.
You could run IE Tab Plus (Firefox plug-in) and get it to default to IE when you open something from the localhost.

Resources