Wiki Home

_ Exam 70-155 Study Group Log _1999/11/14

Namespace: VFP

[Irrelevant material has been trimmed.]

Session Start: Sun Nov 14 11:54:21 1999

[12:05] {Evan Delay} Please see Exam70-155ReviewTopics

[12:08] {NancyF} I noticed there is a note on EstablishTheDevelopmentEnvironmentToRun that you all might want to look at. Considering that there's a good deal to configuring the development version of VFP that doesn't involve added tools, it might make sense!

[12:11] {CarlKarsten} Has anyone figured out what "Remote COM Components" are?

[12:11] {MikeHelland} DCOM IOW: Distributed COM. Remote COM - OOP servers or pooled servers marshalled across a network boundary.

[12:13] {Roi} Carl: I looked a little this morning. Those are the COM servers that you configure on the server NOT the client. When you install them at the server a .vbr file is created. This needs to be run on the client so it can find the Remote COM server (DCOM).

[12:13] {NancyF} There are 3 basic types of COM servers: In-proc - runs in your process, local Out of Process, runs as a separate process on the same host system. Remote - anything that runs elsewhere.

[12:14] {ErikMoore} I have a question: Does this check box do the client registration for you? I think it creates the registry entries via the VBR without performing a local install of the component, but can't swear to it.

[12:16] {Roi} See VFP help. Chapter 16 'Adding Ole'. At the bottom of the topic see 'Using Remote Automation'

[12:17] {ErikMoore} Regarding the ActiveX topics on the exam, will we need to know PEMs of the listed controls? Or just know when to use which controls?

[12:18] {NancyF} Good question, Erik. I'd guess the latter.

[12:21] {Evan Delay} This COM and MTS stuff is almost impossible to study if you don't have NT Server to play around with.

[12:21] {ErikMoore} You can install MTS on a NT WS machine, no?

[12:21] {MikeHelland} And ASP. ASP will run under PWS, but forget about IIS without NT.

[12:21] {NancyF} For reviewing, I suggest everybody just read Rick Strahl's new whitepaper on it.

[12:21] {ErikMoore} I pity you guys developing on Win9x boxes

[12:21] {NancyF} Topic: Deploying an Application

[12:21] {RickBorup} IIS will install as PWS on NT WS

[12:21] {CarlKarsten} The setup.exe form OP3 won/t run on NT WS.

[12:21] {Evan Delay} Everyone be sure to read Rick Strahl's paper on MTS at

[12:22] {ErikMoore} I agree with Nancy, everyone should read it to get a better grip on MTS.

[12:22] {NancyF} I can't believe the documents Rick makes available to us. He should never ever have to buy his own beer at conferences. ;-)

[12:23] {ErikMoore} Right- Windows API, I think all they will ask is how to declare a function, possibly from a template... Check Files Section on UT and the FAQ gives a good bunch of refs. MVP's like EdRauh, GeorgeTasker and ChristofWollenhaupt have put up WORKING SOURCE CODE that you can see...

[12:24] {NancyF} There are differences between declarations with and without the @ specifier, and when you need to do explicit pass by ref in the call, too.

[12:26] {NancyF} We entirely skipped: Implement online user assistance in a distributed application

[12:26] {BillArmbrecht} Evan, I agree Rick's papers are GREAT

[12:27] {ErikMoore} Rick has an uncanny ability to know what people ned to read about.

[12:27] {Roi} Ok. Just read the help on the Remote Automation server gig. You have a COM server that runs on a remote computer.

[12:27] {Roi} You install and register it on the server. It will create a .vbr and .tlb file. The .vbr has the reg entries. The client needs to find the remote com server. Now, you can include them in your client app setup to be registered automatically (the .vbr and .tlb). I guess this only works in a tightly controlled enviroment where you can build the client .exe/.app AFTER you install the Server

[12:27] {Roi} Does that sound about right?

[12:28] {RickBorup} Hmmm. Nancy - how could online help differ in a distributed app vs a desktop app; don't they both use the same HTML Help systems?

[12:29] {Roi} You can only include it in a client side app, right?

[12:29] {NancyF} Hmmm...could it be that a .CHM is just a CHM, and it doesn't matter?

[12:29] {RickBorup} I assume it would have to be installed as part of the client package.

[12:29] {JohnChambers} Could it be where they reside. Most of the html help is on my system. other html help takes me to a web site for various pages, or a combination of the 2

[12:30] {NancyF} The only thing I can think of as an impact with a distributed system is that you might want to customize your help to the COM level.

[12:30] {CarlKarsten} Isn't there something about embedding a help topic id in a com component

