How to determine the patch level of SAP GUI from a dump? - sap-gui

I have a crash dump of SAP GUI (saplogon.exe) and would like to know which Patch Level is has. How can I get that information?

You can see the Patch Level in SAP Logon's system menu / About SAP Logon. Looking at different SAP GUI versions, you'll find that the patch level is encoded in the third part of the version number:
SAP GUI 7.30, Patch Level 8:
SAP GUI 7.40, Patch Level 3:
Knowing this makes it almost trivial to get the patch level from the dump:
0:011> lm vm saplogon
start end module name
01190000 0132a000 saplogon (deferred)
...
Image name: saplogon.exe
...
ProductName: SAP GUI for Windows
InternalName: SAP Logon
OriginalFilename: saplogon.exe
ProductVersion: 730 Final Release
FileVersion: 7300.3.8.1084
...
0:011> * --------------------^

Related

DBus Introspection incomplete/wrong

I'm trying to work with Bluetooth LE on a RPI4, and am following the Bluetooth® Technology for Linux Developers official guide. The python code works fine, but I have to do it in c++, and as of now, I'm blocking at the Advertising step.
I then tried to Intospect the service created by the python programme to compare to what I'm doing in c++, but the introspection result is strange : Intospection in d-feet
I don't understand why the org.bluez.LEAdvertisingManager1 interface is there instead of the org.bluez.LEAdvertisement1 interface. Have I broken dbus ? or are invisible interfaces just a thing ?
Edit
I compared the code for the server_advertising.py example of the Bluetooth® Technology for Linux Developers guide, and for the example-advertisement of the bluez git, and found out that most likely, in the first one, they are implementing the org.bluez.LEAdvertisement1interface while naming it org.bluez.LEAdvertisingManager1...
That would be why I get the same result when introspecting the two, whith only the interface name changing.
As for why I can't see the Properties, from what I now understand, they appear (in both examples) to not have properly registered them, and just overrode the GetAll method to return whatever value they have in their programs. (╯°□°)╯︵ ┻━┻
Thanks to you I now understand the result i got, but I am sad to learn that the introspection won't be usefull...
BlueZ uses a technique where an interface (org.bluez.LEAdvertisement1) is defined for the developer to create the advertisement and publish it to D-Bus.
The location of that created interface implementation is given to BlueZ using the RegisterAdvertisement command on the org.bluez.LEAdvertisingManager1 interface.
This is why the interfaces that need to be implemented are documented as:
Object path: freely definable
Because the relevant Register* command will be used to tell BlueZ the object path of the interface that has been implemented.
To state this a different way, BlueZ provides a blueprint for D-Bus services that it needs to do certain things. e.g. advertising or an agent. The documented interface has no implementation. This is created for the specific instance (e.g. what is to be to advertised). BlueZ is told where to find this interface implementation with the specific Register* command.
Using the example at https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-advertisement.
I can see that I have started the service but I am not able to introspect it because there is no introspection information given.
To advertise:
$ python3 example-advertisement
In another window I can see a new service is published but there is no access to introspect on the service:
$ busctl list | grep python
:1.862 23113 python3 pi :1.862 session-1820.scope 1820 -
$ busctl introspect :1.862 /org/bluez/example/advertisement0
Failed to introspect object /org/bluez/example/advertisement0 of service :1.862: Access denied
The GetAll method is implemented so I can call that (with sudo):
$ sudo busctl call :1.862 /org/bluez/example/advertisement0 org.freedesktop.DBus.Properties GetAll s org.bluez.LEAdvertisement1
a{sv} 7 "Type" s "peripheral" "ServiceUUIDs" as 2 "180D" "180F" "ManufacturerData" a{qv} 1 65535 ay 4 0 1 2 3 "ServiceData" a{sv} 1 "9999" ay 5 0 1 2 3 4 "LocalName" s "TestAdvertisement" "Includes" as 1 "tx-power" "Data" a{yv} 1 38 ay 3 1 1 0

Publish webapp to Azure as student

