summary refs log tree commit diff stats
path: root/win32/wdkpt/vs2010/Microsoft.Cpp.x64.WDK7.props
blob: 7f72f8e29c4cf2fd20641dc0584ed429e091c9e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!--
***********************************************************************************************
Microsoft.Cpp.x64.v100.props

WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
          created a backup copy.  Incorrect changes to this file will make it
          impossible to load or build your projects from the command-line or the IDE.

Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(VCTargetsPath)\Platforms\x64\PlatformToolsets\v100\ImportBefore\*.props" Condition="Exists('$(VCTargetsPath)\Platforms\x64\PlatformToolsets\v100\ImportBefore')" />

  <PropertyGroup>
    <PlatformToolsetVersion>100</PlatformToolsetVersion>

    <WDKInstallDir>$(SystemDrive)\WinDDK\7600.16385.1</WDKInstallDir>

	<VCInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VC@ProductDir)</VCInstallDir>
    <VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VC@ProductDir)</VCInstallDir>
    <VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\10.0\Setup\VC@ProductDir)</VCInstallDir>
    <VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress\10.0\Setup\VC@ProductDir)</VCInstallDir>

    <VSInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS@ProductDir)</VSInstallDir>
    <VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS@ProductDir)</VSInstallDir>
    <VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\10.0\Setup\VS@ProductDir)</VSInstallDir>
    <VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress\10.0\Setup\VS@ProductDir)</VSInstallDir>

    <WindowsSdkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A@InstallationFolder)</WindowsSdkDir>
    <WindowsSdkDir Condition="'$(WindowsSdkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0A@InstallationFolder)</WindowsSdkDir>

    <FrameworkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework@InstallRoot)</FrameworkDir>
    <FrameworkDir Condition="'$(FrameworkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework@InstallRoot)</FrameworkDir>

    <FrameworkSdkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A@InstallationFolder)</FrameworkSdkDir>
    <FrameworkSdkDir Condition="'$(FrameworkSdkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0A@InstallationFolder)</FrameworkSdkDir>

    <FrameworkVersion Condition="'$(UseEnv)' != 'true'">v4.0</FrameworkVersion>
    <Framework35Version Condition="'$(UseEnv)' != 'true'">v3.5</Framework35Version>

    <ExecutablePath Condition="'$(ExecutablePath)' == ''">$(VCInstallDir)bin\x86_amd64;$(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(WindowsSdkDir)bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(FrameworkSDKDir)\lib\win64;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>
    <IncludePath>$(WDKInstallDir)\inc\api;$(WDKInstallDir)\inc\crt;$(WDKInstallDir)\inc\api\crt\stl70;$(WDKInstallDir)\inc\mfc42;$(WDKInstallDir)\inc\ddk;$(WDKInstallDir)\inc\api\dao360;</IncludePath>
    <LibraryPath>$(WDKInstallDir)\lib\wnet\amd64;$(WDKInstallDir)\lib\Crt\amd64;$(WDKInstallDir)\lib\Mfc\amd64;$(WDKInstallDir)\lib\ATL\amd64;</LibraryPath>
    <SourcePath Condition="'$(SourcePath)' == ''">$(VCInstallDir)atlmfc\src\mfc;$(VCInstallDir)atlmfc\src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstallDir)crt\src;</SourcePath>
    <NativeExecutablePath Condition="'$(NativeExecutablePath)' == ''">$(VCInstallDir)bin\AMD64;$(VCInstallDir)VCPackages;$(WindowsSdkDir)bin\NETFX 4.0 Tools\x64;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(WindowsSdkDir)bin\x64;$(WindowsSdkDir)bin\win64\x64;$(WindowsSdkDir)bin;$(MSBuildToolsPath);$(PATH);</NativeExecutablePath>
  </PropertyGroup>

  <ItemDefinitionGroup>
    <Link>
      <AdditionalDependencies>msvcrt_win2003.obj;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
    <ResourceCompile>
      <SuppressStartupBanner Condition="'%(ResourceCompile.SuppressStartupBanner)' == ''">true</SuppressStartupBanner>
    </ResourceCompile>
    <ManifestResourceCompile>
      <SuppressStartupBanner Condition="'%(ManifestResourceCompile.SuppressStartupBanner)'==''">true</SuppressStartupBanner>
    </ManifestResourceCompile>
    <Manifest>
      <EnableDPIAwareness Condition="'$(EnableDPIAwareness)' == '' AND '$(UseOfMFC)' == 'static'">true</EnableDPIAwareness>
      <EnableDPIAwareness Condition="'$(EnableDPIAwareness)' == '' AND '$(UseOfMFC)' == 'dynamic'">true</EnableDPIAwareness>
      <EnableDPIAwareness Condition="'$(EnableDPIAwareness)' == '' AND '$(UseOfMFC)' != 'static' AND '$(UseOfMFC)' != 'dynamic'">false</EnableDPIAwareness>
    </Manifest>
  </ItemDefinitionGroup>

  <Import Project="$(VCTargetsPath)\Platforms\x64\PlatformToolsets\v100\ImportAfter\*.props" Condition="Exists('$(VCTargetsPath)\Platforms\x64\PlatformToolsets\v100\ImportAfter')" />