[12:31] {NancyF} Well, it could be installed on one place - like on a server - but each system would have to point to the CHM, and the HTMLHelp call would be resolved locally across a network. Since a COM/COM+/DCOM can't have it's own UI, doesn't seem to be an available option other than where does the file live...

[12:33] {NancyF} I've been assuming help has to be local without even analyzing why.

[12:33] {NancyF} Could the CHM be on a server-based UNC? (as long as you could find out where to point at it?) The HTML Help components need to be on each system, but maybe not the help file itself.

[12:33] {JohnChambers} In addition to the .chm file you create for your HTML Help system, you can use a free-distributable setup program, Hhupd.exe, that will install and register the HTML Help runtime components listed below. Internet Explorer or the Internet Explorer runtime engine must be installed on your users’ machines.

[12:34] {ErikMoore} Does no IE mean no HTML help?

[12:34] {NancyF} JPC, thanks. Was that from the online help or MSDN?

[12:34] {RickBorup} Erik, right. At least the IE runtime engine must be installed. NO IE engine means no HTML Help.

[12:34] {JohnChambers} ErikMoore It just says the runtime engine which is installed regardless of which browser you use similar to VFP runtime for web apps

[12:36] {ErikMoore} Quiz- how to get your configuration program to run when VFP starts?

[12:37] {ErikMoore} In the Congig.fpw you need COMMAND=DO MyConfig.prg.

[12:37] {JohnChambers} NancyF MSDN help that you load with VS or VFP

[12:37] {RickBorup} From HTMLHelp - "Internet Explorer 3.02 or later is required see:"

[12:38] {NancyF} Does it have to be the last line? And can you specify it without a CONFIG.FPW? How about from Tools/Options/FileLocations/StartUpProgram?

[12:39] {CarlKarsten} What is a resource file?

[12:39] {RickBorup} Carl, what you SET RESOURCE TO. Default is foxuser

[12:40] {ErikMoore} And the _STARTUP system var.

[12:40] {NancyF} FOXUSER.DBF - a mechanism that can carry session settings and non-registry configuration data

[12:40] {NancyF} Quiz, can you have more than one user accessing the same resource file?

[12:40] {CarlKarsten} Yes, but I think you have to make it RO

[12:40] {NancyF} I'm starting a VFPCommandLineParameters topic (don't know where to hook into it yet)

[12:42] {ErikMoore} Quiz- Know how to make certain elements of a resource file readonly (Like system toolbar settings)?

[12:42] {NancyF} Now, what's the consequence of a read-only CONFIG.FPW?

[12:42] {ErikMoore} No settings are saved.

[12:43] {RickBorup} In a multi-user app, you have three options: 1) SET RESOURCE OFF, 2) mark FOXUSER as read-only, or 3) place FOXUSER on a local hard drive

[12:43] {NancyF} How about the ReadOnly field in each Foxuser record?

[12:43] {NancyF} Consequence? I'd always include the config.fpw in the EXE...

[12:43] {ErikMoore} Yup. Trick is, finding the relative record

[12:44] {NancyF} EM - correct. This means FoxUser will not save dynamic things like the position and size of the command window.

[12:46] {ErikMoore} I believe each machine needs to have configurable setttings (tmpfiles, etc.) so including config.fpw is a nono.

[12:46] {ErikMoore} There are no consequences that I know of, just loss of flexibility.

[12:46] {NancyF} Can you specify where the TMPFILES for each system are to be placed if CONFIG.FPW is in the executable? If so, how (2 ways)

[12:47] {ErikMoore} What difference does it make if the config is compiled or not? The wrking folders are still read, no?

[12:47] {RickBorup} To control access to FOXUSER. Options 1 and 2 result in no dynamic settings being saved. Option 3 is for each user to have their own resource file.

[12:48] {NancyF} So, if it's compiled in, where will the temp files be?

[12:49] {Evan Delay} What are the differences between the settings that are stored in the CONFIG.FPW and the FOXUSER.DBF?

[12:49] {NancyF} windows/temp

[12:49] {ErikMoore} Right. But it still works, if all machines are the same. I agree with you though- you need the flexibility. But in most cases, I can count on my target machines being fairly heterogeneous, and it is convenient to inclide the config.fpw.

[12:49] {BillArmbrecht} Environment variable TEMP

[12:50] {RickBorup} TMPFILES = whatever

[12:50] {Evan Delay} But what we're is saying is that the developer could write settings to the config.fpw for a given user/machine

[12:51] {RickBorup} or each one individually (SORTWORK, EDITWORK, etc.)

[12:51] {NancyF} Windows\temp - not a default.

