How to get instance of a service? - windows-ce

HI i am writing a service in wince. In the service i need to create a window. For creating window i need HINSTANCE. I can't get HINSTACE from DllMain> so How can i get the instance of the service?

Since you are not specifying the version of Windows CE you are using I will answer to the version I am familiar with - Windows CE 6.
In Windows CE 6 you need to use the UIProxy to display a window in the driver code. Since a service is very similar to a driver I guess that the same method needs to be applied. (I have not tried this though).
Read Bruce Eitman's blog about the UI Proxy to see how to do it: UI Proxy

Related

Using Azure SDK for JS to create .NET 4.x App Service

I'm starting to wonder whether this is the right tool for the job, still here goes.
I'm attempting to automate the creation of our Azure Test environment using Azure SDK for JS. The environment spans many services (as you can imagine), including Classic ASP.NET app services.
Node is my safe space, so that is why I started with the JS SDK.
I have started scripting the creation of an app service using WebSiteManagementClient.webApps.createOrUpdate. I'm confused though, there is seemingly no way to configure any of the following:
Which app service plan the app service should be connected to. This feels fundamental.
The operating system, Windows or Linux.
The stack version, .NET 4.8, .NET Core, or whatever.
Is it possible to configure the above using the JS SDK, or am I going to have find another approach?
Update 23/03/21
Untested, but these are my findings so far:
App Service Plan - The plan is set using the serverFarmId property of the Site interface.
Operating system - Assuming Windows as the default, if you want a Linux app service, you change the kind property of Site from app, to app,linux.
Stack & version - In the SiteConfig interface, you have linuxFxVersion and windowsFxVersion. Again, I think the assumption is 'latest .NET' (e.g. .NET 4.8). For .NET Core 3.1, the setting looks to be DOTNETCORE|3.1.
It can be achieved using js SDK. I checked the source code and it is ok. But I don't recommend to use js sdk to do this.
Because you need to call the SDK, there are many internal logics that you need to code. This will waste a lot of your time. So I recommend you to use restapi.
The restapi method name is similar to the naming in the SDK, mainly because you can test api interfaces online to achieve the functions you want. So you can selectively choose the method you want to achieve the function you want.
Official doc
Web Apps - Create Or Update
As for your concerns, you only need to write all the configuration in json format and put it in the request body.
Tips:
First use the online interface, encode the json format, create a webapp according to your needs, and then integrate it into your code.

How to monitor Wildfly with Nagios?

I've read that it's possible to monitor Wildfly with Nagios in links like this one and I also know that there are solutions that provide that service as well.
Does anybody knows how to do that, how to monitor Wildfly with Nagios, any recommendations on how to start? Any reference would be very appreciated.
You can consider using JSON based HTTP management API. Sample plugin (Python based) for JBossAS - standalone mode is available here https://github.com/aparnachaudhary/nagios-plugin-jbossas7. This should also work for WildFly.
Some details about WildFly HTTP Management API can be found here https://docs.jboss.org/author/display/WFLY9/The+HTTP+management+API

Proxy settings for Selenium#library with robot Framework and VNCserver

Hi I am writing testcases in robot Framework with Selenum2Library.
I am running my Product on another VM with Proxy settings and Selenium on other machine.
If there's no Proxy I can run selenium on one and product on other.
Is there any way we can bypass proxy settings, and access the product???
I am working on Fedora and trying to access red hat ironport account.
any help is more then welcome.
THanks
You can try generate custom firefox profile in which you could set your custom firefox settings.
On my system firefox's profile (which robot framework uses by default) locates at /usr/local/lib/python2.6/site-packages/SeleniumLibrary/firefoxprofile/.
As I understand from doc from /usr/local/lib/python2.6/site-packages/SeleniumLibrary/init.py you can copy that dir, edit and then use it:
Start Selenium Server -firefoxProfileTemplate C:\\the\\path # Uses custom Firefox profile

IAPClientPaymentException: Application ID initialization fails j2me nokia

I just want to know, what can make the IAP prompt this kind of exception "com.nokia.mid.payment.IAPClientPaymentException: Application ID initialization fails" when you test it in the emulator.
Another related question: The documentation says to remove the TEST_MODE.TXT file when pointing it to live server. I removed the text but now I get Security Exception. Whats the workaround for this? I am using java sdk 2.0 and the emulator that came with it.

BlackBerry Code Signing on Linux without GUI

After a lot of searching I have yet to find a way to sign a BlackBerry application on a Linux distribution with no GUI.
As of right now I'm getting the error "Unable to request signatures until this application has completed the initial key generation.". The problem is I'm not able to register the CSI files it seems via CLI. Has anyone accomplished this without setting up X11?
Yes, its definitely possible to do this on a headless Linux box. Heck, I do it on a headless Solaris/UltraSPARC server :-)
For actually running the tool, I like http://bb-ant-tools.sf.net/ . If you are using an older version of the signature tool, you may need to make some modifications as described on http://slashdev.ca/ .
While the tool is fully controllable from command-line parameters, it does unfortunately still require access to a running X server to function. The workaround for this is to install "Xvfb" (a fake X server for purposes like this), launch it in the background on your system, then set the DISPLAY variable so the signature tool will use it for its non-interactive GUI.
Blackberry sigtool may not be supported in Linux and it may be only partially working. BB dev tools are still Windows-centric.

Resources