Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all 3212 articles
Browse latest View live

Any method of making a suitable LIB file for a DLL created with Microsoft VS C++?

$
0
0

A hardware manufacturer has provided a DLL to interface with their USB device.  This DLL is a C++ Class Library created in Microsoft VisualStudio.

The supplied LIB files would not link (no surprises there - wrong format), so I used IMPLIB to create Embarcadero compatible LIB files.  However, the link still failed reporting that all of the external class methods (including constructors and destructors) referenced in my code had not been found.

Using IMPDEF showed that there was obscure name decoration, that obviously was not compatible with the name decoration used by RAD Studio.

A quick search online turned up a StackOverflow article which stated that this issue was not only between different company compilers, but even between different versions of compiler for the same manufacturer - there is no standard for name decoration in C++ DLLs.

If I can't link to this DLL, I essentially can't use the hardware.

Does anyone know a method of generating a LIB file from a DLL created in Microsoft VS C++ that will link to a RAD Studio Win32 executable project?


Unable to run C++ Builder app in iOS simulator

$
0
0

I set up a VM OSX machine and was able to connect to it and debug OSX applications just fine. But when I moved to test iOS it seems like C++ Builder does not want to work with the Simulator? Or is it that it don't work unless you have a paid developer membership? Apple allows free provisioning since a while back so it should work. Am I doing something wrong?

Running an app in the simulator using xcode works just fine.

RTF Conversion issue

$
0
0

Hi,

 

We've migrated our application from D7 to XE7 .

 

We've noticed that the RTF conversion is not same as D7 in XE 7.

 

Could anyone please let us know how to solve this problem.

 

 

 

Example code below.

 

var

 

  lRTF : String;

 

Begin

 

  lrtf:= '{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}'+

         '{\f1\fnil Tahoma;}}'#$D#$A'\viewkind4\uc1\trowd\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 '+

         '\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1003'+

         '\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1404\'+

         'pard\intbl\b\f0\fs20 : \b0 HUBERS, RACHAEL E\fs24\cell\cell\row'#$D#$A'\b\fs20\trowd\trbrdrt\brdrdb\brdrw10 '+

         '\trbrdrb\brdrdb\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\'+

         'brdrs \cellx1003\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \'+

         'cellx1404\intbl : \b0 413530\fs24\cell\cell\row'#$D#$A'\pard\sb100\sa100 '#$D#$A'\par \pard\f1\fs16 '#$D#$A''+

         '\par }';

 

 

 

    lStream := TStringStream.Create(lRTF);

 

    try

 

      lStream.Seek(0,soBeginning);

 

      lRichEdit.Lines.LoadFromStream(lStream);

 

      lRichEdit.Lines.SaveToFile('c:\abc.rtf');

 

    finally

 

      lStream.Free;

 

    end;

 

End;

 

 

 

When we execute this code in D7 & XE7 the o/p is as below

 

--in D7

 

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fnil Tahoma;}}{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\trowd\trgaph10\trleft-10\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 \trpaddl10\trpaddr10\trpaddfl3\trpaddfr3\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx993\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1394\pard\intbl\b\f0\fs20 : \b0 HUBERS, RACHAEL E\fs24\cell\cell\row\trowd\trgaph10\trleft-10\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 \trpaddl10\trpaddr10\trpaddfl3\trpaddfr3\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx993\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1394\pard\intbl\brdrt\brdrdb\brdrw10 \brdrb\brdrdb\brdrw10 \b\fs20 : \b0 413530\fs24\cell\cell\row\pard\sb100\sa100\par\pard\f1\fs16\par}

 

 

 

--in XE7

 

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fnil\fcharset0 Tahoma;}}\viewkind4\uc1\trowd\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1003\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1404\pard\intbl\b\f0\fs20 : \b0 HUBERS, RACHAEL E\fs24\cell\cell\row\b\fs20\trowd\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1003\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1404\intbl : \b0 413530\fs24\cell\cell\row\pard\sb100\sa100\par\pard\f1\fs16\par}

 

Here you can notice that there is a huge difference between XE7 and D7, because of this we're facing lot of issues.

 

 

RTF conversion issue

$
0
0

