vendredi 27 février 2015

How to understand the internal working of NDIS Miniport driver

I am new to Window driver development.


I am trying to understand the working of a NDIS miniport driver (from Microsoft WDK samples). Especially, to understand the packet flow.


As per numerous sources, I have seen suggestions of installing two instances of NDIS miniport driver and proceed from there. However, I am unable to continue from there, as there is only vague info. Please advise - Especially on how to attach a Windows Debugger Tool to an instance of the driver and to see the callbacks being called on sent/receive packets.


My platform: Windows 7 x64 with debug mode set (Debugging Setup: Single Computer).


There is a similar question. But no info about how to debug the driver: NDIS and miniport driver


Recover windows 8 after dual boot with centOS 6.5

I tried installing Centos 6.5 along side Windows8. When I booted, I saw only Centos6.5 and other. I could not find any solutions with Centos 6 and Windows 7. Centos 6 doesn't have grub2.


This is my grub.conf



title CentOS (2.6.32-431.el6.x86_64)
root (hd0,11)
kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/vg_rashmi-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=vg_rashmi/lv_swap crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_rashmi/lv_root rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-431.el6.x86_64.img

title Other
rootnoverify (hd0,9)
chainloader +1


As shown above, it is showing as "other". I looked at the other solutions and installed ntfs-3g


This is my df -h output



df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rashmi-lv_root 37G 2.7G 32G 8% /
tmpfs 1.9G 232K 1.9G 1% /dev/shm
/dev/sda12 485M 40M 420M 9% /boot
/dev/sda2 256M 28M 229M 11% /boot/efi


I am not sure where the windows is loaded. I tried trail and error to mount Windows.


This is my parted output



Model: ATA WDC WD5000LPVT-2 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 1050MB 1049MB ntfs Basic data partition hidden, diag
2 1050MB 1322MB 273MB fat32 EFI system partition boot, hidden
3 1322MB 2371MB 1049MB fat32 Basic data partition hidden
4 2371MB 2505MB 134MB Microsoft reserved partition msftres
5 2505MB 110GB 107GB ntfs Basic data partition
6 110GB 110GB 367MB ntfs hidden, diag
7 110GB 111GB 1109MB linux-swap(v1)
8 111GB 111GB 10.5MB bios_grub
12 111GB 112GB 524MB ext4
13 112GB 155GB 43.5GB lvm
9 155GB 459GB 304GB ntfs Basic data partition
10 459GB 486GB 26.8GB ntfs Basic data partition
11 486GB 500GB 14.2GB ntfs Basic data partition hidden, diag


I am guessing it is sda9 where windows is installed. What changes should I do to recover?


MySQL binary log location Windows 2008 Server

I'm running a Windows 2008 Server with IIS, PHP and MySQL. MySQL is installed as a service. There's software on the server that uses a database that I need good backups of, including transaction logging. I've turned on Binary Logging via setting log-bin= and expire_logs_days= in the my.ini file. This saves those logs in the MySQL data folder on that drive. If I lose the drive, I lose my logs and they've done me no good as a backup.


I've found all kinds of advice for relocating these logs on a Linux box, but trying to use the same idea of including a path in the log-bin statement is not working. I've tried "flipping" the slashes, adding quotes and the common other attempts when "translating" Linux to Windows.


I created a mapped drive to the external location to make this easier, and I've tried using \server\folder path statements as well as z:\ path statements.


Any help would be greatly appreciated.


If I apply local group policy for the first time why it is not taking effect untill I restart the machine?

I applied local group policy but policy is not taking effect. I tried this on domain member(machine is in connection with Domain Controller) and on workgroup machine also. I used gpupdate, gpupdate /force, gpupdate /gorce /boot, nothing is working. I can see the rule in rsop.msc also. But policy is not taking effect untill I restart the machine once. After policy got applied if I modify anything or add other rule they take effect immediately, Why is that so ? Can I apply local group policy without restarting ?


Why Jmeter opens with a Console(command prompt) in background?

I've searched through internet and couldn't find an explanation for this question, So posting in SO for a better understanding.


When i open Jmeter.bat the it opens jmeter GUI along with a DOS window in background. What is the need for this window?


If this window is to check the initial start-up errors, why is it still open after the GUI loaded.


Why shouldn't we use ApacheJmeter.jar instead of jmeter.bat for opening jmeter?


Thanks.


How to distinguish OpenCV cameras?

I am writing C++ class for managing multiple cameras and reading frames from them. Let's say it is wrapper for OpenCV. Currently I am finding cameras by trying to create devices from 0-10 range and If there is output I know that I've found working camera. I can always save internal IDs of those cameras to distinguish them but what If another camera is plugged in? It may break the order of IDs. So is there any way to distinguish OpenCV cameras for example by getting their hardware IDs?


Media driver is missing when installing Windows 8

After downloading windows 8 install ISO with Windows 8 media creation tool i booted the ISO from my USB to install windows but when i clicked instill an error said "A media driver on your computer is missing " How do i fix this?