Here's how to use ReadDirectoryChangesW without knowing all of this and without using this overkill C++ class library (remove the &o parameter in the call to make it blocking instead of async. Note: This only returns one change, you have to step trough a buffer of FILE_NOTIFY_INFORMATIONs if you need to get more): HANDLE hDirectory ; OVERLAPPED o = { 0 }; union { FILE_NOTIFY_INFORMATION i ; char d [ sizeof ( FILE_NOTIFY_INFORMATION )+ MAX_PATH ]; } fni ; int checkAutoCompile () { DWORD b ; if (! hDirectory ) { hDirectory = CreateFile ( "." , FILE_LIST_DIRECTORY | GENERIC_READ , FILE_SHARE_READ | FILE_SHARE_WRITE , 0 , OPEN_EXISTING , FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED , 0 ); o . hEvent = CreateEvent ( 0 , 0 , 0 , 0 ); } ReadDirectoryChangesW ( hDirectory , & fni , sizeof ( fni ), TR...
Again? Update it then, quick, before your computer explodes!
ReplyDeleteHey, I was wondering if you could either add support for a filetype that's really just a bunch of bytes indicating height, overlay, northwall, eastwall, roof, and color of the tile packed into a bytebuffer which I call a sector, which holds 48x48 tiles of 10 bytes each holding information about the tile? I'd offer more info surely, if you're interested, my MSN is Aeros@stork.pk if not, how much would the source cost me? Just curious.
ReplyDelete