Hi,   We've migrated our application from D7 to XE7 .   We've noticed that the RTF conversion is not same as D7 in XE 7.   Could anyone please let us know how to solve this problem.       Example code below.   var     lRTF : String;   Begin     lrtf:= '{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}'+          '{\f1\fnil Tahoma;}}'#$D#$A'\viewkind4\uc1\trowd\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 '+          '\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1003'+          '\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1404\'+          'pard\intbl\b\f0\fs20 : \b0 HUBERS, RACHAEL E\fs24\cell\cell\row'#$D#$A'\b\fs20\trowd\trbrdrt\brdrdb\brdrw10 '+          '\trbrdrb\brdrdb\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\'+          'brdrs \cellx1003\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \'+          'cellx1404\intbl : \b0 413530\fs24\cell\cell\row'#$D#$A'\pard\sb100\sa100 '#$D#$A'\par \pard\f1\fs16 '#$D#$A''+          '\par }';           lStream := TStringStream.Create(lRTF);       try         lStream.Seek(0,soBeginning);         lRichEdit.Lines.LoadFromStream(lStream);         lRichEdit.Lines.SaveToFile('c:\abc.rtf');       finally         lStream.Free;       end;   End;       When we execute this code in D7 & XE7 the o/p is as below   --in D7   {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fnil Tahoma;}}{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\trowd\trgaph10\trleft-10\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 \trpaddl10\trpaddr10\trpaddfl3\trpaddfr3\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx993\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1394\pard\intbl\b\f0\fs20 : \b0 HUBERS, RACHAEL E\fs24\cell\cell\row\trowd\trgaph10\trleft-10\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 \trpaddl10\trpaddr10\trpaddfl3\trpaddfr3\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx993\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1394\pard\intbl\brdrt\brdrdb\brdrw10 \brdrb\brdrdb\brdrw10 \b\fs20 : \b0 413530\fs24\cell\cell\row\pard\sb100\sa100\par\pard\f1\fs16\par}       --in XE7   {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fnil\fcharset0 Tahoma;}}\viewkind4\uc1\trowd\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1003\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1404\pard\intbl\b\f0\fs20 : \b0 HUBERS, RACHAEL E\fs24\cell\cell\row\b\fs20\trowd\trbrdrt\brdrdb\brdrw10 \trbrdrb\brdrdb\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1003\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx1404\intbl : \b0 413530\fs24\cell\cell\row\pard\sb100\sa100\par\pard\f1\fs16\par}   Here you can notice that there is a huge difference between XE7 and D7, because of this we're facing lot of issues.    

Kinvey PushReceived called 8 times on Android

$
0
0

Hi,
I just tried to develop a quick simple app to get notifications from Kinvey and everything works fine on iOS (iPad and iPhone), when I send a string, it's propagated to iOS and I add it to a Memo field for each notification string.
On Android though, I get each notification 8 times... 

Any idea why?
I don't have any loop, so I just don't get it why I get 1 notification on iOS and why I go 8 times into the PushReceived event when on Android.


My Code for PushReceived is as follows:

procedure TForm1.PushEventsPushReceived(Sender: TObject;
  const AData: TPushData);
begin
    Memo.Lines.Add('-- '+formatDateTime('dd-mm-yyyy hh:nn:ss', Now )+' --' ) ;
    {$IF DEFINED(iOS)}
      Memo.Lines.Add(AData.APS.Alert) ;
      Memo.Lines.Add(AData.APS.Badge) ;
   {$ENDIF}
   {$IF DEFINED (ANDROID)}
      If( AData.GCM.Title <> '') Then
         Memo.Lines.Add('- '+AData.GCM.Title+' -') ;
      Memo.Lines.Add(AData.GCM.Msg) ;
   {$ENDIF}
   Memo.Lines.Add('') ;
end;

Thanks for any clue.

Steve J

FireDac: any way to get SQL data as an object?

$
0
0

Hi,
I was wondering whether it's possible to actually get the result of an SQL statement as an object?
Did anybody typecast a result into an object?

Something like:
The class TProduct has a idProduct: integer, idName:String, idPrice:integer and equivalent fields in a Database, is it possible to get the select from the DB and avoid the idProduct := sql.FieldByName("idProduct").AsInteger, etc... ? A kind of auto field matching, filling the variables automatically (besides blobs)?

The example here is simple, but when you have 20+ fields it's more cumbersome: you need to manually assign each field.
That would be convenient too to write data into the DB.
I'd like to avoid storing the class as a BLOB so we can still query the values.

Thanks for any guidance.

Steve

TDSRestConnection and string parameters

$
0
0

Hi all,

