Quantcast
Channel: Programmer's Town - Delphi & Builder
Viewing all 704 articles
Browse latest View live

Analysis AppCrash

$
0
0

The service fell. Is  created WER memory.hdmp, triagedump.dmp. Whether It is possible to draw out from them call stack for a moment ? Itself  happened in ntdll.dll
Yours faithfully, Vasilisk


OmniThreadLibrary to fulfill OnExecuteRequest in the main flow

$
0
0

Prompt, there is library OmniThreadLibrary
When the client is connected and transfers the data, works method OnExecuteRequest, but not in a principal flow.
Problems would not be, if it was possible to receive a flow object reference, but it does not quit.
How it is possible to fulfill function from the main flow?

How to learn a name ?

$
0
0

It is necessary to learn a name of the security account of the manager.
Googled, anything sensible did not find. Somebody in course?

DBGridEh cell coordinates at RowPanel. Active: = true

$
0
0

While translating EhaGrida in RowPanel. Active: = true coordinate Cell. X in the mentioned below code it becomes always equal 1 and . Value is deduced the first column, at RowPanel. Active: = false the code works correctly.

procedure TForm1.DBGridEh1MouseDown (Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
Cell: TGridCoord;
Column: TColumnEh;
begin
Cell: = TDBGridEh (Sender).MouseCoord (X, Y);
if (Button = mbLeft) and (Cell. Y> 0)
then
begin
(Sender as TControl).BeginDrag (false, 15);
Column: = TDBGridEh (Sender).Columns [Cell. X-1];
CellValue: = Column. Field. AsString;
ShowMessage (CellValue);
end;

Prompt how to win.
Thanks.

Blinking StringGrid.

$
0
0

Greetings!
At writing of a following code it would be desirable to avoid a blinking (yanking) of a grid.
The code is hung up on Click.

if Row = 1 then
begin
RowCount: = RowCount + 1;//we Add a line
MoveRow (1, 2);//we Move the cursor more low
TopRow: = 2;//we Shift a grid upwards that visually at lines did not change
FFirstWeekPos: = FFirstWeekPos + 1;//It is filled by new values
InvalidateGrid;
end;

Thanks!

Access restriction to the service menu of the developer

$
0
0

If at me such in system, in all applications
You push a key pattern, then in a window you enter the password - you get to the menu and you see Easter eggs like variables of a surrounding, version , texts of requests and much everyone other.
Absolutely to remove from  this menu it would not be desirable. There anything critical like passwords is not present, to a DB it is impossible to enter and fulfill the requests, but also to show to the ordinary user this information it would not be desirable.
The heads not against to leave, but demanded to strengthen safety.
Council is necessary.
Already now I can restrict visibility of this menu to that who included into certain debug group AD.
But there is such moment. In coordination with the user, for localization of different situations, I can be connected far off to its application, look eyes at the error text,  different buttons, well and at this time I want to enter into this service menu. How to arrive in this case? After all the ordinary user is not included into debug group AD.
For example, it is possible to transit in application identification in AD, something like "to enter under a name" / "to check up the password". What means?
Or generally as it is better to make the described restriction?
I remind: the Service menu . That it saw  and ; the user did not see, but could look at it at service-desk and .

How to address to value . Columns in DBLookupComboBoxEh

$
0
0

Set the list of additional columns in the drop down list for DBLookupComboBoxEh
I do not understand how to address to value in a certain column for the selected line.
The field name can be pulled out but how to pull out value? (In this case e is called "Transit")

procedure TDropDownForm1.dblcmbLocChange (Sender: TObject);
begin
myTr: = dblcmbLoc. DropDownBox. Columns [2].FieldName;
end;

On a picture showed, let us assume, selected BAY8 - during this moment it would be desirable to know  the data from other columns.

Any in the designer 4.9

$
0
0

Breadboard model of 5*5 sm (printing QR of labels) without fields
But in the designer of half-centimeter on height occupies
And on the report all falls into place. But not how in a breadboard model sad
And any  at all  it turns out


The help in sendings xml a file on Soap Delphi is necessary

$
0
0

Two years we sent the data on Soap
All worked then in adjustments wsdl I was helped by the person from a forum
Two years transited at me at me remained only it  which it is not active r.Lyah@gismps.ru
They changed the server and a file wsdl
Old 

//************************************************************************//
//The types declared in this file were generated from data read from the
//WSDL File described below:
//WSDL: http://91.219.12.29/serviceBus?wsdl
//> Import: http://91.219.12.29/serviceBus? wsdl> 0
//Encoding: UTF-8
//Codegen: [wfForceSOAP11 +]
//Version: 1.0
//(12/25/2013 OF 5:16:29 PM - - $Rev: 52705$)
//************************************************************************//
unit serviceBus1;
interface
uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
const
IS_OPTN = $0001;
IS_REF = $0080;
type
//************************************************************************//
//The following types, referred to in the WSDL document are not being represented
//in this file. They are either aliases of other types represented or were referred
//to but never [!] declared in the document. The types from the latter category
//typically map to predefined/known XML or Embarcadero types; however, they could also
//indicate incorrect WSDL documents that failed to declare or import a schema type.
//************************************************************************//
//!:boolean - "http://www.w3.org/2001/XMLSchema" [Gbl]
//!:string - "http://www.w3.org/2001/XMLSchema" [Gbl]
ResponsePushData = class; {"http://Fed.edu.segment/gisdo" [GblCplx]}
//************************************************************************//
//XML: ResponsePushData, global, <complexType>
//Namespace: http://Fed.edu.segment/gisdo
//************************************************************************//
ResponsePushData = class (TRemotable)
private
FResult: Boolean;
FMessage_: string;
FMessage __ Specified: boolean;
procedure SetMessage _ (Index: Integer; const Astring: string);
function Message __ Specified (Index: Integer): boolean;
published
property Result: Boolean read FResult write FResult;
property Message_: string Index (IS_OPTN) read FMessage_ write SetMessage_ stored Message __ Specified;
end;
//************************************************************************//
//Namespace: http://Fed.edu.segment/gisdo
//soapAction: http://Fed.edu.segment/gisdo/%operationName%
//transport: http://schemas.xmlsoap.org/soap/http
//style: document
//use: literal
//binding: PushDataServiceSoapBinding
//service: PushDataService
//port: PushDataServiceSoap
//URL: http://91.219.12.29/serviceBus
//************************************************************************//
PushDataServiceSoap = interface (IInvokable)
[' {BE34F520-FB0E-5625-6C89-AC6E813ABDFE} ']
function PushZipData (const schema: string; const data: string): ResponsePushData; stdcall;
function PushData (const schema: string; const data: string): ResponsePushData; stdcall;
end;
function GetPushDataServiceSoap (UseWSDL: Boolean=System. False; Addr: string = "; HTTPRIO: THTTPRIO = nil): PushDataServiceSoap;
implementation
uses SysUtils;
function GetPushDataServiceSoap (UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): PushDataServiceSoap;
const
defWSDL = ' http://autov3.do.edu.ru:8080/services/pushData?wsdl ';
defURL = ' http://autov3.do.edu.ru:8080/services/pushData ';
defSvc = ' PushDataService ';
defPrt = ' PushDataServiceSoap ';
var
RIO: THTTPRIO;
begin
Result: = nil;
if (Addr = ") then
begin
if UseWSDL then
Addr: = defWSDL
else
Addr: = defURL;
end;
if HTTPRIO = nil then
RIO: = THTTPRIO.Create (nil)
else
RIO: = HTTPRIO;
try
Result: = (RIO as PushDataServiceSoap);
if UseWSDL then
begin
RIO.WSDLLocation: = Addr;
RIO.Service: = defSvc;
RIO.Port: = defPrt;
end else
RIO.URL: = Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
procedure ResponsePushData. SetMessage _ (Index: Integer; const Astring: string);
begin
FMessage_: = Astring;
FMessage __ Specified: = True;
end;
function ResponsePushData. Message __ Specified (Index: Integer): boolean;
begin
Result: = FMessage __ Specified;
end;
initialization
{PushDataServiceSoap}
InvRegistry. RegisterInterface (TypeInfo (PushDataServiceSoap), ' http://eo.edu.ru/PushData ', ' UTF-8 ');
InvRegistry. RegisterDefaultSOAPAction (TypeInfo (PushDataServiceSoap), ' http://eo.edu.ru/PushData/%operationName% ');
InvRegistry. RegisterInvokeOptions (TypeInfo (PushDataServiceSoap), ioDocument);
{PushDataServiceSoap. PushZipData}
InvRegistry. RegisterMethodInfo (TypeInfo (PushDataServiceSoap), ' PushZipData ', ";
' [ReturnName = "PushZipDataResult"] ', IS_OPTN);
{PushDataServiceSoap. PushData}
InvRegistry. RegisterMethodInfo (TypeInfo (PushDataServiceSoap), ' PushData ', ";
' [ReturnName = "PushDataResult"] ', IS_OPTN);
RemClassRegistry. RegisterXSClass (ResponsePushData, ' http://eo.edu.ru/PushData ', ' ResponsePushData ');
RemClassRegistry.RegisterExternalPropName (TypeInfo (ResponsePushData), ' Message _ ', ' [ExtName = "Message"] ');
end.
The New file
//************************************************************************//
//The types declared in this file were generated from data read from the
//WSDL File described below:
//WSDL: http://autov3.do.edu.ru:8080/services/pushData?wsdl
//> Import: http://autov3.do.edu.ru:8080/services/p … eSoap.wsdl
//> Import: http://autov3.do.edu.ru:8080/services/p … l>0
//Encoding: UTF-8
//Version: 1.0
//(9/22/2015 OF 9:38:09 AM - - $Rev: 76228$)
//************************************************************************//
unit serviceBus;
interface
uses Soap. InvokeRegistry, Soap. SOAPHTTPClient, System. Types, Soap. XSBuiltIns;
const
IS_OPTN = $0001;
IS_REF = $0080;
type
//************************************************************************//
//The following types, referred to in the WSDL document are not being represented
//in this file. They are either aliases of other types represented or were referred
//to but never [!] declared in the document. The types from the latter category
//typically map to predefined/known XML or Embarcadero types; however, they could also
//indicate incorrect WSDL documents that failed to declare or import a schema type.
//************************************************************************//
//!:string - "http://www.w3.org/2001/XMLSchema" [Gbl]
//!:boolean - "http://www.w3.org/2001/XMLSchema" [Gbl]
PushDataResponse = class; {"http://eo.edu.ru" [Lit] [GblElm]}
PushZipDataResponse = class; {"http://eo.edu.ru" [Lit] [GblElm]}
PushZipDataAsyncResponse = class; {"http://eo.edu.ru" [Lit] [GblElm]}
PushData = class; {"http://eo.edu.ru" [Lit] [GblElm]}
PushZipDataAsync = class; {"http://eo.edu.ru" [Lit] [GblElm]}
PushZipData = class; {"http://eo.edu.ru" [Lit] [GblElm]}
Authentication2 = class; {"http://eo.edu.ru" [GblCplx]}
Authentication = class; {"http://eo.edu.ru" [GblElm]}
ResponsePushData = class; {"http://eo.edu.ru" [GblCplx]}
//************************************************************************//
//XML: PushDataResponse, global, <element>
//Namespace: http://eo.edu.ru
//Serializtn: [xoLiteralParam]
//Info: Wrapper
//************************************************************************//
PushDataResponse = class (TRemotable)
private
FPushDataResult: ResponsePushData;
FPushDataResult_Specified: boolean;
procedure SetPushDataResult (Index: Integer; const AResponsePushData: ResponsePushData);
function PushDataResult_Specified (Index: Integer): boolean;
public
constructor Create; override;
destructor Destroy; override;
published
property PushDataResult: ResponsePushData Index (IS_OPTN) read FPushDataResult write SetPushDataResult stored PushDataResult_Specified;
end;
//************************************************************************//
//XML: PushZipDataResponse, global, <element>
//Namespace: http://eo.edu.ru
//Serializtn: [xoLiteralParam]
//Info: Wrapper
//************************************************************************//
PushZipDataResponse = class (TRemotable)
private
FPushZipDataResult: ResponsePushData;
FPushZipDataResult_Specified: boolean;
procedure SetPushZipDataResult (Index: Integer; const AResponsePushData: ResponsePushData);
function PushZipDataResult_Specified (Index: Integer): boolean;
public
constructor Create; override;
destructor Destroy; override;
published
property PushZipDataResult: ResponsePushData Index (IS_OPTN) read FPushZipDataResult write SetPushZipDataResult stored PushZipDataResult_Specified;
end;
//************************************************************************//
//XML: PushZipDataAsyncResponse, global, <element>
//Namespace: http://eo.edu.ru
//Serializtn: [xoLiteralParam]
//Info: Wrapper
//************************************************************************//
PushZipDataAsyncResponse = class (TRemotable)
private
FPushZipDataAsyncResult: ResponsePushData;
FPushZipDataAsyncResult_Specified: boolean;
procedure SetPushZipDataAsyncResult (Index: Integer; const AResponsePushData: ResponsePushData);
function PushZipDataAsyncResult_Specified (Index: Integer): boolean;
public
constructor Create; override;
destructor Destroy; override;
published
property PushZipDataAsyncResult: ResponsePushData Index (IS_OPTN) read FPushZipDataAsyncResult write SetPushZipDataAsyncResult stored PushZipDataAsyncResult_Specified;
end;
//************************************************************************//
//XML: PushData, global, <element>
//Namespace: http://eo.edu.ru
//Serializtn: [xoLiteralParam]
//Info: Wrapper
//************************************************************************//
PushData = class (TRemotable)
private
Fschema: string;
Fschema_Specified: boolean;
Fdata: string;
Fdata_Specified: boolean;
procedure Setschema (Index: Integer; const Astring: string);
function schema_Specified (Index: Integer): boolean;
procedure Setdata (Index: Integer; const Astring: string);
function data_Specified (Index: Integer): boolean;
public
constructor Create; override;
published
property schema: string Index (IS_OPTN) read Fschema write Setschema stored schema_Specified;
property data: string Index (IS_OPTN) read Fdata write Setdata stored data_Specified;
end;
//************************************************************************//
//XML: PushZipDataAsync, global, <element>
//Namespace: http://eo.edu.ru
//Serializtn: [xoLiteralParam]
//Info: Wrapper
//************************************************************************//
PushZipDataAsync = class (TRemotable)
private
Fschema: string;
Fschema_Specified: boolean;
Fdata: string;
Fdata_Specified: boolean;
procedure Setschema (Index: Integer; const Astring: string);
function schema_Specified (Index: Integer): boolean;
procedure Setdata (Index: Integer; const Astring: string);
function data_Specified (Index: Integer): boolean;
public
constructor Create; override;
published
property schema: string Index (IS_OPTN) read Fschema write Setschema stored schema_Specified;
property data: string Index (IS_OPTN) read Fdata write Setdata stored data_Specified;
end;
//************************************************************************//
//XML: PushZipData, global, <element>
//Namespace: http://eo.edu.ru
//Serializtn: [xoLiteralParam]
//Info: Wrapper
//************************************************************************//
PushZipData = class (TRemotable)
private
Fschema: string;
Fschema_Specified: boolean;
Fdata: string;
Fdata_Specified: boolean;
procedure Setschema (Index: Integer; const Astring: string);
function schema_Specified (Index: Integer): boolean;
procedure Setdata (Index: Integer; const Astring: string);
function data_Specified (Index: Integer): boolean;
public
constructor Create; override;
published
property schema: string Index (IS_OPTN) read Fschema write Setschema stored schema_Specified;
property data: string Index (IS_OPTN) read Fdata write Setdata stored data_Specified;
end;
//************************************************************************//
//XML: Authentication, global, <complexType>
//Namespace: http://eo.edu.ru
//************************************************************************//
Authentication2 = class (TRemotable)
private
FLogin: string;
FLogin_Specified: boolean;
FPassword: string;
FPassword_Specified: boolean;
procedure SetLogin (Index: Integer; const Astring: string);
function Login_Specified (Index: Integer): boolean;
procedure SetPassword (Index: Integer; const Astring: string);
function Password_Specified (Index: Integer): boolean;
published
property Login: string Index (IS_OPTN) read FLogin write SetLogin stored Login_Specified;
property Password: string Index (IS_OPTN) read FPassword write SetPassword stored Password_Specified;
end;
//************************************************************************//
//XML: Authentication, global, <element>
//Namespace: http://eo.edu.ru
//************************************************************************//
Authentication = class (Authentication2)
private
published
end;
//************************************************************************//
//XML: ResponsePushData, global, <complexType>
//Namespace: http://eo.edu.ru
//************************************************************************//
ResponsePushData = class (TRemotable)
private
FResult: Boolean;
FMessage_: string;
FMessage __ Specified: boolean;
procedure SetMessage _ (Index: Integer; const Astring: string);
function Message __ Specified (Index: Integer): boolean;
published
property Result: Boolean read FResult write FResult;
property Message_: string Index (IS_OPTN) read FMessage_ write SetMessage_ stored Message __ Specified;
end;
//************************************************************************//
//Namespace: http://eo.edu.ru
//soapAction: |http://eo.edu.ru/PushZipData|http://eo.edu.ru/PushData
//transport: http://schemas.xmlsoap.org/soap/http
//style: document
//use: literal
//binding: PushDataServiceSoapImplServiceSoapBinding
//service: PushDataServiceSoapImplService
//port: PushDataServiceSoapImplPort
//URL: http://autov3.do.edu.ru:8080/services/pushData
//************************************************************************//
PushDataServiceSoap = interface (IInvokable)
[' {6E77A2AD-5DD2-8E06-CD61-AE3EAAF4312D} ']
//Cannot unwrap:
//- Input message has more than one part
function PushZipDataAsync (const parameters: PushZipDataAsync; const Authentication: Authentication): PushZipDataAsyncResponse; stdcall;
//Cannot unwrap:
//- Input message has more than one part
function PushZipData (const parameters: PushZipData; const Authentication: Authentication): PushZipDataResponse; stdcall;
//Cannot unwrap:
//- Input message has more than one part
function PushData (const parameters: PushData; const Authentication: Authentication): PushDataResponse; stdcall;
end;
function GetPushDataServiceSoap (UseWSDL: Boolean=System. False; Addr: string = "; HTTPRIO: THTTPRIO = nil): PushDataServiceSoap;
implementation
uses System. SysUtils;
function GetPushDataServiceSoap (UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): PushDataServiceSoap;
const
defWSDL = ' http://autov3.do.edu.ru:8080/services/pushData?wsdl ';
defURL = ' http://autov3.do.edu.ru:8080/services/pushData ';
defSvc = ' PushDataServiceSoapImplService ';
defPrt = ' PushDataServiceSoapImplPort ';
var
RIO: THTTPRIO;
begin
Result: = nil;
if (Addr = ") then
begin
if UseWSDL then
Addr: = defWSDL
else
Addr: = defURL;
end;
if HTTPRIO = nil then
RIO: = THTTPRIO.Create (nil)
else
RIO: = HTTPRIO;
try
Result: = (RIO as PushDataServiceSoap);
if UseWSDL then
begin
RIO.WSDLLocation: = Addr;
RIO.Service: = defSvc;
RIO.Port: = defPrt;
end else
RIO.URL: = Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
constructor PushDataResponse. Create;
begin
inherited Create;
FSerializationOptions: = [xoLiteralParam];
end;
destructor PushDataResponse. Destroy;
begin
System. SysUtils. FreeAndNil (FPushDataResult);
inherited Destroy;
end;
procedure PushDataResponse. SetPushDataResult (Index: Integer; const AResponsePushData: ResponsePushData);
begin
FPushDataResult: = AResponsePushData;
FPushDataResult_Specified: = True;
end;
function PushDataResponse.PushDataResult_Specified (Index: Integer): boolean;
begin
Result: = FPushDataResult_Specified;
end;
constructor PushZipDataResponse. Create;
begin
inherited Create;
FSerializationOptions: = [xoLiteralParam];
end;
destructor PushZipDataResponse. Destroy;
begin
System. SysUtils. FreeAndNil (FPushZipDataResult);
inherited Destroy;
end;
procedure PushZipDataResponse. SetPushZipDataResult (Index: Integer; const AResponsePushData: ResponsePushData);
begin
FPushZipDataResult: = AResponsePushData;
FPushZipDataResult_Specified: = True;
end;
function PushZipDataResponse.PushZipDataResult_Specified (Index: Integer): boolean;
begin
Result: = FPushZipDataResult_Specified;
end;
constructor PushZipDataAsyncResponse. Create;
begin
inherited Create;
FSerializationOptions: = [xoLiteralParam];
end;
destructor PushZipDataAsyncResponse. Destroy;
begin
System. SysUtils. FreeAndNil (FPushZipDataAsyncResult);
inherited Destroy;
end;
procedure PushZipDataAsyncResponse.SetPushZipDataAsyncResult (Index: Integer; const AResponsePushData: ResponsePushData);
begin
FPushZipDataAsyncResult: = AResponsePushData;
FPushZipDataAsyncResult_Specified: = True;
end;
function PushZipDataAsyncResponse.PushZipDataAsyncResult_Specified (Index: Integer): boolean;
begin
Result: = FPushZipDataAsyncResult_Specified;
end;
constructor PushData. Create;
begin
inherited Create;
FSerializationOptions: = [xoLiteralParam];
end;
procedure PushData. Setschema (Index: Integer; const Astring: string);
begin
Fschema: = Astring;
Fschema_Specified: = True;
end;
function PushData.schema_Specified (Index: Integer): boolean;
begin
Result: = Fschema_Specified;
end;
procedure PushData. Setdata (Index: Integer; const Astring: string);
begin
Fdata: = Astring;
Fdata_Specified: = True;
end;
function PushData.data_Specified (Index: Integer): boolean;
begin
Result: = Fdata_Specified;
end;
constructor PushZipDataAsync. Create;
begin
inherited Create;
FSerializationOptions: = [xoLiteralParam];
end;
procedure PushZipDataAsync. Setschema (Index: Integer; const Astring: string);
begin
Fschema: = Astring;
Fschema_Specified: = True;
end;
function PushZipDataAsync.schema_Specified (Index: Integer): boolean;
begin
Result: = Fschema_Specified;
end;
procedure PushZipDataAsync. Setdata (Index: Integer; const Astring: string);
begin
Fdata: = Astring;
Fdata_Specified: = True;
end;
function PushZipDataAsync.data_Specified (Index: Integer): boolean;
begin
Result: = Fdata_Specified;
end;
constructor PushZipData. Create;
begin
inherited Create;
FSerializationOptions: = [xoLiteralParam];
end;
procedure PushZipData. Setschema (Index: Integer; const Astring: string);
begin
Fschema: = Astring;
Fschema_Specified: = True;
end;
function PushZipData.schema_Specified (Index: Integer): boolean;
begin
Result: = Fschema_Specified;
end;
procedure PushZipData. Setdata (Index: Integer; const Astring: string);
begin
Fdata: = Astring;
Fdata_Specified: = True;
end;
function PushZipData.data_Specified (Index: Integer): boolean;
begin
Result: = Fdata_Specified;
end;
procedure Authentication2.SetLogin (Index: Integer; const Astring: string);
begin
FLogin: = Astring;
FLogin_Specified: = True;
end;
function Authentication2.Login_Specified (Index: Integer): boolean;
begin
Result: = FLogin_Specified;
end;
procedure Authentication2.SetPassword (Index: Integer; const Astring: string);
begin
FPassword: = Astring;
FPassword_Specified: = True;
end;
function Authentication2.Password_Specified (Index: Integer): boolean;
begin
Result: = FPassword_Specified;
end;
procedure ResponsePushData. SetMessage _ (Index: Integer; const Astring: string);
begin
FMessage_: = Astring;
FMessage __ Specified: = True;
end;
function ResponsePushData. Message __ Specified (Index: Integer): boolean;
begin
Result: = FMessage __ Specified;
end;
initialization
{PushDataServiceSoap}
InvRegistry. RegisterInterface (TypeInfo (PushDataServiceSoap), ' http://eo.edu.ru ', ' UTF-8 ');
InvRegistry. RegisterAllSOAPActions (TypeInfo (PushDataServiceSoap), ' |http://eo.edu.ru/PushZipData|http://eo.edu.ru/PushData ');
InvRegistry. RegisterInvokeOptions (TypeInfo (PushDataServiceSoap), ioDocument);
InvRegistry. RegisterInvokeOptions (TypeInfo (PushDataServiceSoap), ioLiteral);
RemClassRegistry. RegisterXSClass (PushDataResponse, ' http://eo.edu.ru ', ' PushDataResponse ');
RemClassRegistry.RegisterSerializeOptions (PushDataResponse, [xoLiteralParam]);
RemClassRegistry. RegisterXSClass (PushZipDataResponse, ' http://eo.edu.ru ', ' PushZipDataResponse ');
RemClassRegistry.RegisterSerializeOptions (PushZipDataResponse, [xoLiteralParam]);
RemClassRegistry. RegisterXSClass (PushZipDataAsyncResponse, ' http://eo.edu.ru ', ' PushZipDataAsyncResponse ');
RemClassRegistry.RegisterSerializeOptions (PushZipDataAsyncResponse, [xoLiteralParam]);
RemClassRegistry. RegisterXSClass (PushData, ' http://eo.edu.ru ', ' PushData ');
RemClassRegistry.RegisterSerializeOptions (PushData, [xoLiteralParam]);
RemClassRegistry. RegisterXSClass (PushZipDataAsync, ' http://eo.edu.ru ', ' PushZipDataAsync ');
RemClassRegistry.RegisterSerializeOptions (PushZipDataAsync, [xoLiteralParam]);
RemClassRegistry. RegisterXSClass (PushZipData, ' http://eo.edu.ru ', ' PushZipData ');
RemClassRegistry.RegisterSerializeOptions (PushZipData, [xoLiteralParam]);
RemClassRegistry. RegisterXSClass (Authentication2, ' http://eo.edu.ru ', ' Authentication2 ', ' Authentication ');
RemClassRegistry. RegisterXSClass (Authentication, ' http://eo.edu.ru ', ' Authentication ');
RemClassRegistry. RegisterXSClass (ResponsePushData, ' http://eo.edu.ru ', ' ResponsePushData ');
RemClassRegistry.RegisterExternalPropName (TypeInfo (ResponsePushData), ' Message _ ', ' [ExtName = "Message"] ');
end.
I Try to send
procedure TFormMain. Button1Click (Sender: TObject);
var
WS: PushDataServiceSoap;
Res: ResponsePushData;
Stream: TMemoryStream;
Encoder: TIdEncoderMIME;
Data: string;
Log: string;
HTTPRIO1: THTTPRIO;
begin
Stream: = TMemoryStream. Create;
Encoder: = TIdEncoderMIME.Create (Self);
try
Stream. LoadFromFile (FileEdit. Text);
Data: = Encoder. Encode (Stream);
HTTPRIO1: = THTTPRIO.create (nil);
HTTPRIO1.URL: ='http://autov3.do.edu.ru:8080/services/pushData ';
HTTPRIO1.Service: ='PushDataService ';
HTTPRIO1.Port: ='PushDataServiceSoap ';
WS: = HTTPRIO1 as PushDataServiceSoap;
HTTPRIO1.OnBeforeExecute: = onPost;
Res:=WS.PushData (Data, ' 3.0 ');
if Res. Result then begin
//ShowMessage (' Loading is completed successfully. ');
if Res. Message _ = "then begin
//Log: = Res. Message _;
end else begin
//ShowMessage (' Loading is completed with errors:'+#13#10+Res.Message_);
end;
end else
begin
ShowMessage (' a loading Error: ' +Res. Message _);
end;
Produces an error
[dcc32 Error] Main.pas (138): E2010 Incompatible types: ' PushData ' and ' string'

Who can help write as@f-centre.ru we agree

Embarcadero all?

How correctly to destroy Tframe

$
0
0

Kind all time of days.
I ask to help.
In the project at pushing the button dynamic there is a new page on TPageControl.
And on this page is located dynamic created Tframe (on which lies TSynEdit, 2 TdbGridEh, Toraquery, TOraSession, TOraDataSource... In general a lot of any hogwash).
When I push the button, TTabSheet and the frame with the contents should be deleted and release operative storage.
But if after creation of the frame the storage occupied with application increases on 1 (I look in the Manager of Tasks) at closing decreases approximately on 100. I.e. 900 remain somewhere to hang.
Here removal procedure:

for i: = 0 to frame1.ControlCount-1 do
frame1.Components [i].Free;//I delete all components on the frame (I do not know, whether they are destroyed by the automatic machine at frame destruction)
frame1.Free;//I destroy the frame
PageControl1.ActivePage. Free;//I destroy current page which formed specially for the frame.

Tell, please, that I do not so?

GetModuleFileNameEx does not want to work

$
0
0
x: = Openprocess (PROCESS_QUERY_INFORMATION or PROCESS_VM_READ or PROCESS_TERMINATE, false, PID);
if x <> 0 then begin
try
GetModuleFileNameEx (x, 0, PChar (FileName), MAX_PATH);
if pos (NameClient, PChar (FileName)) <> 0 then begin
GetExitCodeProcess (x, ExitCode);
TerminateProcess (x, Exitcode);
end;
end

In Delphi 2010 works on hurrah, in XE8 returns an empty name.

Prompt component RichEdit for FireMonkey

$
0
0

Hello, dear gurus. Whether there is a component for FireMonkey analog RichEdit? Or than still it is possible to display the formatted text?

Start vba in Delphi

$
0
0

Hello.  the problem rose me. I have a heap of files in txt to me it is necessary to import all of them in excel and then to fulfill some actions... I received vba the code

With ActiveSheet. QueryTables. Add (Connection: = "TEXT; C:\111\111.txt", _
Destination: = Range ("$A$1"))
.Name = "111"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 20127
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileOtherDelimiter = "|"
.TextFileColumnDataTypes = Array (2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery: = False
End With
Columns ("B:B").Select
ActiveWindow. ScrollColumn = 2
ActiveWindow. ScrollColumn = 3
ActiveWindow. ScrollColumn = 4
ActiveWindow. ScrollColumn = 5
Columns ("B:R").Select
ActiveWindow. ScrollColumn = 4
ActiveWindow. ScrollColumn = 3
ActiveWindow. ScrollColumn = 2
ActiveWindow. ScrollColumn = 1
Columns ("B:B").Select
ActiveWindow. ScrollColumn = 2
ActiveWindow. ScrollColumn = 3
ActiveWindow. ScrollColumn = 4
ActiveWindow. ScrollColumn = 5
Range ("B:B, R:R").Select
Range ("R1").Activate
Selection. Replace What: = ". 000", Replacement: = "", LookAt: = xlPart, _
SearchOrder: = xlByRows, MatchCase: = False, SearchFormat: = False, _
ReplaceFormat: = False
Selection. NumberFormat = "dd/mm/yyyy h:mm:ss"

As to me using means delphi to fulfill these actions
The big request not to answer in a word QueryTables. Add if it is possible an example because as soon as did not try to use it there was nothing... It is launched excel and the window of import opens and at button click  generally happens nothing.

wininet https

$
0
0

Hello.
It is necessary on a site through https POST request to send the data.
There is such function
[spoiler Title]

function TSender.send:TStringList;
label 10;
var
aBuffer: Array [0. 4096] of Char;
certificateInfoStr: Array [0. 2048] of Char;
BufStream, BufStream1: TMemoryStream;
StrList:TStringList;
xml:TXMLDocument;
BytesRead, l, i, dwBytesRead: Cardinal;
sss:Tstringlist;
pSession: HINTERNET;
pConnection: HINTERNET;
pRequest: HINTERNET;
flags_security, Flags, FlagsLen:dword;
pContext: PCCERT_CONTEXT;
certInfoLength, dwErrorDELPHI:dword;
error:dword;
v:IXMLZfcs_violationType;
certificateInfo:INTERNET_CERTIFICATE_INFO;
Sertificat: PCCERT_CONTEXT;
b:Longbool;
confirm:IXMLZfcs_confirmationType;
s:string;
const
INTERNET_OPTION_CLIENT_CERT_CONTEXT = 84;//Ñòàíäàðòíûé ôëàã äëÿ îòïðàâêè çàïðîñà ñ ðó÷íûì ïîñòðîåíèåì àóòåíòèôèêàöèå
begin
Result: = nil;
pSession: = InternetOpen (nil, INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
case blnSSL of
True: pConnection: = InternetConnect (pSession, PChar (self. Servername), INTERNET_DEFAULT_HTTPS_PORT, nil, nil, INTERNET_SERVICE_HTTP, 0, 0);
False: pConnection: = InternetConnect (pSession, PChar (self. Servername), INTERNET_DEFAULT_HTTP_PORT, nil, nil, INTERNET_SERVICE_HTTP, 0, 0);
end;
if Assigned (pSession) then
try
if Assigned (pConnection) then
try
case blnSSL of//PChar (AURL)
True: pRequest: = HTTPOpenRequest (pConnection, PChar (' POST '), PChar (self.url), nil, nil, nil;
INTERNET_FLAG_SECURE or INTERNET_FLAG_KEEP_CONNECTION or 65, 0);
False: pRequest: = HTTPOpenRequest (pConnection, PChar (' POST '), PChar (self.url), nil, nil, nil;
INTERNET_SERVICE_HTTP, 0);
end;
begin
self. CreatePostHeader;
i: = Length (Header. DataString);
HttpAddRequestHeaders (pRequest, PChar (Header. DataString), i, HTTP_ADDREQ_FLAG_ADD);
end;
if Assigned (pRequest) then
try
10:
if smethod = ' POST ' then
begin
i: = Length (Postdata. DataString);
b: = HTTPSendRequest (pRequest, nil, 0, Pointer (Postdata. DataString), i);
end;
l: = 4096;
i: = 0;//îáÿçàòåëüíî íîëü
HttpQueryInfo (pRequest, HTTP_QUERY_CONTENT_TYPE, @aBuffer, l, i);
s: = aBuffer;
if s = ' text/html ' then
begin
DataAvailable (pRequest, L) ;//Ïîëó÷àåì êîë-âî ïðèíèìàåìûõ äàííûõ
BufStream: = TMemoryStream. Create;
BufStream1: = TMemoryStream. Create;
StrList: = TStringList. Create;
try
while InternetReadFile (pRequest, @aBuffer, l, BytesRead) do
begin
if (BytesRead = 0) then Break;
BufStream. Write (aBuffer, BytesRead);
end;
finally
BufStream. Free;
BufStream1.Free;
end;
end;
if b then
begin
DataAvailable (pRequest, L) ;//Ïîëó÷àåì êîë-âî ïðèíèìàåìûõ äàííûõ
if l <> 0 then
begin
BufStream: = TMemoryStream. Create;
BufStream1: = TMemoryStream. Create;
StrList: = TStringList. Create;
try
while InternetReadFile (pRequest, @aBuffer, l, BytesRead) do
begin
if (BytesRead = 0) then Break;
BufStream. Write (aBuffer, BytesRead);
end;
aBuffer [0]: = #0;
BufStream. Write (aBuffer, 1);
finally
BufStream. Position: = 0;
GZDecompressStream (BufStream, BufStream1);
BufStream1.position: = 0;
strlist. LoadFromStream (BufStream1);
BufStream1.Position: = 0;
BufStream1.Position: = 0;
BufStream1.Clear;
strlist. SaveToStream (BufStream1);
BufStream1.Position: = 0;
BufStream1.Position: = 0;
result: = strlist;
FreeAndNil (BufStream);
FreeAndNil (BufStream1);
end;
end;
end
else
begin
dwErrorDELPHI: = GetLastError;
if dwErrorDELPHI = ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED then
begin
FlagsLen: = SizeOf (Flags);
InternetSetOption (pRequest, INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT;
Pointer (@Flags), FlagsLen);
flags_security: = SECURITY_FLAG_IGNORE_UNKNOWN_CA or
INTERNET_FLAG_IGNORE_CERT_CN_INVALID or
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID or INTERNET_FLAG_NO_AUTH;
InternetSetOptionw (pRequest,INTERNET_OPTION_SECURITY_FLAGS,@flags_security,SIZEOF (DWord));
goto 10;
end
else
if dwErrorDELPHI = 12168 then//redirection
begin
raise exception. Create (' redirection ');
//exit;
end
else
if dwErrorDELPHI = 12002 then//timeout
begin
raise exception. Create (' timeout ');
//exit;
end
else
begin
raise Exception. Create (GetWinInetError (dwErrorDELPHI));
end;
end;
finally
InternetCloseHandle (pRequest);
FreeAndNil (Header);
end;
finally
InternetCloseHandle (pConnection);
end;
finally
InternetCloseHandle (pSession);
end;
end;

[/spoiler]
It ceased to work. Worked precisely earlier.
If I launch - produces an error "required title it is not found"
Thus does not produce a standard dialog box of a choice of the certificate.
At line

HttpQueryInfo (pRequest, HTTP_QUERY_CONTENT_TYPE, @aBuffer, l, i);

The buffer empty.
Strangeness such. When I launch Fiddler Web Debugger and I launch function - Fiddler swears
Session #2: The remote server (xxx.ru) presented a certificate that did not validate, due to RemoteCertificateChainErrors.
Also suggests to continue.
If I agree - the data to the server leaves.
And Fiddler that swears not on my certificate, and on what certificate of the chief on that site.
What in function not so? How to force to select my certificate?
Thanks


Values on axes in schedules FastReport

$
0
0

Misters, I welcome all!
Probably question trivial, but I something was at a deadlock.
In general there is a schedule, undertakes from . On X - Dates, on Y - an amount of orders. An amount of orders - INT,  through COUNT (). The schedule gives a heap of values on a y axis, type 1,25 1,50, well and so on. How to force to show on a y axis only integer numbers (1,2,3 etc.). Already with a format in axis struggled, both that and that... More shortly . Who faced? In advance, it is grateful.

How to transfer procedure as a method and on the contrary a method as procedure?

$
0
0

The guru, prompt, whether it is possible to make it beautifully?
Though in case of method coercion to procedure.

How to receive OS version on WinAPI?

$
0
0

Whether it is possible connecting in uses only one "windows.pas unit to define OS version?
It is necessary to define only type 6.1 version, 6.2, etc.

Start of the created application on the client

$
0
0

Dear colleagues, created a Delphi application + MySQL + MyDAC + DevExpress.
Transferred it on the client for the purpose of performance check. The norm is launched, but here in places where in the program I generate exceptions the UserException the dialog box is not caused. In this connection the question why so happens.
For an example I result the code location responsible for handling of an exception:

procedure TMainForm. JvAppEvents1Exception (Sender: TObject; E: Exception);
var
S: string;
ErrorCode: Integer;
begin
//the Data recording about an exception in a broad gull-magazine
LogMessage (E);
//Handling of the user exception
if E is TApplicationUserException then
MessageBox (handle, Pchar (APLICATION_USER_ERROR_MESSAGE + #13 + E.Message);
APLICATION_CAPTION_FORM_ERROR, MB_OK + MB_ICONERROR)
else
//Handling of all remaining exceptions (critical)
begin
if E is EMyError then
begin
ErrorCode: = EMyError (E).ErrorCode;
case ErrorCode of
2013:
S: =
' Connection with a database is broken off, start application repeatedly. ';
else
S: = ' the Error number ' + IntToStr (ErrorCode) + '. ' + #13 + E.Message;
end;
MessageDlg (S, mtError, [mbOK], 0)
end
else
MessageBox (handle;
Pchar (APLICATION_ERROR_MESSAGE + #13 + E.Message + #13 +
APLICATION_ERROR_MESSAGE_END), APLICATION_CAPTION_FORM_ERROR;
MB_OK + MB_ICONERROR);
Application. Terminate;
end;
end;

How to transfer to the Soap-server parameters in format Datetime

$
0
0

Hello!
tz - To receive from the server received by me from the specific supplier waybills in the range of time. Without  the filter correctly works, and if with the filter then I can not correctly transfer date in a format not Datetime, not XSDatetime:

procedure TForm1.GetBuyerWaybillsClick (Sender: TObject);
var WBS:WayBillsSoap;
ToServ:get_buyer_waybills;
FromServ:get_buyer_waybillsResponse;
i:integer;
DT: TDateTime;
XSDT: TXSDateTime;
begin
TRY
WBS: = GetWayBillsSoap (false, ", nil);
ToServ: = get_buyer_waybills. Create;
fmt. ShortDateFormat: ='dd/MM/yyyy ';
fmt. DateSeparator: = ' / ';
fmt. LongTimeFormat: = ' hh:mm:ss';
fmt. TimeSeparator: = ': ';
//StrDate: = ' 01/09/2015 ';
StrDate: = ' 01/09/2015 1:04:56 AM ';
DT: = StrToDateTime (StrDate, Fmt);
ToServ.su: ='BIDZINA01:201947554 ';
ToServ.sp: ='mari555 ';
ToServ.seller_tin: = ' 401964148 ';
//DateTimeToXSDateTime (DT);
ToServ.create_date_s. AsDateTime: = DT;
ToServ.create_date_e. AsDateTime: = DT;
FromServ: = WBS.get_buyer_waybills (ToServ);
Memo. Text: = FromServ.get_buyer_waybillsResult.XMLNode.Xml;
finally
FreeAndNil (ToServ);
FreeAndNil (FromServ);
THTTPRIO (wbs).Free;
end;
end;

Deduces Access violation 4 times and at  forms still:

an unexpected memory leak has ocurred. The unexpected small block leaks are:
13-20 bytes:TXSDateTime*1, 29-36 bytes:
EAccessViolation*2, 69-76 bytes:
UnicodeString*2. 173-188 bytes:
Unicodestring*2.

The function description such (soap 1.2):
https://services.rs.ge/WayBillService/W … r_waybills
That is the server  in format XSDatetime (<CREATE_DATE> 2012-04-03T12:23:52 </CREATE_DATE>) is transferred parameters create_date_s and create_date_e type datetime (or can be in a format XSDatetime - both tried), and:

<WAYBILL>
<ID> 395946 </ID> <TYPE> 2 </TYPE>
<CREATE_DATE>2012-04-03T12:23:52</CREATE_DATE>
<BUYER_TIN> 201249558 </BUYER_TIN>
<BUYER_NAME> Firm 1 </BUYER_NAME>
<SELLER_NAME> Firm 2 + </SELLER_NAME>
<SELLER_TIN> 401964148 </SELLER_TIN>
...
<SELLER_ST> 0 </SELLER_ST> </WAYBILL>

The link to the project: http://f-bit.ru/693399
https://mega.nz/#!fAk00KZK!wRdwCYcMVCV0 … NtWStq_lCQ

Viewing all 704 articles
Browse latest View live