msdn

How to get the full path for USN journal query?

ⅰ亾dé卋堺 提交于 2019-12-04 13:26:29
问题 I am trying to go through the example on MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/aa365736%28v=vs.85%29.aspx) on how to query USN journal in order to trace file changes on a NTFS drive. The example code works well. However, in this example code, the USN_RECORD structure only returns me a file reference number and the file name. It does not return me the full path of the file. Does anyone have any idea how to query USN journal to return a full path? Or there is a way to

Schema (XSD) for Microsoft .NET configuration file

此生再无相见时 提交于 2019-12-04 08:23:22
I'm searching the XSD (XML Schema) for the Microsoft .NET application configuration files. Till now I found only this: Configuration File Schema for the .NET Framework but I'm more interested in the XSD. Or - asked in general - I search also XSDs in general for .NET configuration files listed here . I've Visual Studio 2008 and don't see such files as in the first answer... DotNetConfig.xsd updated by Peter Ritchie based on C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\DotNetConfig.xsd . See Schema Cache . 来源: https://stackoverflow.com/questions/311782/schema-xsd-for-microsoft-net

Microsoft's CodeView format specs

微笑、不失礼 提交于 2019-12-04 07:36:01
I've been looking for a Microsoft document from the 1990's called CodeView Symbolic Debug Information Specification . It's referenced by Microsoft in their PE/COFF spec . Information about this document is sparse, and every lead I come across ends in a 404. Unfortunately I don't have any old MSDN CD's, which seemed to end the search for a few people. Does anyone have a copy, or know where I could find any related specs? The one Matt Pietrek linked to, but which is not available at the original address anymore. - Note that this is one of the official CodeView 4 specifications, it doesn't cover

ReadProcessMemory on a 64 bit proces always returns Error 299

吃可爱长大的小学妹 提交于 2019-12-04 04:29:44
问题 I'm having some trouble with ReadProcessMemory My code is 64 bit I can read the memory of any 32 bit process , but ReadProcessMemory always fails with error code 299 (Partial read) returning 0 bytes read. Done my research and most answers were relate to privilges , but I have Debugging token enabled and running as admin , The address i read the the ImageBase in the PE optional header I tried to check the page status using VirtualQueryEx and got access denied! Note : The code runs perfectly on

Direct2D : Unhandled Exception In WM_RESIZE switch case

老子叫甜甜 提交于 2019-12-04 03:42:06
问题 I am creating a Simple Direct2D Application. Unfortunately it is giving an unhandled exception. The function where it is taking place: void DemoApp::OnResize(UINT width, UINT height) { if (m_pRenderTarget) <----|****The exception occurs here.....**** { // Note: This method can fail, but it's okay to ignore the // error here, because the error will be returned again // the next time EndDraw is called. m_pRenderTarget->Resize(D2D1::SizeU(width, height)); } } And the code snippet calling

WinAPI: InternetCloseHandle function closes the handle but not the connection

試著忘記壹切 提交于 2019-12-03 21:32:10
问题 I call wininet\InternetOpenUrlA, then wininet\InternetReadFile and when I'm done I call wininet\InternetCloseHandle which returns True. That means that the handle successfully closed, but the connection is still in established state. Why doesn't the connection close when I call wininet\InternetCloseHandle ? 回答1: WinInet can cache and reuse connections for future requests to the same server. 回答2: WinInet tries to re-use sockets where it can, so even when you release the handle it can choose to

How to detect if media is inserted into a removable drive/card reader

ぃ、小莉子 提交于 2019-12-03 20:57:41
I have a card reader ( no memory stick is inserted ). When i insert into my compter it shows an empty drive in My Computer... Is it possible to know whether a drive is having a media ( sorry i am not sure how to call it ) or not... I find the suggestion of MSalters to use IOCTL_STORAGE_CHECK_VERIFY very good. There are a small trick in the usage of IOCTL_STORAGE_CHECK_VERIFY . Before the usage of IOCTL code in the function DeviceIoControl one need to open the corresponding device with respect of CreateFile function: HANDLE hDevice = CreateFile (szDeviceName, // like "\\.\E:" 0, // no access to

Setting Library path for win32 console applications

老子叫甜甜 提交于 2019-12-03 20:30:01
问题 I am getting "dll not found:restarting the application may fix the problem" error when i try to execute a simple "HelloWorld" win32 console application. I know the location of the .dll. How to specify its location when executing the .exe from command prompt? PS: copying the .dll to the .exe's current dir seems to solve the problem, but this approach is not suitable in this case. 回答1: DLL loading happens deep in the plumbing of windows. If the DLL is not found in the same directory as the

performing Arithmetic on SYSTEMTIME

断了今生、忘了曾经 提交于 2019-12-03 16:00:28
I have a time value represented in SYSTEMTIME, i want to add/subtract 1 hour from it and get the newly obtained SYSTEMTIME. I want the conversion should take care of the date change on addition/subtraction or month change or e1 year change . Can someone help me with this if there is some windows api which does arithmetic on SYSTEMTIME Marco If you're using C# (or VB.NET, or ASP.NET) you can use DateTime dt = DateTime.Now.AddHours(1); You can use negative numbers to subtract: DateTime dt = DateTime.Now.AddHours(-1); EDITED: I extract an asnwer from this post They suggest converting SYSTEMTIME

What is difference between BaseAddress and AllocationBase in MEMORY_BASIC_INFORMATION struct?

天大地大妈咪最大 提交于 2019-12-03 13:27:39
In MSDN i find following` BaseAddress - A pointer to the base address of the region of pages. AllocationBase - A pointer to the base address of a range of pages allocated by the VirtualAlloc function. The page pointed to by the BaseAddress member is contained within this allocation range. But i don't understand what is difference really. Can anyone tell me difference? (not like in MSDN :) ) Virtual memory allocations on Windows are made with a granularity of 64 kilobytes, the value of SYSTEM_INFO.dwAllocationGranularity. But virtual memory pages are 4096 bytes, the value of SYSTEM_INFO