7

The LA Fox Developer Newsletter
March 1996
Death of FoxPro (Con’t from page 1)
Contrary to a February 16 report in the publication “Information
Week Online,” Microsoft will continue to develop, manufacture,
and support Visual FoxPro. A Macintosh version of Visual
FoxPro 3.0, the current generation of the product, is slated to
ship this summer, and the Visual FoxPro team continues work
on the next version.
b)In March, Application Developers Training Company
(AppDev) and Microsoft Corporation will co-sponsor a new one-
day seminar for developers around the U.S. and Canada high-
lighting how to make programming easier with the powerful new
features of Visual FoxPro 3.0. If you’re a developer, power user,
manager or independent consultant using FoxPro or an Xbase
programming language, this seminar is for you. Call for informa-
tion orto register in the U.S. or Canada: 1-800-295-1883. If
you are interested in viewing additional information on AppDev,
please check out the AppDev Web page. Outside the U.S or
Canada, please contact your local subsidiary for training
opportunities.
c)The alpha release of the WWW Search Page Wizard and
the beta release of the VFP ODBC Driver 1.0 are now available.
Check out the Visual FoxPro home page.
4. Active VRML
Active VRML is a modeling language for specifying interactive
animation. An interactive animation is an event-driven animation
where those events are defined by the animation’s author.
Animation can be created from two- and three-dimensional
geometries, two- and three-dimensional points, vectors, and
transforms, as well as montages, colors, images, text, and
sound. An example of an interactive animation is a solar
system complete with planets that rotate about their axis and
orbit the sun. The interactive aspects of this animation could
include buttons which let the user move (in three dimensions)
around the solar system and sounds which increase in volume
as the user “approaches” a given planet or star. For a complete
description of the modeling language as well as sample anima-
tion, please visit the Active VRML page in the Internet develop-
ment toolbox.
5. MSDN Ships Pre-Release of Windows NT Workstation
4.0
A new premium release of the Development Platform has been
shipped to Microsoft Developer Network Level 2 members. It
contains:
- Windows NT Workstation version 4.0 P re-Release
- Win32 SDK
-Windows NT DDK
- BackOffice SDK 2.0 Pre-Release
Version 4.0 (also known as the Shell Update Release or SUR)
integrates the Windows 95 shell with Windows NT. Those of you
who want to port your applications from Windows 95 to Win-
dows NT 4.0 should check out “To SUR, With Love: Important
Stuff To Know About the Windows NT Shell Update Release” by
Nancy Cluts to find out more about dealing with a couple of
gotchas that have surfaced during early beta testing. The article
can be found online in the Developer Network News.
6. Access95 Beta Exam has been Extended to 3.7.96
The Microsoft Access for Windows95 and the Microsoft Access
(Con ‘t, page 9)
Windows API Calls
User Login ID’s - (FoxPro 2.x)
(Ed. Note: The following tips were submitted by the PAFUG
editor Bob Timney for inclusion in Tips & Tricks...)

Editor’s note: This little gem has my vote for tip of the year! I
have heard many speakers talk at seminars on the subject of
getting user information straight from the network, and there
have been some elaborate techniques to get this done. The
most widely accepted technique of setting a DOS variable by
the name of USER to the login id has been used in
autoexec.bat files and by even more, setting this variable in the
Novell login script unbeknownst to the user. BUT it was STILL
just a DOS Environment variable... Wading through massive
amounts of information on the Internet, I recently “overheard”
Paul Russell offer this fantastic piece of code:

Date: Thu, 12 Oct 1995
From: “Paul Russell” <prussell@fox.nstn.ns.ca>
* Setup the Windows function
set library to foxtools
m.lnWNetGetUser = (RegFn("WNetGetUser","@C@|","|")
* Setup some placeholders
m.gcUserName = space(40)
m.lpUserLen = 40

* Retrieve the name, assigning a value if it wasn’t found
if CaIIFn(m.lnWNetGetUser,
@gcUserName,
@IpUserLen) >= 0 and
m.lpUserLen> I and;
not empty(m.gcUserName)
m.gcUserName = left(m.gcUserName,m.IpUserLen-1)
else
m.gcUserName = “UNKNOWN”
endif
release IpUserLen
m.gcUserlD = m.gcUserName

Paul notes success testing this in Win 3.1, Win 3.11, WFW,
Windows ‘95, Novell and mentions that he hasn’t tested NT or
Banyan, but because this is a standard Windows function, we
assume it would work.

I have verified that it works on NT and will post when I have
tested it with Banyan (won’t be in time for press). And because
I was so excited, I also re-tested it on Novell!

My test was the following.

set library to foxtools
m.lnWNetGetUser = RegFn(”WNetGetUser”,”@C@l”,”l”)
m.gcUserName = SPACE(40)
m.IpUserLen = 40
=CallFn(m.lnWNetGetUser,@gcUserName,@IpUserLen)
WAIT WINDOW ALLTRIM(m.gcUserName)


Thanks Paul!
Page 7

7