We have a small 3-tier application with a DataSnap-server and a windows-client
using a TDSRestConnection component to connect to this datasnap server over HTTP/REST.
We have several server-methods with string parameters.
In Delphi 10.1 Berlin the spaces in these string parameters are replaced by plus-signs (+)

One can easily reproduce this effect.
Create a basic datasnap server with sample methods using the datasnap server wizard.
(VCL Forms application, protocol HTTP, include sample methods and use a TDSServerModule as ancestor type for the server methods)

Create a windows VCL-client with a TDSRestConnection component to make the connection with the server.
Call the sample ReverseString method with for instance "Hello   world" as parameter. (3 spaces between the words)
The server will return "Hello+++world"

This effect is only visible with Delphi 10.1 Berlin, not with Seattle.
Anyone an idea how to avoid this or is this a bug ?

Regards
Freddy

RTTI over DLL boundaries

$
0
0

Hello,

I'm trying to migrate a project from our old borland to the latest XE 10.1, using trial. 

I ran into a problem while compiling ICU : while compiling the second dll (icuin), which depends on the first one (icuuc), there is a link error :

[ilink64 Error] Error: Unresolved external 'typeinfo for icu_53::UMemory' referenced from E:\DEV\COMPONENTS\ICU\WINDOWS\WIN64\RELEASE\COLLATIONKEYS.O

With UMemory defined (in icuuc) as this (comments stripped)

class U_COMMON_API UMemory {
public:
    static void * U_EXPORT2 operator new(size_t size) U_NO_THROW;
    static void * U_EXPORT2 operator new[](size_t size) U_NO_THROW;
    static void U_EXPORT2 operator delete(void *p) U_NO_THROW;
    static void U_EXPORT2 operator delete[](void *p) U_NO_THROW;
    static inline void * U_EXPORT2 operator new(size_t, void *ptr) U_NO_THROW { return ptr; }
    static inline void U_EXPORT2 operator delete(void *, void *) U_NO_THROW {}
};

U_COMMON_API is defined as __declspec( dllexport ) in icuuc and as __declspec( dllimport ) in icuin ; U_EXPORT_2 is __cdecl

I can't figure why it needs this information as there is no virtual methods in UMemory, nor than I figure how to make this to compile :(

I've put the cbproj files in a gist, if needed on understand anything: https://gist.github.com/BastienDurel/6d7971d2379629c922d7ae9b76df510f

Thanks,

 


IPv6 Datasnap (IOS App)

$
0
0

At WWDC 2015 they announced the transition to IPv6-only network services in iOS 9. Starting June 1, 2016 all apps submitted to the App Store must support IPv6-only networking.

My IOS app have a IPv4 IP, im using a TDSRestConnection now in the Host property i set 2112:d8ac:64c4::d8bc:64c4 and say "error is socket error11004"
How i make my IOS app use IPv6


I use XE8, Datasnap Rest Server

The directory folders for my apps no longer show up in internal memory--Delphi

$
0
0

Hi, I am currently developing an android app (using Delphi in Rad Studio 10.1) and would like to save a text file to the internal memory as the Nexus 7 tablet I am using does not have an SD card slot. My problem is that I have somehow made it so that I can no longer see the directories for the apps I am downloading to the tablet. When the tablet is plugged into the computer, the Android folder within the internal memory has the apps that i downloaded from rad studio a couple of weeks ago, but nothing recently. Deleting one of these apps and redownloading it from computer to tablet does not bring it back either. What have I done and how do I fix it? Thanks! R

DB artisan 2016 version not able to discover DB2 databases

$
0
0

Hi, I have installed DB artisan 2016 version and have valid license for DB2 but still auto discover not working for DB2. I have Db2 9.7 client installed on my machine, which works fine.  Please suggest what need to be done

iOS Simulator 程序崩溃,无法运行。

$
0
0

iOS Simulator 程序崩溃,无法运行。

 

Problem is built in components with 64 bit compiler

$
0
0

 

I am trying to use a TCheckListBox component in a 64 bit C++ application.  This component is clearly available for 64 bit development, as the IDE allows me to insert it on a form, but when I compile, I get the following error message:

 

[ilink64 Error] Error: Unresolved external 'vtable for Vcl::Checklst::TCheckListBox' referenced from D:\MY DOCUMENTS\CPROJS_BCC10\PLOTERTHECOMPONENT\WIN64\RELEASE\TEXTSETUPDLGMAIN.O

 

