The Latest

DevX

Rebooting NT from VB

Question: How do I reboot (with an option to force) inside of Win NT? I know about the ExitWindowsEx API call, which works fine in Windows 95, but unfortunately this

DevX

File version information under NT

Question: I am using the GetFileVersionInfoSize, GetFileVersionInfo, and VerQueryValue APIs to get the file version of third-party applications. In all cases, GetFileVersionInfoSize returns a large number, but when I query

DevX

Output to I/O port under NT 4.0

Question: Please kindly advise how to output to a PC’s I/O port address: &H158 using Visual C++ under NT 40. For your information, we used to use outp() using C

DevX

FTP

Question: If I ftp to an AS400, I can run a program on it by typing quote rcmd call . Is it possible for me to do the same thing

DevX

Automatic logon problems in NT 3.51

Question: We are running a SCADA package on an NT 3.51 machine at a mine. Since we often have power failures, the PC reboots itself and then requires the operator

DevX

Scheduling A Visual Basic app on NT

Question: I have a VB app that was running on Windows 95 and using the scheduler included with Microsoft Plus. All was well. Now our company is switching to an

DevX

Use Register variables to enhance performance

The C/C++ register keyword can be used as a hint to the compiler that the declared variable is to be accessed very often during program execution, and hence, should be

DevX

Static member function

A static member function in a class can access only other static members of a class or variables which are not members of its class. It can be invoked even

DevX

Retrieving actual object type in run-time

C++ supports Run-time Type Identification (RTTI), which enables detection of actual object type during program execution using the built-in typeid() operator. Here is an example: //file: classes.hclass base{ base(); virtual

DevX

Global objects construction and destruction

In object-oriented programming (OOP), global objects are considered harmful. Particularly in C++, there’s even more reason to think twice before using them: a global object construction occurs before a program’s

DevX

When is a mem-initializer required?

A const member or a reference member cannot be initialized within an object’s constructor. Instead, they must be initialized in the constructor’s member-initializer list. Conceptually, mem-initialization takes place before the

DevX

Uses of an anonymous union

Unions are used to minimize memory waste. For example, consider the following database-transaction class used to update a person’s data. The key can be either a unique ID number or

DevX

Datawindow print dialog

Question: How can I get the Windows 95 print dialog box todisplay instead of the print setup dialog usingprintsetup()? Answer: You have to build your own custom dialog window. The

DevX

Text files with MFC

Question: I have been reading Visual C++ 5 in 21 Days while trying to learn how to use the Visual C++ user interface, and I have been trying to find

DevX

System commands

Question: Is there a way for me to issue system commands (for example, DOS commands: dir, md temp, etc.) from within a C++ program? Answer: You can use the C

DevX

How do I get a null-terminate string in PB?

Question: When I use Windows API functions in PB, the null-terminate string is often needed. For example, when I use GetSaveFileName,the parameter lpstrFilter is really a trouble to me. Please

DevX

Image Change Script

Question: I am trying to get an image change script to be downward compatible, but Internet Explorer 3.0 does not recognize MouseOvers. Is there another way to do an image

DevX

Accessing individual pixels

Question: I’m developing a VB program that requires manipulation of pictures. I can read them in and display them without any problem, but I have no way (that I can

DevX

Client Licensing

Question: What is the most cost-effective engine and method for licensing clients in client/server applications? Answer: For PowerBuilder applications, the runtime license for clients is free. You can have a

DevX

Virtual functions

Question: If I have an abstract base class with a pure virtual function called get_data(), how do I declare the function in inherited classes to have different return types than

DevX

Powerbuilder import utilities

Question: I would like to know if there are any PB import utilities that can import Excel files into a datawindow, datastore, or database table. Answer: PowerBuilder 6 can import

DevX

Year 2000 compliant

Question: Which versions of PowerBuilder are year 2000 compliant? Answer: PB5.0.4 is year 2000 compliant. All versions before that release had a few minor problems that would not affect most

DevX

Blob comparsion

Question: How can you tell if blob1 = blob2? Answer: You can just use: IF blob1 = blob2 THEN I have used this in the past to compare bitmaps to

DevX

Different develop/deploy operating systems

Question: What are the issues involved, if any, if your development environment uses Windows NT and you want to deploy the application to a Windows 95 environment? Answer: There are

DevX

Datawindow column sorting

Question: I am looking for a way to display an arrowin the the “sorted column” heading to indicatethe direction and column sorted. This functionality can be seen in MS-Exchange. Answer:

DevX

ToolBar

Question: Can I change the font size of the ToolBar text for the application (not the development painters)? Answer: No. The font size is taken from the user’s operating system