Solved

system directory

Posted on 2002-03-12
9
148 Views
Last Modified: 2010-05-02
how do u get the sytem directory?
0
Comment
Question by:killer5
9 Comments
 
LVL 50

Accepted Solution

by:
Ryan Chong earned 5 total points
ID: 6859312
0
 
LVL 1

Author Comment

by:killer5
ID: 6859344
thanks ryancys!
but before i give u the points let me ask u one thing.

what's the difference between system and system32 folders?
can i use system32 to register my own ActiveX(ocx) files?
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6859381
Basically we just use either system or system32 to register your own ActiveX (ocx). So just register it to the path returned by this function and it will be fine.

ryancys
0
ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

 
LVL 1

Author Comment

by:killer5
ID: 6859412
the code is not that optimized... it returns some weird characters. thanks anyway
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6859587
So i deserve a "C"?!
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6860009
i didn't do better in that other question ;) questioner would like to have more of cut & paste code completely tailored i guess
0
 
LVL 15

Expert Comment

by:ameba
ID: 6862767
There is a small error in that vbcode sample.

Original line:
    strWindowsSystemDirectory = Left$(strBuffer, Len(strBuffer) - 1)  ' weird character is Chr(0)
should be changed to:
    strWindowsSystemDirectory = Left$(strBuffer, lngReturn)

----
GetSystemDirectory
The function returns the length of the string returned if it is successful, or 0 if it failed.
    lngReturn = GetSystemDirectory(strBuffer, MAX_PATH)
----

Suggestion to still change the grade to B, since no info is lost, and 'weird character' is trimmed automatically in most cases, e.g if you show a MsgBox, or put it into textbox.  It will still show in IDE, when you move mouse over variable.
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6863186
Thanks ameba for clarification.
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6864872
Grade changed.

killer5,

You should understand that here at Experts Exchange, you have the responsibility of bringing a question to an excellent resolution. Spend some time answering the experts questions and clarifying your problem. The experts have given their time in helping you, please show your appreciation by attending to your open questions and not grading punitively.

When you're grading an expert's answer it is important to remember that the grade you award to a question is a token of appreciation, not a "school" grade.

For grading, in general, I would advise to give an "A" unless you have a good reason to grade less, for example, if you asked for more information and you didn't get it, or the expert only gave you a starting point and you still had to do most of the grunge work yourself.

A "C" grade is particularly unacceptable if the person simply posted their suggestion as a comment. After all, you are not obliged to accept a comment as the answer.

Whatever the case may be, if you're considering giving a "B" or a "C", please tell the expert beforehand, so that they have a chance to work on making their answer worth that "A".

Another thing you might want to consider is that a lot of experts check an asker's grading record. If they see that an asker habitually grades questions with "B"s or even "C"s they would be very reluctant to give their help. With your current record, you might find it difficult to get good and timely answers.

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question