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

Error in GetIt

$
0
0

Hi everyone   I did a clean install of the Delphi Seattle (pc is clean too) and when I try to use the GetIt Package Manager I receive the message below:   Error Reading SearchingImg.Picture.Data: Stream read error   How do I solve this error?   Thanks   Ederson Selvati


Asm stdcall

$
0
0

Hi im currently trying to create a few hooks in another process which application was made in C++ and uses alot of stdcall which means when it calls an function it pushed the params into the stack and removes them when it leaves the function.

Delphi aka pascal dont do that with the original function type rates it uses the current register (not sure up to how many params)

So thats the reason why i try to use stdcall. my issue is that if i create any local variables it ignores that my function type is stdcall and screwup the function.

 

Anyone have any idea how i can solve these issues aka what im doing wrong (a bit confused since i just create 3 variables)


// function with no local variables

-- adding line since its not visible--


procedure _FindWindowHook(StackPos:dword); stdcall;

begin

end;

 

asm

-- adding line since its not visible--


MapleStory.exe+1CFC58 - 55                    - push ebp

MapleStory.exe+1CFC59 - 8B EC                 - mov ebp,esp

MapleStory.exe+1CFC5B - 5D                    - pop ebp

MapleStory.exe+1CFC5C - C2 0400               - ret 0004 { 4 } // remove param



 

 

 

 

// function with 3 local variables

-- adding line since its not visible--


procedure _FindWindowHook(StackPos:dword); stdcall;

var

  _RetAddy:dword;

  _ClassName:string;

  _WindowTitle:string; 

begin

end;

 

results in 

-- adding line since its not visible--

MapleStory.exe+1CFC58 - 55                    - push ebp

MapleStory.exe+1CFC59 - 8B EC                 - mov ebp,esp

MapleStory.exe+1CFC5B - 33 C0                 - xor eax,eax

MapleStory.exe+1CFC5D - 55                    - push ebp

MapleStory.exe+1CFC5E - 68 77FCDF10           - push MapleStory.exe+1CFC77 { [233] }

MapleStory.exe+1CFC63 - 64 FF 30              - push fs:[eax]

MapleStory.exe+1CFC66 - 64 89 20              - mov fs:[eax],esp

MapleStory.exe+1CFC69 - 33 C0                 - xor eax,eax

MapleStory.exe+1CFC6B - 5A                    - pop edx

MapleStory.exe+1CFC6C - 59                    - pop ecx

MapleStory.exe+1CFC6D - 59                    - pop ecx

MapleStory.exe+1CFC6E - 64 89 10              - mov fs:[eax],edx // why is this generated?

MapleStory.exe+1CFC71 - 68 7EFCDF10           - push MapleStory.exe+1CFC7E { [93] } // why is this generated?

MapleStory.exe+1CFC76 - C3                    - ret // decides to leave here and not remove the params??

MapleStory.exe+1CFC77 - E9 2490E3FF           - jmp MapleStory.exe+8CA0 // why is this generated?

MapleStory.exe+1CFC7C - EB F8                 - jmp MapleStory.exe+1CFC76 // why is this generated?

MapleStory.exe+1CFC7E - 5D                    - pop ebp

MapleStory.exe+1CFC7F - C2 0400               - ret 0004 { 4 } // should return here and remove param




 

and when im at it, anyone know how to avoid delphi/pascal auto convertion when it comes to jmp? "jmp Variable, jmp function" it instantly convert it into jmp dword ptr []

 

example code

-- adding line since its not visible--

var

OriginalBytes:array [0..30] of bytes





type 1

procedure myhook; assembler;

asm

dothings...

jmp OriginalBytes

end;



type 2

procedure myhook; assembler;

asm

dothings...

mov eax, OriginalBytes

jmp eax
end;



type 3

procedure myhook; assembler;

asm

dothings...

mov eax, dword(addr(OriginalBytes))

jmp eax

end;




 

when compiled

-- adding line since its not visible--

var 
OriginalBytes:array [0..30] of bytes





type 1

procedure myhook; assembler;

asm

dothings...

jmp dword ptr [OriginalBytes]

end;



type 2

procedure myhook; assembler;

asm

dothings...

mov eax, [OriginalBytes]

jmp eax
end;



type 3

procedure myhook; assembler;

asm

dothings...

mov eax, [OriginalBytes]

jmp eax

end;

 

All these will result in a crash since they convert themself into grabbing the value of the address instead of the address itself. 

Can't download eBooks in Books section.

$
0
0

Hello!

I can't download ebooks from Books section on site.

Error page appears.

Please, fix it or  send me books by mail. Thanx.

