?
Solved

system directory

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

Accepted Solution

by:
Ryan Chong earned 15 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 54

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

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

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 54

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

749 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