Posts

Showing posts from 2012

Decompiling Delphi - 3

I came across this on delphi.about.com web site and thought it useful to add it a a reference here. continued from part two The art of reverse engineering has traditionally been the land of technical wizards, familiar with assembly language and debuggers. Several Delphi decompilers have appeared that allow anybody, even with limited technical knowledge, to reverse engineer most Delphi executable files. If you are interested in reverse engineering Delphi programs I suggest you to take a look at the following few "decompilers": IDR (Interactive Delphi Reconstructor) A decompiler of executable files (EXE) and dynamic libraries (DLL), written in Delphi and executed in Windows32 environment. Final project goal is development of the program capable to restore the most part of initial Delphi source codes from the compiled file but IDR, as well as others Delphi decompilers, cannot do it yet. Nevertheless, IDR is in a status considerably to facilitate such process. In co...

Decompiling Delphi - 2

I came across this on delphi.about.com web site and thought it useful to add it a a reference here. continued from part one For the moment, Borland does not offer any product capable of decompiling an executable (.exe) file or the "Delphi compiled unit" (.dcu) back to the original source code (.pas). Delphi compiled unit: DCU When a Delphi project is compiled or run a compiled unit (.pas) file is created. By default the compiled version of each unit is stored in a separate binary-format file with the same name as the unit file, but with the extension .DCU. For example unit1.dcu contains the code and data declared in the unit1.pas file. This means that if you have someones, for example, component compiled source all you have to do is to reverse it and get the code. Wrong. The DCU file format is undocumented (proprietary format) and may change from version to version. After the compiler: Delphi Reverse Engineering If you would like to try to decompile a Delphi e...

Decompiling Delphi - 1

I came across this on delphi.about.com web site and thought it useful to add it a a reference here. Decompilation? Reverse? Cracking?` Simply speaking, decompilation is the inverse of compilation: translating an executable file into a higher level language. Suppose you lose your Delphi project's source and you only have the executable file: reverse engineering (decompilation) is useful if the original sources are not available. Hm, "sources not available", does this mean that we can decompile other people's Delphi projects? Well, yes and no.. Is true decompilation possible? No, of course not. Fully automated decompilation is not possible - no decompiler could exactly reproduce the original source code. When a Delphi project is compiled and linked to produce a standalone executable file, most of the names used in the program are converted to addresses. This loss of names means that a decompiler would have to create unique names for all the constants, variab...

Hidden paths of MVVM - Lookup values

To recap, I am getting my feet wet in MVVM using XAML and I got stuck with a seemingly simple task. I have a field with domain values and I needed to display the description stored in another table. Ordinarily, I would have defined a calculated field in the target dataset and make it a lookup field against the dataset containing the description using the domain value as the matching key. I am using a strongly typed dataset for my data layer and conversant with using EXPRESSION property to derive values. My intial thought was to use the "RowChanging" event handler to populate the description for the domain value but then I thought that was not an efficient way to go and I suspected there was a way to actually implement some form of "lookup" even if it was not implemented in the traditional way. Well, I did a couple of googling and came across the concept of "RELATIONS" in dataset. Basically, Dot Net Framework allows relationship to be defined at desig...

Hidden paths of MVVM - Calc Field and Dynamic Value

I will save you the theatrics and plunge straight into the issue at hand. I am getting my feet wet with MVVM methodology using XAML and I had a situation where I needed to have a calc field assigned to computed dynamic value. My data layer consisted of a strongly typed dataset. After googling a couple of times, i found out there is a property called EXPRESSION that you can actually use with calc fields to derive values but it has a finite set of notations that you can specify at design time. Specifically, design time specification is only good for STATIC or known finite set of values. A lot of articles out there suggest using the "Column Change" and/or "Column Changed" events to assign complex values to a calc field. For whatever reason, I could not get the calc field populated using either of these events. I actually suspect the reason why the handlers for the events were not firing was becuase of the fact that I was doing a "READ ONLY" ( search) oper...

Windows Presentation Foundation - FAQ

As usual, I came accros this while "googlng" for way to implement a radio group in WPF using the MVVM model. Essentially, it is a collection of FAQs in WPF. The original post can be found here. < Page xmlns = " http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x = " http://schemas.microsoft.com/winfx/2006/xaml " xmlns:s = " clr-namespace:System;assembly=mscorlib " > < Page.Resources > < x:Array Type = " {x:Type s:String} " x:Key = " data " > < s:String > Option1 </ s:String > < s:String > Option2 </ s:String > < s:String > Option3 </ s:String > </ x:Array > </ Page.Resources > < StackPanel DataContext = " {StaticResource data} " > < TextBlock Margin = " 5 " > < TextBlock Text = " Current Option: " /...

ASP Dot net - Bits and Stuff

1. What is the sequence in which ASP.NET events are processed ? Following is the sequence in which the events occur : Page_Init. Page_Load. Control events. Page_Unload event. Page_Init event only occurs when first time the page is started, but Page_Load occurs in subsequent request of the page   2. In which event are the controls fully loaded ? Page_Load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that viewstate is not fully loaded during this event   3. How can we identify that the Page is PostBack? Page object has a “IsPostBack” property which can be checked to know that is the page posted back. 4. How does ASP.NET maintain state in between subsequent request? Refer caching chapter. Caching Concepts 5. What is event bubbling? Server controls like Datagrid, DataList, Repeater can have other child controls inside them. Example DataGrid can have combo box inside datagrid. The...

Object Oriented Programming

What is Object Oriented Programming? It is a problem solving technique to develop software systems. It is a technique to think real world in terms of objects. Object maps the software model to real world concept. These objects have responsibilities and provide services to application or other objects. What’s an Object? It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Objects are members of a class. Attributes and behavior of an object are defined by the class definition. What is the relation between Classes and Objects? They look very much same but are not same. Class is a definiti...

Caching Concepts

Image
Q1. What is the difference between Cache object and Application object? The main difference between the Cache and Application objects is that the Cache object provides cache-specific features, such as dependencies and expiration policies. Q2. How to get access to Cache object ? The Cache object is defined in the System.Web.Caching namespace. You can get a reference to the Cache object by using the Cache property of the HttpContext class in the System.Web namespace or by using the Cache property of the Page object. Q3. What are dependencies in cache and types of dependencies? When you add an item to the cache, you can define dependency relationships that can force that item to be removed from the cache under specific activities of dependencies. Example if the cache object is dependent on file and when the file data changes you want the cache object to be update. Following are the supported dependency : File dependency: Allows you to invalidate a specific cache item when a di...

Remoting and WebService

Remoting and Webservices What is an application domain? Previously “PROCESS” where used as security boundaries. One process has its own virtual memory and does not over lap the other process virtual memory; due to this one process can not crash the other process. So any problem or error in one process does not affect the other process. In .NET they went one step ahead introducing application domains. In application domains multiple applications can run in same process with out influencing each other. If one of the application domains throws error it does not affect the other application domains. To invoke method in a object running in different application domain .NET remoting is used.   What is .NET Remoting? .NET remoting is replacement of DCOM. Using .NET remoting you can make remote object calls which lie in different Application Domains. As the remote objects run in different process client calling the remote object can not call it directly. So the client...