This would appear to be a problem either with the library or with the directory configurations.

 

Can you provide a solution to this problem, please ?

 

adv manager

$
0
0

Hello all I'm Very new to Android app development.

I've installed my fresh new copy of Berlin and I have tried to compile and execute in the ADV the AdapterBindSourceSampler, but even if I have installed the android SDK in the windows 10 menu, I can't find where to set up my Android emulator because under Samples I have not found the android SDK menu where i can find the Android avd manager and the Android tools application as shown in the help file. 

What's wrong in my installation? 

thenk you for your help

 

franz

Search for Usages tabs

$
0
0

New searches no longer generate a new tab?  In XE7, a new search always generated a new tab, as the documentation says:

Note that each new Search for Usages command adds its own tab to the Search for Usages window.

But, now that I've upgraded to Delphi 10, search results always replace the existing tab.  Is there a setting in the IDE so I can get this functionality back?


Delphi Application not terminating on Android 6

$
0
0

I am experiencing problems terminating an android application developed with Delphi XE7 when the app is run on Android 6.

I have tried using all the app termination functions i could find, including :

  • Application.Terminate;
  • MainActivity.Finish;
  • SharedActivity.Finish;
  • Close;
  • Halt;
  • FreeAndNil(Application);
  • Application.MainForm.DisposeOf;

None of these work on Android 6.

All of them seem to work perfectly if i install the app on Android 5 or 4.

Is there any way to effectively terminate a Delphi XE7 android app which is run on Android 6.

Thanks in advance.

Safe to upgrade to Xcode 7.3 ?

$
0
0

Hi All,
Did anyone upgrade to Xcode 7.3 on the Mac? Does it break anything with iOS and OS X dev on Seattle 10?
Thanks 

DirectShow9.hpp problem

$
0
0

Dir Sir:

I include  DirectShow9.hpp in my project and run

1.Get message as below

[bcc32 Error] amvideo.h(389): E2015 Ambiguity between 'std::abs(long double)' and 'std::abs(double)'
  Full parser context
    Main.cpp(5): #include c:\program files (x86)\embarcadero\studio\17.0\include\windows\rtl\DirectShow9.hpp
    DirectShow9.hpp(11): #include c:\program files (x86)\embarcadero\studio\17.0\include\windows\rtl\Winapi.DirectShow9.hpp
    Winapi.DirectShow9.hpp(50): #include c:\program files (x86)\embarcadero\studio\17.0\include\windows\sdk\amvideo.h
    amvideo.h(396): decision to instantiate: long SAFE_DIBSIZE(const tagBITMAPINFOHEADER *,unsigned long *)
    --- Resetting parser context for instantiation...
    amvideo.h(378): parsing: long SAFE_DIBSIZE(const tagBITMAPINFOHEADER *,unsigned long *)

2.I modify dw = abs(pbi->biHeight); --> dw = abs((double)pbi->biHeight); and run again

3.Get message as below

[bcc32 Error] Winapi.DirectShow9.hpp(237): E2451 Undefined symbol 'IDirectShowStream'
  Full parser context
    Main.cpp(5): #include c:\program files (x86)\embarcadero\studio\17.0\include\windows\rtl\DirectShow9.hpp
    DirectShow9.hpp(11): #include c:\program files (x86)\embarcadero\studio\17.0\include\windows\rtl\Winapi.DirectShow9.hpp

I try to ask for help and get answer as:

We've examined the issue you faced and it does not relate to our controls. You can replicate it even without them - just create a new project, add the "#include " string to an *.h file and try to recompile the application.

So, the problem is related to the IDE and we've created a corresponding ticket in Embarcadero Quality Center - RSP-15280.

 

Please advise.

 

content-type: application/vnd.api+json

$
0
0

IS there a component or a setting that will allow a rest service to return a response in the following format:

{
  "data": {
    "type": "articles",
    "id": "1",
    "attributes": {
      // ... this article's attributes
    },
    "relationships": {
      // ... this article's relationships
    }
  }
}

based on the specs found at http://jsonapi.org/format/

 

Problem with Error: rm failed for -f, No such file or directory

$
0
0

I'm developing an application with Embarcadero XE10 and this error always show when I try to run/debug the application by USB cable in my device: rm failed for -f, No such file or directory. I can't found a solution for this, somebody can help me?

Viewing all 3212 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>