Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pointers in VFP?
Message
De
05/10/2006 09:39:28
 
 
À
05/10/2006 06:07:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01158687
Message ID:
01159669
Vues:
25
Thanks so much Christian!

>Hello Tracy,
>
>see inline comments.
>
>
>sizeof = REPLICATE(' ',2048)+CHR(0)
>i = 1
>nInfo = REPLICATE(' ',2048)+CHR(0)
>PSP_DEVINFO_DATA = []
>
>lnpointer = 0
>DO WHILE .T.
>	lnpointer =  SetupDiGetClassDevs(@cGuid,null,0,DIGCF_INTERFACEDEVICE)
>	IF TYPE('lnpointer') = "N" .and. lnpointer > 0
>		lldestroy = .t.
>		? '        Handle to Device Set: '
>		?? ALLTRIM(STR(lnpointer))
>		DeviceInfoSet = lnpointer
>
>		i = 0 && first interface is retrieved by passing 0
>                LOCAL lcInterfaceData
>
>                DO WHILE .T.
>                    && setup a SP_DEVICE_INTERFACE_DATA structure,
>                    && BINTOC sets dwSize member to 28, + SPACE(24) for the
>                    && rest of the structure
>                    lcInterfaceData = BINTOC(28,'RS') + SPACE(24)
>
>		IF !SetupDiEnumDeviceInterfaces(DeviceInfoSet,
>                        @nInfo , @cGuid, i, @lcInterfaceData)
>
>
>             		IF GetLastError() = ERROR_NO_MORE_ITEMS
>           	         	EXIT
>                 	ELSE
>	                	EXIT
>                        ENDIF
>
>                ELSE
>
>                   &&& extract the interface data here ... (CTOBIN, SUBSTR)
>
>                   && increment i for next interface
>                   i = i + 1
>	       ENDIF
>
>               ENDDO
>
>	ENDIF
>ENDDO
>
>....
>....
>
>
>the value returned from SetupDiGetClassDevs is a HANDLE, just like a HWND (window handle). It's not an array, its just a single 32bit value you pass on plain to other functions.
>
>Regards
>Christian
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform