-
Content Count
1335 -
Joined
-
Last visited
-
Days Won
29
Posts posted by Dave Nottage
-
-
-
Just now, Alb said:I'm afraid the URL is shown as not existing anymore (page not found).... Could you, please, place the demo also here? (or anywhere else)
Sorry, I renamed it. It's now: https://github.com/DelphiWorlds/Playground/tree/main/Demos/AdMob
Please also see: https://github.com/DelphiWorlds/Playground#project-configuration- 1
-
8 minutes ago, qubits said:I found this.
I'm aware of that one, but thanks 🙂 We've ended up going with a combination of:
WTSUserName
WTSDomainName
WTSClientName
WTSClientAddress
https://docs.microsoft.com/en-us/windows/win32/api/wtsapi32/ne-wtsapi32-wts_info_class
using WTSQuerySessionInformation
- 1
-
On 2/10/2022 at 9:06 AM, Dave Nottage said:That was it; thanks
Unfortunately, this gives the public facing IP address, which makes sense, however in my case isn't suitable.
What I am after is a way of obtaining a unique identifier for the "local" machine, by way of either one of the WTS functions or the Winstation functions.
-
On 2/8/2022 at 4:22 AM, qubits said:looks like you have to enumerate through all sessions, don't think you can pass -1
That was it; thanks
-
4 hours ago, microtronx said:Is WTSAPI32 a good starting point or are there any ready to use components for send/receive over rdp / pipe?
You could use this as a starting point, or to learn from: https://github.com/DelphiWorlds/MiscStuff/blob/master/Test/RDSTwainTestCase.zip
Though the code is pretty messy. I had a plan to re-organise it - maybe some day 🙂- 1
-
On 2/6/2022 at 6:34 PM, Levente said:First, I deleted the iOS SDK in the Delphi SDK manager, then I also deleted it from the hard drive, and then I added the iOS SDK to Delphi again.
You may also need to delete any cache-xxxxxx folders under PAServer/scratch-dir on the Mac, then import
-
I've found some code from an older repo (namely https://github.com/ccy/jedi-apilib) for what I want to achieve however I'm having trouble making it work. This is the code in question:
const WTS_CURRENT_SERVER_HANDLE = 0; WTS_CURRENT_SESSION = DWORD(-1); type _WINSTATION_REMOTE_ADDRESS = record AddressFamily: DWORD; Port: WORD; Address: array [0..19] of Byte; Reserved: array[0..5] of Byte; end; PWINSTATION_REMOTE_ADDRESS = ^_WINSTATION_REMOTE_ADDRESS; TWinStationRemoteAddress = _WINSTATION_REMOTE_ADDRESS; PWinStationRemoteAddress = PWINSTATION_REMOTE_ADDRESS; function WinStationQueryInformation(hServer: THandle; SessionId: DWORD; WinStationInformationClass: Cardinal; pWinStationInformation: PVOID; WinStationInformationLength: DWORD; var pReturnLength: DWORD): Boolean; stdcall; external 'winsta.dll' name 'WinStationQueryInformationW'; function GetWVDClientAddress: string; var LBytesReturned: DWORD; LRemoteAddress: _WINSTATION_REMOTE_ADDRESS; begin LBytesReturned := 0; ZeroMemory(@LClientAddress, SizeOf(LClientAddress)); if WinStationQueryInformation(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WinStationRemoteAddress, @LClientAddress, SizeOf(LClientAddress), LBytesReturned) then begin // Do something with LClientAddress here end else Result := SysErrorMessage(GetLastError); end;
The call to WinStationQueryInformation is failing, and the message being returned by SysErrorMessage is: "The tag is invalid".
Is there something obvious that I'm missing? -
3 hours ago, AVG said:Do anyone know how or we are pre-configured this automatic value that Delphi adxs to the Manifiest when you select that you want to integrate with Firebase?
As you discovered, it is being added during the build process. The value for exported is not in any configuration files so presumably it is hard-coded. The "easiest" way to fix this is to edit the generated AndroidManifest.xml, add it to the deployment and disable the one that Delphi would normally deploy. Of course this means having to repeat the process if you make any changes that affect the manifest.
..or you could use Delphi 11, where the problem has been fixed.
- 1
-
On 2/4/2022 at 6:26 PM, Levente said:The following program versions are installed:
Delphi 11.0 all patches
If you imported the iOS SDK before you installed the patches, you will need to re-import the SDK
-
-
4 hours ago, angusj said:That seems likely be the solution to Dave Nottage's problem
I'd like to know how it is the likely solution. Please refer to the original question.
29 minutes ago, Anders Melander said:Well, the answer to his question is "yes" but since we don't really know what problem he's trying to solve it's hard to tell
The problem I am trying to solve is in the original question. The "why" is that a WVD app is on the receiving end of the drag operation, and the virtual channel needs to register the WVD app window for drag/drop. The best time to do this is at the start of the operation. As I say, this has been working famously for standard drag/drop, but it does not work for dragging attachments out of Outlook
-
17 minutes ago, angusj said:guessing ...
As promising as that looked, it didn't help 🙂
-
This answer has served me well for some time now:
https://stackoverflow.com/a/13835244/3164070however it does not work for when a user drags an attachment from Outlook (it works when dragging the entire email). Does anyone know if an object of a different name is created, or perhaps some other "event" occurs? I'm otherwise looking at installing a global mouse hook as @Remy Lebeau suggests in one of the other answers in the same SO post.
-
If you're using the original project, follow the steps here to ensure that it has references to the correct Android libraries: https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidLibraries
Delete the original AndroidManifest.template.xml, making sure you note any customizations you added yourself. Recompiling the project should recreate the AndroidManifest.template.xml file and you can add any customizations back in. I suspect the error messages you were seeing when you tried compiling with Delphi 10.4 may have been related to having an older AndroidManifest.template.xml.Assuming that you had not changed the %targetSdkVersion% part of AndroidManifest.template.xml, you will find that your app will now need to request permissions for "dangerous" permissions at runtime, so you will need to modify your code to suit. There's examples of how to do this in demos like in the camera component demo: https://github.com/Embarcadero/RADStudio11Demos/tree/main/Object Pascal/Mobile Snippets/CameraComponent and the location demo: https://github.com/Embarcadero/RADStudio11Demos/tree/main/Object Pascal/Mobile Snippets/Location
If you opted to install the Android SDK/NDK files when you installed Delphi 11, when you add an SDK, it should default to the compatible values anyway.
-
9 minutes ago, kaarigar said:I was curious because sync dialogs are supported on other platforms.
I can understand that async dialogs are a concept that can be a challenge to embrace. Some time in the future we'll all be wondering why 😉
- 1
-
3 hours ago, kaarigar said:Documentation says that the modal dialogs are not supported on android
There's a good reason for that - implementing modal dialogs on Android the same way as on Windows is practically impossible.
3 hours ago, kaarigar said:and was looking for a work around way or technique to have it on android
The workaround is to use async dialogs. Developers do this on Windows all the time - from one form, show another. When the user takes some action on the secondary form, do something based on that action, and close the form. The primary form will still be there when they get back 🙂
If the primary form needs to "know" what happened on the secondary form, you could expose a property or event handler on the secondary form which the primary form can examine, or handle.
- 1
-
For Android, this is the only way I've found that will quit completely and remove the task from the "recent items" list:
For iOS, it's bound to have your app rejected if it is on the App Store, otherwise:
https://developer.apple.com/library/archive/qa/qa1561/_index.html
- 2
- 2
-
-
-
I've just added a new demo:
https://github.com/DelphiWorlds/Playground/tree/main/Demos/Advertising
to the Playground repo
- 6
-
On 12/22/2021 at 7:59 PM, Felix. said:why I'm not able to write to GetLibraryPath folder? (Android 11, Delphi 10.4.1)
On Android, it's not meant to be written to by the app. What is the reason why you're using that folder to write to?
-
1 minute ago, Felix. said:df, free
I don't know of any option for df that means it needs to wait for input
-
1 hour ago, Felix. said:I suspect that stockfish engine waits for input, that's why it locks the application.
You said you are running apps that result in: Process terminated with exit code: 0. Stockfish just locked up on me - regardless of whether or not it's waiting for input, that's not what you described
mismatch? SDK 15.2, iOS device 15.3
in Cross-platform
Posted
Which version of iOS? Do you have a test project that reproduces the problem?
In this case, it's unlikely. I'm working with iOS SDK 15.0 on 15.3 devices, including playing audio.
I know this sounds a bit bone-headed, but also check that your mute button is not switched. I've actually done that myself 🙂