Alright, so I have a Microsoft Imagine account from school through which I've gotten both Azure and Microsoft Visual Studio 2017 in order to learn ASP.NET (worked with Django earlier).
So I've gone throught a whole bunch of tutorials from codeschool to virtual academy to docs.microsoft and finally got the first version of my webapp done and ready to be published to Azure.
So I look through the steps on how to publish, here's some info on that:
Subscription: Microsoft Imagine
Resource Group: <name> (northeurope)
App Service Plan:
Resource Group: <name>
Pricing Tier: Free
Location: North Europe
Status: Ready
Subscription Name: Microsoft Imagine
Click on "Explore additional azure services" (as per many tutorial instructions) and add a database, I've fortunately already created the database in Azure so I only have to connect it. Here's some info on the database (though creating it directly here generates the same error):
Resource Group: <name>
Status: Online
Location: North Europe
Subscription Name: Microsoft Imagine
Server Name: <servername>.database.windows.net
Pricing Tier: Free (5 DTUs)
Some info on the server that the server:
Resource Group: <name>
Status: Available
Location: North Europe
Status: Available
So everything looks really good and I'm ready to publish and I hit the Create-button.
Deploying: (step 0 out of 5) ...
Deploying: (step 4 out of 5) ...
ERROR
Details:
Template deployment failed. Deployment operation statuses:
Succeeded: /subscriptions/ ... /servers/mintentadbserver ()
Failed: /subscriptions/ ... /databases/Mintenta_db ()
40619: The edition 'Free' does not support the database data max size '1073741824'.
Succeeded: /subscriptions/ ... /firewallrules/AllowAllAzureIPs ()
Succeeded: /subscriptions/ ... /sites/MinTenta ()
Succeeded: /subscriptions/ ... /config/connectionstrings ()
The few duplicate questions I've found on this have close to no answers and just a few suggestions to upgrade (link1, link2).
So I suppose my question is, like many others:
1) How do you change the size of the database?
2) If that's not possible and you cannot have a database with your free account. Why would not just say that instead of using size-restrictions?
I know this question is a little bit old, but I've just ran across the same error and I also couldn't find an answer. However, I managed to work around this issue.
I was following this tutorial (https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-dotnet-sqldatabase) from Microsoft, and since you mentioned the same steps and the same message error I got, I'm assuming you were doing the same thing or at least something similar.
When publishing directly from Visual Studio 2017 to Azure, VS tries to create the following resources:
App service plan
App service
SQL server
SQL database
From your error message (and mine as well), although the SQL database creation had an error, the other resources were published successfully. So, if you access Azure portal, you'll see those resources there.
Then, if you open the SQL server and click "New database", you'll be able to add a database manually - and more importantly, you'll be able to select the free option with max size of 32MB.
(In this example, the button is disabled because I've already added one database - I believe this is another limitation from the students' subscription).
Note that if you add the database manually, you'll also need to configure your connection strings. But that is quite easy:
Open your new database on Azure portal
Go to Settings > Connection Strings
Copy the connection string from there
Now open your App service and go to Settings > Application Settings
On Connection Strings, add a new one or edit the existing one, pasting the content that you just copied from the DB (don't forget to input your username and password)
You can have a DB using a trial (there are no restrictions to trial account as far as I'm aware of, well, except money). I'm not sure how to workaround this issue, as the template is pre-built by VS.
The more I look at this error, the more I don't get it. There is no "Free" tier of the Azure SQL DB. And the cheapest (basic) supports up to 2GB database, so this doesn't really restrict you.
Try setting appservice plan to shared? if that doesn't help try deleting everything and just let VS create all the resources for you, it should work in that case.

Stonestreet One's Bluetopia how do you request a MTU change?

Or more specifically how do you request an MTU change when operating at the "Platform Manager" level?
More details
I'm using the sample program LinuxGATM_CLT which acts as a GATT client and it uses the Bluetopia Platform Manager Framework.
I'm using TI's WL183xMOD WiLink hardware which uses Bluetopia (previously owned by Stonestreet One).
The API call exists
The function exists, but seems to be at stack layer lower than the PM:
~/src/ti_bluetopia/ $ grep GATT_Exchange_MTU_Request ./BluetopiaPM/Bluetopia/include/GATTAPI.h
BTPSAPI_DECLARATION int BTPSAPI GATT_Exchange_MTU_Request(unsigned int BluetoothStackID, unsigned int ConnectionID, Word_t RequestedMTU, GATT_Client_Event_Callback_t ClientEventCallback, unsigned long CallbackParameter);
But its not callable from the "Platform Manager" level
Everything within BluetopiaPM/sample/LinuxGATM/LinuxGATM_CLT.c uses GATM functions from BluetopiaPM/include/client/GATMAPI.h
It feels like the GATT_Exchange_MTU_Request() function has not been exposed at the PM level. Its hard to dig deeper into how the PM works because they only ship binaries (doesn't seem to be open-source). For example the only match is the GATTAPI.h header file and a binary library file:
~/src/ti_bluetopia/ $ grep -ri GATT_Initialize ./
Binary file ./BluetopiaPM/Bluetopia/lib/libSS1BTGAT.a matches
I feel like the solution is to find methods to report my current Platform Manager BluetoothStackID, ConnectionID, and callback parameters so that I can call the GATT_Exchange_MTU_Request() function directly.
In short, the workaround is to get an earlier version of Stonestreet One's Bluetopia, before they created the "Platform Manager". These earlier versions (suchas 4.012 and 4.013) don't have the advantage of the Platform Manager, but they do allow you to have more control, operating at a lower level where you can call:
GATT_Initialize() and
GATT_Exchange_MTU_Request()
One good example is 4.013's SPPLEDemo.c which calls the above-mentioned methods.

Access 2013 Linked Tables to DBF files

I have searched here and Google, with no solution so far.
The problem is Access 2013 no longer wants to connect to DBF.
Each month, I will get 33 DBF files (each with a CDX file) that I have to import into MySQL. The front end for this is Access 2013.
I've built a few other applications that do similar functions, so I'll just tweak one of them for this new data.
I don't know the the actual source of the original data, but it's my understanding that dbase & visual foxpro use the same format.
The application is designed to link to the data files, where I'll run queries (and maybe VBA as well) to port the data into tables linked to MySQL. All tables are linked using VBA and a DSN-Less connection.
I can use VFPOleDb, or something else if it gets me what I want. I've actually already installed this, but can't figure out the code to do what I need.
I'm running 64-bit Access & Windows 7.
Thanks.
Can you launch a VB program to convert the files to xlsx. A friend of mine had the same situation and we finally found this on a forum (don't remember which one, I just had this code copied into a word doc I sent her.)
Function dbf2xlsx(dbffile)
Dim xlapp, objWorkbook As Object
Dim SaveFile As String
SaveFile = Left(dbffile, Len(dbffile) - 3) & "xlsx"
Set xlapp = CreateObject("EXCEL.application")
Set objWorkbook = xlapp.workbooks.Open(dbffile)
xlapp.Application.Visible = False
xlapp.Application.DisplayAlerts = False
xlapp.ActiveWorkbook.SaveAs SaveFile
xlapp.ActiveWorkbook.Close
End Function
Now she only had 1 file to import so I don't know how effective or efficient this may be.
I ended up using an external program called DBF to MySQL by Intelligent Converters. Except for the fact that it doesn't convert indexes, it does a great job. It has a command line interface, so I used Access to offer the options, build the command string, then execute it.
In retrospect, I think I would have rather read the raw data files and pulled the data that way instead.
For anyone with this issue you can link to a DBF table using code similar to below, (note that error checking etc ought to be included) AND obviously change the hard coded names to whatever is required
Dim tdf As TableDef
Set tdf = CurrentDb.CreateTableDef("NameYouWant")
tdf.Connect = "Dbase III;Database=c:\test\dbase\"
tdf.SourceTableName = "example.dbf"
CurrentDb.TableDefs.Append tdf
Using access as a frontend doesn't seem to be a good idea.
Anyway, if you want to import VFP data into MySQL, then it could be done in various ways. Unfortunately VBA with 64 bits is not one of them (doable with drivers from say Sybase ADS but not worth the effort IMHO).
You can use VFP itself or C#, or any other language like Go, Python ...
With VFP itself, you would create a cursorAdapter or remote view or SPT cursor to your MySQL, and then push the data into that cursor from VFP table and commit. It is a simple process.
With C#, you would open connection to both MySQL and VFP (using VFPOLEDB) and then pump data from one to other (same with other languages as well).
AFAIK, access doesn't have an option to get data from OLEDB sources directly (Excel does), if your office were 32 bits, you could use that.
(If it were MS SQL Server, then you could use BulkCopy class in .Net)
Access 2013 dropped support for DBF files. It shows error Could not find installable ISAM when trying to open a linked DBF table. But you can install Access 2010 component that supports DBF files and keep using them in Access 2013.
First, download and install Microsoft Access Database Engine 2010 Redistributable (free, contains 32bit and 64bit versions). This will install (among other things) the required ACEXBE.DLL library to access dBase files directly. But this is not enough, since this installs it under OFFICE14 (2010), not for OFFICE15 (2013).
Now you need to copy 4 registry keys from Office 14 to Office 15. This registry patch will do it for you, but it’s highly recommended that you understand what it’s doing. This one is for 64bit Office:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Access Connectivity Engine\Engines\Xbase]
"win32"="C:\\PROGRA~1\\COMMON~1\\MICROS~1\\OFFICE14\\ACEXBE.DLL"
"DbcsStr"=hex:01
"Mark"=dword:00000000
"Date"="MDY"
"Exact"=hex:00
"Deleted"=hex:01
"Century"=hex:00
"CollatingSequence"="Ascii"
"DataCodePage"="OEM"
"NetworkAccess"=hex:01
"PageTimeout"=dword:00000258
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE III]
"Engine"="Xbase"
"ExportFilter"="dBASE III (*.dbf)"
"ImportFilter"="dBASE III (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE IV]
"Engine"="Xbase"
"ExportFilter"="dBASE IV (*.dbf)"
"ImportFilter"="dBASE IV (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE 5.0]
"Engine"="Xbase"
"ExportFilter"="dBASE 5 (*.dbf)"
"ImportFilter"="dBASE 5 (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00
For 32bit Office 2013 running on 64bit Windows it’s slightly different:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\Engines\Xbase]
"win32"="C:\\PROGRA~2\\COMMON~1\\MICROS~1\\OFFICE14\\ACEXBE.DLL"
"DbcsStr"=hex:01
"Mark"=dword:00000000
"Date"="MDY"
"Exact"=hex:00
"Deleted"=hex:01
"Century"=hex:00
"CollatingSequence"="Ascii"
"DataCodePage"="OEM"
"NetworkAccess"=hex:01
"PageTimeout"=dword:00000258
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE III]
"Engine"="Xbase"
"ExportFilter"="dBASE III (*.dbf)"
"ImportFilter"="dBASE III (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE IV]
"Engine"="Xbase"
"ExportFilter"="dBASE IV (*.dbf)"
"ImportFilter"="dBASE IV (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Access Connectivity Engine\ISAM Formats\dBASE 5.0]
"Engine"="Xbase"
"ExportFilter"="dBASE 5 (*.dbf)"
"ImportFilter"="dBASE 5 (*.dbf)"
"CanLink"=hex:01
"OneTablePerFile"=hex:01
"IsamType"=dword:00000000
"IndexDialog"=hex:00
"CreateDBOnExport"=hex:00
"SupportsLongNames"=hex:00
Note that win32 path may be different on your system due to 8dot3 names assignments.
After this registry patch, your database with linked DBF files will work like in previous Access versions.