Server Error in '/' Application.

Encrypted ID must be 14 characters
Parameter name: szValue

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Encrypted ID must be 14 characters
Parameter name: szValue

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[ArgumentException: Encrypted ID must be 14 characters
Parameter name: szValue]
   EDN.Util.EDNUtils.CommDecrypt(String szValue) +330
   EDN.Util.UserCookie.GetUserID() +43
   EDN.Util.UserCookie.CookieIsSet() +12
   Global.TGlobal.LoginUser() +79
   Global.TGlobal.Session_Start(Object sender, EventArgs e) +111
   System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +8880868
   System.Web.SessionState.SessionStateModule.CompleteAcquireState() +237
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +504
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +66
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

 


Version Information: Microsoft .NET Framework Version:2.0.50727.8000; ASP.NET Version:2.0.50727.8001

Print receipts with bluetooth in Android application

$
0
0

Hello everyone! I'm new in this enviroment and I want to learn to create an app in Android to print receipts with bluetooth in a mini thermal printer . I know I need the android sdk printer but I don´t know how implement it on XE8 c++. ¿Someone knows how do this? thanks so much!!

Accessing TLISTVIEW data programmatically

$
0
0

I am trying to access TListview members data I have created in LiveBindings programmatically and cant figure out it. 

I created a live binding to a rest field called rec_id and  If use clicks on a TListView item I need to get the rec_id of the item they have clicked for further work, rec_id is a non visible field.

This is what I have now. How do I get rec_id data?

LiveBinding(LinkPropertytoFieldrec_id)  FDMemTable id ---> ListView2 rec_id

procedure TForm1.ListView2ButtonClick(const Sender: TObject;

const AItem: TListViewItem; const AObject: TListItemSimpleControl);

var

Rec_id_string : String;

begin

Rec_id_string := AItem ???? rec_id

end;

 

Physical without Logical

$
0
0

Is there a way to create a new model starting from the physical and not the logical? Currently it seems you have to begin with a logical to create a physical but I would like to create a physical and then merge that to the logical. I know there are workarounds (e.g. create physical from a blank .SQL file) but I'm wondering if I'm missing something. Thanks in advance.

DUnit Output XE8 Vs XE10 Seattle

$
0
0

In XE10 Seattle the output of a DUnit test is changed.

In XE3 & XE8 I get this output:

DUnit / Testing
....FF
Time: 0:00:00.1

FAILURES!!!
Test Results:
Run:             6
Failures:        2
Errors:          0
There were 2 failures:
  1) [Unit1] TTesting3.TestCase3_1: ETestFailure
     at 
      "TTesting3.TestCase3_1, expected:  but was: "
  2) [Unit1] TTesting3.TestCase3_2: ETestFailure
     at 
      "TTesting3.TestCase3_2, expected:  but was: "

While in XE10 the output is:

Executing: "C:\Users\bart.coppens\Documents\Embarcadero\Studio\Projects\DUnit-XE3-XE10\DUnitXE3XE10.exe"
DataFiles: "C:\Users\bart.coppens\Documents\Embarcadero\Studio\Projects\DUnit-XE3-XE10\"
OSVersion: "Windows 7 Service Pack 1 (Version 6.1, Build 7601, 64-bit Edition)"

DUnit / Testing

TestFramework.TTestSuite.DUnitXE3XE10.exe 
StartSuite(DUnitXE3XE10.exe)(6) <
 TestFramework.TTestSuite.Test 1 
 StartSuite(Test 1)(2) <
  TestFramework.TTestSuite.TTesting1 
  StartSuite(TTesting1)(2) <
   Unit1.TTesting1.TestCase1_1 .
   Unit1.TTesting1.TestCase1_2 .
  > EndSuite(TTesting1)
 > EndSuite(Test 1)
 TestFramework.TTestSuite.Test 2 
 StartSuite(Test 2)(2) <
  TestFramework.TTestSuite.TTesting2 
  StartSuite(TTesting2)(2) <
   Unit1.TTesting2.TestCase2_1 .
   Unit1.TTesting2.TestCase2_2 .
  > EndSuite(TTesting2)
 > EndSuite(Test 2)
 TestFramework.TTestSuite.Test 3 
 StartSuite(Test 3)(2) <
  TestFramework.TTestSuite.TTesting3 
  StartSuite(TTesting3)(2) <
   Unit1.TTesting3.TestCase3_1 Failure: TestFramework.TTestFailure.TestCase3_1

   Unit1.TTesting3.TestCase3_2 Failure: TestFramework.TTestFailure.TestCase3_2

  > EndSuite(TTesting3)
 > EndSuite(Test 3)
