Need some explanations on this Delphi code [closed] - windows

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I have this code and need some explanation on these questions:
What is that trailing "_TLB" after "ShellExecHookXample" in first uses section?
How should I use this code in Delphi 7 and make stand-alone exe file? (I don't know what's the proper place to put codes and call its method. Since it seems to be a unit or what?)
if possible please describe the code for me.
Thanks in Advance.

The _TLB is stands for type library. It looks like you are trying to implement IShellExecuteHook.Execute and have so far found some code here. However, I'm guessing because you didn't tell us. You are likely to get better answers if you are able to to spend more effort describing what it is you are trying to achieve.
If my guess is correct you should take a look at this question: IShellExecuteHook.Execute which I believe will explain how to solve your actual problem.

ShellExecHookXample_tlb means that this unit was imported from com (activex) object with an internal delphi tool (Project->Import type library...)
it reads public methods,events, properties of com (activex) object and generates pas unit with appropriate classes/interfaces. Usually you can find it in delphi folders.

Related

Passing Arguments in Windows Application [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am making a application(desktop app), and need to fetch ids from DB and pass these ids to another desktop application.
How to achieve this?
Your question is your answer. You can use command line argument passing in windows application. As to how to do this is written below.
You can Create a process and call the application to start and pass those arguments:
Process pro=new Process();
pro.StartInfo.FileName = #"ApplicationName.exe";
pro.StartInfo.Arguments = arg1 + " " + arg2;
pro.Start();
pro.WaitForExit();
in the second application get these values by following the below code:
var arguments = Environment.GetCommandLineArgs();
if (arguments.Length > 1)
{
productIdFirst = Convert.ToInt32(arguments[1]);
productIdSecond = Convert.ToInt32(arguments[2]);
}
If I understand you correctly then you're talking about a website and you could pass it a query string. If that is the case then you should check out http://msdn.microsoft.com/en-us/library/system.web.httprequest.querystring.aspx :)
I agree to Martim, that it is no clear if your tags "Windows" not perhaps mean "Website". But if you really mean "Windows" like you've tagged, you can use COM as Middleware. A german article already has great explanation with code samples. Languages can be translated.
http://www.activevb.de/tutorials/tut_middleware/middleware.html
Download Source Code
http://www.activevb.de/tutorials/tut_middleware/downloads/Middleware.zip

How Poco Use in MVC3 with example? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am new to POCO and all this MVC stufffs.
Reading some articals about POCO on google, but not having exact idea may be lack of my knowledge about it or not proper examples i got.
Can any one please explain me how to use this "POCO" stuffs in my MVC project.
it would be great if any vidoe link for POCO to learn
The POCO term is used to be able to tell if the object has any side effects and the term is usually used together with OR/M layers.
An object which is a POCO have no dependencies to your ORM layer or anything else. If you serialize it and then deserialize it will still look the same.
non-pocos can be used to be able to add support for lazy loading or be able to track the entity. The normal approach is that the object is either inherited from your regular class (a proxy) or that it has the features from start.

Renaming Document type once app is in the wild [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I have an document based application with a custom document type.
Any idea how to rename that type once the application has been release, so that the old files are treated the same?
Thanks!
The easiest way is to support both document types, saving only as the newer one. Sooner or later, the older document type will be (mostly) replaced with the newer one.
You can also automatically re-save the older type of document whenever users open it.
Note that resaving documents may have side effects if the file name extension has also changed, because users may have symbolic links to existing documents. The same side effects apply if you brutally search the user home folder to rename all existing documents of the older type. I wouldn't recommend it.
The first approach is just fine, I think, because even if users notice the change, they will attribute it to a file format change or something like that. The biggest downside is that you have to support both document types literally forever.

Insert a text in to a file from command prompt windows 7 [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to edit a text file from command prompt in Windows 7. I have a text file, i want to search for particular String in that file. then I need to append some more string to string.
Then, I need to save or over write it.
The batch command language is not well-suited to this sort of task. You would be much better served using some other scripting language, like js or vbs or (if you are targeting Windows 7) powershell. If you really want to do it in the batch command language, you can sort of cobble something together with for /f to read from the input file and echo to write to the output file. Mind you, it won't be fun.

how stackoverflow is making url [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
i need to know how stack overflow is creating the url in name of title as an page..
if i ask an question as how stackoverflow is making url is it creating an page for that question or it is coming from db ..if it is from db how it is done....
It's called URL Rewriting, done specifically for the purpose of search engines.
At a guess, I'd say that the ACTUAL url that is being called (logically) is something like this:
stackoverflow.com/questions/index.php?id=4591366
The text bit probably is only to make identification easier, especially for search engines.
That index.php probably loads the question identified by that id, which in this case, is your question.
http://stackoverflow.com/questions/4591366/how-stackoverflow-is-making-url
4591366 - ID of question
how-stackoverflow-is-making-url - a String made from subject after processing it correctly how stackoverflow is making url
while retrieving Question id only is enough, while subject will help in SEO stuff
The number is the primary key. The part afterwards is ignored when processing actual requests. So:
http://stackoverflow.com/questions/4591366/
and
http://stackoverflow.com/questions/4591366/made%20up
both work.
However, links and redirects are generated that way (by including the title) for search engine optimization.
StackOverflow uses ASP.NET MVC Routing to achieve its URLs.
They would be using a Routing Map similar to this:
"{question}/{id}"
Then in the URL they just add the title of the question which gets ignored by their routing logic but gets used for Search Engine Optimisation.
Source: Hanselminutes Podcast 134 - StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team, http://www.hanselman.com/blog/HanselminutesPodcast134StackOverflowUsesASPNETMVCJeffAtwoodAndHisTechnicalTeam.aspx

Resources