完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
尝试我可能无法获得我希望在VEE中工作的.NET代码。
我试图在一个vee程序中获得一个网络计算机列表,我尝试了两种方法,1)导入Netapi32.dll并使用NetserverEnum方法和2).NET System.DirectoryServices.DirectoryEntry方法。 问题是虽然我对Vee合情合理,但我不是C#/ .NET / C ++等程序员。 我已经尝试了很多方法让这个工作,并试图研究答案,但我找不到我做错了什么。 所以,我只是直接问,可以为我提供指针,提示/提示或更好的样本Vee程序,将实现与以下代码相同。 Sub Main()Dim root As New DirectoryEntry(“WinNT:”)Dim parent As DirectoryServices.DirectoryEntries parent = root.Children Dim d As DirectoryEntries = parent for Each complist As DirectoryEntry In parent For Each c As DirectoryEntry in complist.Children If( c.Name“Schema”)然后Console.WriteLine(c.Name)结束如果下一个下一个结束SubMany提前感谢,Harvey 以上来自于谷歌翻译 以下为原文 Try as I might I am not able to get the .NET code I want working in VEE. I am trying to get a list of network computers in a vee program, I have tried 2 methods, 1) importing Netapi32.dll and using NetserverEnum method and 2) the .NET System.DirectoryServices.DirectoryEntry method. The problem is that whilst I'm reasonably OK with Vee, I'm not a C# / .NET / C++ etc programmer. I have tried many ways to get this working and have tried to research the answer but I cannot find what I am doing wrong. So, I am just going to ask straight out, can any provide me with pointers, hints / tips or better still a sample Vee program that will achieve the same as the following code. Sub Main() Dim root As New DirectoryEntry("WinNT:") Dim parent As DirectoryServices.DirectoryEntries parent = root.Children Dim d As DirectoryEntries = parent For Each complist As DirectoryEntry In parent For Each c As DirectoryEntry In complist.Children If (c.Name "Schema") Then Console.WriteLine(c.Name) End If Next Next End Sub Many thanks in advance, Harvey |
|
相关推荐
2个回答
|
|
希望这会有所帮助。
使用VEE 9.22.directory.veeThanks,-mk创建 以上来自于谷歌翻译 以下为原文 Hopefully this helps. Created using VEE 9.22. directory.vee Thanks, -mk 附件
|
|
|
|
chamemeikuan,我不能为此感谢你,我可以确切地看到我出错的地方,希望这为我开启了一个全新的VEE编程领域......最后一分钱一滴。非常感谢你,谢谢你的支出
你有时间帮助我,我真的很感激。请注意哈维 以上来自于谷歌翻译 以下为原文 changmeikuan, I cannot thank you enough for this, I can see exactly where I was going wrong and hopefully this has opened a whole new area of VEE programming for me... finally the penny drops. Thank you very much, I appreciate you spending some of your time to help me out, I'm truly grateful. Regards Harvey |
|
|
|
只有小组成员才能发言,加入小组>>
1223 浏览 0 评论
2347 浏览 1 评论
2157 浏览 1 评论
2022 浏览 5 评论
2902 浏览 3 评论
965浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
701浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
801浏览 0评论
1224浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 10:02 , Processed in 1.327866 second(s), Total 48, Slave 42 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号