草庐IT

get_user_media

全部标签

Windows shell : How can I get the audio device(s) name(s)?

Iamnotsureifthisisstrictlyaprogrammingquestion,aslongasIdon'tmindtouseadditionalsoftwareinordertosolvetheproblem,aslongasitkeepsbeingscriptableorcommand-line(thisis:anotGUIsolution).Anyway,Ihavepostedanother(abitdifferent)questionatSuperUser.Bytheway,IwillupdatehereifIgettheanswerthere.我的Windows

c# - Windows 上的 OpenVPN --auth-user-pass FILE 选项

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。这个问题似乎不是关于aspecificprogrammingproblem,asoftwarealgorithm,orsoftwaretoolsprimarilyusedbyprogrammers的.如果您认为这个问题是关于anotherStackExchangesite的主题,您可以发表评论,说明问题可能在哪里得到解答。关闭5年前。Improvethisquestion如果您尝试通过--auth-user-pass开关将用户名/密码从文件传递到OpenVPN,您会收到以下错误:"Sorry,'Aut

c++ - windows C++ opening printer with documentproperties get C6836 "Write Overrun"代码分析警告

在下面的代码中://IfGetPrinterdidn'tfillintheDEVMODE,trytogetitbycalling//DocumentProperties...if(pi2->pDevMode==NULL){dwNeeded=DocumentProperties(NULL,hPrinter,printerName,NULL,NULL,0);if(dwNeededpDevMode=pDevMode;}在线lFlag=DocumentProperties(NULL,hPrinter,printerName,pDevMode,NULL,DM_OUT_BUFFER);当我运行Vi

ruby - Ruby gets 方法将我的输入截断为 256 个字符

我试图在Ruby中输入一个长字符串(>256个字符,但通常puts"Enterlongstring"ilogo=gets.chompputs"#{ilogo}"出于某些愚蠢的原因,它总是截断输入以仅保留256个字符(在chomp之前)。我验证了Ruby接受更长的字符串,并且Windows7命令行控制台也接受大于256个字符的字符串。我找不到任何关于具有这种限制的gets方法的提及,但我肯定遗漏了一些东西。我一无所知。这可能只是一个获取限制吗?编辑:更具体地说:我正在使用的测试字符串之一是:1111111111111111111111111111111111111111111111111

java - java获取windows网卡 "Media State"?

如何在Windows中获取网络适配器的媒体状态?我搜索了一下,它看起来不像java.net.NetworkInterface类提供这种能力,这是有道理的,因为它似乎是一个甚至不适用于所有适配器的Windows概念。当我运行ipconfig时,我得到如下内容:WindowsIPConfigurationWirelessLANadapterWirelessNetworkConnection5:Connection-specificDNSSuffix.:BlahBlah.BlahIPv4Address...........:192.168.113.44SubnetMask..........

windows - Node : Getting MyDocuments Path on Windows

如何使用NodeJS检索MyDocuments路径。所以我想用下面的C#代码在NodeJs中得到一些东西:Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)谢谢和问候斯特凡 最佳答案 找到答案:varQ=require('Q');vargetUserDoc=function(callback){varWinreg=require('winreg');vardeferred=Q.defer();varregKey=newWinreg({hive:Winreg

windows - 通过 Get-WmiObject : Exception calling SetDefaultPrinter : Not Supported 设置默认打印机时出错

概览我正在尝试使用PowerShell在Windows2012R2中设置默认打印机。每当我在本地执行此操作时,它都可以正常工作,但是无论我如何尝试远程运行它(我需要这样做),它总是会失败并出现以下错误。我已经尝试使用域管理员帐户以及我需要为其更改默认打印机的用户凭据,但它仍然失败。错误Exceptioncalling"SetDefaultPrinter":"Notsupported"Atline:1char:1+(Get-WmiObject-ClassWin32_Printer-Filter"(Name='MicrosoftXPSDocumentWrite...+~~~~~~~~~~~

python 3.7 : How to get the Windows user Login Time?

我正在尝试使用Python3.7获取系统用户的登录时间。我已经尝试过win32net和Python的平台模块,但是平台模块中没有定义函数,Win32net与Python3等不兼容。我尝试了以下代码:importplatformplatform.uname()importplatformos_name=platform.uname()[0].lower()ifos_name=="windows":get_win_login_time()elifos_name.endswith("nix"):get_nix_login_time() 最佳答案

wpf - 在 WPF 中嵌入 Windows Media Player

我从以下网址下载了源代码:http://diptimayapatra.wordpress.com/2010/04/05/using-windows-media-player-com-in-wpf/我想自定义播放,向窗体添加播放、暂停和停止按钮。但是我无法访问方法:axWmp.Ctlcontrols.play();'WMPLib.IWMPControls'doesnotcontainadefinitionfor'play'andnoextensionmethod'play'acceptingafirstargumentoftype'WMPLib.IWMPControls'couldbef

node.js - Windows Node : always get either "Error: ENOENT: no such file or directory, open" or "Error: EACCES: permission denied, open"

这是我的代码:varfs=require('fs');varutil=require('util');varlogFile=fs.createWriteStream('C:/text.txt',{flags:'a'});//Or'w'totruncatethefileeverytimetheprocessstarts.varlogStdout=process.stdout;console.log=function(){logFile.write(util.format.apply(null,arguments)+'\n');logStdout.write(util.format.app