best way to get a volume serial number in an asp.net application?

I work on an ASP.Net application which is a web version of an already existing winforms desktop application. The desktop application reads a license file defining enabled features to adapt its behavior. To lock the application to a specific machine, one of the setting of the license file is the serial number of the first system volume. At startup the application checks that the serial number in the license file matches the volume serial number. Getting the volume serial number is done by PInvoking kernel32.dll's GetVolumeInformation function.
However in the asp.net version a standard application pool using a local service or local network identity does not have permission to PInvoke, resulting in the impossibility to check the license file is valid. How can I check the license at the application startup?
I can think of the following alternatives:
replacing the PInvoke by a method which does not require special permissions to get the volume serial number (is it the case with WMI?)
putting all the license checking code in a separate assembly and install it to the GAC to have it executed elevated
creating an application pool with administrator identity just for my application during the installation process
The first solution would be the best but I don't know if it is possible.
Have I other possibilities? What are the pros and cons of each method? Which one is the best?
I suggest using WMI. The Win32_Volume class has the serial number of the volume. You can use something like this:
using System.Management;
SelectQuery query = new SelectQuery("Win32_Volume");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
foreach (ManagementObject obj in searcher.Get())
{
Console.WriteLine("{0} {1}", obj["DriveLetter"], obj["SerialNumber"]);
}

Resources