[12:51] {NancyF} Rick TMPFILES in 6 can specify a directory - what if the directory doesn't exist?

[12:52] {NancyF} The TMPFILES (and SORTWORK, PROGWORK, etc.) path

[12:52] {RickBorup} Why not always use WINDOWS\TEMP?

[12:52] {ErikMoore} Then the developer wasn't doing his job.

[12:52] {NancyF} NT system doesn't have one. What then?

[12:52] {NancyF} I was thinking whatever the default temp directory is..

[12:52] {Roi} sys(2023) returns the current temp file location for vfp.

[12:52] {CarlKarsten} MKDIR (SYS(2023))

[12:52] {NancyF} Hmmm...What if one exists, but I don't have write privileges, or the disk is very cramped... Then will it go in the starting directory.

[12:54] {NancyF} Does anybody know WHERE temp files go if there's no setting (I *think* that's what we're getting at)

[12:54] {FrankCamp} I will look for the temp var, if that dir doesn't exist, in the startup-dir

[12:55] {CarlKarsten} and that is what sys(2023) will return, not what was set in config.fpw

[12:55] {ErikMoore} Quiz- does anybody know what property to use to bind an ActiveX control to a VFP table?

[12:56] {CarlKarsten} Tip: edit config.fpw - modi comm (sys(2019))

