I was able to get a sample code from the internet about how I can get a list of users of a particular computer. Currently, I am having problem with the NetWkstaGetInfo function. I need to create a customized data type like the one written below. I wonder if we can do this in VFP? If anyone of you was able to use the said function from NetApi32, I will be very grateful to know how you were able to use the function successfully. So far, all the sample codes that I was able to get are written in VB or Pascal (I guess)

Private Type WKSTA_INFO_10
wki100_platform_id As Lon
pwki100_computername As Lon
pwki100_langroup As Lon
wki100_ver_major As Lon
wki100_ver_minor As Lon
pwki102_lanroot As Lon
wki102_logged_on_users As Lon
End Typ

They assign this "data type" to a variable like this way

nVariable = WKSTA_INFO_10

and access the values of each sub items this way

nVariable.pwki100_computername

as if the sub items are properties and the nVariable is an object..

Thanks,

Noy_P

Re: NetWkstaGetInfo of NetApi32 and Custom Data Type by Eric

Eric
Wed May 19 07:51:55 CDT 2004

Hello, noy_ph!
You wrote on Wed, 19 May 2004 05:31:04 -0700:

np> They assign this "data type" to a variable like this way:
np> nVariable = WKSTA_INFO_102

These data types are called "structures". VFP does not natively support
structures. Christof Lange has written a structure class library which is
available for download from
www.universalthread.com > VFP Zone (orange button) > Downloads (3rd button
in second row) > Put Lange in the Summary box > API-Structures in VFP.
(thanks Cindy ;))

More info on API programming:
http://www.news2news.com
http://fox.wikis.com/wc.dll?Wiki~ApiStructureClass~VFP
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: NetWkstaGetInfo of NetApi32 and Custom Data Type by anonymous

anonymous
Wed May 19 21:36:06 CDT 2004

Eric

Thanks for the info, Eric... I'll see what I can get from that class..

Noy_ph