Managed code in WinPE - managed-c++

If I want to run a program in windows PE (Vista or 7) am I not allowed to use any level of managed code?
Can I only have c++ code that doesn't reference any dotNet code?
How can I interact with windows? Do I have to use user32.dll type files to carry out various operations?

Edit: See also Can Windows PE 2.0 support the .NET framework?
Windows PE is a very limited bit of windows before windows proper. It stands to reason that vast parts of the windows in the WIN32 subsystem will not be available. However this page discusses coding with PE (though its limited to XP embedded). And this discusses some ui aspects under PE and possibly ways of getting access to the windows libraries.
It may be possible to self host the CLR but I doubt it. Might make an interesting challenge. Let us know how you get on.

Related

How does Ada access Windows 8.1/10 APIs, and can 64 bit programs for Windows be generated?

I am considering to learn Ada. I found several resources online, and Programming in Ada 2012 by Barnes is on its way to here, so that should get me started.
The target machines for the future Ada programs are Intel 64 bit, and the target OSes are Win 8.1 and Win 10.
However, I was not able to find an example on how to interact with the Windows API in order to draw and manipulate Windows. Could someone please direct me to a source, so that I can have a look at how such code would look like?
Also, all I've read so far indicates, that Ada compiles only 32 bit executables for Windows. Is it correct that I can not generate true 64 bit Windows programs?
The recent GNAT community release does target 64bit. An alternative is TDM-GCC which has provided a GNAT release targeting 64bit for a while.
There is Win32Ada which is a binding to the Windows API. However, I don't think it has been updated with new APIs of Windows 8.1 or Windows 10. However, you can always import functions from the Windows API into Ada yourself.
There is GtkAda which allows you to use GTK to create GUIs. However, these are not „native“ Windows GUIs.

Does it make any sense trying to compile .NET Core CLR for Windows CE?

We're in the unfortunate situation of still having to support a Windows CE based device (ARMV7 architecture). We're continuously running into problems regarding the limited functionality of .NET Compact framework (no security libraries, very limited asynchronous support, ...). Since the .NET Core CLR has been compiled for multiple platforms, including ARM-based platform, the idea of trying to compile it for Windows CE as well came up. I invested about a day to see how far I'd get, however I'm not the most experienced CMake user.
I couldn't find any hint on the internet whether someone ever tried, so... Is there a basic possibility of succeeding in doing so or are there limitations I do not yet see which make getting a working version highly improbable?

What are the equivalents of Microsoft ASP.NET and Visual Studio for Linux?

I just wonder what are the similar frameworks and tools for Linux web development.
And can I use Visual Studio to develop websites for Linux Apache? Thanks.
Mono (it supports ASP.NET) and MonoDevelop, I guess.
Web development on Linux isn't specifically tied to one programming language, framework or IDE. More commonly they are related in terms of being Free and Open Source (free as in cost, and also the ability to do what you want with the code).
I loved Visual Studio when we used it for classes, however I haven't quite found a tool that is the same. The only thing near to this would be Eclipse or Netbeans.
In general, many Linux enthusiasts use emacs or vi (or vim) for their editing. At first glance you may not see the power they have, but emacs is definitely a wonderful editor, and vi is very good once you become familiar with it.
For Web programming langauges and frameworks, you have a variety to pick from.
Python is one of the most popular languages to use for Web development. This language has been used by Google, Reddit, Quora and a host of others. Perhaps the most popular framework for Python is Django, and each (Python and Django) have their own following, as well.
Ruby is a wonderfully beautiful langauge, too. Most likely you may have heard of Ruby on Rails, which is a great Web framework allowing you to quickly turn an idea into something actual in no time.
PHP is another popular language, and has the PEAR framework. Many of the online forums that you can buy are written in this language, such as vBulletin and the ever famous phpbb.
In my opinion, it depends on what you want to accomplish. Python and Ruby are great for Web development, as well as non-Web, too.
Ad 1) There are several IDEs. I prefer eclipse, no matter if for html, php, python, c or java.
Ad 2) Yes you can. Create your websites, copy them to your /var/www (or wherever your ww-root) is and you are set.
EDIT: < personal opinion > By the way, I mean there is no thing like "windows web development" and "linux web development". In the end it is of no importance at all on which OS you developped your web application, on which OS the web server runs, which OS the client has or which server- and client-side languages you used (as long as you don't use something certain clients can't provide). You have a web server that communicates via HTTP, HTTPS (or whatever) with clients. This server passes certain data via CGI, lib-apache2-mod-XYZ, WSGI, the interface IIS uses for ASP (or whatever) to executable scripts. These yield a result that the web server then publishes via (fill in arbitrary OSI layer 7 protocol) to the client, no matter what the content: HTML, CSS, images, JSON, you name it. Your operating systems has nothing to do with this.
Not all interfaces are available on all hosting server OS, but you always have a bunch to choose from and what counts is the result in the end. Quidquid agis, prudenter agas et respice finem. < /personal opinion >
There are a ton. You can use mono for ASP.NET that runs on Apache. There are even other languages. PHP, JSP, Djanjo, Ruby on Rails, Node... just to name a few languages/frameworks. There isn't a build of Visual Studio for Linux and you would be hard pressed to set it up to compile Linux assemblies on Windows.

