This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from NHibernate source. Very helpful to prevent fragmentation when using Guid with clustered PK | |
Guid GenerateComb() | |
{ | |
byte[] destinationArray = Guid.NewGuid().ToByteArray(); | |
DateTime time = new DateTime(0x76c, 1, 1); | |
DateTime now = DateTime.Now; | |
TimeSpan span = new TimeSpan(now.Ticks - time.Ticks); | |
TimeSpan timeOfDay = now.TimeOfDay; | |
byte[] bytes = BitConverter.GetBytes(span.Days); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DirectShowLib; | |
using Microsoft.Xna.Framework.Graphics; | |
using System; | |
using System.Runtime.InteropServices; | |
using System.Runtime.InteropServices.ComTypes; | |
using System.Threading; | |
namespace WindowsGame1 | |
{ | |
public class VideoCapture : ISampleGrabberCB, IDisposable |