delphi-2006

Getting External Exception C0000006 in D2006 app - how can I force delphi to load the whole executable?

雨燕双飞 提交于 2019-12-01 11:39:05
I get this occasionally when exiting my app - my app is running the EXE over a network. I understand it's a page fault when part of the EXE is loaded on demand. I have also observed it in the OnDrawCell method of a TDrawGrid, so I'm mystified how that might have caused a page load. Also, the exception kept happening. So my questions: Can Error C0000006 result from other causes? I have made fairly major changes to the way the app manages memory, though nothing out of the ordinary, and I'm confident the code is behaving. How can you make the app load all of itself into memory on startup (in

Explain errors from GetKeyState / GetCursorPos

大城市里の小女人 提交于 2019-12-01 04:41:51
Sometimes I get bug reports from customers, that I can't explain. After Application.Run() in Delphi I get the following errors: EOSError: System error: Code:_5 Access denied Call Stack Information: ------------------------------------------------------------------- |Address |Module |Unit |Class |Procedure |Line | ------------------------------------------------------------------- |Running Thread: ID=4352; Priorität=0; Klasse=; [Main Thread] | |-----------------------------------------------------------------| |772B291F|USER32.dll | | |GetKeyState | | |772B7B96|USER32.dll | | |GetPropA | |

Explain errors from GetKeyState / GetCursorPos

为君一笑 提交于 2019-12-01 02:44:02
问题 Sometimes I get bug reports from customers, that I can't explain. After Application.Run() in Delphi I get the following errors: EOSError: System error: Code:_5 Access denied Call Stack Information: ------------------------------------------------------------------- |Address |Module |Unit |Class |Procedure |Line | ------------------------------------------------------------------- |Running Thread: ID=4352; Priorität=0; Klasse=; [Main Thread] | |-------------------------------------------------

Get the list of ODBC data source names programatically using Delphi

蹲街弑〆低调 提交于 2019-11-30 20:07:57
I saw several examples where the list of the source names were took from registry (HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources). Is there any other way to get the list of ODBC data sources names? I need to work only with Delphi standard components, so I can not use 3d party solutions. You have to use SQLDataSources function from ODBC32.DLL. For example . 来源: https://stackoverflow.com/questions/7675412/get-the-list-of-odbc-data-source-names-programatically-using-delphi

How to auto fit/scale DBGrid's (or other similar) columns widths according to its contents?

送分小仙女□ 提交于 2019-11-30 19:35:51
I am trying to make a frame with a DBGrid that will serve for more than 10 tables with half of its fields as defaults, and other fields exclusive for each table. As the space for the columns are limited and I do not want to configure each column of each table manually because it is very poor quality work, I was wondering a way to calculate the width of each column by the largest content of a row inside that column, measured by the own component or by the data set. Does anyone knows the way? Is there out in the world some custom component with that power? I need a solution that implements

Problem in consuming WCF service (basicHttpBinding) in Delphi Win32 Client

廉价感情. 提交于 2019-11-30 16:06:54
问题 I am trying to make a Delphi client (Delphi 2006) to communicate with a service written using WCF. Service is damn simple with just one function. Technically like below: [ServiceContract (Namespace = "http://www.company.com/sample/")] public interface IService { [OperationContract] string GetNumber (string name); } I have hosted this service on IIS and exposed it using basicHttpBinding with mex end point. I am able to use it in .NET clients. I tried to run WSDLImp.exe and it generated a

Problem in consuming WCF service (basicHttpBinding) in Delphi Win32 Client

依然范特西╮ 提交于 2019-11-30 15:49:32
I am trying to make a Delphi client (Delphi 2006) to communicate with a service written using WCF. Service is damn simple with just one function. Technically like below: [ServiceContract (Namespace = "http://www.company.com/sample/")] public interface IService { [OperationContract] string GetNumber (string name); } I have hosted this service on IIS and exposed it using basicHttpBinding with mex end point. I am able to use it in .NET clients. I tried to run WSDLImp.exe and it generated a source code unit (btw, it generates wierd classes to encapsulate string type. Why cant it be same as Delphi

How to download a file over HTTPS using Indy 10 and OpenSSL?

ε祈祈猫儿з 提交于 2019-11-30 11:40:31
问题 I have the following task: download a file using HTTPS and authentication. Indy seems the way to go but for some reason it doesn't work so far. I have the following in place: a TIdHTTP component which I use for downloading a TIdURI component used to create the URL a TIdSSLIOHandlerSocketOpenSSL component which should provide the secure connection. The required DLLs are in the binary folder. The site also requires authentication and I included the user/pass in the URL as in the example below.

How do I define implicit conversion operators for mutually dependent records?

落花浮王杯 提交于 2019-11-30 08:02:13
问题 I am using the operator overloading for records in Delphi 2006. (Please don't answer this question by telling me not to.) I have two record types with the implicit operator overloaded. They are both only in the implementation of the module, not exposed through the interface. My problem is, now that they are mutually dependent, I don't know how to forward declare the second type to the compiler. I know how to do this with functions, procedures, and classes, but not with records. Here is a

How can I fix the TScrollBar MouseWheel malfunction?

喜欢而已 提交于 2019-11-30 07:44:34
I have a TScrollBox inside of a TFrame and when I use my mouse's wheel it simply does not goes up nor down the ScrollBox scrolling. I have tried to use TScrollBox(Sender).Perform(WM_VSCROLL,1,0); on the FrameMouseWheelDown but it does not trigger. Any Ideas? My scroll box looks like this: type TMyScrollBox = class(TScrollBox) protected function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override; procedure WndProc(var Message: TMessage); override; end; function TMyScrollBox.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;