SQL Server CE v4 on Windows 8 - visual-studio-2010

I built the app using SQL Server CE 4.0 and it runs just fine in Windows 7.0 dev machine, but got the following error message running it in Windows 8 (x64 version, Lenovo All-In-One Horizon 27' HW platform):
Is not a valid Win 32 application (Exception from HRESULT: 0x800700C1)
In app directory I can clearly see the
System.Data.SqlServerCe.dll
and all other 7 DLLs:
Sqlceca40.dll Sqlcecompact40.dll Sqlceer40EN.dll
Sqlceme40.dll Sqlceoledb40.dll Sqlceqp40.dll Sqlcese40.dll
taken from C:\Program Files\Microsoft SQL Server Compact Edition\v4.0 root directory and included in the app dir as per recommendation at: http://msdn.microsoft.com/en-us/library/vstudio/aa983326%28v=vs.110%29.aspx .
Other settings:
Configuration Platform: Any CPU Target Platform: x86 Setup
TargetPlatform: x64
Any idea on what went wrong and how to fix it? Thx.

Related

How to correctly use WDK 8.1 Devfund_IOAttack_ERT_Basic test for fuzzing windows driver

I want test my storage driver using fuzzing techniques and I choosed Microsoft tool called IoAttack that is represent as test case in WDK 8.1 and not standalone application like in previous versions of WDK. This tool work with IoSpy tool that gather all IOCTLs and WMI command that are send to the driver. IoSpy attach to driver stack as filter driver and record all traffic. Problem occurs after I successfull attach IoSpy, record all data than remove IoSpy and run IoAttack. Because IoAttack do not see my device that is created by my storage driver I cannot fuzz my driver. Below are steps and configurations that I use.
Any tip or solution will be very welcome :)
[Setup steps for test machine:]
Install driver that created storage device
Install package "WDK Test Target Setup"
default location: C:\Program Files (x86)\Windows Kits\8.1\Remote\x64
default location on machine that has WDK 8.1 component installed
installation command: msiexec /i "WDK Test Target Setup x64-x64_en-us.msi"
2.1 If your target computer is running Windows Server, find the DriverTest folder that was just created by WDK Test Target Setup MSI. (Example: c:\DriverTest). Right click the DriverTest folder, and choose Properties. On the Security tab, give Modify permission to the Authenticated Users group.
Install package Test Authoring and Execution Framework (TAEF)"
default location: C:\Program Files (x86)\Windows Kits\8.1\Testing\Runtimes
default location on machine that has WDK 8.1 component installed
installation command: msiexec /i "Test Authoring and Execution Framework x64-x64_en-us.msi"
Install package "WDTF runtime library"
default location: C:\Program Files (x86)\Windows Kits\8.1\Testing\Runtimes
default location on machine that has WDK 8.1 component installed
installation command: msiexec /i "Windows Driver Testing Framework (WDTF) Runtime Libraries-x64_en-us.msi"
installation verification:
Open a Command Prompt window on the test computer.
Run %WDTFDir%\Tools\CheckWDTFInstall.cmd
default location: C:\Program Files (x86)\Windows Kits\8.1\Testing\Runtimes\WDTF
Open the log file CheckWDTFInstall.log and examine the results which contains information on all installed WDTF components
Setting mode "kernel debugging"
steps:
Open a Command Prompt window as Administrator. Enter bcdedit /debug on
If the computer is not already configured as the target of a debug transport, enter bcdedit /dbgsettings local
Reboot the computer.
[Test procedure that uses IoSpy and IoAttack:]
Enable IoSpy using WDK test "EnableIoSpy" and application "TAEF"
command:
Te.exe "%SystemDrive%\Tests\Additional
Tests\DeviceFundamentals\ERT\Basic\Devfund_IOSpy_EnableSupport_ERT_Basic.wsc"
/select:"#Name='Devfund::EnableIoSpy'"
/p:"DQ=INF::OriginalInfFileName='my_storage_driver.inf'"
/p:"DFD=%systemdrive%\DriverTest\IoSpy"
/rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml
/enableWttLogging
/wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Enable_I_O_Spy_(Quick)_(possible_reboot)_00000.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*"
/runas:Elevated
Reboot operating system
Use IOCTL commands for public and private IOCTLs
Verify that IoSpy data file that records the data sent throught IOCTL and WMI requests to drivers for devices enabled for fuzz tests is larger that initial 1 KB size (if not data acquiring failed for specific driver)
default location for IoSpy data file: %SystemDrive%\DriverTest\IoSpy
Disable IoSpy using WDK test "DisableIoSpy" and application "TAEF"
command:
te.exe "%SystemDrive%\Tests\Additional
Tests\DeviceFundamentals\ERT\Basic\Devfund_IOSpy_DisableSupport_ERT_Basic.wsc"
/select:"#Name='Devfund::DisableIoSpy'"
/rebootStateFile:%systemdrive%\DriverTest\Logs\DriverTestReboot.xml
/enableWttLogging
/wttDeviceString:$LogFile:file="%systemdrive%\DriverTest\Logs\Disable_I_O_Spy_(Quick)_(possible_reboot)_00000.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*"
/runas:Elevated
Reboot operating system
Run I/O Attack (Quick) fuzzer using WDK test "RunIoAttack" and application "TAEF"
command:
te.exe "%SystemDrive%\DATA\Tests\Additional
Tests\DeviceFundamentals\ERT\Basic\Devfund_IOAttack_ERT_Basic.wsc"
/select:"#Name='Devfund::RunIoAttack'"
/p:"DQ=DeviceID=’my_device_id_that_was_created_by_my_storage_driver"
/rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml
/enableWttLogging
/wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Run_I_O_Attack_(Quick)_00001.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*"
/runas:Elevated
[Issue:]
Microsoft fuzzer IoAttack that is ran as test from WDK does not see my_storage_driver. Test pass because no devices we found for testing. Output from test:
*
StartGroup: Devfund::RunIoAttack Property: TAEF: Description [Runs I/O
Attack. ] WDTF_TARGETS: - Query("IsDevice AND IoSpy::") WDTF_TEST: No
devices were found for testing EndGroup: Devfund::RunIoAttack [Passed]
Summary: Total=1, Passed=1, Failed=0, Blocked=0, Not Run=0, Skipped=0
*
Command that was used to run test using WDK application "TAEF" (te.exe)
te.exe "%SystemDrive%\Tests\Additional
Tests\DeviceFundamentals\ERT\Basic\Devfund_IOAttack_ERT_Basic.wsc"
/select:"#Name='Devfund::RunIoAttack'"
/p:"DQ=DeviceID=’my_device_id_that_was_created_by_my_storage_driver’"
/rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml
/enableWttLogging
/wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Run_I_O_Attack_(Quick)_00001.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*"
/runas:Elevated
[Additional information:]
I tried to address my driver / storage device for fuzzing test using DQ=DeviceID, DQ=INF::OriginalInfFileName (like in IoSpy case) but in the end doesn't work.
Procedure source for usage of IoSpy and IoAttack is from https://msdn.microsoft.com/en-us/library/windows/hardware/ff547271
[Test machine setup:]
- Windows Server 2012 R2 Standard Build 9600 (x64)
[Software setup:]
- WDK 8.1 installed on Windows 7 Professional (x64)