Text to Speech in ASP.NET

I would like to do some japanese text to speech on my dedicated windows 2003 x64 server with .net framework, using c#
I found something on google, but requires to install a lot of files on the server... i don't like, for stability issues: there is another option, like a linked dll or something?
You can use Microsoft Speech SDK. It's a set of COM APIs containing TTS and SR engines. I'm not sure if it contains Japanese TTS though.
What you most likely want is the Microsoft Speech Server especially if your webite is going to encounter any decent load or volume.
From the site:
"A speech platform, MSS contains all
the server components for deploying
telephony (voice-only) and multimodal
(voice/visual) applications. MSS
combines Web technologies,
speech-processing services, and
telephony capabilities into a single
system. "
There is also a dedicated Microsft Speech community which will likely help you get started in this realm. Also, I'm not sure what the latest version is...2004 R2?
This article has a decent diagram outlining the various components. Looks like a good fit for integration with an ASP Web Application.
using SAPI in an ASP.NET website, is impossible: the sound will be reproduced on the server :S
It seems that there is the need of Microsoft Speech Server
...
Or not? With asp.net is possible to run a commandline exe on the server to save an mp3, then stream that mp3, right? (how to do that? i will try to figure it)
I will go this way, i let you know the result :)
edit: this is how i solved:
How to save text-to-speech as a wav with Microsoft SAPI?
I save the generated voice in a wav file, then i embed it on the page, playing it in a flash player
COOL!!
Use Microsoft Speech Library and see this article Text to Speech with the Microsoft Speech Library and SDK version 5.1 in CodeProject. Also see Giving Computers a Voice in Coding4Fun
The System.Speech.Synthesis namespace has been part of the framework since .NET 3.0. However, it has internal dependencies on the Speech SDK COM libraries (it chooses the correct version depending on the host OS), so I would recommend prototyping the work before you jump in.
The class you should probably look at first is System.Speech.Synthesis.SpeechSynthesizer (whitepaper and example code)
Warning: I have personally experienced issues using the speech APIs in an ASP.NET environment whereby the request that returned the audio data never returned. Despite heavy debugging I was never able to resolve the issue and the feature was dropped. I have had an unresolved support case with Microsoft for 12 months now.

best way to get started in setting up Mono for ASP.NET on Mac

I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the way Mac's do things. Any tips or advice would be helpful
To launch the development ASP.NET server, just open a terminal window and run the "xsp2" command from the Mono installation.
The only thing that is missing from the Mono distribution on the Mac compared to Linux is the Apache module, that one you will have to compile yourself if you want to deploy your application in production on OSX.
Since I first worked with mono osx, they've added Cocoa# and ObjC#, but the ASP.NET core was pretty solid (about 3 years ago). You can in fact write web applications according to the Onion book, and port 'em to IIS with little or no difficulty.
Honestly if you want to run ASP.NET you probably don't want to struggle with getting it to run via mono on MacOS. Intel-based Macintoshes can boot Windows, and Apple provides Windows drivers for their various devices as part of Boot Camp.
Alternately you can buy Parallels or VMWare Fusion for less than $100. I use VMWare Fusion. There is also a Mac version of VirtualBox from Sun which is free, though I have never used it.
For MacOS development (not .Net) you really should try Apple's XCode. It is free. It primarily focuses on Objective C though Python, Ruby, and other languages can be used to develop native Mac applications.
Edit 9/22: I'm sorry neither you nor Kev found this a useful answer. Let me try to expand a bit: the Macintosh has a long history of software being ported in from Windows, applying a theme to make the GUI elements look Mac-like but otherwise being content with a minimum cost port. Such software never behaves like a real Mac application: it doesn't respond to AppleEvents, it won't be scriptable, it handles only the cross-platform clipboard formats, etc.
You're free to do whatever you want, including running ASP.NET using mono. If its for your personal use, knock yourself out. However if you're considering it as a way to offer your web-enabled product in a Mac version, I urge you to reconsider. The Mac market has for the most part rejected such products. You'll get some sales, but nothing like you would get for an app which behaves like a native Mac application.
Now, let the down-voting continue.
You can also run ASP.NET via NGINX - easy to install using:
sudo brew install nginx
See installation tutorial: http://www.robertmulley.com/tutorial/nginx-install-and-setup-mac-os-x-mavericks/
See configuration steps for your app: http://www.mono-project.com/docs/web/fastcgi/nginx/
(Note: see my pull request as the fastcgi-mono-server4 should now be used - https://github.com/mono/website/pull/82/files)
Why use Mono on a Mac? Run Parallels, VMWare, or Boot Camp.

Resources