[12:57] {Roi} Erik: You mean like '.controlsource' (that doesn't work for the datetime picker.

[12:57] {ErikMoore} Trick question- no activeX controls can bind to VFP data,

[12:57] {ErikMoore} Nope, No general field, no nothing. VFP doesn't expose data through the COM interface, so ActiveX controls can't see the data.

[12:58] {NancyF} Erik- but an ADO recordset can be bound to an ActiveX control?

[12:58] {ErikMoore} Yes. An ADO recordset is itself a COM object, and Activex controls can see PEMS of other COM objects.

[12:59] * NancyF thinks at least one thing has sunk in.

[12:59] {Evan Delay} The point is. Learn ADO.

[13:00] {CarlKarsten} Can an activeX control can be bound to any property?

[13:00] {Roi} Ok. I used controlsource to bind the datetime picker to a vfp field. It show the data in the field, it just doesn't write the new value back into the table.

[13:01] {ErikMoore} Roi- the ACtiveX datetime picker?

[13:03] {CarlKarsten} How do you add active x controls to the activex toolbar?

[13:04] {CarlKarsten} found it: Tools, Options, Controls, ActiveX

[13:05] {NancyF} An olebound control is an ActiveX control. And that can be bound to a general fld.

[13:07] {Roi} Nancy: the activeX may have a .controlsource property that you can bind to a field. I can't write anything back though. AFIAK.

[13:08] {ErikMoore} NF you are right. That seems to break my assertion. The text I was reading clearly explained why ActiveX controls coudn't see the contents of VFP fields. I guess this should be revised to say can't write to them...

[13:08] {CarlKarsten} Roi, where did you find the datetime picker?

[13:08] {Roi} Carl: Came with VFP I think.

[13:09] {FrankCamp} Carl, it is installed with vfp5 and vfp6 (newer version)

[13:09] {ErikMoore} DT Picker is on my sytem. I think it installed with VS

[13:09] {CarlKarsten} What is it called? I am looking at all the controls, and Calendar Control 8.0 is the closest

[13:09] {NancyF} Folks, I think we're concerned with the VFP6 issues for this

[13:10] {ErikMoore} Microsoft Date And Time Picker control 6.0

[13:10] {NancyF} There's a downloadable patch that makes both versions available and usable from

[13:11] {Roi} It allows activeX to write back to a field?

[13:11] {RickBorup} Carl, look under "M" for Microsoft Date Time...

[13:13] {FrankCamp} Roi, this one is for converting forms from the vfp5 controls to vfp6 controls (activeX that is)

[13:13] {NancyF} Very important: go and read the comment at the bottom of EstablishTheDevelopmentEnvironmentToRun

[13:14] {NancyF} Well, registry get settings for ActiveX controls...

[13:15] {NancyF} Wouldn't questions on how to set up VFP for the Developer (what things get set in Registry values)

[13:15] {Roi} Almost everything in the Tools-Options dialog gets set in the registry right? Couldn't you export those to a .reg file to distribute to other developers to setup all systems to run the same.

[13:17] {CarlKarsten} Would it make any sense to install one set of controls on a server, and then use them in a dcom sort of way?

[13:17] {ErikMoore} another helpful hint: Hold shhift while clicking "ok" in the options dialog, and many settings wll be copied tothe command window

[13:18] {NancyF} I haven't used reg files. Do the other developers then import the .reg file settings? What key are they under?

[13:18] {ErikMoore} .reg files can be double clicked to incorporate them into your registry.

[13:19] {ErikMoore} HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\6.0\Options

[13:20] {BillArmbrecht} That gives common VFP settings, but what about the ActiveX controls?

[13:21] {BillArmbrecht} Under VB, I lost all my "licenses" recently

[13:21] {BillArmbrecht} I had to download a program from MS to restore them in the registry

[13:21] {ErikMoore} Those are under HKEY_CLASSES_ROOT

[13:21] {BillArmbrecht} Couldn't find them anywhere on a machine that "worked"

[13:21] {ErikMoore} they actually are attached under HKEY_CURRENT_USER

[13:22] {NancyF} Like ActiveMovie Control Object

[13:22] {FrankCamp} Or use regsvr32.exe to register them again on the system. (don't forget the lic file also)

[13:22] {BillArmbrecht} EM, So I'd have to know those IDs instead of the English names?

[13:22] {BillArmbrecht} Frank, I reregistered but there was no lic files?

[13:23] {ErikMoore} HTe ProgID is the name you use to instanciate it. Look that up to get the GUID, and then look up the GUID under CLSID.

[13:23] {BillArmbrecht} These were the MS controls i.e. MsFlexGrid

[13:24] {FrankCamp} Bill, the lic file is the developer-license. In vb you need to supply it programmaticly (as fas as I read in the VB exam cram)

[13:25] {CarlKarsten} I bound the datetime picker and a textbox to a prop of my form. seams that the picker can only read the value; I can use the textbox and a thisform.refresh() to update the picker.

[13:25] {NancyF} Erik- I have Word.Application under HKEY_CLASSES_ROOT, with an entry for CLSID. Not GUID.

[13:26] {ErikMoore} The GUID is the long hex number.

[13:26] {BillArmbrecht} Frank, the ? after lic files was a typo. I couldn't figure out how to do it programmatically. Luckily MS had a donwload to fix it.

[13:26] {NancyF} A CLSID is a special case of a GUID.

[13:27] {ErikMoore} You should have an entry for HKEY_CLASSES_ROOT\Word.Application that lists the GUID under the CLSID folder.

[13:27] {BillArmbrecht} But, back to my question. If you're going to create a .REG file for the developers...

[13:27] {Roi} Nancy: The CLSID is a GUID. GUID = Blobaly Unique InDentification correct?

[13:27] {ErikMoore} Roi- yup

[13:27] {BillArmbrecht} Where do you find all the REG entries for the developers licenses, etc.

[13:27] {Roi} Erik: Thanks.

[13:28] {BillArmbrecht} It looks like from Erik's response you have to traverse the ProgId, GUId and CLsId, Right?

[13:28] {NancyF} A ProdID is the 'English" name. A VersionIndependentProgID is a ProID not tied to a specific version - last one to write it in the registry gets the ref.

[13:28] {ErikMoore} Bill- that's not such an easy question, because the license information is under each control's entry.

[13:29] {ErikMoore} A ProgID either points to a CLSID, or points to another ProgID that points to the CLSID. The CLSID indicates the actual provider, type, etc.

[13:29] {ErikMoore} That references a class definition.

[13:31] {ErikMoore} I suggest reading the doc files that Christof wrote and packaged with his Structure class. It talks alot about how to translate VFP types into windows types

[13:31] {ErikMoore} It's not really a one or two line subject.

[13:32] {Roi} I would like to review multi-threaded vs SingleInstance if possible.

[13:32] {ErikMoore} CLSHEAP is also an excellent source.

[13:32] {NancyF} Key things to know - how do I set up to use a DLL entrypoint. What are the differences between things passed by ref or by val. How do I get something back from a DLL call other than the return value.

[13:33] {NancyF} How do you set up to use a DLL entrypoint? Exactly what IS a DLL entrypoint?

[13:33] {ErikMoore} The DECLARE statement does that.

[13:34] {ErikMoore} It tells VFP where to look in the dll and how to prototype the call

[13:34] {NancyF} No - in many cases, an API will pass a buffer as one of its arguments; it fills it and you may need to get that. If you need to get the content back, then when you invoke the DLL call, you need to prefix the varname with @ so that the updated value comes back - pass by value doesn't update the value.

[13:36] {NancyF} An entrypoint is a callable function in the DLL. The DLL has a list of things it knows how to do (entrypoints, sort of like methods.) DECLARE...DLL describes how to find and pass things to a DLL function, or entrypoint

[13:36] {RickBorup} I don't think so, Nancy. I was reading about callbacks this morning in the VB book, not sure I understand them yet.

[13:36] {ErikMoore} Maybe somoeone else can tell you in better terms what an entry point is- but here's my understanding: a library exposes a set of functions with names. The VFP DECLARE command tells VFP what the name of the exposed function is, and allows you to give it an "alias" if necessary...

[13:36] {ErikMoore} The exposed name is the entry point.

[13:37] {NancyF} A callback is a code reentrypoint passed to the function so that the function can invoke routines in the caller as a part of its operation. VFP doiesn't easily support callbacks.

[13:37] {NancyF} An entrypoint in the DLL - a place in the DLL where control is passed to do something.

[13:38] {ErikMoore} But VFPCOM's BindEvents gets us a little callback functionality if we are accessing the code through its COM interface, right?

[13:38] {NancyF} Wouldn't any method in any component be an entrypoint?

[13:38] {Roi} I thought I read that VFP doesn't support callbacks at all.

[13:38] {BillArmbrecht} So would a callback be where I pass an object reference to a method and that method calls a method in the passed object?

[13:39] {Evan Delay} Question: Why do they refer to this as WindowsAPI... it almost feels like COM.

[13:39] {ErikMoore} Bill- I don't think that "object" is a supported windows data type.

[13:39] {NancyF} Question#2: does callback have any impact on us as exam-takers?

[13:39] {RickBorup} My guess in no, not in the VFP exam.

[13:40] {ErikMoore} COM is an interface for using objects created in any platform. Windows API is just a set of functions..

[13:40] {BillArmbrecht} So is callback only relevant to using the Windows API or another non-VFP exe/dll?

[13:40] {NancyF} It's like the API is "old-style" procedural code.

[13:40] {Evan Delay} Both are exposed via a DLL. Is there were the similarity ends?

[13:40] {NancyF} And COM objects are new style...

[13:40] {NancyF} Entrypoints are a list of exported routines found in the DLL header that other things can examine to find where to call, what to pass, and what to expect to get back. DECLARE...DLL links VFP to an entrypoint

[13:40] {NancyF} Offtopic, but does the API go away with W2K?

[13:41] {ErikMoore} NF NOOOO.

[13:41] {Roi} Nancy: Old-school ;)

[13:41] {CarlKarsten} I think if you didn't use the DECLARE command then VFP wouldn't know where to find a function that was part of a dll. You wouldn't want it to go searching through all of the dll's on you system

[13:41] {NancyF} Oh, absolutely. It would be looking in your exe and path.

[13:41] {NancyF} ...for set procedure.

[13:42] {ErikMoore} The API is still the only way to get at many windows functoins. But MS is giving us objects that wrap a lot of it: WSH, Shell.Application, etc

[13:42] {NancyF} A callback is the address of a block of code in the caller that is passed to a DLL, exposing some functionality that the DLL entrypoint can pass control to during its execution. VFP doesn't do them easily; typically, you need to write a wrapper DLL/FLL, or rely on messaging in the event loop

[13:42] {ErikMoore} It has a pretty interesting set of functionality.

[13:42] {NancyF} Callbacks sound like a potentially dangerous thing.

[13:43] {NancyF} EM- It's a royal PIA to get at some of the constants, though.

[13:43] {ErikMoore} Yup.

[13:43] {CarlKarsten} On passing parameters to dll functions: VFP does not have "Structure type variable support. -- Ones that can be passed to DLL functions", so you typically need to construct a string that has all of your parameters imbedded in it.

[13:43] * NancyF throws lo-fat cottage cheese at NancyF

[13:44] {ErikMoore} CK- Christof's strucure class makes this SO EASY!!!

[13:44] {CarlKarsten} EM, Where can I find it?

[13:44] {NancyF} Okay, let's review (our review)...

[13:44] {ErikMoore} You create an object that has a property for each member of the structure, and his class builds the structure string for you.

[13:44] {NancyF} The big difference between COM and invoking a DLL are (1) The OLE interface provides data conversion and data exchange services, (2) the location of the COM object need not be directly accessible to the caller, and (3) In addition to functions (methods), a COM server can expose some or all of its dataspace through the OLE interface -

[13:44] {ErikMoore} UT Files section.

[13:44] {NancyF} DLLs rely on the parameters to move data

[13:45] {NancyF} To review MTS, read Rick Strahl's new white paper. For the api review Lange, Rauh, and Tasker's uploads on the UT.

*** Session close [13:45] ***

Contributors: CindyWinegarden, NancyFolsom

See also: Exam70-155StudyGroupSummaries

( Topic last updated: 1999.11.14 07:04:48 PM )