Delphi

How to get more detailed error info in EWS SOAP response?

▼魔方 西西 提交于 2020-03-25 18:42:17
问题 I'm posting SOAP calls to Exchange webservices (using Delphi and the IpWorks TipwHTTP component) and some of these return with internal server errors (some CreateItem and UpdateItem SOAP actions), but no more info than that: <?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <s:Fault> <faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorInternalServerError</faultcode> <faultstring xml:lang="en-US"

How to get more detailed error info in EWS SOAP response?

房东的猫 提交于 2020-03-25 18:42:07
问题 I'm posting SOAP calls to Exchange webservices (using Delphi and the IpWorks TipwHTTP component) and some of these return with internal server errors (some CreateItem and UpdateItem SOAP actions), but no more info than that: <?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <s:Fault> <faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorInternalServerError</faultcode> <faultstring xml:lang="en-US"

Delphi XE 10.3.3 RSA 签名(IdSSLOpenSSLHeaders)

岁酱吖の 提交于 2020-03-24 14:41:49
unit Unit1; interface uses System.NetEncoding, IdGlobal, IdSSLOpenSSL, IdSSLOpenSSLHeaders, EncdDecd, Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm1 = class(TForm) btn1: TButton; procedure btn1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} function Sign(msg, keyfile: ansistring; zfj, jmfs: integer; var signstr: ansistring): integer; //zfj:字符集 0 utf8 1 gbk jmfs:加密方式 0RSA 1RSA2 2MD5 var // Path

How to keep my (custom) IDE color scheme after switching themes?

夙愿已清 提交于 2020-03-23 08:00:34
问题 Delphi Rio comes with two color schemes: dark and light. I open Tools->Options->Editor->Color and changed the dark color scheme to make it even darker. But after switching to the 'light' theme and then back to the 'dark' theme my colors were lost: I don't get how this color editor works. How do I permanently store my colors? 回答1: Know Delphi bug (no wonder why Delphi will fall out of Tiobe index) as reported by Dalija: quality.embarcadero.com/browse/RSP-19524. Workaround: Setup editor colors

Delphi制作DLL小结

流过昼夜 提交于 2020-03-23 02:31:31
一 、Dll 的制作一般分为以下几步: 1 在一个 DLL 工程里写一个过程或函数 2 写一个 Exports 关键字,在其下写过程的名称。不用写参数和调用后缀。 二 、 参数传递 1 参数类型最好与 window C++ 的参数类型一致。不要用 DELPHI 的数据类型。 2 最好有返回值 [ 即使是一个过程 ] ,来报出调用成功或失败,或状态。成功或失败的返回值最好为 1[ 成功 ] 或 0[ 失败 ]. 一句话,与 windows c++ 兼容。 3 用 stdcall 声明后缀。 4 最好大小写敏感。 5 无须用 far 调用后缀,那只是为了与 windows 16 位程序兼容。 三 、DLL 的初始化和退出清理 [ 如果需要初始化和退出清理 ] 1 DLLProc[SysUtils 单元的一个 Pointer] 是 DLL 的入口。在此你可用你的函数替换了它的入口。但你的函数必须符合以下要求 [ 其实就是一个回调函数 ] 。如下: procedure DllEnterPoint(dwReason: DWORD);far;stdcall; dwReason 参数有四种类型: DLL_PROCESS_ATTACH: 进程进入时 DLL_PROCESS_DETACH 进程退出时 DLL_THREAD_ATTACH 线程进入时 DLL_THREAD_DETACH 线程退出时

How can I pass TForm to a DLL as parameter?

别说谁变了你拦得住时间么 提交于 2020-03-22 07:52:09
问题 i want to make dll that using tform as parameter, the simple plan is if that form passed to dll the dll file return array that contain components name. it possible to passing tform as parameter? 回答1: Most likely you will have two instances of the VCL in your process, one for the host exe and one for the DLL. And that is one instance too many. The TForm class from your host exe is a different class from the TForm class in your DLL. The basic rule is that you cannot share VCL/RTL objects across

Delphi制作DLL小结

女生的网名这么多〃 提交于 2020-03-20 04:31:31
一 Dll的制作一般分为以下几步: 1 在一个DLL工程里写一个过程或函数 2 写一个Exports关键字,在其下写过程的名称。不用写参数和调用后缀。 二 参数传递 1 参数类型最好与window C 的参数类型一致。不要用DELPHI的数据类型。 2 最好有返回值[即使是一个过程],来报出调用成功或失败,或状态。成功或失败的返回值最好为1[成功]或0[失败].一句话,与windows c 兼容。 3 用stdcall声明后缀。 4 最好大小写敏感。 5 无须用far调用后缀,那只是为了与windows 16位程序兼容。 三 DLL的初始化和退出清理[如果需要初始化和退出清理] 1 DLLProc[SysUtils单元的一个Pointer]是DLL的入口。在此你可用你的函数替换了它的入口。但你的函数必须符合以下要求[其实就是一个回调函数]。如下: procedure DllEnterPoint(dwReason: DWORD);far;stdcall; dwReason参数有四种类型: DLL_PROCESS_ATTACH:进程进入时 DLL_PROCESS_DETACH进程退出时 DLL_THREAD_ATTACH 线程进入时 DLL_THREAD_DETACH 线程退出时 在初始化部分写: DLLProc := @DLLEnterPoint; DllEnterPoint(DLL

解决Delphi图形化界面的TEdit、TLable等组件手动拖拽固定大小,但是编译之后显示有差别的情况

为君一笑 提交于 2020-03-20 03:17:29
经常遇到这样的情况,在我们使用Delphi的可视化工具进行UI设计的时候,我们拖拽TEdit或者Label组件,并且在可视化界面上设置它们的长、宽   但是当我们编译和运行程序的时候,却发现真正显示出来的 TEdit或者TLabel组件并不是我们在可视化界面所拖拽的长和宽(显示的“有问题”)   具体的情况见下面的两张图   1.我们在Delphi的可视化界面上需要一个TEdit和TLabel组件,于是我们拖拽了两个组件放在上面,并且设置拖拽设置了长和宽(为了显示清楚,我设置了颜色)   这个时候通过拖拽设计界面上的组件确实   2.但是按 F9 运行的时候显示的却是这样的效果   明显图中显示的 TEdit、TLabel组件(两个黄色区域)根本就不是设置的时候的样子 2015.08.07发现了本质原因            上面出现的这个问题,我在2015.05.11专门写了博客说明解决方法(见本博客的下部分),那个方法确实可以解决问题,但是没有弄明白真正的原因,所以现在进行说明。   在可视化界面上通过拖拽设计TEdit或者TLabel的大小的时候,拖拽好了一个长和宽,但是在点击编译运行之后,发现出来的效果是不一样的(入上面的两张图)。   主要的问题就是出在TEdit的AutoSize属性(TLabel也有AutoSize属性),因为通过看该TEdit的Object

Derive from specialized generic types

…衆ロ難τιáo~ 提交于 2020-03-19 06:01:05
问题 Is it possible to derive a class from a specialized generic type: TGenericBase <T> = class // ... end; TSpecializedDerived = class (TGenericBase <String>) // ... end; Just wondering if this is possible at all... EDIT Code works fine when I put it in a new project. Must be due to some other mistake; sorry about that 回答1: Yes. I do it all the time. It's very useful. One of my favorite tricks goes something like this: TSpecializedList = class(TObjectList<TMyType>) public (extra methods specific