> EndSuite(DUnitXE3XE10.exe)
Time: 0:00:00.1

FAILURES!!!
Test Results:
Run:             6
Failures:        2
Errors:          0
There were 2 failures:
  1) [Unit1] TTesting3.TestCase3_1: ETestFailure
     at 
      "TTesting3.TestCase3_1, expected:  but was: "
  2) [Unit1] TTesting3.TestCase3_2: ETestFailure
     at 
      "TTesting3.TestCase3_2, expected:  but was: "

 

Any idea how to get the same output in XE10 Seattle as in XE3 & XE8 ?

How can i create custom item appearence on a TListView?

$
0
0

For example, i want that the items in my Listview have 2 bottom details and no Image.

Is there any way to achive that?

 

thank you for reading!!

 


XE8 + IOS9 - E2597 (ld: file not found: /usr/lib/libiconv.dylib)

$
0
0

Hi,

I've the following error when I'm trying to upload an iOS 9 application from XE8.

[DCC Error] E2597 ld: warning: directory not found for option '-FC: ...\Embarcadero\Studio\SDKs\iPhoneOS9.0.sdk\System\Library\PrivateFrameworks'

ld: file not found: /usr/lib/libiconv.dylib

I'm using PAServer 16.0 and the SKD is iPhoneOS9.0.sdk provided by XCode 7.0.1.

The device is an iPad 4th Generation (32 bits) and I've iOS Developer Account ant the deviceis enroled in the  provisioning profile.

I don't understand the responses given for the same questions in other forums. 

 

Thanks for your attention.

iPhone emulation inside or outside IDE?

$
0
0

I'm using Seattle 10. Is it possible to emulate an iPhone inside Delphi, as in this video (specifically 1m 03s) iPhone Emulation
I understand Android works externally, and I can achieve that OK, but I thought that iPhone could be emulated in software (and this video above seems to demonstrate that).


I can find information about running some SDK on a Mac etc, but I don't have an iPhone or a Mac. I don't understand a message I get about creating a Connection Profile when I try to compile. It seems to be looking for an emulation on a MAC etc.


Can I emulate iPhone from within Delphi Seattle IDE? Are there steps to do this? It looks easy but I cannot find out how. (Don't hold back on the individual steps, thanks!) Many thanks for as much help as I can get. TP

Q: Remote Message Notification for Delphi iOS apps (without Kinvey/Parse)

$
0
0

Now Parse has decided to stop their remote push notification service, I'm looking for an alternative.

Of course I can move to Kinvey, which has a similar service, but you never know how long Kinvey will last (as a free service).

So, I was looking to implement my own independent and free solution for my app (both android and ios).

 

For android it seems pretty easy. I've just set up gcm for my project at https://developers.google.com/cloud-messaging/, and I received my GCM Sender Id and API key.

 

In my android app I can now easily register my android device for a device token with:

 

  {$IFDEF ANDROID}

  PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.GCM); // Google Cloud Messaging

  PushService.AppProps[TPushService.TAppPropNames.GCMAppID] := <>;

  {$ENDIF}

  {$IFDEF IOS}

  PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.APS); // Apple Push Service

  {$ENDIF}

  PushServiceConnection := TPushServiceConnection.Create(PushService);

  PushServiceConnection.Active := True;

  DeviceToken = PushService.DeviceTokenValue[TPushService.TDeviceTokenNames.DeviceToken];



 

