Question 1. What Should I Give To Windows Api Functions That Want A Hwnd?
Each shape has a belongings referred to as Handle, which incorporates the shape's hWnd. Many controls also have hWnd homes. However, don't try and bypass Canvas.Handle to an API feature looking ahead to a hWnd, because TCanvas's Handle property is a hDC, no longer a hWnd.
Question 2. Why Do I Get Exception Messages Even Though I Am In Protected Code?
By default, the inner debugger will halt any time there may be an exception, despite the fact that the exception is trapped by using code. This can frequently be useful for debugging purposes. If it offends you, flip it off. You manage it from the Options/Environment menu.
Pascal programming Interview Questions
Question three. How Do I Write A Global Error Handler?
Use the Application.OnException occasion. Look in the assist underneath "utility occasions" for information of a way to create and fix an occasion handler to the application variable.
Question 4. I Am Trying To Call From Delphi And It Gpfs. Whats Up?
Based at the quantity of postings to comp.Lang.Pascal, it'd appear that with the aid of a ways the most important wide variety of troubles calling Windows API capabilities or non-Delphi DLLs are because of passing Pascal-style strings to features that expect null-terminated (PChar) strings.
This is the primary thing you have to take a look at in case you get a GPF or different ordinary outcomes when calling an external feature. See phase 6.11 for greater facts on which type of strings move where.
Pascal programming Tutorial
Question 5. When I Use The Glyph Property, How Do I Know Which Color Is Transparent?
Delphi continually assumes that the color of the lowest left-hand nook pixel is the background colour and must be displayed as transparent. Yes, it took me some time to parent this out. It's now not documented everywhere, but if you have the VCL supply, you could take a look at the code in BUTTONS.PAS.
Linux Embedded systems Interview Questions
Question 6. How Does Delphi Handle Windows Callbacks?
Just like C: You can get a much pointer on your callback technique (you have to recall to declare it with the "a ways" qualifier, except you've got F$+ in impact to pressure all calls to be a ways), bypass the pointer to the Windows callback feature, and there it's far.
Question 7. How Does Delphis Exception Handling Work?
The simple structure goes some thing like this:
p := new(big_thing);
sooner or later
The first line allocates a massive block of reminiscence. Then, inside the "try" block, we execute numerous statements, every of which may produce an errors--or, in different phrases, "improve an event." If an mistakes does arise, the relaxation of the "attempt" block may be skipped, "ultimately" blocks may be done.
If there are not any mistakes, then the "subsequently" block could be entered while the closing statement within the "attempt" block completes. So, both manner, the large block of reminiscence receives freed. These "strive/eventually" blocks will trap anything up to and including a Windows GPF.
Linux Embedded systems Tutorial Hadoop Interview Questions
Question eight. Do I Have To Understand Object-oriented Programming To Use Delphi?
Well, yes, to some extent. Delphi's person interface design gear produce item-oriented code. However, if you're familiar with either Visual Basic or Powerbuilder, you possibly have sufficient information of OOP to get by means of.
You can do a top notch deal in Delphi without having to create your very own items, that is the point at which it will become critical to surely apprehend some thing about them.
Question nine. Do I Have To Know A Lot About The Windows Api To Use Delphi?
There seems to be a sense which you want to know extra approximately Windows to use Delphi than you do to apply Visual Basic. This isn't surely proper; you can get by means of in both environments with a very minimum know-how of Windows internals. However, in both environments, you need to understand at least a bit about the Windows API in an effort to genuinely make the most of what you've got. The difference is that Delphi gives you lots greater energy to do these types of interesting matters, so that you sense greater limited in case you do not know how.
Hadoop MapReduce Interview Questions
Question 10. How Do I Close A Modal Form? For That Matter, What Is The Best Way To Close Any Form?
Generally talking, you name the shape's Close method. This runs the OnClose event, which may additionally determine it does not need to shut, as an example if there may be unsaved information within the form. Close does not unfastened the memory related to the shape, until of course you positioned a name to Release within the form's OnClose event.
If you want to close a form with out giving it a risk to argue, call the shape's Release approach. This is much like Free, but it lets in occasion handlers (e.G. OnDestroy) to complete going for walks before the memory is going away.
Modal forms "end their modal country" while you set the form's ModalResult belongings to something extra than 0. If you placed a button on a modal form and set the button's ModalResult assets to some price, then while the consumer clicks on that button the shape will close with the result you detailed. You can discover what the result changed into by calling ShowModal as a function; i.E. Result := Form.ShowModal.
Question eleven. Are There Any Tools To Help Me Migrate My Applications To Delphi?
There is an automatic translator that converts Visual Basic tasks to Delphi. I even have heard from a couple people who've tried the usage of it, and the outcomes seem to be pretty mixed. It's very useful for a few human beings, however not beneficial at all for others.
Hadoop Administration Interview Questions
Question 12. Why Do I Get Compile Errors Acessing The Sender Object In Events?
If you examine the announcement, the Sender item is of kind TObject, which is the class from which (nearly) all different items are derived. You're probable trying to access a belongings that isn't defined in TObject, like Text or Caption or something. For this cause, "Sender.Text" will fail, but if (as an instance) you understand that the sender is of type TEdit, then you can use "(Sender As TEdit).Text". If you aren't sure that the Sender item will always be the equal kind, you could check it with "if (Sender is TEdit) then < blah> ;".
Pascal programming Interview Questions
Question thirteen. How Can I Manipulate Data Programatically?
It is sometimes perfect to jot down code that offers with databases however isn't related to any precise shape or consumer-interface details. To do that, you claim variables of type TDatabase, TTable and/or TQuery, and set their properties in code simply as you will in the layout surroundings. Make positive which you include the DB and DBTables devices in your uses statement, or you'll get "unknown identifier" mistakes for the duration of compilation.
Hadoop MapReduce Tutorial
Question 14. How Do I Write A Change Password Function For A Paradox Table?
There is not any manner to do that in the Delphi VCL. Seems like a quite extreme omission to me. However, it's miles feasible to do it through speakme without delay to the Borland Database Engine via the interface provided by using the DBIPROCS and DBITYPES units.
You call DbiDoRestructure, however set all the "wide variety of" variables to zero, which makes it go away the existing values intact. I actually have code to try this, however it is a piece too long to protected here. E-mail graham (at) mhn.Org if you need it.
Question 15. Can I Use The Odbc Drivers That I Got With ?
Yes, normally. I even have not encountered any ODBC drivers that do not paintings with Delphi, however on the other hand, I haven't attempted any surely distinct ones.
IReport Interview Questions
Question 16. Does Delphi Support The Back-end?
Delphi Desktop does no longer at once guide any lower back-ends besides for Local InterBase, and of direction the BDE (Borland Database Engine) itself. Delphi Client/Server at once supports Oracle, Sybase, Informix, and InterBase. In each cases, you could use 1/3-party ODBC drivers to hook up with any gadget you need.
Question 17. How Do We Get Access To A Database From Delphi?
In preferred, you have to go to "BDE Config" and define an alias for the database you want to connect with. This permits you to avoid difficult-coding a listing path into your software; you just talk to the alias. Then, you create at the least three objects at the computing device: A Query or Table item that definitely talks to the alias and receives a few information; a Data Source item that links between the statistics and the controls, and at least one records-aware control.
If you've got been trying for hours to get this to paintings, and no matter what you do you simply don't see some thing occurring, strive placing the "lively" assets at the Table or Query to "True." This will open the database. I actually have visible many humans get stuck out by using this the primary time they are trying it.
Embedded C Interview Questions
Question 18. Can I Make Calls To Delphi Code From C Or C++?
Delphi can generate DLLs, which may be called from C, C++, Visual Basic, Powerbuilder, or something else that knows standard Windows DLLs. There is an example of a database-succesful DLL in the DEMOSDBDLL listing.
As is the case in all Windows programming languages that I recognise of, DLLs are hard to debug and will crash your gadget if they are not pretty right. Save your supply code regularly.
Linux Embedded systems Interview Questions
Question 19. Can I Use Dlls Developed In C Or C++ From Delphi?
Delphi is capable of making calls to and receiving callbacks from any preferred Windows DLL. In addition, it's far stated to be possible (though as an alternative difficult) to get Delphi to get admission to classes within C++ DLLs. Borland's WWW server has instructions on how to do this. I wasn't able to get it to work, however I suppose it truly is because I have weird DLLs.
Question 20. What Technical Support Do We Get With Delphi?
You get access to the "up and running" line, in order to best solution questions related to putting in Delphi and getting it to run in your gadget. The long preserve times that had been common whilst Delphi changed into first released seem to have stepped forward--the contemporary average appears to be about five mins or so.
In order to get what borland calls "consultative" tech support (I.E. A person with whom you may speak reasons why a program isn't always operating), you need to pay $2/minute. You can call (900) 555-1015 and have the costs placed on your smartphone bill, in any other case (800) 330-3372 and use a credit card. I actually have known as twice, and that they couldn't answer my question both time; but, they did not fee me for the calls.
Embedded Testing Interview Questions
Question 21. What If I Do Not Have A Cd-rom Drive?
Borland will deliver Delphi on 3.5" floppy diskettes, but they charge greater for them. The resellers I even have spoken to simplest bring the CD-ROM version because they do not need to ought to inventory two one of a kind items. I got my reproduction on CD, however the CD has directories on it referred to as DISK1 thru DISK15, so I count on it would be 15 diskettes if to procure it that way. If you don't get the CD, you might not get the stuff they use to refill space at the CD, like an AVI report of an animated spinning Delphi logo.
Question 22. What Is The History Of Delphi?
Delphi is the descendant of Turbo Pascal, which changed into first launched in 1983 for the CP/M working gadget. Turbo Pascal was ported to MS-DOS in early 1984. During the early history of the IBM PC, Turbo Pascal turned into arguably the most famous language for severe improvement work--often because it changed into a real compiler, such as this system editor and the whole lot, that fee $19.95 and might run on a 64k gadget. Borland delivered Turbo Pascal for Windows in 1990. The brand new release of Borland Pascal (as it's far now called), no longer along with Delphi, turned into model 7.Zero in past due 1992.
Question 23. Can We Write Multi-user Database Applications In Regular Delphi?
Using everyday, non-purchaser/server Delphi, I even have advanced an utility that talks to a Sybase server using ODBC drivers. I failed to need to visit any severe problem getting it to work, and data get entry to pace is quite proper, better than it changed into under Visual Basic.
Hadoop Testing Interview Questions
Question 24. What Is The Difference Between Delphi And Delphi Client/server?
Delphi Client/Server includes the whole lot from Delphi Desktop, plus the following:
SQL-Links 2.5, which incorporates local client drivers for Oracle, Sybase, Informix, and InterBase, and consists of full royalty-free redistribution rights to the ones drivers, and which expenses $995 if offered one after the other;
The Local InterBase Deployment Kit, $495 ;
ReportSmith/SQL, $three hundred;
"Team development help" -- interoperation with PVCS (glaringly, that is no need to you if you do not personal PVCS), not to be had one after the other;
The visible query builder, which creates SQL statements for you, also no longer to be had separately;
The VCL source code, which is available separately for $one hundred.
Hadoop Interview Questions
Question 25. How Much Disk Space, Memory, Etc, Do I Need To Run Delphi?
The minimum set up of Delphi takes approximately 30Mb, and the whole installation takes 80Mb. In order to run it well, you may want a 486 with at the very least 8Mb of RAM, although I individually wouldn't try to run it in much less than approximately 12Mb. I use a 486DX2/sixty six at domestic and a Pentium-90 at work, and to be sincere, there's no longer plenty distinction among them--Delphi's compiles are so speedy that the CPU is virtually now not a bottleneck.
Question 26. What Operating Systems Does Delphi Support?
The only model of Delphi that has been launched is for Windows 3.1. There is no purpose why it ought to not run effectively under structures that offer Windows three.1 emulation, like OS/2 Warp, Windows NT, and so forth. Borland has introduced plans for a 32-bit version to coincide with Windows 95. It is rumored that this might be a loose upgrade to users of Delphi 1.Zero, however I wouldn't expect it. It is also recognized that Delphi 1.Zero does not run successfully at the prerelease version of Windows 95.
Applications constructed in Delphi are Windows three.1, 16-bit packages. However, Borland has stated that existing Delphi programs will bring together unmodified in 32-bit Delphi.
Embedded firmware software program Interview Questions
Question 27. What Is Delphi?
Delphi is a manufactured from Borland International. It is a native code compiler that runs under Windows three.1 and affords visible programming tools quite similar to the ones discovered in Microsoft Visual Basic 3.Zero. The underlying language is Object Pascal, that is an extension of the item-oriented Pascal located in Turbo/Borland Pascal starting with version 5.Five.
Hadoop MapReduce Interview Questions
Question 28. What Are The Different Types Of Pointers Used In Delphi?
There are typed suggestions types which might be being supplied by way of Delphi like PChar and PExtended.
These points paintings with the Inc and Dec capabilities and don’t have any trouble with the use of it.
They can increment the Pint64 pointer type and upload the SizeOf(Int64) bytes at the pointer address region.
This manner it permits the pointing of the pointer to factor to the next memory location in the reminiscence.
There are common recommendations which might be used to point to whatever and really beneficial in case of dynamic memory allocation.
Question 29. What Are The Different Types Of Inheritance Present In Delphi?
Specialization inheritance: that is the sort of inheritance in which the child magnificence is the superior version of the parent’s magnificence.
Class inheritance: gives a manner for the kid elegance to encompass the capabilities and whole homes of the parent’s class.
It is used to increase the discern elegance and offer the disregarded capabilities and strategies.
Abstract inheritance: that is the technique that offers other skeleton methods which is being carried out via the kid class.
Interface: that is the manner through which the elegance implements all of the skeleton techniques by using using the interface itself.
Hadoop Cluster Interview Questions
Question 30. What Is The Function Of Inheritance In Delphi?
Inheritance is a method to inherit the houses of the figure’s magnificence by way of the child class.
Inheritance is used in Object oriented language and it deals with the real international items and statistics.
The records in those situations is dealt with as an object and it has the traits like size and the actions which are finished on them.
In inheritance a category is depending on another item. The infant item inherits the houses of the figure’s class and makes use of it.
Child class has its own features but it also inherits the properties or the functions from the parent’s magnificence.
The instance suggests it:
TBall = class
ballSize : Byte;
procedure Kick(electricity : Byte);
feature GetSpeed : Byte;
constructor Create(size : Byte);
TFootball = magnificence(TBall)
ballPanels : Byte;
constructor Create(size : Byte; panels : Byte);
Question 31. What Does Memory Leak Show In Delphi?
Memory leak suggests that the machine is using an increasing number of reminiscence to assign to objects which might be now not lively.
This is the case while the object is unused and it is not getting deleted so in this situation the reminiscence doesn’t get freed.
The program that doesn’t delete the unused object, in this case it makes use of an increasing number of memory as it runs.
Memory leak occurs in the case of discarding unwanted blocks of reminiscence.
This state of affairs doesn’t assist the device and it uses more and more sources to sluggish down the machine and because of this the machine hangs up.
Question 32. What Is The Procedure To Access The Database From Delphi?
To get right of entry to the database the BDE needs to be configured as it defines an alias for the database that must be connected.
The configuration allows the avoidance of coding the directory course and it simply takes the referring of the alias.
The creation of three objects is needed to get admission to the database and that consists of: Query or desk object that in synchronization with the alias and it also fetches some information.
Data source item that permits the linking among the records and the controls used to attach the database.
Setting the energetic property at the desk or query to TRUE will open the database and allow the gaining access to to be completed.
Question 33. How Is The Memory Used Within An Object In Delphi?
Classes are built to create gadgets after which the items are allotted inside the constructors and used in the methods.
The gadgets which are allocated in the constructor have to have a liberating point and that is also inside the destructor approach.
The manner wherein, the constructor constructs, and after the work destructor destructs is known as speak method.
The training may be made to deal with the reminiscence well by way of the usage of the staying power assets after the item that is presently used is being destroyed.
The instance is as follows:
makes use of
TMy = magnificence
fileData : TStringList;
Constructor Create(const fileName : string);
Destructor Destroy; override;
Hadoop Administration Interview Questions
Question 34. What Is The Process Of Exception Handling In Delphi?
The manner of exception dealing with is as follows:
Allocate the memory and use the try block to execute the statements. The statements written inside the attempt block will help to provide the error or it's going to increase an event.
After the mistake occurs then the strive block may be skipped and it will be catched by using the finally block.
In case of no error the subsequently block will be executed simplest after the ultimate declaration of the strive block.
The reminiscence receives freed due to dealing with of exceptions in a right way.
The try to in the end blocks are used to lure any exception that comes below way.
Providing of an “except” block that allows the handling of neighborhood mistakes or all the mistakes that could create the worldwide error handler.
The application suggests the usage of exception handling:
p := new(whats up);