Jean_D
Members-
Content Count
19 -
Joined
-
Last visited
Community Reputation
1 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Installing missing Delphi Help after clean install
Jean_D replied to Jean_D's topic in Delphi IDE and APIs
@Remy Lebeau Thanks a lot. I learned something new today. It worked flawlessly. -
When installing the latest version of Delphi (Delphi 12.1), I forgot to request the installation of Delphi Help. If I try to re-run the installer in order to install the Help, the installer wants to, first, uninstall my current version of Delphi. I don't want to do that as I would have to reinstall all my third-party components. Is there a way to manually install Delphi Help without having to reinstall Delphi in its entirety?
-
Calling a Delphi DLL function from a C++ Builder application
Jean_D replied to Jean_D's topic in VCL
Thank you very much. Passing the string as a pointer from the Delphi unit did fix my issue.- 3 replies
-
- delphi
- c++ builder
-
(and 3 more)
Tagged with:
-
I have created a DLL with one exported function using the latest version of Delphi (12.1). The function takes one parameter: a record type variable. library MyDLL; uses System, SysUtils; type TMyRecord = record MyString: AnsiString; MyInteger: Integer; end; function FillRecord(var Rec: TMyRecord): Boolean; stdcall; export; begin Rec.MyString := 'Hello from Delphi'; Rec.MyInteger := 42; Result := True; end; exports FillRecord; begin end. In my C++ Builder 6.0 application, I have declared the following: struct TMyRecord { char *MyString; int MyInteger; }; extern "C" __declspec(dllimport) bool __stdcall FillRecord(TMyRecord *Rec); When calling the 'FillRecord' function from my C++ Builder application, I do not get the expected results: TMyRecord iMyRec; Memo1->Lines->Clear(); Memo1->Lines->Add(Format("Address: %p", ARRAYOFCONST((&iMyRec)))); if (FillRecord(&iMyRec)) { String iData = iMyRec.MyString; Memo1->Lines->Add("iMyRec.MyString: " + iData); int iNumber = iMyRec.MyInteger; Memo1->Lines->Add("iMyRec.MyInteger: " + IntToStr(iNumber)); } else { Memo1->Lines->Add("Error calling FillRecord"); } I am expecting: iMyRec.MyString: Hello from Delphi iMyRec.MyInteger: 42 But I am getting: iMyRec.MyString: H iMyRec.MyInteger: 42 I am drawing a blank when trying to figure out what I am doing wrong. Any inputs/suggestions to solve my issue would be greatly appreciated. Thank you
- 3 replies
-
- delphi
- c++ builder
-
(and 3 more)
Tagged with:
-
Delphi 12 - ListView - Search Box - Android: Not Working
Jean_D replied to Jean_D's topic in Cross-platform
FYI: re-creating the app directly in 'Delphi 12' solved the issue. -
We have a small cross-platform application written in 'Delphi 12.' Within the application, we have a few lists (TListView) of various data. In order to 'filter' the data displayed within a list, we set the 'SearchVisible' property of our lists to 'true.' This works flawlessly when our application runs on an iOS device. However, when the application runs on an Android device, the user is not even able to input text in the search box. The virtual keyboard does display. But none of its inputs are displayed within the search box. As a result, the data is not filtered. Has anybody else experienced the same issue? If you did, have you found a work around?
-
Thanks for the tip. I gave it a try to no avail. Everything appears to be working fine as long as form style is not set to 'fsMDIForm.'
-
It might be related indeed.
-
Wanting to test the 'CustomTitleBar' feature that comes with the newer versions of Delphi, I created a small Delphi 12 application for testing purposes. To my main form, I added a 'TitleBarPanel' that I assigned to the 'Control' property of my main form 'CustomTitleBar.' If I set my form style to 'fsNomal,' I am able to change the colors of the custom title bar at design time and the bar displays properly at run time. However, if I set my form style to 'fsMDIForm,' I am still able to change the colors of the custom title bar at design time. But the bar does not display properly at run time (my custom colors are ignored). Is this normal behavior or am I doing something wrong?
-
Thanks. It worked.
-
Thanks for the link. It appears to be promising. I was able to 'patch' the 'FMX.Platform.UI.Android.pas' file. If I replace the original file with its patched version, how do I 'force' the recreation of its '.dcu' counterparts?
-
We have an app for Android (originally created using the Delphi 11 but, now, maintained using Delphi 12). After a fresh install, the login process will behave properly. However, after logging out, any attempt to log back in will have the 'caret' not aligned with the 'cursor' (see below). By the way, both the username and pin are TEdit. How do I force the 'caret' to be aligned with the 'cursor?' Then, once in a while, if we tap the username field in order to enter a new value, we get the following error: Has anybody else experienced this strange behavior/error and found a way to solve it? By the way, none of these issues were present under Delphi 11.
-
How do I 'connect' an 'inhouse' MacBook Air to a VM hosting my work environment in the Cloud?
Jean_D replied to Jean_D's topic in General Help
Thanks for both of your suggestions. After been distracted by other projects, I finally had time to attempt to solve my issue. It took a few tries but I, finally, was successfull. In order to solve my problem, I 'simply' had to install a VPN Client on my MacBook giving me 'access' to my virtual machine. -
Yes, I was. But your solution is more elegant. Since it is not defined within the 'Androidapi.JNI.Os.pas' file, I didn't think that I had to follow the same process as I did for 'WRITE_EXTERNAL_STORAGE'. How would I do that. No, I am not getting any error. The application runs 'properly.' The issue is that, instead of storing the 'zip' file within the external SD card, it saves it within the internal 'Documents' folder. Since I am running out of space 'internally,' the compression does not complete.
-
Did you grant permission,? Do you have code that prompts the user if permission has not been granted yet? I believe that I do: procedure TForm_Main.request_Result(const aPermissions: TClassicStringDynArray; const aGrantResults: TClassicPermissionStatusDynArray); begin v_PermissionGranted := ((Length(aGrantResults) = 1) and (aGrantResults[0] = TPermissionStatus.Granted)); end; procedure TForm_Main.request_Permissions(aPermission: String); begin PermissionsService.RequestPermissions([aPermission], request_Result); end; v_PermissionGranted := PermissionsService.IsPermissionGranted(JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE)); if not v_PermissionGranted then request_Permissions(JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE)); In terms of 'MANAGE_EXTERNAL_STORAGE,' it is only defined within in the manifest file. Is that not enough? My issue is that, when I execute the following code, the 'zip' file is not created on the SD card. iZipFile := TZipFile.Create; iZipFile.Open(System.IOUtils.TPath.Combine(System.IOUtils.TPath.GetSharedDocumentsPath, 'Folder-Content.zip'), zmWrite);