[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

06/24/2002 at 06:32PM PDT, ID: 20315754
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

Need some expert advice...

Asked by heathprovost in Delphi Programming

Tags: delphi, ismultithreaded

Hello all. I have developed an ISAPI filter dll for IIS using Delphi 6. The filter will be running on a server we use for development purposes (my company is a website development firm). Its purpose is to remap URLs to sort of emulate host-header redirection without having to set it up manually on the web server. Basically, if you type in:

http://something.ourdomain.com/

the filter will modify the request to be

http://www.ourdomain.com/something/

The filter works as expected, but I am curious about a few things that are mostly Delphi specific (and have nothing really to do with filter dlls):

1. What does the global variable isMultiThreaded actually do and do I need to set it to true?  I have read that it is required by the memory manager to be set to true in multi-threaded apps, but is it necessary in something like this? Although my code is not multi-threaded, the dll can be called by multiple threads at the same time, so I am not sure if that is the same thing as far as the memory manager goes.

2. My code has to make a few calls involving passing some local variables as pchars... Which is the best way to do this.

var
  myBuffer: array [0..MAX_BUFFER] of char;
  buffSize: integer;
begin
  buffSize := MAX_BUFFER;
  GetApiProc(@myBuffer, @buffSize) //procedure expects pchar and pointer to an integer.
  //do something with myBuffer
  SetApiProc(@myBuffer);
end;

OR

var
  myBuffer: string;
  buffSize: integer;
begin
  buffSize := MAX_BUFFER;
  setLength(myBuffer, buffSize);
  GetApiProc(pchar(myBuffer), @buffSize) //procedure expects pchar and pointer to an integer.
  //do something with myBuffer
  uniquestring(buffSize);
  SetApiProc(pchar(myBuffer));
end;

or is there another way that is better... My goal here is for this routine to go as fast as possible, and I need to reduce the number of memory allocations to the bare minimum... So basically my question is are string types slower to allocate than character arrays???


Any other advice on getting this to run as fast as possible would be greatly appreciated.

Heath


 
[+][-]06/24/02 06:34 PM, ID: 7106262

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/24/02 09:22 PM, ID: 7106506

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/24/02 09:51 PM, ID: 7106529

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/24/02 10:28 PM, ID: 7106557

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/24/02 10:31 PM, ID: 7106563

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/02 01:09 AM, ID: 7106729

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/02 01:57 AM, ID: 7106805

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/02 03:01 AM, ID: 7106915

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/02 04:05 AM, ID: 7107023

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/02 11:06 AM, ID: 7108557

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/02 11:20 AM, ID: 7108605

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/02 01:03 PM, ID: 7108813

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/02 01:34 PM, ID: 7108895

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/02 02:34 PM, ID: 7109044

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/02 10:23 PM, ID: 7109733

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Delphi Programming
Tags: delphi, ismultithreaded
Sign Up Now!
Solution Provided By: AvonWyss
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20091111-EE-VQP-91