Tuesday, September 14, 2010

Delphi beginners reference (b)

Windows APIAPI (Application Programming Interface) application programming interface, all the computer language to be used in it. What is API? API is the program uses the services provided by the operating system as a means of programming most of us are not operating directly on hardware, but rather call these API, the direct operation by the operating system, hardware, it is we do not have programming and hardware test filter compatibility issues, more importantly, from the operating system level to achieve a code-sharing. Therefore, if the programming API can be used to achieve the function, we try to use it.

Delphi How to use the Windows API

Development in their daily work, we often have to use the Windows API function, then the API function exists where? We can interpret it this way, API function that is encapsulated in the Windows system's DLL system files. As we often use the Beep procedure (Bell), is called Windwos system directory user32.dll in MessageBeep realized; SendMessage (message) is a direct call to user32.dll's SendMessageA. Delphi Dll most frequently used are: advapi32.dll, kernel32.dll, mpr.dll, version.dll, comctl32.dll, gdi32.dll, opengl32.dll, user32.dll, wintrust.dll, msimg32.dll.

So Delphi is how to use this API function for? Since the API function exists in the system DLL, then we can call their own, as written in the same DLL API function call friends. Call the DLL function in two ways, one is a static method, a dynamic way. Call the Windows API are based on the static approach, and why? This is because the DLL is the most basic services provided by the operating system, the operating system at boot time on already loaded into memory, and large and the operating system also use them.

API and daily programming

Delphi encapsulates the Windows API function, the majority of (mainly in the Windows.pas unit), it should be said to complete most of our work, we generally do not directly call the API function. But sometimes there are special requirements, we may have to call off a number of Delphi did not package API, sometimes even calling Windows API functions not released. So how to call these API functions? As mentioned before, using the static method call just fine. See more details call the relevant information.

Delphi did not call these API functions encapsulated key is to know the parameters. Can check to see the latest MSDN or related information.

API and VCL

Microsoft's MFC a lot of packages in Windows API, VCL is no exception. VCL features can not be separated to achieve most of the Windows API, either directly call, either through a simple package and then call. Repaint if TControl's implementation (Control unit):procedure TControl.Repaint;

var

DC: HDC;

begin

if (Visible or (csDesigning in ComponentState) and not (

csNoDesignVisible in ControlStyle)) and (Parent <> nil) and

Parent.HandleAllocated then

if csOpaque in ControlStyle then

begin

/ / Direct call to the GetDC user32.Dll

DC: = GetDC (Parent.Handle);

Try

/ / Direct call gdi32.Dll of IntersectClipRect

IntersectClipRect (DC, Left, Top, Left + Width, Top +

Height);

/ / Parent.PaintControls a large number of API calls

Parent.PaintControls (DC, Self);

Finally

/ / Directly call the ReleaseDC user32.Dll

ReleaseDC (Parent.Handle, DC);

end;

end else

begin

/ / The following two calls through the package

Invalidate;

Update;

end;

end;

Can be seen in everywhere VCL API, we understood from the other side is VCL: VCL is a large number of package API function libraries, such a result is to make it easier to use the API, do not care about those annoying API parameter.

Delphi and Windwos COM ServiceWhat is COM? COM (Component Object Model), Component Object Model, which is based on the Windows platform for the different independent objects can communicate with each other without any constraint of software computing language component model, which defines a standard API, and a binary. The definition of abstract, first of all it is a component model defines a component object specification model to achieve this COM object is the COM object. COM object is through the interface (Interface) to achieve access to a COM object can contain one or more interfaces form the COM objects function, you can visit the VCL objects like the same way as the interface method to access COM objects. COM objects in order to achieve resource sharing, it is a binary code level to achieve a shared, so it can be implemented in different programming languages can also be by a different programming language to call, similar to DLL (COM fact, the ideological sources DLL).

VCL and COM

COM is highly recommended by Microsoft before something so ubiquitous Windows operating system, Delphi's VCL has also called Windows COM service, the most obvious example is the field component of all ADO ADO page components, such as TADOQuery, it is inherited from the TCustomADODataSet while TCustomADODataSet defined as follows:TCustomADODataSet = class (TDataSet, IUnknown,

RecordsetEventsVt)

private

FRecordsetObject: _Recordset;

FFindCursor: _Recordset;

FLookupCursor: _Recordset;

FLockCursor: _Recordset;

FRowset: IRowset;

FAccessor: IAccessor;

FRowsetFind: IRowsetFind;

FHAccessor: HACCESSOR;

FOleRecBufSize: Integer;

...

