device

Enable/disable hardware w/o Admin rights on Vista?

一个人想着一个人 提交于 2019-12-12 10:19:07
问题 I've been asked to provide a program/script/whatever that enables or disables the CD/DVD drive USB ports Floppy (!) drive devices without requiring admin rights, that is, that can be run by a 'normal' user. Ideally, something like a command line utility: C:> foobar cdrom /disable Any pointers, hints or clues gratefully accepted! Thanks, Rony 回答1: You could write a service that runs as a privileged account (e.g. Local System), and write a GUI front-end application which communicates with the

Linux Device Driver Error for the Keyboard Interrupt Handling

只谈情不闲聊 提交于 2019-12-12 09:56:07
问题 During the way to learn how to program the Keyboard interrupt handling in Kernel mode, and following the example below, I get such an error after loading the driver in kernel space. #include <linux/kernel.h> #include <linux/module.h> #include <linux/sched.h> #include <linux/workqueue.h> #include <linux/interrupt.h> #include <asm/io.h> MODULE_LICENSE("GPL"); irqreturn_t irq_handler(int irq, void *dev_id, struct pt_regs *regs) { static unsigned char scancode, status; status = inb(0x64);

Resolve Windows device path to drive letter

泄露秘密 提交于 2019-12-12 09:36:10
问题 How do you resolve an NT style device path, e.g. \Device\CdRom0 , to its logical drive letter, e.g. G:\ ? Edit: A Volume Name isn't the same as a Device Path so unfortunately GetVolumePathNamesForVolumeName() won't work. 回答1: Hopefully the following piece of code will give you enough to solve this - after you've initialised it, you just need to iterate through the collection to find your match. You may want to convert everything to upper/lower case before you insert into the collection to

Getting Portable Devices using java

六月ゝ 毕业季﹏ 提交于 2019-12-12 09:09:40
问题 I am trying to access some files in a device (having "windows CE" application in it) that appears as portable device in windows 7 using java applet.... My device path is like "Computer\Attari's Device\myfile.txt" Now i am trying to access file from it using the same address but it gives path error or file not found. Similarly i used "\\.\Attari's Device\myfile.txt" but it resulted in same error tell me how to access portable devices using java applet When i navigate to connected device and

iAd ADBannerView appears tinted on Device

随声附和 提交于 2019-12-12 08:54:59
问题 I'm getting a tinted adBannerView on the device, instead the normal adBannerView as it appears in the Simulator. Any ideas on this? 回答1: On the device, go to Settings > Developer and disable the option "Highlight Clipped Banners" to remove the colored layer. If enabled, the colors show you if the iAd banner view is clipped (red) or not (green). Note that this setting is system-wide, and affects not only the development builds from your app, but also production builds from all other apps

Is there a compilation of device-specific bugs for Android devices?

試著忘記壹切 提交于 2019-12-12 07:46:20
问题 We've found a crash on a particular device that happens inside some of the standard Java libraries. This crash only happens on one particular model of device. I'm sure there are other curious oddities for various Android devices. Is there a compilation of known issues for Android devices someplace? I'm thinking in particular about oddities in the supplied libraries and JVM type stuff. 回答1: I am not aware if there is a indexed compilation available on the internet. At the moment, the best

Android how to evaluate view size to keep same proportion in all devices

余生颓废 提交于 2019-12-12 06:10:15
问题 I'm searching for a way to keep view size proportioned on all devices. I experimented with many maths calculations (e.g. mixing screen size, density, percentage, etc.) but haven't found any solutions, just different results for each device tested. Let me present an example: Suppose I'm testing an app on a sw-360dp and eventually I find a size view that works. relativeLayoutParams.width = 150; relativeLayoutParams.height = 250; This has the effect of creating a view with size about 1/3 of

C - infinite read from cat in Device file

霸气de小男生 提交于 2019-12-12 04:51:57
问题 I've been having some headache with infinite reads from cat (cat doesn’t close because it doesn’t receive end of function from my read function. How can I implement an end of read so that reading the file with cat will only produce 1 output per command in the terminal? function. This is the kernel read() function I've written: static ssize_t dev_read(struct file *file, char *buf, size_t count, loff_t *ppos) { char tmp_buf[MAX_BUF_SIZE]; //defined as 100 int bLen=0; sprintf(tmp_buf, "Some

device driver fn is not being called when system call in userspace is called

雨燕双飞 提交于 2019-12-12 04:35:01
问题 i am re-writing a scull device driver. I have written the open/read/write fns in driver code. echo "hello" > /dev/myscull0 shows the data being written successfully to my device driver, and open() -> write() ->release() has been called in driver successfully. Similarly, other operations using standard bash commands are successfull when operated on driver device file. Eg: cat /dev/myscull0 execute drivers read() call. Now, i am writing a user space program to operate on my device file. void

How to retrieve updated content on an Observed resource in Leshan?

我怕爱的太早我们不能终老 提交于 2019-12-12 03:20:20
问题 Currently I am working on proof of concept using Leshan to recieve log messages from devices on regular basis. We found that Observe request is the best way to go for this approach. So temporarily, since we don't have a custom object yet(Wakama client not ready yet), on the server side when the client registers, I observe resource 15 on Device in LeshanClientExample. Here is the Observe code in LeshanServer.java: this.clientRegistry.addListener(new ClientRegistryListener() { .... @Override