Given an appropriate manifest that sets uiAccess="true", should a win32 program (that works fine on other Windows7 systems) be able to get a valid handle back from SetWindowsHookEx when running on Windows7 (32bit) on Mac Mini using Parallels ?
This is the line of Delphi XE4 code that calls the API
HookHandle := SetWindowsHookEx(WH_JOURNALPLAYBACK, #Playback, hInstance, 0);
I keep getting "access denied" as the system error returned in HookHandle.
I have tried many variations of my manifest syntax and am seriously wondering whether this is just some limitation of the Mac Mini / Parallels environment. The user invoking the program is an Administrator. UAC is enabled. I have tried Run as Administrator; no difference.
My manifest file follows.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="FFHotKeys" version="1.1.0.0 processorArchitecture="*"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="true"/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
</assembly>
I have tried stting the level to each of these
level="asInvoker"
level="requireAdministrator"
level="highestAvailable"
and that did not solve the 'access denied' problem.
Note: I am including my manifest via .rc file containing
1 24 "FFHotKeys.exe.manifest"
rather than by the Custom Manifest feature under Project > Options. I have "Enable Runtime Themes" and a blank custom manifest. I tried it the other way but with slightly different .manifest contents.
Note: when I check the resources with XN_Resource_Editor, there is an "XP Theme Manifest" resource containing exactly the XML expected. There are also 2 VCLSTYLE resources.
Thank you.
The answer is YES, it should and does work on Parallels.
The problem was clarified by using XN_Resource_Editor to examine the compiled EXE. Turns out the only deleting the .RES file prior to Project > Build led to the resources being recompiled, so test results had been confusing. More importantly, Delphi XE4 uses its default manifest when RunTime themes are involved. Therefore the solution was to delete the resource references in the project and instead use Project > Options, Application, Runtime Themes, select the custom manifest and then Project > Build and code-sign the EXE and run it from under c:\Program Files\subdir.
processorArchitecture="*"
was valid in the manifest
<requestedExecutionLevel level="asInvoker" uiAccess="true"/>
was valid in the manifest.
Related
I'm getting the following error when attempting to install my .msix file via an .appinstaller file.
This .appinstaller file is using a new schema which is not valid on this OS version. Please update to the latest version of Windows 10.
I've tried various schemas /2017, /2017/2, /2018, 2021.
I've tried with 'Developer Mode' switched on & off.
There doesn't seem to be anything relating to the error in the event viewer in AppxDeploymnet-Server.
This is my .appinstaller file.
<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2"
Version="1.0.0.0"
Uri="https://mywebsite.com/myapp.appinstaller" >
<MainPackage
Name="myapp"
Publisher="CN=myOrganisation"
Version="1.0.0.0"
ProcessorArchitecture="x64"
Uri="https://mywebsite.com/myapp.msix" />
<UpdateSettings>
<OnLaunch
HoursBetweenUpdateChecks="0"
UpdateBlocksActivation="true"
ShowPrompt="true" />
<AutomaticBackgroundTask />
<ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
</UpdateSettings>
</AppInstaller>
This is the version of Windows I'm using.
I am using VS2019 (16.11.10) and have created a C++ exe using Windows SDK 10.0.19041.0. When I look at the properties of the exe in Windows 10 the compatibility tab appears and the troubleshooter wants to run the exe in Windows 8 compatibility mode.
I have added information to the embedded manifest using assembly identity:
MyCompany.MyGroup.MyApp, processorArchitecture=IA64, version=2.0.22.1, type=win32, language=neutral
and also an extra manifest file containing...
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<maxversiontested Id="10.0.19041.0"/>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
<!-- Windows 10 -->
Can anyone please tell me how to find out why Windows 10 wants to run this exe in Windows 8 compatibility mode, when it runs OK as a Windows 10 exe. Many thanks.
I have tried checking the embedded manifest by opening the exe in VS2019 to verify that the information I have added actually appears, it does. I have tried making the manifest file not embedded, this makes no difference.
I suspect your 'snippet' isn't passing the schema validation. Try:
Add a settings.manifest to your project that contains:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 / Windows 11 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>
(once you have it working, feel free to trim it down)
Make sure in your project properties you have Linker -> Manifest File -> Generate Manifest set to "Yes"
(this page should be defaulted to run "asInvoker". If you need admin rights, you'd change it here).
In the project properties, also make sure Manifest Tool -> Input and Output -> Embed Manifest is set to "Yes".
(this is also where you'd set DPI awareness if desired)
See this blog post
FSLab template gives an error "The type provider 'RProvider.RProvider' reported an error: The type provider constructor has thrown an exception: Failed to start the R.NET server within 20 seconds"
I am using VS2015 and latest template from fslab.org
Anyone know how to work around this error? I get the same error when using VS2013 so I don't think it is related to VS.
RProvider.Server.exe is expecting FSharp.Core v4.3.0.0 but is bundled with 4.4, if you run RProvider.Server.exe you should see the exception. A work around is to add a RProvider.Server.exe.config file to the same directory with a binding redirect.
This is a pain. I am assuming you added FsLab from NuGet and tried building the project. As #kev says, the current stable version of FsLab (0.3.18) bundles the wrong version of FSharp.Core.dll. To see what #kev meant, go to the $YOUR_PROJECT_DIR/packages/RProvider.1.1.17/lib/net40 directory, open a command window there, and run RProvider.Server.exe to see the exception for yourself.
The cure is to create a binding redirect that would tell the runtime to look for the assembly version that is actually bundled (4.4.0.0) instead of the one it expects (4.3.0.0). To do this, create a file in the above mentioned directory, called RProvider.Server.exe.config, and paste the following into it...
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="4.3.0.0" newVersion="4.4.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
...and you should be good to go. To check, either run RProvider.Server.exe from the command line (it should give a different output to before) or rebuild your project to check that the error message stops appearing.
Obviously, this will hopefully just go away when the FsLab NuGet package gets sorted out.
I am trying to create a web application using MS Access as database. For it, I am using ucanaccess driver and my server is Wildfly 8.0
The issue is to how correctly configure this driver on the server ?
After researching on internet I got to know below steps
create a folder structre and place all the ucanaccess jar files-
wildfly-8.0.0.Final\modules\system\layers\base\com\ucanaccess\jdbc\main
Edit module.xml file-
<module xmlns="urn:jboss:module:1.1" name="com.ucanaccess.jdbc">
<resources>
<resource-root path="ucanaccess-2.0.9.4.jar"/>
<resource-root path="commons-lang-2.6.jar"/>
<resource-root path="commons-logging-1.1.1.jar"/>
<resource-root path="hsqldb.jar"/>
<resource-root path="jackcess-2.0.8.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
Edit standalone-full.xml file
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/MyDS" pool-name="MyDS" enabled="true" use-java-context="true">
<connection-url>jdbc:ucanaccess://C://Users//sahashu//Documents//NGCORE.accdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>ucanaccess-2.0.9.4.jar</driver>
<security>
<user-name></user-name>
<password></password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="ucanaccess" module="com.ucanaccess.jdbc">
<xa-datasource-class>org.ucanaccess.jdbc.MsAccessDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
However, still I get this error-
23:29:34,422 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 28) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "ucanaccess")
]) - failure description: "JBAS010441: Failed to load module for driver [com.ucanaccess.jdbc]"
Please help me to identify the issue
Thanks
There is an easier way: Just create your own JAR using the UcanAccess JAR files.
In Eclipse:
Create a plain Java Project (for Java 8)
Create a dummy class with a dummy main method, and execute it (for example a simple Hello World program)
Right-click on the project -> Build Path -> Configure Build Path
Go to the Libraries tab and use "Add External JARs" to add all 5 JARs that you find in your UcanAccess download
Right-click on the project -> Export -> Java / Runnable JAR file, choose your dummy class as Launch configuration, and keep Library handling as "Extract required libraries..."
Now go to your WildFly administration console, and click on "Deployments". There you can add your freshly baked JAR and enable it. WildFly will recognize this driver automatically from now on, when you need to add a Microsoft Access Datasource using the Wizard in the administration console.
TF215097: An error occurred while initializing a build for build definition {DefinitionName}: The invocation of the constructor on type 'Classname' that matches the specified binding constraints threw an exception.
OK some had already answered this very well:
TFS 2010 Custom Build Activity TF215097 error
I had the same issue before and corrected them by adding the correct attribute:
Microsoft.TeamFoundation.Build.Client.BuildActivity( Microsoft.TeamFoundation.Build.Client.HostEnvironmentOption.Agent )
My build is running well on x86 machine but give the error on 64 bit build controller or agent.
The Context :
I created several Build Activities. One of this activity is a Visual Build Pro runner activity. I referenced the Visual Build Professional 6 Server Object. (We have several project and could not update it... at this point)
When I build the assembly VS 2010 generate Native.{MyAssemblyName}.manifest
<?xml version="1.0" encoding="utf-8"?>
<assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="Native.EMI.TeamFoundation.Build" version="1.0.0.0" type="win32" />
<file name="VisBuildSvr.dll" asmv2:size="712904">
<hash xmlns="urn:schemas-microsoft-com:asm.v2">
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>aePKKx7BgE7vN7OjQqwrQ2bvex8=</dsig:DigestValue>
</hash>
<typelib tlbid="{c48285d5-e97e-4824-9e14-faf8124b00a4}" version="1.0" helpdir="C:\Program Files (x86)\VisBuildPro6\System\VisBuildPro.chm" resourceid="0" flags="HASDISKIMAGE" />
<comClass clsid="{d87ad38d-99d9-4e04-9505-696c3afde66c}" threadingModel="Both" tlbid="{c48285d5-e97e-4824-9e14-faf8124b00a4}" progid="VisBuildSvr6.Application" description="Visual Build Pro 6 server application component" />
<comClass clsid="{1cc058ff-793f-4560-9fad-48d88db93ca9}" threadingModel="Free" tlbid="{c48285d5-e97e-4824-9e14-faf8124b00a4}" progid="VisBuildSvr6.Builder" description="Visual Build core builder component (MTA)" />
<comClass clsid="{5ef3f30b-278b-4796-8f23-41fdd5ddc96c}" threadingModel="Both" tlbid="{c48285d5-e97e-4824-9e14-faf8124b00a4}" progid="VisBuildSvr6.BuilderSTA" description="Visual Build core builder component (MTA/STA)" />
</file>
</assembly>
And Interop.VisBuildSvr.dll assembly
When I trig a build on a Windows 64 bit Build Controller and Agent on the same machine I have the TF error.
I tried to attach the debugger on the controller and I am able to see the first error :
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'Interop.VisBuildSvr, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d64ea679b6fd0408' or one of its dependencies. The system cannot find the file specified.
That file is on my custom assemblies folder on TFS and also on the BuildController and BuildAgent folder.
Thanks
From your comment, it looks like you got it working by configuring your build to invoke the 32-bit version of MSBuild. Is that right?