And from my php server I can now send a downstream message with:

 

  $Request = curl_init();

  try

  {

    curl_setopt($Request, CURLOPT_URL, 'https://gcm-http.googleapis.com/gcm/send');

    curl_setopt($Request, CURLOPT_POST, 1);

    curl_setopt($Request, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Authorization:key=' . <>));

    curl_setopt($Request, CURLOPT_POSTFIELDS, {"registration_ids" : ["' . <> . '"],"data":{"message":"My message","title":"My title"}});

    curl_setopt($Request, CURLOPT_SSL_VERIFYPEER, false);

    curl_setopt($Request, CURLOPT_RETURNTRANSFER, true);

    $Response = curl_exec($Request);

  }

  finally

  {

    curl_close($Request);

  }



It all works (i.e. for Android)! The message is received in the PushServiceConnection.OnReceiveNotification event if the app is active or in the android's notification center if the app is inactive.

 

But howabout iOS? With the Delphi code above I actually get an APN device token, but how do I "translate" this to a GCM device token? Or what php code do I need to send a downstream message to APN?

 

Google gives some information at https://developers.google.com/cloud-messaging/ios/client, but this explanation is based on XCode and C++ and not Delphi. Has someone a Delphi explanation?

 

Note. I've already created a APN developer and production certificate.

 

Logical Alt Key into Physical Unique Constraint w/out Index

$
0
0

 

 

In E/R Studio Data Architect V10, in a logical model, I created an Alternate Key on a field (actually doing this is many entities), with the intent that, when I generate a physical model, the table would automatically have a unique constraint, but NO index, on the column, because the actual target DBMS (Snowflake, not natively supported in E/R Studio), does not allow user-entered indexes. So far, I have made two attempts; both attempts failed to create the unique constraint.  One attempt was to generate to a target physical platform of 'Generic DBMS', and the second was to 'Oracle 12c'.  On page 2 of 5 in physical model generation process, I needed to leave the 'Generate Indexes for alt keys' option un-checked, due to the aforementioned characteristic of the target live DBMS. 

So, my intent is to create an unique constraint in the logical model, which can be auto-generated in the physical model, so that I can then use the physical model to automatically generate ANSI-compliant DDL.

I believe that I could resolve this by manually creating unique constraints in the E/R Studio Physical Model, and/but...

1. Is that true?

2. Is there a way to get it done in logical, so it auto-generates into physical.

Reverse Engineering a Hive database into ERStudio

$
0
0

Trying to reverse engineer tables from SQL file into a physical Data Model on Hive, but the drop down list for physical databases does not include Hive. I have the multiplatorm option with the big data edition.  I can define models from scratch for Hive, but how do I pull off reverse engineering into HIVEw ithout this option?  

Set the prefs in Settings on iOS?

$
0
0

Hi,
Most iOS apps have the preferences set into the Settings > General section instead of embedded in the app.

Any example on how to split that and take it out of the app and place it in the correct place on iOS?
Thanks for any light

 

 

Some questions about using this forum

$
0
0

Hi,

How do I get notification (e.g. by e-mail) when someone has answered my question on this forum?. Now I have to login several times a week to see if there is a reaction.

 

And why is "My questions" at the right side of the screen (under "Answers panel") always empty, even when I posted several questions?

 

Thanks,

Robert


iPhone emulation - what's required?

$
0
0

Is it possible to emulate an iPhone inside Delphi, as in this video (specifically 1m 03s) iPhone Emulation
I understand Android works externally, and I can achieve that OK, but I thought that iPhone could emulate in software (and this video above seems to prove that).
I can find information about running some SDK on a Mac etc, but I don't have an iPhone or a Mac. I don't understand a message I get about creating a Connection Profile when I try to compile. It seems to be looking for an emulation on a MAC etc.
Can I emulate iPhone from within Delphi Seattle IDE? Are there steps to do this? It looks easy but I cannot find out how. (Don't hold back on the individual steps, thanks!) Many thanks for as much help as I can get. TP

Import .csv file in firemonkey listview or stringgrid or grid ?

$
0
0

Hi forum,

Please help me: how can i import .csv file in firemonkey listview or stringgrid or grid ?

Use Android API to Delphi

$
0
0

Hello forum , 

Is it possible to use te android API inside Delphi? 

If yes , how can I do that?

Is there an easy way?

 

Regards

John

Logical Alt Key Generate into Physical as Unique Constraint w/out Index

$
0
0

 

 

In E/R Studio Data Architect V10, in a logical model, I created an Alternate Key on a field (actually doing this is many entities), with the intent that, when I generate a physical model, the table would automatically have a unique constraint, but NO index, on the column, because the actual target DBMS (Snowflake, not natively supported in E/R Studio), does not allow user-entered indexes. So far, I have made two attempts; both attempts failed to create the unique constraint.  One attempt was to generate to a target physical platform of 'Generic DBMS', and the second was to 'Oracle 12c'.  On page 2 of 5 in physical model generation process, I needed to leave the 'Generate Indexes for alt keys' option un-checked, due to the aforementioned characteristic of the target live DBMS. 

So, my intent is to create an unique constraint in the logical model, which can be auto-generated in the physical model, so that I can then use the physical model to automatically generate ANSI-compliant DDL.

I believe that I could resolve this by manually creating unique constraints in the E/R Studio Physical Model, and/but...

1. Is that true?

2. Is there a way to get it done in logical, so it auto-generates as a unique key into physical, but without an Index?

Interbase failure

$
0
0

Interbase connection give the failure: [FireDAC][Phys][IB]connection rejected by remote interface This happen with interbase version XE7 and Seattle 10 Delphi

Viewing all 3212 articles
Browse latest View live


Latest Images

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