Not getting DbgPrintEx prints on windows debugger running on host (Windows 10)

My driver is deployed successfully on windows 10 target PC. But still i am not getting debug prints on windows debugger (WinDbgX64) session on my HOST PC.
I have also set HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Debug Print Filter key's "DEFAULT" DWORD to value 8. So that my DPFLTR_INFO_LEVEL will be able to send data to kernel buffer.
The installing and configuration of components for driver deployment and testing via visual studio is commenced successfully. Hence it has created a WDKRemoteUser account on my target machine to deploy the drivers.
My Host Environment:- Windows 10 (Build 10130) X64 and Visual studio 2015 RC with all required component installed.
My Target Environment:- Windows 10 (Build 10130) X64 and debugging & testing components installed.
My debug print statement inside driver entry routine is as follows.
DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "KMDFHelloWorldDriver: DriverEntry\n");
Shouldn't you be setting IHVDRIVER's value to 8 instead of DEFAULT's value, if you are using DPFLTR_IHVDRIVER_ID in the DbgPrintEx?

How to start Oracle SQL Developer 4 using 32 bit JDK on Win 64?

I need to connect to a database and use a wallet file.
If i try with my SQL Developer i end up with "ocijdbc.dll: Cant load IA 32bit .dll on a AMD 64-bit platform."
I have both installed JDK 32 bit (in C:Prog32bit) and JDK 64 bit (C:Prog) for development.
I tried to set JavaHome in sqldeveloper/bin/sqldeveloper.conf manually
SetJavaHome C:\Program Files (x86)\Java\jdk1.7.0_51
My next step was to edit %USER_HOME%/sqldeveloper/sqldeveloper.conf and I set SetJavaHome there too, but none didn't work.
Next step was, i edited sqldeveloper/bin/sqldeveloper.bat and set:
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_51"
path="C:\Program Files (x86)\Java\jdk1.7.0_51\bin%"
java.exe -Xmx640M -Xms128M -Xveri....
My last try was to use the command line (as I would do on linux) and run:
D:\sqldeveloper>PATH="C:\Program Files (x86)\Java\jdk1.7.0_51\bin"
D:\sqldeveloper>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
D:\sqldeveloper>sqldeveloper.exe
But i still receive the message sqldeveloper is running 64 bit Java.
I found a workarround. An older version of SQL Developer (bundeld with jdk) is available at http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-downloads-v322-2080107.html
The main problem in this case is that you have installed a 32 bits Oracle Driver to connect to your database in a 64 bit machine. There is no problem with that but you need to set SetJavaHome to a jdk directory that contains 32 bits version.
In sqldeveloper 4 you need to edit the file:
"C:\Users\username\AppData\Roaming\sqldeveloper\1.0.0.0.0\product.conf"
and inside this config file change the default directory for jdk1.7.0_71 32 bits is like this:
SetJavaHome C:\Program Files (x86)\Java\jdk1.7.0_71
After you use this path, check in Task Manager that your process sqldeveloper looks like this:
sqldeveloper.exe *32
If your process starts with that "*32" you could be able to connect using your 32 bits oracle driver.
Set the SetJavaHome value at %appdata% "Roaming\sqldeveloper\1.0.0.0.0\product.conf"
This could be cause of connection type as well.
Before connecting to database,
Right click on database and goto properties
Change the connection type to Basic from TNS, set the port and service name/SID, provide password and save the connection.
Try testing the connection, this resolved the issue for me.