end;

ADO (Microsoft ActiveX Data Objects), it is a set by Microsoft OLE DB Provider to access the database a collection of COM objects. If we look at the First TADOQuery realization methods:TADOQuery.First-> TDataSet.First-> TdataSet.InternalFirst-> TCustomADODataSet. InternalFirst -> Recordset15. MoveFirst

Not difficult to find, TADOQuery.First eventually calling COM object through the interface implemented.

Delphi and the Windows shell

What is the Windows shell does? Windows Shell is the Windows interface operating environment, it also provides a powerful our programming scalability. We use Windows shell functions to achieve some of the programming, known as shell extension. For example, if your machine has been installed WinRAR, right-click menu in the folder will see the WinRAR compression menu. These features is through the Windows shell extensions to achieve.

Windows shell is based on COM, so all the shell extensions is through the interface. Delphi also defines a number of shell extension interface, the installation directory Delphi7 SourcertlWinShlObj.pas unit.

In Delphi's Demo directory there is a Virtual Listview example is achieved by Windows shell extension disk browsing, interested readers can look.

Embedded assembly languageAssembly language code to embed in Delphi is one of the characteristics, such as the VCL implementation of the root class Tobjce compilation of statements on a range of embedded.

Assembly language is a relatively low-level computer languages, and the closer relationship between hardware. So we usually try not to use it programming, but in some special occasions (such as high performance requirements, the need for direct manipulation of hardware), the use of it can still play a significant role.

21 comments:

If you are using firewall software such as Outpost Firewall Pro, the paid edition of Online Armor and Kaspersky Internet Security or PURE, you can take advantage of using their Blocklist feature that will block connections to known malicious URL and IP addresses.This means you tend to be copying it through file sharing websites like rapidshare, megaupload, hotfile, etcetera. This is what professionals do. Naturally, they will flock to your competitor who does.A dedicated SEO expert will devote all the attention and effort in enhancing the visibility of your website or business in the online world.

The major preference is for offshore SEO companies as they offer SEO at the most competitive prices. Instead, the developer should concentrate on the functions mentioned in this article first, as they are the basis for further extension of the Word - Press header file. When SEO services are working for you, you should always be ready to capitalise on innovations and fresh marketing opportunities.Make buying easy for the customer and they will return often.Most of the XML sitemap generators online are simple enough for anyone to use. They want to know things about how to create effective copy, general marketing tips and maybe even stuff about social media. However, in general, SEO services involve using standard and compliant coding. Basically, if you create links to your website with "ink cartridges" or "printer cartridges" in the anchor text, it will help move your website up on the search results for those key words. Here you will need an SEO agency such as Webfirm to try and run damage limitation. Create a general, high-level category in which you want to manage all phrases'for example 'global,' 'online,' 'channel,' and so on. SEO defined. Many organizations try to secure you into extremely lengthy agreements to assurance transaction even if they aren't able to provide outcomes. SEO content is a huge deal in today's online oriented business world. The website serves as a way for customers to find the business and be able to see what services are offered. com is one of the premier portals on the World Wide Web which has been formulated with the intention of providing SEO Hosting options for webmasters around the world who seek a way to ensure that their websites reach the top ranks of all major search engines.

1. com’s report. Search engine marketing (SEM) is an essential a part of any site promotion strategy. This will not only help you find the best service provider but will help you build an idea about the recent SEO market. SEO must be implemented by following a step by step process.If the conversion is higher with a certain keyword or a particular set of keywords, then the SEO vendor can focus on the same keyword to get it ranked high in all the search engines. The tips are as follows:-.This means that they follow only the steps given to them by Google and other major search engines.The title is supposed to explain the article, and the title is what your readers see when they search for content.) of links. organic search, frequency of blog posts, frequency of on-page optimization, the relative importance of links, the use of social media, the best way to measure results, etc.), watching movie trailers or other people's funny animal videos. Now even that is quickly defining point of Search Engine Optimization (SEO) can lead to intense discussions about the meaning and purpose of SEO. You can Google maps link for your website, which will be very helpful if any person search in images sections. This was the beginning of the thought process for my new business. As of now, Thomas Lenarz has helped many people get the information on reputed SEO companies. The World Wide Web is an incredible source of customers and potential revenue for all types of businesses and companies in all niches. You will not even get to a 1 or 2 until Google has fully crawled your website or blog enough to give it a ranking. The internet has become an integral part of our lives that according to the latest statistics, almost 1 billion Americans access the internet. Yahoo style guide.

