May 9, 1999

Add Share for a special User group in VB

Question: How can I add a Share in Visual Basic to a Local or Remote Machine with permission only for a special User group? Answer: That is a rather difficult question. You can use the code I’ve already posted to add a share, but you will need to use Level

File Paths

Question: How do I grab a file’s absolute path, given a filename? Answer: All you have to do is create a File object corresponding to the filename and call getAbsolutePath().

MOD Division

Question: Does Java have a MOD function? Answer: The Java language has a built-in operator to perform modulus division. It is the same as that of the C and C++ programming languages, the %symbol. For example num = 25 % 8 would assign the integer value 1 to the num

Windows Standard Color Dialog

Question: How can I call the Windows color dialog box in Powerbuilder 6.0? Answer: To use the Windows standard color chooser dialog, you will need to declare and use some API calls. Create a new nonvisual object and define a structure in your object with the following attributes: long lstructsizeulong

The LogonUser function and the SE_TCB_NAME privile

Question: I can’t use the LogonUser function because I don’tknow how to set (with program, if possible) the SE_TCB_NAME privilege. When I use your program that shows the use of the LogonUser function, the sytem says to me it is missing a privilege. What can I do to have this

Batch files won’t run

Question: My batch files don’t run anymore. I’ve changed the association for editting them, and now that is the default action. Also, the “add” button is disabled in the edit action dialog. The “open” (executable) option is no longer there. How do I reset this? At the moment, they can’t

String Substitution

Question: How can I find and replace a substring of a String? Answer: The String class is immutable. That is, once you have created a String, you cannot change its value. Therefore, to perform a substitution, you must create a newString in the process. The key to performing a substitution