c.haslam Posted May 23, 2017 Share Posted May 23, 2017 (edited) I am new to DLLStruct functions. Here is what is not working: #include <WinNet.au3> ;~ Local $tResource = DllStructCreate($tagNETRESOURCE) Local $hEnum ; all currently connected, all resources, all resource types Local $b = _WinNet_OpenEnum ( 0, 0, 0, 0, $hEnum) MsgBox(0,'b',$b) Local $iCount= -1 Local $ret = DllStructCreate($tagNETRESOURCE) MsgBox(0,'tn',@error) Local $siz = DllStructGetSize($ret) MsgBox(0,'siz',$siz&' '&@error) While True $b = _WinNet_EnumResource($hEnum,$iCount,$ret,$siz) MsgBox(0,'','b '&$b&' siz '&$siz&' iCount '&$iCount) MsgBox(0,'enum',DllStructGetData($ret,'LocalName')&' '&DllStructGetData($ret,'RemoteName')) If $b<>True Then Exit WEnd The Help says that _WinNetEnumResource() returns either True or False. In my case, It returns 234, Error more data. For pBuffer ($ret) the help says "The buffer must be large enough to hold the structures plus the strings to which their members point.". How do I do this? As I first atempt, I am trying grabbing one resource at a time. Edited May 23, 2017 by c.haslam Spoiler CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard Link to comment Share on other sites More sharing options...
c.haslam Posted May 23, 2017 Author Share Posted May 23, 2017 (edited) I have found some code that works here. Thank you, KaFu! Edited May 23, 2017 by c.haslam Spoiler CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now