For some people, renting those games was another option, which yet again burns a hole in their pocket.Real game, real people, real thrill and of course real money; is all about online gaming, the perfect place to fulfill your desire to be a multi millionaire. You'll have to keep the phone close (on the bed or in an armband) for the app to work.

Few travellers on a Mashobra tour can resist the temptation of seeking blessings at the Mahasu Devta Temple.'The tears of mankind have not washed away man's desire to kill.Hometown Retired households are comprised of retirees, two-thirds of whom are over 65; nonetheless, don't assume that these people don't do much more than hang around the house and watch TV all day. In exchange you'll have to pay a bit more for the GT 220, as most models are around $60 or $70 dollars. I'm hoping that all of you smarter ' more learned authors out there have a way to describe the intensity of this desire that you must have to journey in your own recovery. Those pain killers and medications hide the problem without dealing with the true cause. Talcahuano. In fact the publicly owned Ecopetrol has seen an immense FDI surge in the past few years and in spite of being overvalued to some, the stock still is a good bet due to the growth potential it has. The players have to buy the weapons to use from the available shops and weapon stores. Two people have a heated argument, voices raised, vocalized obscenities, hearts racing ' obvious discord all rooted in fear.

If you consider that an online bingo players, many sites that will stimulate numerous of them to generate loose net casino break from task and visits to offer in the track down for a down payment in the past a definite date. Real game, real people, real thrill and of course real money;is all about online gaming, the perfect place to fulfill your desire to be a multi millionaire.

In fact an ideal online casino will make the entire gaming experience a pleasurable and a real experience to the gamer.

Moreover, over the internet there are 2 main versions of this game that is the RA deluxe with 10 pay lines and the classic RA with 9 pay lines. This is the Baccarat online really different, so are able to attract players to play Posh least $ 500 a night.This setup offer players a medium amount of flexibility over their hit or win line selection.

Rather,all the applications keep running in the background although in a low power state,utilizing both processing power and memory that leads to a lower battery life.If you don't want to use Safari to navigate to pages, zoom in, and read articles, Byline may be just the app for you. Double Tap (Tap the home button twice > Press down on an app for one second > Hit the "minus" button on all apps that are running) When you open an app, it stays running until you actually turn it off.

What I didn't know was how I would get all of what I wanted in just six hours. Many people will be happy with replaceable batteries for home use and occasional outings. Even if you have a good two way radio, it isn't baԁ to havе some kind of receive onlу radio to get information on.

The most important thing to know when you are selling an account is where you are going to sell. WIFI:Als Verbindungsmoglichkeiten ins Internet stehen Ihnen WIFI wireless lan zu Verfugung. The reason for this rather strange feature is that, as described above, apps in the Android Market are listed as they are submitted, without any testing.

Tennis balls, wiffle balls, ping pong balls, and golf balls can also be used. Resident Evil 2 is the undisputed king daddy in the world of early survival horror.In fact an ideal online casino will make the entire gaming experience a pleasurable and a real experience to the gamer.

Please supplement charge before use when the battery has been kept for a long time.Continually letting a battery drain will make it die much faster then it normally would. If a LED is used instead of a bulb, the connections will require a bit more attention.

If there is a change in the search engine algorithms, it is also up to the service provider to keep a watch on such activities.The objective is to arrange your passions as carefully as possible with your online promotion company.The more doors you have the more chances of people finding it.The only thing that cannot be "fixed" later is your blog and post titles.NOW, I don't mean you should just put keyword spam in your footer. The algorithms are not known publicly, but one thing is certain, is the search engine websites that the information is relevant to the purpose of the preferred site. Identify your niche audience and be an active member on the forums and blogs. Having realized that it is practically not possible to combat with SEO Next in terms of services and offerings at this point of time, rivals have started thinking of an easier alternative of being successful in their mission. Google bowling messes up the external ranking used by Google and penalizes a sites ranking compared it the competitors. People these days use the Internet for a varied purpose. organic search, frequency of blog posts, frequency of on-page optimization, the relative importance of links, the use of social media, the best way to measure results, etc. He has also mentioned each and every seo service. Advertise by Selling Branded Products. An SEO strategy should combine a number of elements that work together to get results for you. Once you find the right and affordable SEO Company, it is essential to talk about your business objectives, target customers and future goals with the professionals to help them develop their strategies accordingly. It has been designed especially for business purposes and it holds biggest importance for your B2B online marketing strategy. You need to try to find reputed SEO consultants. Once someone clicks on your site, they should see tons of unique informative content. Such companies know the best about industry and market trends. Never post a half edited article, and never settle for less than your best.