Teach Yourself ActiveX in 21 Days
A
Answers to Quiz Questions
Day 1
- An Internet service provider that charges a fee based on a metered rate.
- HyperTerminal and dial-up networking
- To integrate pre-existing technologies, and to enhance Windows features used over the Internet.
- From computer-oriented to document-oriented program design.
- It's class.
- Properties, methods and events.
- Because it is based on a standard, and is viewable by users on a variety of machines.
- MIME (RFC 1521 & 1522).
Day 2
- You use the BACKGROUND attribute of the <BODY> tag.
- The BORDER attribute.
- Use the regedit.exe program under the CLSID directory.
Day 3
- It relieves a server of the burden of having to process multiple simultaneous requests to run an application.
- JScript and VBScript
- To prevent malicious or undesirable effects from network scripts.
- A computer connected to the Internet, and a program that coordinates the interaction between a script and a script engine.
- A script, host, and engine.
- All the objects in the VBScript script engine and the Microsoft Internet Explorer Object Model for Scripting.
- The Language attribute.
- Enclose the script within comment tags.
- Within the head element.
- You must acknowledge Microsoft in the About box.
Day 4
- No, it has no facility to interpret these tags and will ignore them.
- The procedure for both is the same. Select or highlight the elements you want to align and press the appropriate alignment button on the tool bar. The three settings are left, right, and center.
- Not automatically. You can use the text editor part of the ActiveX Control Pad and enter them manually, but there is no automated support.
Day 5
- If you run window.mane in the browser, you get an error telling you that the object window doesn't support a member called mane. If you use just mane, VBScript makes a new variable and your value is blank.
- windows.document.write and windows.document.writeln.
- <SETFRAME> is the tag and TARGET is the attribute.
Day 6
- The string-intensive application, because string functions outnumber math functions two-to-one in VBScript.
- Answer MY.NAME is illegal because it has a period in it; 4Things is illegal because it starts with a number.
- Use the Raise method of the Err object. This will allow you to raise an error with a specific number and not risk crashing your machine.
Day 7
- JavaScript is well suited for both. The string and math functions are evenly balanced.
- MY.NAME is illegal because it has a period in it. The interpreter will think it is a property or method of an object. 4Things is illegal because it starts with a number.
- The for...in loop is specifically designed to loop through the values of your object.
Day 8
- The idx and htx files go into the scripts subdirectory. The htm files go into the root directory.
- You can put startup and initialization code in the onload event of the layout control.
- You name a form section using the following syntax:
<FORM ACTION="/scripts/salord.idc" METHOD="POST" NAME="ORDERFORM">
- Where NAME = "MYNAMEHERE" names the section. You manipulate it through the Document object of the window. The Document object maintains an list of all the <FORM> sections on the web page. To submit the form you would type,
document.MYNAMEHERE.submit. (Remember the case is not important.)
Day 9
- The CheckValues() function would be the perfect place to check the validity of the user inputs. This function already looks at all the controls.
- window.parent.frames[0].document.forms[0].submit()
- Only the middle one will work. The first one uses () instead of []. The last doesnt use submit(), and will not work
Day 10
- The specific purposes of the server must be defined.
- The console and CPU are common to both a server and a client.
- Multimedia components (CD-ROM, sound card, graphics) are generally associated with, but not necessarily required for, ActiveX systems.
- A dynamic IP address is assigned every time the user logs on, but remains the same throughout a given session.
- An easy-to-remember domain name can be assigned to the address.
- You
You.Our.Net
You.204.001.001.002
- Send: SMTP
- Retrieve: POP3
- It requires a great deal of attention.
- A database server processes queries over a network to a database and returns their results. Additionally, a number of higher-end database-management processes are available, depending on the server software.
- Individual dial-up customers
Commercial and leased-line customers
Day 11
- CGICommon Gateway Interface
ISAPIInternet Server Application Programmer's Interface
- Both are used as an interface between a remote user and an external program on the server.
- .IDC (Internet database connector)
- .HTX (hypertext extension)
- No, but by using the OLEISAPI.DLL, you can reference OLE DLLs compiled with Visual Basic.
- ReadClient and WriteClient
- Web pages, alone, are very safe. CGIs and ISAPIs, however, can be written to work all kinds of damage on a server, and the result of that damage can cascade down to every user serviced by the IPP (Internet Presence Provider).
- The equal sign (=)
- .EXE and .DLL
- Reduced system resource overhead. The ISAPI DLL will run in the same space as the HTTP server itself.
Day 12
- (BSD) Berkeley Software Development UNIX
- A WinSock application
- Domain format and IP address format
- GetHostByName()
- TCP and UDP
- LocalPort
- RemotePort
- RequestID or Connection ID
- The name of the variable into which the data is to be read, and the data type of the incoming stream.
- The Quit method
Day 13
- A normal console application will not link with MFC because Microsoft Visual C++ doesn't set the MFC library as required in the project settings.
- GetFtpConnection, GetHttpConnection, GetGopherConnection
- If you don't check and you continue with the code execution, you may have an exception and your code will terminate improperly.
- CInternetException
- The _T macro lets you compile code in the three character types (Unicode, MBCS, and SBCS) without having to handle each case specifically.
Day 14
- There can be many conferences managed by only one conference manager.
- A user is a potential member of a conference but has not joined the conference yet while a member has joined the conference.
- NetMeeting.
Day 15
-
- OLE is the basis for object-oriented programming.
- VBXs were the first custom controls. They are used to allow programming environments such as Visual Basic to interact with complex features of their machines (that is, networks, modems, and so on).
- OCXs are very similar to VBXs with the additional capability to more powerfully interact with a machine and, often, to provide a way of interacting with more powerful OLE features than those used by VBXs.
- The middle of the century.
- Programmatic and scripting.
- DCOM.
- JavaScript or JScript
- Visual Basic.
- ShDocVW.DLL.
- Component object model and distributed COM, respectively.
- Windows NT 4.0
- HTML pages and OLE Container applications.
- Sun Microsystems.
- IUnknown and self-registering.
- The addition of machine-to-machine programming methods.
- All operating systems that are run on networked machines.
- Windows 95 and Windows NT 4.0+
- (UserID, Password, Location(Optional))
- .INF files.
- A designer's license.
- JavaScript is an HTML script, and a Java applet is an HTML object.
- Visual Basic for Applications.
Day 16
- <HTML>/<HTML>, <HEAD></HEAD>, <TITLE></TITLE>, <BODY></BODY>
- <BODY></BODY>
- <OBJECT></OBJECT>
- scripts, objects
- height, width
- <IMG>
- World Wide Web Consortium (W3 Organization)
- Ctrl+T
- RegSvr32.exe
- No. A programmer might wish to reference a control that the user already has installed on the machine without making it available on the Net. If the user does not have the control, it will not be enabled on the Web page when the user views it. Control
developers who develop proprietary controls might wish to ensure that those without a license to use the control can't use it. To do this, the control developer simply declines to include a reference to the control's distribution site; the content can have
this small level of security.
Day 17
- Acquisition, Verification, Installation
- <OBJECT>
- Code
- CODETYPE
- .OCX, .DLL, .EXE
- .INF
- DestDir=11
- OLE objects, Non-OLE objects, document content.
- Base Security Layer SDK
- Trust verification service
- CreationSafe when scripted.
InitializationSafe when standing alone.
- IObjectSafety
- The original source of the control.
Integrity of the control since its release.
- Commercial certification and individual certification
- Private key and public key
- PICSPlatform for Internet Content Security
- Internet Ratings API
Day 18
- A standard hierarchy of objects against which an ActiveX Program operates.
-
- docdocDocument
- wwWindow
- scrscrScript
- frfrFrames(0)
- frmfrmForm(0)
- The Window object.
- Frames()
- Frames()
- 0 (Frames(0))
- History
- Port
- host
- hostname
Day 19
- <FORM></FORM>
- <INPUT TYPE = ... NAME = ...>
- Value
- lstAllOfUs
- CheckBox
- MaxLength property
- GET to retrieve data; SEND to post data
- The TYPE attribute.
- The ISMAP attribute.
- X1Left; X2Top; X3Bottom; X4Right
Day 20
- FTP.Connect RemoteHost
FTP.Authenticate UserID, Password
- From, To, Subject
- FTP.ChangeDir
- NNTP.SelectGroup
- NNTP.Connect RemoteHost
- No. Some news servers require a UserID and Password, but most only allow access from within their own network and therefore do not require a UserID or Password.
- POP3_RefreshMessageCount
- 2 - DocHeaders
- Control
Day 21
- [Embedding]
- System.DAT
- RegClean.EXE
- DLLRegisterServer and DLLUnRegisterServer
- Ver.DLL
- Visual Basic
Visual C++
- MFC40.DLL
MSVCRT.DLL
OLEPro32.DLL
- All of them.
- QueryInterface
AddRef
Release
- Instantiation