Re: how to use vb6 dll?



You should be able to use WMI directly in VFP:

*!* Let's get the CPU ID
LOCAL lcComputerName, loWMI, lowmiWin32Objects, lowmiWin32Object
lcComputerName = GETWORDNUM(SYS(0),1)
loWMI = GETOBJECT("WinMgmts://" + lcComputerName)
lowmiWin32Objects = loWMI.InstancesOf("Win32_Processor")
FOR EACH lowmiWin32Object IN lowmiWin32Objects
WITH lowmiWin32Object
? "ProcessorId: " + TRANSFORM(.ProcessorId)
ENDWITH
ENDFOR


The above code is from
http://fox.wikis.com/wc.dll?Wiki~RetrievingHardwareInformation~VFP

--
Fred
Microsoft Visual FoxPro MVP


"Mr. Server" <alxgen@xxxxxxxxxxx> wrote in message
news:EFDC2AA4-223A-4E93-8A78-3DD9AC32FA3B@xxxxxxxxxxxxxxxx
i have a simple question, how can i use my dll with functions created from
vb6 to my vfp6 application?

this is my vb function:

Public Function GetCPUID() As String
Dim oWMI, oCpu
Set oWMI = GetObject("winmgmts:")
For Each oCpu In oWMI.InstancesOf("Win32_Processor")
GetCPUID = oCpu.ProcessorID
Next
End Function


.


Loading