</Project>
n> /*****************************************************/ /**** Don't want to pollute the namespace do we? *****/ /*****************************************************/ std::list<xchat_hook *> g_vHooks; /*****************************************************/ /************ Global Identifiers *********************/ /*****************************************************/ WNDPROC g_hOldProc; xchat_plugin *ph; /*****************************************************/ /***************** Resources *************************/ /*****************************************************/ HWND g_hXchatWnd; HWND g_hHotkeyWnd; HWND g_hPrefDlg; HMENU g_hTrayMenu; HICON g_hIcons[11]; HANDLE g_hInstance; /*****************************************************/ /***************** Preferences ***********************/ /*****************************************************/ unsigned int g_dwPrefs; TCHAR g_szAway[512]; int g_iTime; BOOL WINAPI DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpVoid) { if((fdwReason == DLL_PROCESS_ATTACH) || (fdwReason == DLL_THREAD_ATTACH)) { g_hInstance = hModule; } return TRUE; } int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg) { ph = plugin_handle; *plugin_name = "X-Tray"; *plugin_desc = "Minimize XChat to the Windows system tray"; *plugin_version = "1.2.4"; /***************************************************************************************************************************/ /************************* Load our preferances from xTray.ini *************************************************************/ /***************************************************************************************************************************/ LoadPrefs(); /***************************************************************************************************************************/ /************************* Finds the xChat window and saves it for later use ***********************************************/ /***************************************************************************************************************************/ g_hXchatWnd = (HWND)xchat_get_info(ph, "win_ptr"); if(g_hXchatWnd == NULL) { EnumThreadWindows(GetCurrentThreadId(), EnumWindowsProc, 0); } g_hOldProc = (WNDPROC)GetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC); SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)WindowProc); /***************************************************************************************************************************/ /************************* Grab the xChat Icon, Load our menu, create the window to receive the hotkey messages ***********/ /************************* and register the windows message so we know if explorer crashes ***********/ /***************************************************************************************************************************/ g_hTrayMenu = GetSubMenu(LoadMenu((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDR_TRAY_MENU)), 0); g_hHotkeyWnd = CreateDialog((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDD_ALERT), NULL, (DLGPROC)HotKeyProc); g_hPrefDlg = CreateDialog((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDD_PREF), g_hXchatWnd, (DLGPROC)PrefProc); g_hIcons[0] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_XCHAT), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); g_hIcons[1] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_CHANMSG), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); g_hIcons[2] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_HIGHLIGHT), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); g_hIcons[5] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_BANNED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); g_hIcons[6] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_KICKED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); g_hIcons[8] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_PMSG), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); g_hIcons[10]= (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_SNOTICE), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); g_hIcons[11]= (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_DISCONNECTED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); /***************************************************************************************************************************/ /************************* Add our icon to the tray ************************************************************************/ /***************************************************************************************************************************/ char szVersion[64]; _snprintf(szVersion, 64, "XChat-WDK [%s]", xchat_get_info(ph, "version")); AddIcon(g_hXchatWnd, 1, g_hIcons[0], szVersion, (NIF_ICON | NIF_MESSAGE | NIF_TIP), WM_TRAYMSG); /***************************************************************************************************************************/ /***************************************************************************************************************************/ /***************************************************************************************************************************/ if(g_dwPrefs & (1<<PREF_DNSIT)) { DWORD dwStyle; dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE); dwStyle |= (1<<WS_CHILD); SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle); SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, (LONG_PTR)g_hHotkeyWnd); } /***************************************************************************************************************************/ /************************* Set our hooks and save them for later so we can unhook them *************************************/ /***************************************************************************************************************************/ g_vHooks.push_back(xchat_hook_print(ph, "Channel Msg Hilight", XCHAT_PRI_NORM, event_cb, (void *)CHAN_HILIGHT)); g_vHooks.push_back(xchat_hook_print(ph, "Channel Message", XCHAT_PRI_NORM, event_cb, (void *)CHAN_MESSAGE)); g_vHooks.push_back(xchat_hook_print(ph, "Topic Change", XCHAT_PRI_NORM, event_cb, (void *)CHAN_TOPIC_CHANGE)); g_vHooks.push_back(xchat_hook_print(ph, "Channel Action Hilight", XCHAT_PRI_NORM, event_cb, (void *)CHAN_HILIGHT)); g_vHooks.push_back(xchat_hook_print(ph, "Channel INVITE", XCHAT_PRI_NORM, event_cb, (void *)CHAN_INVITE)); g_vHooks.push_back(xchat_hook_print(ph, "You Kicked", XCHAT_PRI_NORM, event_cb, (void *)CHAN_KICKED)); g_vHooks.push_back(xchat_hook_print(ph, "Banned", XCHAT_PRI_NORM, event_cb, (void *)CHAN_BANNED)); g_vHooks.push_back(xchat_hook_print(ph, "CTCP Generic", XCHAT_PRI_NORM, event_cb, (void *)CTCP_GENERIC)); g_vHooks.push_back(xchat_hook_print(ph, "Private Message", XCHAT_PRI_NORM, event_cb, (void *)PMSG_RECEIVE)); g_vHooks.push_back(xchat_hook_print(ph, "Private Message to Dialog", XCHAT_PRI_NORM, event_cb, (void *)PMSG_RECEIVE)); g_vHooks.push_back(xchat_hook_print(ph, "Disconnected", XCHAT_PRI_NORM, event_cb, (void *)SERV_DISCONNECT)); g_vHooks.push_back(xchat_hook_print(ph, "Killed", XCHAT_PRI_NORM, event_cb, (void *)SERV_KILLED)); g_vHooks.push_back(xchat_hook_print(ph, "Notice", XCHAT_PRI_NORM, event_cb, (void *)SERV_NOTICE)); g_vHooks.push_back(xchat_hook_command(ph, "tray_alert", XCHAT_PRI_NORM, command_cb, "Create an Alert", NULL)); return 1; } int xchat_plugin_deinit(xchat_plugin *plugin_handle) { /******************************************/ /****** Remove the Icon from the tray *****/ /******************************************/ StopBlink(g_hXchatWnd, 1, g_hIcons[0]); RemoveIcon(g_hXchatWnd, 1); /*******************************************/ /*******************************************/ /*******************************************/ if(g_dwPrefs & (1<<PREF_DNSIT)) { DWORD dwStyle; dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE); dwStyle &= ~(1<<WS_CHILD); SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle); SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, NULL); } /******************************************/ /****** Unload our resources **************/ /******************************************/ DestroyMenu(g_hTrayMenu); for(int i = 0; i <= 11; i++) { DestroyIcon(g_hIcons[i]); } /******************************************/ /****** Remove our window hook ************/ /******************************************/ SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)g_hOldProc); /******************************************/ /****** Remove our hotkey, and destroy ****/ /****** the window that receives its ****/ /****** messages ****/ /******************************************/ UnregisterHotKey(g_hHotkeyWnd, 1); DestroyWindow(g_hHotkeyWnd); DestroyWindow(g_hPrefDlg); /******************************************/ /************* Clean up Isle 7 ************/ /******************************************/ if(sdAlertNum()) { sdCloseAlerts(); } /******************************************/ /****** remove our xchat_hook_*s **********/ /******************************************/ while(!g_vHooks.empty()) { if(g_vHooks.back() != NULL) { xchat_unhook(ph, g_vHooks.back()); } g_vHooks.pop_back(); } return 1; }