Is it possible to use Java 7 with IBM WebSphere Application Server 8.5 Trial

I have installed WAS 8.5 Trial version on Windows 7. I would like to deploy and run Java 7 application. Is it possible to do it?
I can not see "IBM WebSphere SDK for Java Technology Edition 7" in the IBM Installation Manager's feature list and there is no SDK 7 installed, yet.
>managesdk.bat -listAvailable
CWSDK1003I: Available SDKs :
CWSDK1005I: SDK name: 1.6_64
CWSDK1001I: Successfully performed the requested managesdk task.
>
Has somebody managed to make WAS 8.5 Trial and Java 7 work together on Windows 7?
Thanks in advance!
I've just found one of the possible solutions...
Select the method "Download Director or HTTP" instead of "Installation Manager (Recommended)" at the download page of Evaluate: IBM WebSphere Application Server. Then you get a list of products to download which contains "IBM WebSphere SDK Java 7, Installation Manager repository".
Select and Download all parts of the product and extract the three part to the same directory.
Start your previously installed Installation Manager and add the directory as a new repository under File > Preferences > Repositories, then press OK.
Now you can choose Install and you can select IBM WebSphere SDK Java Technology Edition (Optional) from the list of available packages.
After the installation is completed you can check if everything went well.
>managesdk.bat -listAvailable
CWSDK1003I: Available SDKs :
CWSDK1005I: SDK name: 1.6_64
CWSDK1005I: SDK name: 1.7_64
CWSDK1001I: Successfully performed the requested managesdk task.
>
The Java SDK 1.7 is installed and you can set it as the default SDK in the Administrative Console of your server.
Server > WebSphere application servers > server > Server Infrastructure > Java SDKs
Sorry for the stupid question, I wasn't careful enough...
Firstly install the JDK 1.7 or any required version supported.(find the available using the command - managesdk.bat -listAvailable)
Then Go to the Installed WAS Server DIR and then navigate to bin folder
C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv02\bin
For ALL Profiles
managesdk -enableProfileAll -sdkname SDK_Name -enableServers
From there execute this command(In Windows)
C:\Program Files (x86)\IBM\WebSphere\AppServer_2\profiles\AppSrv02\bin>managesdk
.bat -enableProfile -profileName AppSrv02 -sdkname 1.7_64
It gives this message to confirm.
CWSDK1017I: Profile AppSrv02 now enabled to use SDK 1.7_64.
CWSDK1001I: Successfully performed the requested managesdk task.
(In Linux)
/opt/IBM/WebSphere/WSRR/v8.5/bin/managesdk.sh -enableProfile -profileName AppSrv02 -sdkname 1.7_64
Note: AppSrv02 is the server name used in my local. Replace the name with your actual thing.

SMO restore and Windows 7

I have an application that uses SMO to manage databases. It works great on XP and Server 2003.
However, when I try to run it on Windows 7, I get the following exception:
Restore failed for Server 'localhost'. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
Is this a UAC/permissions issue? Windows 7 is the only variable between the two computers.
Database used is Sql Server 2005 on both machines as well. Using .NET 3.5.
Thanks.
This issue had to do with the fact this dll is not installed on x64 Windows. To resolve it, I had to download SQL Server feature pack:
SQL Server Feature Pack.

Resources