msdn

MSDN subscriptions on the cheap? [closed]

a 夏天 提交于 2019-11-28 14:34:17
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . As a long time Microsoft developer, I find MSDN to be an invaluable resource. However, when tinkering at home I am not able to play

Need to know if a directory has write permission or not in C++

*爱你&永不变心* 提交于 2019-11-28 14:13:57
问题 I need to know if a specified directory (local or shared path with login credentials) has write permissions or not. I am using GetFileAttributes but it always returns FILE_ATTRIBUTE_DIRECTORY and nothing else. My code is something like below if(storageLocation != "") { //! check if local storage - user name password would be empty if(storageUsername == "" && storagePassword == "") { //! local storage //! lets check whether the local path is a valid path or not boost::filesystem::path fpath

Unexpected behaviour of Process.MainWindowHandle

妖精的绣舞 提交于 2019-11-28 11:10:46
I've been trying to understand Process.MainWindowHandle . According to MSDN; "The main window is the window that is created when the process is started. After initialization, other windows may be opened, including the Modal and TopLevel windows, but the first window associated with the process remains the main window ." (Emphasis added) But while debugging I noticed that MainWindowHandle seemed to change value... which I wasn't expecting, especially after consulting the documentation above. To confirm the behaviour I created a standalone WinForms app with a timer to check the MainWindowHandle

Calling SHGetSetSettings from Delphi

一曲冷凌霜 提交于 2019-11-28 08:55:05
问题 I just read this question and this question, and since then I have been trying to call SHGetSetSettings in Delphi. This is a function of shell32.dll , but is not defined in ShlObj.pas , so we need to write our own definition. First we need to translate the SHELLSTATE structure. Now I have only limited experience in C, but I suppose that ": 1" means that the member of the structure is a single bit, that is, that eight of them can be packed together in a byte. I also suppose that DWORD = UINT =

why can MemoryBarrier be implemented as a call to xchg?

荒凉一梦 提交于 2019-11-28 08:54:40
问题 on msdn http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208(v=vs.85).aspx, MemoryBarrier is implemented as a call to xchg. // x86 FORCEINLINE VOID MemoryBarrier ( VOID ) { LONG Barrier; __asm { xchg Barrier, eax } } I can't find some material in "Software Developer's Manual". please tell me the reason. 回答1: From Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3: "System Programming Guide" 8.2.5 "Strengthening or Weakening the Memory-Ordering Model"

GetLogicalDriveStrings() and char - Where am I doing wrongly

 ̄綄美尐妖づ 提交于 2019-11-28 04:45:00
问题 I want to search a file which may be present in any drives such as C:\, D:\ etc. Using GetLogicalDriveStrings I can able to get the list of drives but when I add anything extra for the output, I am getting a null in the output prompt. Here is my code: #include "StdAfx.h" #include <windows.h> #include <stdio.h> #include <conio.h> // Buffer length DWORD mydrives = 100; // Buffer for drive string storage char lpBuffer[100]; const char *extFile = "text.ext"; // You may want to try the wmain()

Load search URL in browser from Visual Studio

六眼飞鱼酱① 提交于 2019-11-28 04:20:39
问题 I'm finding the built-in Visual Studio Document Explorer less relevant , especially as more of the SDKs I work with have the most up-to-date content on-line . Pressing F1 starts Document Explorer usually with something unhelpful and it's not usable any more for me. Is there any way that on the press of a key combination in Visual Studio : the default browser opens to the URL of a search engine query used is the keyword under the current cursor position a filter is added such as site:msdn

VSTO Add-ins, COMAddIns and RequestComAddInAutomationService

走远了吗. 提交于 2019-11-27 09:47:59
Please see 1st Edit (the screenshot at the bottom): I've followed this article to have a Winform app trigger a VSTO Add-In method: http://blogs.msdn.com/b/andreww/archive/2007/01/15/vsto-add-ins-comaddins-and-requestcomaddinautomationservice.aspx At the end of the above article the author mentions a issue and tries to ameliorate it here: http://blogs.msdn.com/b/andreww/archive/2008/08/11/why-your-comaddin-object-should-derive-from-standardolemarshalobject.aspx I have been through the code several times now and the method to derive StandardOleMarshalObject to ameliorate the exception does not

Reverse-Mapping for String Enums

浪尽此生 提交于 2019-11-27 03:12:38
问题 I wanted to use string enums in typescript but I can't see a support for reversed mapping in it. I have an enum like this: enum Mode { Silent = "Silent", Normal = "Normal", Deleted = "Deleted" } and I need to use it like this: let modeStr: string; let mode: Mode = Mode[modeStr]; and yes I don't know what is it there in modeStr string and I need it parsed to the enum or a fail at parsing in runtime if the string is not presented in the enum definition. How can I do that as neat as it can be?

Get information about disk drives result on windows7 - 32 bit system

╄→гoц情女王★ 提交于 2019-11-26 20:44:30
When i run the below code on windows XP - 32 , i get the below result. i have plugged only one usb pen drive On Windows XP - 32 Bit ----------------------- Drive C: ProductId: ST3160215AS ProductRevision: 3.AAD DeviceType: 7, DeviceNumber: 0, PartitionNumber: 1 DevicePath: \\?\ide#diskst3160215as_____________________________3.aad___#5&2 7db0ed4&0&0.0.0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b} Class: DiskDrive Hardware ID: IDE\DiskST3160215AS_____________________________3.AAD___ Friendly Name: ST3160215AS Physical Device Object Name: \Device\Ide\IdeDeviceP2T0L0-5 Device Description: Disk drive