Solved

system directory

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

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 49

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
 
LVL 1

Author Comment

by:killer5
ID: 6859412
the code is not that optimized... it returns some weird characters. thanks anyway
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 49

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 49

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now