mirror of
https://github.com/reactos/reactos
synced 2025-10-07 00:42:44 +02:00
Compare commits
7 Commits
ReactOS-0.
...
GSoC_2011/
Author | SHA1 | Date | |
---|---|---|---|
|
d782f12590 | ||
|
f83a7d4e9d | ||
|
5ddfa57f7c | ||
|
cc194f8f81 | ||
|
7c1f7fe5c5 | ||
|
6fb0e9e6dd | ||
|
8a9d4c3e13 |
@@ -34,6 +34,7 @@ add_importlibs(explorer_new
|
||||
shell32
|
||||
shlwapi
|
||||
version
|
||||
uxtheme
|
||||
msvcrt
|
||||
kernel32
|
||||
ntdll)
|
||||
|
@@ -350,6 +350,19 @@ GetVersionInfoString(IN TCHAR *szFileName,
|
||||
return bRet;
|
||||
}
|
||||
|
||||
static void HideMinimizedWindows(BOOL hide)
|
||||
{
|
||||
MINIMIZEDMETRICS mm;
|
||||
mm.cbSize = sizeof(MINIMIZEDMETRICS);
|
||||
SystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &mm, FALSE);
|
||||
if(hide)
|
||||
mm.iArrange |= ARW_HIDE;
|
||||
else
|
||||
mm.iArrange &= ~ARW_HIDE;
|
||||
SystemParametersInfo(SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &mm, FALSE);
|
||||
}
|
||||
|
||||
|
||||
INT WINAPI
|
||||
_tWinMain(IN HINSTANCE hInstance,
|
||||
IN HINSTANCE hPrevInstance,
|
||||
@@ -395,7 +408,10 @@ _tWinMain(IN HINSTANCE hInstance,
|
||||
Tray = CreateTrayWindow();
|
||||
|
||||
if (Tray != NULL)
|
||||
{
|
||||
hShellDesktop = DesktopCreateWindow(Tray);
|
||||
HideMinimizedWindows(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
/* WinXP: Notify msgina to hide the welcome screen */
|
||||
|
22
base/shell/explorer-new/explorer.exe.manifest
Normal file
22
base/shell/explorer-new/explorer.exe.manifest
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="ReactOS.Explorer"
|
||||
type="win32"
|
||||
/>
|
||||
<description>This is ReactOS Explorer</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
@@ -20,6 +20,7 @@ IDB_TASKBARPROP_NOLOCK_GROUP_NOQL BITMAP DISCARDABLE res/nolock_group_noql.bmp
|
||||
IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL BITMAP DISCARDABLE res/nolock_nogroup_noql.bmp
|
||||
IDB_TASKBARPROP_NOLOCK_NOGROUP_QL BITMAP DISCARDABLE res/nolock_nogroup_ql.bmp
|
||||
IDB_TASKBARPROP_NOLOCK_GROUP_QL BITMAP DISCARDABLE res/nolock_group_ql.bmp
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "explorer.exe.manifest"
|
||||
|
||||
#include "lang/bg-BG.rc"
|
||||
#include "lang/cs-CZ.rc"
|
||||
|
@@ -17,7 +17,9 @@
|
||||
#include <tchar.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <uxtheme.h>
|
||||
|
||||
#include "tmschema.h"
|
||||
#include "resource.h"
|
||||
#include "comcsup.h"
|
||||
#include "todo.h"
|
||||
@@ -384,6 +386,11 @@ HWND
|
||||
CreateTrayNotifyWnd(IN OUT ITrayWindow *TrayWindow,
|
||||
IN BOOL bHideClock);
|
||||
|
||||
void
|
||||
TrayNotify_NotifyMsg(IN HWND hwnd,
|
||||
IN WPARAM wParam,
|
||||
IN LPARAM lParam);
|
||||
|
||||
/*
|
||||
* taskswnd.c
|
||||
*/
|
||||
|
@@ -20,10 +20,6 @@
|
||||
|
||||
#include <precomp.h>
|
||||
|
||||
/* By default we don't use DrawCaptionTemp() because it causes some minimal
|
||||
drawing glitches with the toolbar custom painting code */
|
||||
#define TASK_USE_DRAWCAPTIONTEMP 1
|
||||
|
||||
/* Set DUMP_TASKS to 1 to enable a dump of the tasks and task groups every
|
||||
5 seconds */
|
||||
#define DUMP_TASKS 0
|
||||
@@ -47,14 +43,6 @@ typedef struct _TASK_GROUP
|
||||
struct
|
||||
{
|
||||
|
||||
#if TASK_USE_DRAWCAPTIONTEMP != 0
|
||||
|
||||
/* DisplayTooltip is TRUE when the group button text didn't fit into
|
||||
the button. */
|
||||
DWORD DisplayTooltip : 1;
|
||||
|
||||
#endif
|
||||
|
||||
DWORD IsCollapsed : 1;
|
||||
};
|
||||
};
|
||||
@@ -65,12 +53,9 @@ typedef struct _TASK_ITEM
|
||||
HWND hWnd;
|
||||
PTASK_GROUP Group;
|
||||
INT Index;
|
||||
|
||||
#if !(TASK_USE_DRAWCAPTIONTEMP != 0)
|
||||
|
||||
INT IconIndex;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
union
|
||||
{
|
||||
@@ -78,14 +63,6 @@ typedef struct _TASK_ITEM
|
||||
struct
|
||||
{
|
||||
|
||||
#if TASK_USE_DRAWCAPTIONTEMP != 0
|
||||
|
||||
/* DisplayTooltip is TRUE when the window text didn't fit into the
|
||||
button. */
|
||||
DWORD DisplayTooltip : 1;
|
||||
|
||||
#endif
|
||||
|
||||
/* IsFlashing is TRUE when the task bar item should be flashing. */
|
||||
DWORD IsFlashing : 1;
|
||||
|
||||
@@ -113,9 +90,11 @@ typedef struct _TASK_SWITCH_WND
|
||||
PTASK_ITEM TaskItems;
|
||||
PTASK_ITEM ActiveTaskItem;
|
||||
|
||||
HTHEME TaskBandTheme;
|
||||
HWND hWndToolbar;
|
||||
UINT TbButtonsPerLine;
|
||||
WORD ToolbarBtnCount;
|
||||
HIMAGELIST TaskIcons;
|
||||
|
||||
union
|
||||
{
|
||||
@@ -139,12 +118,6 @@ typedef struct _TASK_SWITCH_WND
|
||||
static VOID TaskSwitchWnd_UpdateButtonsSize(IN OUT PTASK_SWITCH_WND This,
|
||||
IN BOOL bRedrawDisabled);
|
||||
|
||||
#if TASK_USE_DRAWCAPTIONTEMP != 0
|
||||
|
||||
#define TaskSwitchWnd_GetWndTextFromTaskItem(a,b) NULL
|
||||
|
||||
#else /* !TASK_USE_DRAWCAPTIONTEMP */
|
||||
|
||||
static LPTSTR
|
||||
TaskSwitchWnd_GetWndTextFromTaskItem(IN OUT PTASK_SWITCH_WND This,
|
||||
IN PTASK_ITEM TaskItem)
|
||||
@@ -161,7 +134,6 @@ TaskSwitchWnd_GetWndTextFromTaskItem(IN OUT PTASK_SWITCH_WND This,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if DUMP_TASKS != 0
|
||||
static VOID
|
||||
@@ -408,20 +380,45 @@ TaskSwitchWnd_ExpandTaskGroup(IN OUT PTASK_SWITCH_WND This,
|
||||
/* FIXME: Implement */
|
||||
}
|
||||
|
||||
static HICON
|
||||
TaskSwitchWnd_GetWndIcon(HWND hwnd)
|
||||
{
|
||||
HICON hIcon = 0;
|
||||
|
||||
SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
|
||||
|
||||
if (!hIcon)
|
||||
SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
|
||||
|
||||
if (!hIcon)
|
||||
SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
|
||||
|
||||
if (!hIcon)
|
||||
hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
|
||||
|
||||
if (!hIcon)
|
||||
hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICON);
|
||||
|
||||
return hIcon;
|
||||
}
|
||||
static INT
|
||||
TaskSwitchWnd_UpdateTaskItemButton(IN OUT PTASK_SWITCH_WND This,
|
||||
IN PTASK_ITEM TaskItem)
|
||||
{
|
||||
TBBUTTONINFO tbbi;
|
||||
|
||||
HICON icon;
|
||||
|
||||
ASSERT(TaskItem->Index >= 0);
|
||||
|
||||
tbbi.cbSize = sizeof(tbbi);
|
||||
tbbi.dwMask = TBIF_BYINDEX | TBIF_STATE | TBIF_TEXT;
|
||||
tbbi.dwMask = TBIF_BYINDEX | TBIF_STATE | TBIF_TEXT | TBIF_IMAGE;
|
||||
tbbi.fsState = TBSTATE_ENABLED;
|
||||
if (This->ActiveTaskItem == TaskItem)
|
||||
tbbi.fsState |= TBSTATE_CHECKED;
|
||||
|
||||
if (TaskItem->RenderFlashed)
|
||||
tbbi.fsState |= TBSTATE_MARKED;
|
||||
|
||||
/* Check if we're updating a button that is the last one in the
|
||||
line. If so, we need to set the TBSTATE_WRAP flag! */
|
||||
if (This->TbButtonsPerLine != 0 &&
|
||||
@@ -433,6 +430,10 @@ TaskSwitchWnd_UpdateTaskItemButton(IN OUT PTASK_SWITCH_WND This,
|
||||
tbbi.pszText = TaskSwitchWnd_GetWndTextFromTaskItem(This,
|
||||
TaskItem);
|
||||
|
||||
icon = TaskSwitchWnd_GetWndIcon(TaskItem->hWnd);
|
||||
TaskItem->IconIndex = ImageList_ReplaceIcon(This->TaskIcons,TaskItem->IconIndex,icon);
|
||||
tbbi.iImage = TaskItem->IconIndex;
|
||||
|
||||
if (!SendMessage(This->hWndToolbar,
|
||||
TB_SETBUTTONINFO,
|
||||
(WPARAM)TaskItem->Index,
|
||||
@@ -446,6 +447,40 @@ TaskSwitchWnd_UpdateTaskItemButton(IN OUT PTASK_SWITCH_WND This,
|
||||
return TaskItem->Index;
|
||||
}
|
||||
|
||||
static void
|
||||
TaskSwitchWnd_RemoveIcon(IN OUT PTASK_SWITCH_WND This,
|
||||
IN PTASK_ITEM TaskItem)
|
||||
{
|
||||
TBBUTTONINFO tbbi;
|
||||
PTASK_ITEM currentTaskItem,LastItem;
|
||||
|
||||
if(TaskItem->IconIndex==-1)
|
||||
return;
|
||||
|
||||
tbbi.cbSize = sizeof(tbbi);
|
||||
tbbi.dwMask = TBIF_IMAGE;
|
||||
|
||||
currentTaskItem = This->TaskItems;
|
||||
LastItem = currentTaskItem + This->TaskItemCount;
|
||||
while (currentTaskItem != LastItem)
|
||||
{
|
||||
if (currentTaskItem->IconIndex > TaskItem->IconIndex)
|
||||
{
|
||||
currentTaskItem->IconIndex--;
|
||||
tbbi.iImage = currentTaskItem->IconIndex;
|
||||
|
||||
SendMessage(This->hWndToolbar,
|
||||
TB_SETBUTTONINFO,
|
||||
(WPARAM)currentTaskItem->Index,
|
||||
(LPARAM)&tbbi);
|
||||
}
|
||||
currentTaskItem++;
|
||||
}
|
||||
|
||||
ImageList_Remove(This->TaskIcons, TaskItem->IconIndex);
|
||||
}
|
||||
|
||||
|
||||
static PTASK_ITEM
|
||||
TaskSwitchWnd_FindLastTaskItemOfGroup(IN OUT PTASK_SWITCH_WND This,
|
||||
IN PTASK_GROUP TaskGroup OPTIONAL,
|
||||
@@ -541,6 +576,7 @@ TaskSwitchWnd_AddTaskItemButton(IN OUT PTASK_SWITCH_WND This,
|
||||
{
|
||||
TBBUTTON tbBtn;
|
||||
INT iIndex;
|
||||
HICON icon;
|
||||
|
||||
if (TaskItem->Index >= 0)
|
||||
{
|
||||
@@ -556,7 +592,10 @@ TaskSwitchWnd_AddTaskItemButton(IN OUT PTASK_SWITCH_WND This,
|
||||
TaskItem->Group);
|
||||
}
|
||||
|
||||
tbBtn.iBitmap = 0;
|
||||
icon = TaskSwitchWnd_GetWndIcon(TaskItem->hWnd);
|
||||
TaskItem->IconIndex = ImageList_AddIcon(This->TaskIcons, icon);
|
||||
|
||||
tbBtn.iBitmap = TaskItem->IconIndex;
|
||||
tbBtn.fsState = TBSTATE_ENABLED | TBSTATE_ELLIPSES;
|
||||
tbBtn.fsStyle = BTNS_CHECK | BTNS_NOPREFIX | BTNS_SHOWTEXT;
|
||||
tbBtn.dwData = TaskItem->Index;
|
||||
@@ -612,6 +651,7 @@ TaskSwitchWnd_DeleteTaskItemButton(IN OUT PTASK_SWITCH_WND This,
|
||||
{
|
||||
TaskSwitchWnd_BeginUpdate(This);
|
||||
|
||||
TaskSwitchWnd_RemoveIcon(This,TaskItem);
|
||||
iIndex = TaskItem->Index;
|
||||
if (SendMessage(This->hWndToolbar,
|
||||
TB_DELETEBUTTON,
|
||||
@@ -1107,7 +1147,10 @@ static VOID
|
||||
TaskSwitchWnd_FlashTaskItem(IN OUT PTASK_SWITCH_WND This,
|
||||
IN OUT PTASK_ITEM TaskItem)
|
||||
{
|
||||
/* FIXME: Implement */
|
||||
TaskItem->RenderFlashed=1;
|
||||
TaskSwitchWnd_UpdateTaskItemButton(This,
|
||||
TaskItem);
|
||||
|
||||
}
|
||||
|
||||
static BOOL
|
||||
@@ -1151,6 +1194,7 @@ TaskSwitchWnd_RedrawTaskItem(IN OUT PTASK_SWITCH_WND This,
|
||||
else if (TaskItem->Index >= 0)
|
||||
{
|
||||
UpdateTaskItem:
|
||||
TaskItem->RenderFlashed=0;
|
||||
TaskSwitchWnd_UpdateTaskItemButton(This,
|
||||
TaskItem);
|
||||
}
|
||||
@@ -1386,6 +1430,18 @@ TaskSwichWnd_ToolbarSubclassedProc(IN HWND hWnd,
|
||||
return Ret;
|
||||
}
|
||||
|
||||
static VOID
|
||||
TaskSwitchWnd_UpdateTheme(IN OUT PTASK_SWITCH_WND This)
|
||||
{
|
||||
if(This->TaskBandTheme)
|
||||
CloseThemeData(This->TaskBandTheme);
|
||||
|
||||
if(IsThemeActive())
|
||||
This->TaskBandTheme = OpenThemeData(This->hWnd, L"TaskBand");
|
||||
else
|
||||
This->TaskBandTheme = 0;
|
||||
}
|
||||
|
||||
static VOID
|
||||
TaskSwitchWnd_Create(IN OUT PTASK_SWITCH_WND This)
|
||||
{
|
||||
@@ -1410,11 +1466,16 @@ TaskSwitchWnd_Create(IN OUT PTASK_SWITCH_WND This)
|
||||
HMODULE hShell32;
|
||||
SIZE BtnSize;
|
||||
|
||||
SetWindowTheme(This->hWndToolbar, L"TaskBand", NULL);
|
||||
TaskSwitchWnd_UpdateTheme(This);
|
||||
/* Identify the version we're using */
|
||||
SendMessage(This->hWndToolbar,
|
||||
TB_BUTTONSTRUCTSIZE,
|
||||
sizeof(TBBUTTON),
|
||||
0);
|
||||
|
||||
This->TaskIcons = ImageList_Create(16, 16, ILC_COLOR32, 0, 1000);
|
||||
SendMessage(This->hWndToolbar, TB_SETIMAGELIST, 0, (LPARAM)This->TaskIcons);
|
||||
|
||||
/* Calculate the default button size. Don't save this in This->ButtonSize.cx so that
|
||||
the actual button width gets updated correctly on the first recalculation */
|
||||
@@ -1497,6 +1558,7 @@ TaskSwitchWnd_NCDestroy(IN OUT PTASK_SWITCH_WND This)
|
||||
}
|
||||
}
|
||||
|
||||
CloseThemeData(This->TaskBandTheme);
|
||||
TaskSwitchWnd_DeleteAllTasks(This);
|
||||
}
|
||||
|
||||
@@ -1729,7 +1791,7 @@ TaskSwitchWnd_HandleTaskItemRightClick(IN OUT PTASK_SWITCH_WND This,
|
||||
GetCursorPos(&pt);
|
||||
cmd = TrackPopupMenu(hmenu, TPM_LEFTBUTTON|TPM_RIGHTBUTTON|TPM_RETURNCMD, pt.x, pt.y, 0, This->hWndToolbar, NULL);
|
||||
if (cmd) {
|
||||
SetForegroundWindow(TaskItem->hWnd); // reactivate window after the context menu has closed
|
||||
SetForegroundWindow(TaskItem->hWnd); // reactivate window after the context menu has closed
|
||||
PostMessage(TaskItem->hWnd, WM_SYSCOMMAND, cmd, 0);
|
||||
}
|
||||
}
|
||||
@@ -1778,16 +1840,10 @@ static LRESULT
|
||||
TaskSwichWnd_HandleItemPaint(IN OUT PTASK_SWITCH_WND This,
|
||||
IN OUT NMTBCUSTOMDRAW *nmtbcd)
|
||||
{
|
||||
HFONT hCaptionFont, hBoldCaptionFont;
|
||||
LRESULT Ret = CDRF_DODEFAULT;
|
||||
PTASK_GROUP TaskGroup;
|
||||
PTASK_ITEM TaskItem;
|
||||
|
||||
#if TASK_USE_DRAWCAPTIONTEMP != 0
|
||||
|
||||
UINT uidctFlags = DC_TEXT | DC_ICON | DC_NOSENDMSG;
|
||||
|
||||
#endif
|
||||
TaskItem = FindTaskItemByIndex(This,
|
||||
(INT)nmtbcd->nmcd.dwItemSpec);
|
||||
TaskGroup = FindTaskGroupByIndex(This,
|
||||
@@ -1798,97 +1854,29 @@ TaskSwichWnd_HandleItemPaint(IN OUT PTASK_SWITCH_WND This,
|
||||
|
||||
if (TaskItem != NULL && IsWindow(TaskItem->hWnd))
|
||||
{
|
||||
hCaptionFont = ITrayWindow_GetCaptionFonts(This->Tray,
|
||||
&hBoldCaptionFont);
|
||||
if (nmtbcd->nmcd.uItemState & CDIS_CHECKED)
|
||||
hCaptionFont = hBoldCaptionFont;
|
||||
|
||||
#if TASK_USE_DRAWCAPTIONTEMP != 0
|
||||
|
||||
/* Make sure we don't draw on the button edges */
|
||||
InflateRect(&nmtbcd->nmcd.rc,
|
||||
-GetSystemMetrics(SM_CXEDGE),
|
||||
-GetSystemMetrics(SM_CYEDGE));
|
||||
|
||||
if ((nmtbcd->nmcd.uItemState & CDIS_MARKED) && TaskItem->RenderFlashed)
|
||||
{
|
||||
/* This is a slight glitch. We have to move the rectangle so that
|
||||
the button content appears to be pressed. However, when flashing
|
||||
is enabled, we can see a light line at the top and left inner
|
||||
border. We need to fill that area with the flashing color. Note
|
||||
that since we're using DrawCaptionTemp() the flashing color is
|
||||
COLOR_ACTIVECAPTION, not COLOR_HIGHLIGHT! */
|
||||
FillRect(nmtbcd->nmcd.hdc,
|
||||
&nmtbcd->nmcd.rc,
|
||||
(HBRUSH)(COLOR_ACTIVECAPTION + 1));
|
||||
|
||||
/* Make the button content appear pressed. This however draws a bit
|
||||
into the right and bottom border of the button edge, making it
|
||||
look a bit odd. However, selecting a clipping region to prevent
|
||||
that from happening causes problems with DrawCaptionTemp()! */
|
||||
OffsetRect(&nmtbcd->nmcd.rc,
|
||||
1,
|
||||
1);
|
||||
|
||||
/* Render flashed */
|
||||
uidctFlags |= DC_ACTIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
uidctFlags |= DC_INBUTTON;
|
||||
if (nmtbcd->nmcd.uItemState & CDIS_CHECKED)
|
||||
uidctFlags |= DC_ACTIVE;
|
||||
}
|
||||
|
||||
if (DrawCapTemp != NULL)
|
||||
{
|
||||
/* Draw the button content */
|
||||
TaskItem->DisplayTooltip = !DrawCapTemp(TaskItem->hWnd,
|
||||
nmtbcd->nmcd.hdc,
|
||||
&nmtbcd->nmcd.rc,
|
||||
hCaptionFont,
|
||||
NULL,
|
||||
NULL,
|
||||
uidctFlags);
|
||||
}
|
||||
|
||||
return CDRF_SKIPDEFAULT;
|
||||
|
||||
#else /* !TASK_USE_DRAWCAPTIONTEMP */
|
||||
|
||||
/* Make the entire button flashing if neccessary */
|
||||
if (nmtbcd->nmcd.uItemState & CDIS_MARKED)
|
||||
{
|
||||
if (TaskItem->RenderFlashed)
|
||||
{
|
||||
nmtbcd->hbrMonoDither = GetSysColorBrush(COLOR_HIGHLIGHT);
|
||||
nmtbcd->clrTextHighlight = GetSysColor(COLOR_HIGHLIGHTTEXT);
|
||||
nmtbcd->nHLStringBkMode = TRANSPARENT;
|
||||
|
||||
/* We don't really need to set clrMark because we set the
|
||||
background mode to TRANSPARENT! */
|
||||
nmtbcd->clrMark = GetSysColor(COLOR_HIGHLIGHT);
|
||||
|
||||
Ret |= TBCDRF_USECDCOLORS;
|
||||
Ret=TBCDRF_NOBACKGROUND;
|
||||
if(!This->TaskBandTheme){
|
||||
SelectObject(nmtbcd->nmcd.hdc, GetSysColorBrush(COLOR_HIGHLIGHT));
|
||||
Rectangle(nmtbcd->nmcd.hdc,
|
||||
nmtbcd->nmcd.rc.left,
|
||||
nmtbcd->nmcd.rc.top,
|
||||
nmtbcd->nmcd.rc.right,
|
||||
nmtbcd->nmcd.rc.bottom);
|
||||
}else{
|
||||
DrawThemeBackground(This->TaskBandTheme, nmtbcd->nmcd.hdc, TDP_FLASHBUTTON, 0, &nmtbcd->nmcd.rc, 0);
|
||||
}
|
||||
else
|
||||
Ret |= TBCDRF_NOMARK;
|
||||
nmtbcd->clrText = GetSysColor(COLOR_HIGHLIGHTTEXT);
|
||||
return Ret;
|
||||
}
|
||||
|
||||
/* Select the font we want to use */
|
||||
SelectObject(nmtbcd->nmcd.hdc,
|
||||
hCaptionFont);
|
||||
return Ret | CDRF_NEWFONT;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
else if (TaskGroup != NULL)
|
||||
{
|
||||
/* FIXME: Implement painting for task groups */
|
||||
}
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
@@ -1907,22 +1895,7 @@ TaskSwitchWnd_HandleToolbarNotification(IN OUT PTASK_SWITCH_WND This,
|
||||
switch (nmtbcd->nmcd.dwDrawStage)
|
||||
{
|
||||
|
||||
#if TASK_USE_DRAWCAPTIONTEMP != 0
|
||||
|
||||
case CDDS_ITEMPREPAINT:
|
||||
/* We handle drawing in the post-paint stage so that we
|
||||
don't have to draw the button edges, etc */
|
||||
Ret = CDRF_NOTIFYPOSTPAINT;
|
||||
break;
|
||||
|
||||
case CDDS_ITEMPOSTPAINT:
|
||||
|
||||
#else /* !TASK_USE_DRAWCAPTIONTEMP */
|
||||
|
||||
case CDDS_ITEMPREPAINT:
|
||||
|
||||
#endif
|
||||
|
||||
Ret = TaskSwichWnd_HandleItemPaint(This,
|
||||
nmtbcd);
|
||||
break;
|
||||
@@ -1942,6 +1915,13 @@ TaskSwitchWnd_HandleToolbarNotification(IN OUT PTASK_SWITCH_WND This,
|
||||
return Ret;
|
||||
}
|
||||
|
||||
static void TaskSwitchWnd_DrawBackground(HWND wnd, HDC dc)
|
||||
{
|
||||
RECT rect;
|
||||
GetClientRect(wnd, &rect);
|
||||
DrawThemeParentBackground(wnd, dc, &rect);
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK
|
||||
TaskSwitchWndProc(IN HWND hwnd,
|
||||
IN UINT uMsg,
|
||||
@@ -1961,6 +1941,12 @@ TaskSwitchWndProc(IN HWND hwnd,
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_THEMECHANGED:
|
||||
TaskSwitchWnd_UpdateTheme(This);
|
||||
break;
|
||||
case WM_ERASEBKGND:
|
||||
TaskSwitchWnd_DrawBackground(hwnd,(HDC)wParam);
|
||||
break;
|
||||
case WM_SIZE:
|
||||
{
|
||||
SIZE szClient;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -43,6 +43,7 @@ typedef struct
|
||||
const IShellDesktopTrayVtbl *lpVtblShellDesktopTray;
|
||||
LONG Ref;
|
||||
|
||||
HTHEME TaskbarTheme;
|
||||
HWND hWnd;
|
||||
HWND hWndDesktop;
|
||||
|
||||
@@ -1019,6 +1020,12 @@ ITrayWindowImpl_Destroy(ITrayWindowImpl *This)
|
||||
This->TrayBandSite = NULL;
|
||||
}
|
||||
|
||||
if(This->TaskbarTheme)
|
||||
{
|
||||
CloseThemeData(This->TaskbarTheme);
|
||||
This->TaskbarTheme = NULL;
|
||||
}
|
||||
|
||||
ITrayWindowImpl_Release(ITrayWindow_from_impl(This));
|
||||
|
||||
if (InterlockedDecrement(&TrayWndCount) == 0)
|
||||
@@ -1105,6 +1112,8 @@ ITrayWindowImpl_AlignControls(IN OUT ITrayWindowImpl *This,
|
||||
BOOL Horizontal;
|
||||
HDWP dwp;
|
||||
|
||||
ITrayWindowImpl_UpdateStartButton(This,
|
||||
NULL);
|
||||
if (prcClient != NULL)
|
||||
{
|
||||
rcClient = *prcClient;
|
||||
@@ -1392,12 +1401,26 @@ Cleanup:
|
||||
|
||||
return hBitmap;
|
||||
}
|
||||
static VOID
|
||||
ITrayWindowImpl_UpdateTheme(IN OUT ITrayWindowImpl *This)
|
||||
{
|
||||
if(This->TaskbarTheme)
|
||||
CloseThemeData(This->TaskbarTheme);
|
||||
|
||||
if(IsThemeActive())
|
||||
This->TaskbarTheme = OpenThemeData(This->hWnd, L"Taskbar");
|
||||
else
|
||||
This->TaskbarTheme = 0;
|
||||
}
|
||||
static VOID
|
||||
ITrayWindowImpl_Create(IN OUT ITrayWindowImpl *This)
|
||||
{
|
||||
TCHAR szStartCaption[32];
|
||||
|
||||
|
||||
SetWindowTheme(This->hWnd,L"TaskBar", NULL);
|
||||
ITrayWindowImpl_UpdateTheme(This);
|
||||
|
||||
InterlockedIncrement(&TrayWndCount);
|
||||
|
||||
if (!LoadString(hExplorerInstance,
|
||||
@@ -1450,6 +1473,7 @@ ITrayWindowImpl_Create(IN OUT ITrayWindowImpl *This)
|
||||
NULL);
|
||||
if (This->hwndStart)
|
||||
{
|
||||
SetWindowTheme(This->hwndStart, L"Start", NULL);
|
||||
SendMessage(This->hwndStart,
|
||||
WM_SETFONT,
|
||||
(WPARAM)This->hStartBtnFont,
|
||||
@@ -1530,6 +1554,7 @@ SetStartBtnImage:
|
||||
This->TrayBandSite = CreateTrayBandSite(ITrayWindow_from_impl(This),
|
||||
&This->hwndRebar,
|
||||
&This->hwndTaskSwitch);
|
||||
SetWindowTheme(This->hwndRebar,L"TaskBar", NULL);
|
||||
|
||||
/* Create the tray notification window */
|
||||
This->hwndTrayNotify = CreateTrayNotifyWnd(ITrayWindow_from_impl(This),
|
||||
@@ -1851,6 +1876,105 @@ static const ITrayWindowVtbl ITrayWindowImpl_Vtbl =
|
||||
ITrayWindowImpl_Lock
|
||||
};
|
||||
|
||||
static int ITrayWindowImpl_DrawBackground(IN ITrayWindowImpl *This,
|
||||
IN HDC dc)
|
||||
{
|
||||
int backoundPart;
|
||||
RECT rect;
|
||||
|
||||
GetClientRect(This->hWnd, &rect);
|
||||
switch (This->Position)
|
||||
{
|
||||
case ABE_LEFT:
|
||||
backoundPart = TBP_BACKGROUNDLEFT;
|
||||
break;
|
||||
case ABE_TOP:
|
||||
backoundPart = TBP_BACKGROUNDTOP;
|
||||
break;
|
||||
case ABE_RIGHT:
|
||||
backoundPart = TBP_BACKGROUNDRIGHT;
|
||||
break;
|
||||
case ABE_BOTTOM:
|
||||
default:
|
||||
backoundPart = TBP_BACKGROUNDBOTTOM;
|
||||
break;
|
||||
}
|
||||
DrawThemeBackground(This->TaskbarTheme, dc, backoundPart, 0, &rect, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ITrayWindowImpl_DrawSizer(IN ITrayWindowImpl *This,
|
||||
IN HRGN hRgn)
|
||||
{
|
||||
HDC hdc;
|
||||
RECT rect;
|
||||
int backoundPart;
|
||||
|
||||
GetWindowRect (This->hWnd, &rect);
|
||||
OffsetRect (&rect, -rect.left, -rect.top);
|
||||
|
||||
hdc = GetDCEx(This->hWnd, hRgn, DCX_WINDOW|DCX_INTERSECTRGN|DCX_PARENTCLIP);
|
||||
|
||||
switch (This->Position)
|
||||
{
|
||||
case ABE_LEFT:
|
||||
backoundPart = TBP_SIZINGBARLEFT;
|
||||
rect.left = rect.right-GetSystemMetrics(SM_CXSIZEFRAME);
|
||||
break;
|
||||
case ABE_TOP:
|
||||
backoundPart = TBP_SIZINGBARTOP;
|
||||
rect.top = rect.bottom-GetSystemMetrics(SM_CYSIZEFRAME);
|
||||
break;
|
||||
case ABE_RIGHT:
|
||||
backoundPart = TBP_SIZINGBARRIGHT;
|
||||
rect.right = rect.left+GetSystemMetrics(SM_CXSIZEFRAME);
|
||||
break;
|
||||
case ABE_BOTTOM:
|
||||
default:
|
||||
backoundPart = TBP_SIZINGBARBOTTOM;
|
||||
rect.bottom = rect.top+GetSystemMetrics(SM_CYSIZEFRAME);
|
||||
break;
|
||||
}
|
||||
|
||||
DrawThemeBackground(This->TaskbarTheme, hdc, backoundPart, 0, &rect, 0);
|
||||
|
||||
ReleaseDC(This->hWnd, hdc);
|
||||
return 0;
|
||||
}
|
||||
DWORD WINAPI RunFileDlgThread( LPVOID lpParam )
|
||||
{
|
||||
ITrayWindowImpl *This = (ITrayWindowImpl*)lpParam;
|
||||
HANDLE hShell32;
|
||||
RUNFILEDLG RunFileDlg;
|
||||
HWND hwnd;
|
||||
RECT posRect;
|
||||
|
||||
GetWindowRect(This->hwndStart,&posRect);
|
||||
|
||||
hwnd = CreateWindowEx(0,
|
||||
WC_STATIC,
|
||||
NULL,
|
||||
WS_OVERLAPPED | WS_DISABLED | WS_CLIPSIBLINGS | WS_BORDER | SS_LEFT,
|
||||
posRect.left,
|
||||
posRect.top,
|
||||
posRect.right-posRect.left,
|
||||
posRect.bottom-posRect.top,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
hShell32 = GetModuleHandle(TEXT("SHELL32.DLL"));
|
||||
RunFileDlg = (RUNFILEDLG)GetProcAddress(hShell32, (LPCSTR)61);
|
||||
|
||||
RunFileDlg(hwnd, NULL, NULL, NULL, NULL, RFF_CALCDIRECTORY);
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT CALLBACK
|
||||
TrayWndProc(IN HWND hwnd,
|
||||
IN UINT uMsg,
|
||||
@@ -1891,6 +2015,32 @@ TrayWndProc(IN HWND hwnd,
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_COPYDATA:
|
||||
{
|
||||
if(This->hwndTrayNotify)
|
||||
{
|
||||
TrayNotify_NotifyMsg(This->hwndTrayNotify,
|
||||
wParam,
|
||||
lParam);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
case WM_THEMECHANGED:
|
||||
ITrayWindowImpl_UpdateTheme(This);
|
||||
return 0;
|
||||
case WM_NCPAINT:
|
||||
if(!This->TaskbarTheme)
|
||||
goto DefHandler;
|
||||
return ITrayWindowImpl_DrawSizer(This,
|
||||
(HRGN)wParam);
|
||||
case WM_ERASEBKGND:
|
||||
if(!This->TaskbarTheme)
|
||||
goto DefHandler;
|
||||
return ITrayWindowImpl_DrawBackground(This,
|
||||
(HDC)wParam);
|
||||
case WM_CTLCOLORBTN:
|
||||
SetBkMode((HDC)wParam, TRANSPARENT);
|
||||
return (int)GetStockObject(HOLLOW_BRUSH);
|
||||
case WM_NCHITTEST:
|
||||
{
|
||||
RECT rcClient;
|
||||
@@ -1903,13 +2053,16 @@ TrayWndProc(IN HWND hwnd,
|
||||
clicks on the border. */
|
||||
return HTBORDER;
|
||||
}
|
||||
|
||||
|
||||
/* 0 is a possible valid response for MapWindowPoints.
|
||||
While the default error code is 0. An extra check needs to be done */
|
||||
SetLastError(-1);
|
||||
if (GetClientRect(hwnd,
|
||||
&rcClient) &&
|
||||
MapWindowPoints(hwnd,
|
||||
(MapWindowPoints(hwnd,
|
||||
NULL,
|
||||
(LPPOINT)&rcClient,
|
||||
2) != 0)
|
||||
2) != 0 || GetLastError() != 0))
|
||||
{
|
||||
pt.x = (SHORT)LOWORD(lParam);
|
||||
pt.y = (SHORT)HIWORD(lParam);
|
||||
@@ -1929,30 +2082,23 @@ TrayWndProc(IN HWND hwnd,
|
||||
if (pt.y > rcClient.bottom)
|
||||
return HTBOTTOM;
|
||||
break;
|
||||
|
||||
case ABE_BOTTOM:
|
||||
if (pt.y < rcClient.top)
|
||||
return HTTOP;
|
||||
break;
|
||||
|
||||
case ABE_LEFT:
|
||||
if (pt.x > rcClient.right)
|
||||
return HTRIGHT;
|
||||
break;
|
||||
|
||||
case ABE_RIGHT:
|
||||
if (pt.x < rcClient.left)
|
||||
return HTLEFT;
|
||||
break;
|
||||
|
||||
default:
|
||||
case ABE_BOTTOM:
|
||||
default:
|
||||
if (pt.y < rcClient.top)
|
||||
return HTTOP;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return HTBORDER;
|
||||
}
|
||||
|
||||
case WM_MOVING:
|
||||
{
|
||||
POINT ptCursor;
|
||||
@@ -2005,7 +2151,7 @@ TrayWndProc(IN HWND hwnd,
|
||||
case WM_SIZE:
|
||||
{
|
||||
RECT rcClient;
|
||||
|
||||
InvalidateRect(This->hWnd, NULL, TRUE);
|
||||
if (wParam == SIZE_RESTORED && lParam == 0)
|
||||
{
|
||||
ITrayWindowImpl_ResizeWorkArea(This);
|
||||
@@ -2350,13 +2496,12 @@ HandleTrayContextMenu:
|
||||
|
||||
case IDM_RUN:
|
||||
{
|
||||
HANDLE hShell32;
|
||||
RUNFILEDLG RunFileDlg;
|
||||
|
||||
hShell32 = GetModuleHandle(TEXT("SHELL32.DLL"));
|
||||
RunFileDlg = (RUNFILEDLG)GetProcAddress(hShell32, (LPCSTR)61);
|
||||
|
||||
RunFileDlg(hwnd, NULL, NULL, NULL, NULL, RFF_CALCDIRECTORY);
|
||||
CreateThread(NULL, // default security attributes
|
||||
0, // use default stack size
|
||||
RunFileDlgThread, // thread function name
|
||||
This, // argument to thread function
|
||||
0, // use default creation flags
|
||||
NULL); // returns the thread identifier
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -7,3 +7,5 @@ add_subdirectory(nls)
|
||||
add_subdirectory(ntdll)
|
||||
add_subdirectory(shellext)
|
||||
add_subdirectory(win32)
|
||||
add_subdirectory(test)
|
||||
|
||||
|
3
dll/test/CMakeLists.txt
Normal file
3
dll/test/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
add_subdirectory(comtest)
|
||||
|
52
dll/test/comtest/CMakeLists.txt
Normal file
52
dll/test/comtest/CMakeLists.txt
Normal file
@@ -0,0 +1,52 @@
|
||||
set_unicode()
|
||||
set_cpp()
|
||||
|
||||
add_definitions(
|
||||
-D__WINESRC__
|
||||
-DROS_Headers)
|
||||
|
||||
remove_definitions(-D_WIN32_WINNT=0x502)
|
||||
add_definitions(-D_WIN32_WINNT=0x600)
|
||||
|
||||
include_directories(
|
||||
${REACTOS_SOURCE_DIR}/include/reactos/wine
|
||||
${REACTOS_SOURCE_DIR}/lib/atl)
|
||||
|
||||
set_rc_compiler()
|
||||
|
||||
spec2def(comtest.dll comtest.spec)
|
||||
|
||||
list(APPEND SOURCE
|
||||
IComTest.h
|
||||
IComTest_i.c
|
||||
comtest.cpp
|
||||
comtest.h
|
||||
dllmain.cpp
|
||||
stdafx.cpp
|
||||
stdafx.h
|
||||
targetver.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/comtest.def)
|
||||
|
||||
|
||||
add_library(comtest SHARED ${SOURCE})
|
||||
set_module_type(comtest win32dll)
|
||||
|
||||
target_link_libraries(comtest
|
||||
atlnew
|
||||
uuid
|
||||
wine)
|
||||
|
||||
add_importlibs(comtest
|
||||
shlwapi
|
||||
shell32
|
||||
comctl32
|
||||
gdi32
|
||||
ole32
|
||||
oleaut32
|
||||
user32
|
||||
advapi32
|
||||
msvcrt
|
||||
kernel32
|
||||
ntdll)
|
||||
|
||||
add_cab_target(comtest 1)
|
94
dll/test/comtest/IComTest.h
Normal file
94
dll/test/comtest/IComTest.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*** Autogenerated by WIDL 0.4-SVN from D:/reactos/reactos_atl/dll/test/idl/IComTest.idl - Do not edit ***/
|
||||
|
||||
#include <rpc.h>
|
||||
#include <rpcndr.h>
|
||||
|
||||
#ifndef __WIDL_ICOMTEST_H
|
||||
#define __WIDL_ICOMTEST_H
|
||||
|
||||
/* Forward declarations */
|
||||
|
||||
#ifndef __IComTest_FWD_DEFINED__
|
||||
#define __IComTest_FWD_DEFINED__
|
||||
typedef interface IComTest IComTest;
|
||||
#endif
|
||||
|
||||
/* Headers for imported files */
|
||||
|
||||
#include <unknwn.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IComTest interface
|
||||
*/
|
||||
#ifndef __IComTest_INTERFACE_DEFINED__
|
||||
#define __IComTest_INTERFACE_DEFINED__
|
||||
|
||||
DEFINE_GUID(IID_IComTest, 0x10cdf249, 0xa336, 0x406f, 0xb4,0x72, 0x20,0xf0,0x86,0x60,0xd6,0x09);
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
interface IComTest : public IUnknown
|
||||
{
|
||||
virtual HRESULT STDMETHODCALLTYPE test(
|
||||
) = 0;
|
||||
|
||||
};
|
||||
#else
|
||||
typedef struct IComTestVtbl {
|
||||
BEGIN_INTERFACE
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
|
||||
IComTest* This,
|
||||
REFIID riid,
|
||||
void **ppvObject);
|
||||
|
||||
ULONG (STDMETHODCALLTYPE *AddRef)(
|
||||
IComTest* This);
|
||||
|
||||
ULONG (STDMETHODCALLTYPE *Release)(
|
||||
IComTest* This);
|
||||
|
||||
/*** IComTest methods ***/
|
||||
HRESULT (STDMETHODCALLTYPE *test)(
|
||||
IComTest* This);
|
||||
|
||||
END_INTERFACE
|
||||
} IComTestVtbl;
|
||||
interface IComTest {
|
||||
CONST_VTBL IComTestVtbl* lpVtbl;
|
||||
};
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IComTest_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
|
||||
#define IComTest_AddRef(This) (This)->lpVtbl->AddRef(This)
|
||||
#define IComTest_Release(This) (This)->lpVtbl->Release(This)
|
||||
/*** IComTest methods ***/
|
||||
#define IComTest_test(This) (This)->lpVtbl->test(This)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IComTest_test_Proxy(
|
||||
IComTest* This);
|
||||
void __RPC_STUB IComTest_test_Stub(
|
||||
IRpcStubBuffer* This,
|
||||
IRpcChannelBuffer* pRpcChannelBuffer,
|
||||
PRPC_MESSAGE pRpcMessage,
|
||||
DWORD* pdwStubPhase);
|
||||
|
||||
#endif /* __IComTest_INTERFACE_DEFINED__ */
|
||||
|
||||
/* Begin additional prototypes for all interfaces */
|
||||
|
||||
|
||||
/* End additional prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __WIDL_ICOMTEST_H */
|
10
dll/test/comtest/IComTest.idl
Normal file
10
dll/test/comtest/IComTest.idl
Normal file
@@ -0,0 +1,10 @@
|
||||
import "unknwn.idl";
|
||||
[
|
||||
object,
|
||||
uuid(10CDF249-A336-406F-B472-20F08660D609),
|
||||
]
|
||||
interface IComTest : IUnknown
|
||||
{
|
||||
HRESULT test(void);
|
||||
};
|
||||
|
17
dll/test/comtest/IComTest_i.c
Normal file
17
dll/test/comtest/IComTest_i.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/*** Autogenerated by WIDL 0.4-SVN from D:/reactos/reactos_atl/dll/test/idl/IComTest.idl - Do not edit ***/
|
||||
|
||||
#include <rpc.h>
|
||||
#include <rpcndr.h>
|
||||
|
||||
#include <initguid.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
DEFINE_GUID(IID_IComTest, 0x10cdf249, 0xa336, 0x406f, 0xb4,0x72, 0x20,0xf0,0x86,0x60,0xd6,0x09);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
22
dll/test/comtest/comtest.cpp
Normal file
22
dll/test/comtest/comtest.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
// comtest.cpp : Defines the exported functions for the DLL application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "comtest.h"
|
||||
|
||||
|
||||
ComTestBase::ComTestBase()
|
||||
{
|
||||
OutputDebugStringW(L"ComTestBase");
|
||||
}
|
||||
|
||||
ComTestBase::~ComTestBase()
|
||||
{
|
||||
OutputDebugStringW(L"~ComTestBase");
|
||||
}
|
||||
|
||||
STDMETHODIMP ComTestBase::test(void)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
6
dll/test/comtest/comtest.def
Normal file
6
dll/test/comtest/comtest.def
Normal file
@@ -0,0 +1,6 @@
|
||||
LIBRARY comtest
|
||||
EXPORTS
|
||||
DllCanUnloadNow @1
|
||||
DllGetClassObject @2
|
||||
DllRegisterServer @3
|
||||
DllUnregisterServer @4
|
53
dll/test/comtest/comtest.h
Normal file
53
dll/test/comtest/comtest.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <shlwapi.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "iComTest.h"
|
||||
//#include "iComTest.h"
|
||||
//#include "iComTest_i.c"
|
||||
//#include "iComTest_p.c"
|
||||
|
||||
#define IDR_COMTEST 101
|
||||
|
||||
|
||||
// {C4CC78DB-8266-4ae7-8685-8EE05376CB09}
|
||||
DEFINE_GUID(CLSID_ComTest, 0xc4cc78db, 0x8266, 0x4ae7, 0x86, 0x85, 0x8e, 0xe0, 0x53, 0x76, 0xcb, 0x9);
|
||||
//static const GUID CLSID_ComTest = {0xc4cc78db,0x8266,0x4ae7,{0x86,0x85,0x8e,0xe0,0x53,0x76,0xcb,0x9}};
|
||||
|
||||
|
||||
//const IID IID_IComTest = {0x10CDF249,0xA336,0x406F,{0xB4,0x72,0x20,0xF0,0x86,0x60,0xD6,0x09}};
|
||||
|
||||
|
||||
class ComTestBase :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IComTest
|
||||
{
|
||||
public:
|
||||
ComTestBase();
|
||||
~ComTestBase();
|
||||
|
||||
// *** IComTest methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE test(void);
|
||||
|
||||
|
||||
BEGIN_COM_MAP(ComTestBase)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IComTest, IComTest)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
class ComTest :
|
||||
public CComCoClass<ComTest, &CLSID_ComTest>,
|
||||
public ComTestBase
|
||||
{
|
||||
public:
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_COMTEST)
|
||||
DECLARE_NOT_AGGREGATABLE(ComTest)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
};
|
4
dll/test/comtest/comtest.spec
Normal file
4
dll/test/comtest/comtest.spec
Normal file
@@ -0,0 +1,4 @@
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllUnregisterServer()
|
76
dll/test/comtest/dllmain.cpp
Normal file
76
dll/test/comtest/dllmain.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlobj_undoc.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <shlwapi.h>
|
||||
#include <tchar.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include <initguid.h>
|
||||
#include "stdafx.h"
|
||||
#include "comtest.h"
|
||||
|
||||
|
||||
extern const IID IID_IComTest;
|
||||
|
||||
CComModule gModule;
|
||||
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
OBJECT_ENTRY(CLSID_ComTest, ComTest)
|
||||
END_OBJECT_MAP()
|
||||
|
||||
|
||||
|
||||
STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
|
||||
{
|
||||
OutputDebugStringW(L"DllMain");
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
OutputDebugStringW(L"DLL_PROCESS_ATTACH");
|
||||
gModule.Init(ObjectMap, hInstance, NULL);
|
||||
DisableThreadLibraryCalls(hInstance);
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
OutputDebugStringW(L"DLL_PROCESS_DETACH");
|
||||
gModule.Term();
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
STDAPI DllCanUnloadNow()
|
||||
{
|
||||
OutputDebugStringW(L"DllCanUnloadNow");
|
||||
return gModule.DllCanUnloadNow();
|
||||
}
|
||||
|
||||
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
OutputDebugStringW(L"DllGetClassObject");
|
||||
return gModule.DllGetClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
STDAPI DllRegisterServer()
|
||||
{
|
||||
OutputDebugStringW(L"DllRegisterServer");
|
||||
return gModule.DllRegisterServer(FALSE);
|
||||
}
|
||||
|
||||
STDAPI DllUnregisterServer()
|
||||
{
|
||||
OutputDebugStringW(L"DllUnregisterServer");
|
||||
return gModule.DllUnregisterServer(FALSE);
|
||||
}
|
8
dll/test/comtest/stdafx.cpp
Normal file
8
dll/test/comtest/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// comtest.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
16
dll/test/comtest/stdafx.h
Normal file
16
dll/test/comtest/stdafx.h
Normal file
@@ -0,0 +1,16 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files:
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
8
dll/test/comtest/targetver.h
Normal file
8
dll/test/comtest/targetver.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||
|
||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||
|
||||
#include <SDKDDKVer.h>
|
BIN
msvc_stuff/ComTestLoad/ComTestLoad.opensdf
Normal file
BIN
msvc_stuff/ComTestLoad/ComTestLoad.opensdf
Normal file
Binary file not shown.
BIN
msvc_stuff/ComTestLoad/ComTestLoad.sdf
Normal file
BIN
msvc_stuff/ComTestLoad/ComTestLoad.sdf
Normal file
Binary file not shown.
20
msvc_stuff/ComTestLoad/ComTestLoad.sln
Normal file
20
msvc_stuff/ComTestLoad/ComTestLoad.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ComTestLoad", "ComTestLoad\ComTestLoad.vcxproj", "{D878018F-317B-4F6D-815A-0FC8B1BE446C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D878018F-317B-4F6D-815A-0FC8B1BE446C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D878018F-317B-4F6D-815A-0FC8B1BE446C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D878018F-317B-4F6D-815A-0FC8B1BE446C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D878018F-317B-4F6D-815A-0FC8B1BE446C}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
msvc_stuff/ComTestLoad/ComTestLoad.suo
Normal file
BIN
msvc_stuff/ComTestLoad/ComTestLoad.suo
Normal file
Binary file not shown.
129
msvc_stuff/ComTestLoad/ComTestLoad/ComTestLoad.cpp
Normal file
129
msvc_stuff/ComTestLoad/ComTestLoad/ComTestLoad.cpp
Normal file
@@ -0,0 +1,129 @@
|
||||
// ComTestLoad.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <iComTest.h>
|
||||
#include <initguid.h>
|
||||
#include <Objbase.h>
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
// {C4CC78DB-8266-4ae7-8685-8EE05376CB09}
|
||||
DEFINE_GUID(CLSID_ComTest, 0xc4cc78db, 0x8266, 0x4ae7, 0x86, 0x85, 0x8e, 0xe0, 0x53, 0x76, 0xcb, 0x9);
|
||||
|
||||
// {6DA36786-117F-449b-B210-194DCFCAF416}
|
||||
DEFINE_GUID(CLSID_ComAggTest, 0x6da36786, 0x117f, 0x449b, 0xb2, 0x10, 0x19, 0x4d, 0xcf, 0xca, 0xf4, 0x16);
|
||||
|
||||
//{ ECD4FC4D- 521C- 11D0- B7 92- 00 A0 C9 03 12 E1}
|
||||
//DEFINE_GUID(CLSID_ComTest, 0xECD4FC4D, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1);
|
||||
|
||||
//const IID IID_IComTest = {0x10CDF249,0xA336,0x406F,{0xB4,0x72,0x20,0xF0,0x86,0x60,0xD6,0x09}};
|
||||
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
|
||||
HRESULT hr = CoInitialize(NULL);
|
||||
IComTest * testCom;
|
||||
hr = CoCreateInstance(CLSID_ComTest, NULL, CLSCTX_INPROC_SERVER, IID_IComTest, (LPVOID *)&testCom);
|
||||
|
||||
switch(hr)
|
||||
{
|
||||
case S_OK:
|
||||
cout << "testCom Loaded" << endl;
|
||||
break;
|
||||
case REGDB_E_CLASSNOTREG:
|
||||
cout << "testCom loading REGDB_E_CLASSNOTREG" << endl;
|
||||
return 0;
|
||||
break;
|
||||
case CLASS_E_NOAGGREGATION:
|
||||
cout << "testCom loading CLASS_E_NOAGGREGATION" << endl;
|
||||
return 0;
|
||||
break;
|
||||
case E_NOINTERFACE:
|
||||
cout << "testCom loading E_NOINTERFACE" << endl;
|
||||
return 0;
|
||||
break;
|
||||
case E_POINTER:
|
||||
cout << "testCom loading E_POINTER" << endl;
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
HRESULT hrTest=testCom->test();
|
||||
if(hrTest==S_OK)
|
||||
{
|
||||
cout << "testCom->test OK" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "testCom->test failed" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IComAggTest * testAggCom;
|
||||
hr = CoCreateInstance(CLSID_ComAggTest, NULL, CLSCTX_INPROC_SERVER, IID_IComAggTest, (LPVOID *)&testAggCom);
|
||||
|
||||
switch(hr)
|
||||
{
|
||||
case S_OK:
|
||||
cout << "testAggCom Loaded" << endl;
|
||||
break;
|
||||
case REGDB_E_CLASSNOTREG:
|
||||
cout << "testAggCom loading REGDB_E_CLASSNOTREG" << endl;
|
||||
return 0;
|
||||
break;
|
||||
case CLASS_E_NOAGGREGATION:
|
||||
cout << "testAggCom loading CLASS_E_NOAGGREGATION" << endl;
|
||||
return 0;
|
||||
break;
|
||||
case E_NOINTERFACE:
|
||||
cout << "testAggCom loading E_NOINTERFACE" << endl;
|
||||
return 0;
|
||||
break;
|
||||
case E_POINTER:
|
||||
cout << "testAggCom loading E_POINTER" << endl;
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
hrTest=0;
|
||||
hrTest=testAggCom->test();
|
||||
if(hrTest==S_OK)
|
||||
{
|
||||
cout << "testAggCom->test OK" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "testAggCom->test failed" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
hrTest=0;
|
||||
hrTest=testAggCom->test2();
|
||||
if(hrTest==S_OK)
|
||||
{
|
||||
cout << "testAggCom->test2 OK" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "testAggCom->test2 failed" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
94
msvc_stuff/ComTestLoad/ComTestLoad/ComTestLoad.vcxproj
Normal file
94
msvc_stuff/ComTestLoad/ComTestLoad/ComTestLoad.vcxproj
Normal file
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{D878018F-317B-4F6D-815A-0FC8B1BE446C}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ComTestLoad</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>C:\Users\Greenie\Documents\Visual Studio 2010\Projects\comtest\comtest;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>C:\Users\Greenie\Documents\Visual Studio 2010\Projects\comoutertest\comtest;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\comoutertest\comtest\iComTest.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\comoutertest\comtest\iComTest_i.c" />
|
||||
<ClCompile Include="ComTestLoad.cpp" />
|
||||
<ClCompile Include="stdafx.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\comoutertest\comtest\iComTest.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ComTestLoad.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\comoutertest\comtest\iComTest_i.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
40
msvc_stuff/ComTestLoad/ComTestLoad/ReadMe.txt
Normal file
40
msvc_stuff/ComTestLoad/ComTestLoad/ReadMe.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
========================================================================
|
||||
CONSOLE APPLICATION : ComTestLoad Project Overview
|
||||
========================================================================
|
||||
|
||||
AppWizard has created this ComTestLoad application for you.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your ComTestLoad application.
|
||||
|
||||
|
||||
ComTestLoad.vcxproj
|
||||
This is the main project file for VC++ projects generated using an Application Wizard.
|
||||
It contains information about the version of Visual C++ that generated the file, and
|
||||
information about the platforms, configurations, and project features selected with the
|
||||
Application Wizard.
|
||||
|
||||
ComTestLoad.vcxproj.filters
|
||||
This is the filters file for VC++ projects generated using an Application Wizard.
|
||||
It contains information about the association between the files in your project
|
||||
and the filters. This association is used in the IDE to show grouping of files with
|
||||
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
|
||||
"Source Files" filter).
|
||||
|
||||
ComTestLoad.cpp
|
||||
This is the main application source file.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other standard files:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
These files are used to build a precompiled header (PCH) file
|
||||
named ComTestLoad.pch and a precompiled types file named StdAfx.obj.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other notes:
|
||||
|
||||
AppWizard uses "TODO:" comments to indicate parts of the source code you
|
||||
should add to or customize.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
8
msvc_stuff/ComTestLoad/ComTestLoad/stdafx.cpp
Normal file
8
msvc_stuff/ComTestLoad/ComTestLoad/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// ComTestLoad.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
15
msvc_stuff/ComTestLoad/ComTestLoad/stdafx.h
Normal file
15
msvc_stuff/ComTestLoad/ComTestLoad/stdafx.h
Normal file
@@ -0,0 +1,15 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
8
msvc_stuff/ComTestLoad/ComTestLoad/targetver.h
Normal file
8
msvc_stuff/ComTestLoad/ComTestLoad/targetver.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||
|
||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||
|
||||
#include <SDKDDKVer.h>
|
BIN
msvc_stuff/ComTestLoad/Release/ComTestLoad.exe
Normal file
BIN
msvc_stuff/ComTestLoad/Release/ComTestLoad.exe
Normal file
Binary file not shown.
BIN
msvc_stuff/LogCom/LogCom.opensdf
Normal file
BIN
msvc_stuff/LogCom/LogCom.opensdf
Normal file
Binary file not shown.
BIN
msvc_stuff/LogCom/LogCom.sdf
Normal file
BIN
msvc_stuff/LogCom/LogCom.sdf
Normal file
Binary file not shown.
20
msvc_stuff/LogCom/LogCom.sln
Normal file
20
msvc_stuff/LogCom/LogCom.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LogCom", "LogCom\LogCom.vcxproj", "{E9C40DD4-0249-494A-8C94-E4251A600ABE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E9C40DD4-0249-494A-8C94-E4251A600ABE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E9C40DD4-0249-494A-8C94-E4251A600ABE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E9C40DD4-0249-494A-8C94-E4251A600ABE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E9C40DD4-0249-494A-8C94-E4251A600ABE}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
msvc_stuff/LogCom/LogCom.suo
Normal file
BIN
msvc_stuff/LogCom/LogCom.suo
Normal file
Binary file not shown.
6
msvc_stuff/LogCom/LogCom/LogCom.cpp
Normal file
6
msvc_stuff/LogCom/LogCom/LogCom.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
// LogCom.cpp : Defines the exported functions for the DLL application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
6
msvc_stuff/LogCom/LogCom/LogCom.def
Normal file
6
msvc_stuff/LogCom/LogCom/LogCom.def
Normal file
@@ -0,0 +1,6 @@
|
||||
LIBRARY LogCom
|
||||
EXPORTS
|
||||
DllCanUnloadNow @1
|
||||
DllGetClassObject @2
|
||||
DllCanUnloadNow @3
|
||||
DllUnregisterServer @4
|
100
msvc_stuff/LogCom/LogCom/LogCom.vcxproj
Normal file
100
msvc_stuff/LogCom/LogCom/LogCom.vcxproj
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E9C40DD4-0249-494A-8C94-E4251A600ABE}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>LogCom</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LOGCOM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LOGCOM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<ModuleDefinitionFile>LogCom.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LogCom.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LogCom.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
39
msvc_stuff/LogCom/LogCom/LogCom.vcxproj.filters
Normal file
39
msvc_stuff/LogCom/LogCom/LogCom.vcxproj.filters
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LogCom.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LogCom.def" />
|
||||
</ItemGroup>
|
||||
</Project>
|
3
msvc_stuff/LogCom/LogCom/LogCom.vcxproj.user
Normal file
3
msvc_stuff/LogCom/LogCom/LogCom.vcxproj.user
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
94
msvc_stuff/LogCom/LogCom/dllmain.cpp
Normal file
94
msvc_stuff/LogCom/LogCom/dllmain.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
#include "stdafx.h"
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <Objbase.h>
|
||||
|
||||
HINSTANCE dllHandle = NULL;
|
||||
typedef HRESULT (CALLBACK* DllCanUnloadNowType)();
|
||||
typedef HRESULT (CALLBACK* DllGetClassObjectType)(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
|
||||
typedef HRESULT (CALLBACK* DllUnregisterServerType)();
|
||||
|
||||
DllCanUnloadNowType DllCanUnloadNowPtr = NULL;
|
||||
DllGetClassObjectType DllGetClassObjectPtr = NULL;
|
||||
DllUnregisterServerType DllUnregisterServerPtr = NULL;
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
OutputDebugStringW(L"DllMain");
|
||||
if(!dllHandle)
|
||||
{
|
||||
OutputDebugStringW(L"!dllHandle");
|
||||
dllHandle = LoadLibrary(L"C:\\Windows\\System32\\browseui.dll");
|
||||
if(!dllHandle)
|
||||
OutputDebugStringW(L"dllHandle fail");
|
||||
else
|
||||
OutputDebugStringW(L"dllHandle work");
|
||||
DllCanUnloadNowPtr = (DllCanUnloadNowType)GetProcAddress(dllHandle,"DllCanUnloadNow");
|
||||
DllGetClassObjectPtr = (DllGetClassObjectType)GetProcAddress(dllHandle,"DllGetClassObject");
|
||||
DllUnregisterServerPtr = (DllUnregisterServerType)GetProcAddress(dllHandle,"DllUnregisterServer");
|
||||
}
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
STDAPI DllCanUnloadNow()
|
||||
{
|
||||
if(!dllHandle)
|
||||
{
|
||||
return DllCanUnloadNowPtr();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
FILE *file;
|
||||
OutputDebugStringW(L"DllGetClassObject");
|
||||
file = fopen("c:/browsui.txt","a+");
|
||||
fprintf(file,"DllGetClassObject ");
|
||||
|
||||
LPOLESTR sIid = NULL;
|
||||
HRESULT hr = StringFromIID(rclsid, &sIid);
|
||||
fprintf(file,"rclsid = %S ", sIid);
|
||||
|
||||
hr = StringFromIID(riid, &sIid);
|
||||
fprintf(file,"riid = %S \n", sIid);
|
||||
|
||||
fclose(file);
|
||||
|
||||
|
||||
if(dllHandle)
|
||||
{
|
||||
OutputDebugStringW(L"dllHandle good");
|
||||
if(!dllHandle)
|
||||
OutputDebugStringW(L"DllGetClassObjectPtr exists");
|
||||
return DllGetClassObjectPtr(rclsid, riid, ppv);
|
||||
}
|
||||
else
|
||||
{
|
||||
OutputDebugStringW(L"dllHandle fail");
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
STDAPI DllUnregisterServer()
|
||||
{
|
||||
if(!dllHandle)
|
||||
{
|
||||
return DllUnregisterServerPtr();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
8
msvc_stuff/LogCom/LogCom/stdafx.cpp
Normal file
8
msvc_stuff/LogCom/LogCom/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// LogCom.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
16
msvc_stuff/LogCom/LogCom/stdafx.h
Normal file
16
msvc_stuff/LogCom/LogCom/stdafx.h
Normal file
@@ -0,0 +1,16 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files:
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
8
msvc_stuff/LogCom/LogCom/targetver.h
Normal file
8
msvc_stuff/LogCom/LogCom/targetver.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||
|
||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||
|
||||
#include <SDKDDKVer.h>
|
BIN
msvc_stuff/LogCom/Release/LogCom.dll
Normal file
BIN
msvc_stuff/LogCom/Release/LogCom.dll
Normal file
Binary file not shown.
BIN
msvc_stuff/comtest/Release/browseui.dll
Normal file
BIN
msvc_stuff/comtest/Release/browseui.dll
Normal file
Binary file not shown.
BIN
msvc_stuff/comtest/comtest.opensdf
Normal file
BIN
msvc_stuff/comtest/comtest.opensdf
Normal file
Binary file not shown.
BIN
msvc_stuff/comtest/comtest.sdf
Normal file
BIN
msvc_stuff/comtest/comtest.sdf
Normal file
Binary file not shown.
20
msvc_stuff/comtest/comtest.sln
Normal file
20
msvc_stuff/comtest/comtest.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "comtest", "comtest\comtest.vcxproj", "{7F61642A-9DD4-4287-BFCB-CBC90E14A790}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{7F61642A-9DD4-4287-BFCB-CBC90E14A790}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7F61642A-9DD4-4287-BFCB-CBC90E14A790}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7F61642A-9DD4-4287-BFCB-CBC90E14A790}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7F61642A-9DD4-4287-BFCB-CBC90E14A790}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
msvc_stuff/comtest/comtest.suo
Normal file
BIN
msvc_stuff/comtest/comtest.suo
Normal file
Binary file not shown.
10
msvc_stuff/comtest/comtest/IComTest.idl
Normal file
10
msvc_stuff/comtest/comtest/IComTest.idl
Normal file
@@ -0,0 +1,10 @@
|
||||
import "unknwn.idl";
|
||||
[
|
||||
object,
|
||||
uuid(10CDF249-A336-406F-B472-20F08660D609),
|
||||
]
|
||||
interface IComTest : IUnknown
|
||||
{
|
||||
HRESULT test(void);
|
||||
};
|
||||
|
22
msvc_stuff/comtest/comtest/comtest.cpp
Normal file
22
msvc_stuff/comtest/comtest/comtest.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
// comtest.cpp : Defines the exported functions for the DLL application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "comtest.h"
|
||||
|
||||
|
||||
ComTestBase::ComTestBase()
|
||||
{
|
||||
OutputDebugStringW(L"ComTestBase");
|
||||
}
|
||||
|
||||
ComTestBase::~ComTestBase()
|
||||
{
|
||||
OutputDebugStringW(L"~ComTestBase");
|
||||
}
|
||||
|
||||
STDMETHODIMP ComTestBase::test(void)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
7
msvc_stuff/comtest/comtest/comtest.def
Normal file
7
msvc_stuff/comtest/comtest/comtest.def
Normal file
@@ -0,0 +1,7 @@
|
||||
LIBRARY comtest
|
||||
EXPORTS
|
||||
DllCanUnloadNow @1
|
||||
DllGetClassObject @2
|
||||
DllRegisterServer @3
|
||||
DllCanUnloadNow @4
|
||||
DllUnregisterServer @5
|
46
msvc_stuff/comtest/comtest/comtest.h
Normal file
46
msvc_stuff/comtest/comtest/comtest.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include "iComTest.h"
|
||||
//#include "iComTest_i.c"
|
||||
//#include "iComTest_p.c"
|
||||
|
||||
#define IDR_COMTEST 101
|
||||
|
||||
|
||||
// {C4CC78DB-8266-4ae7-8685-8EE05376CB09}
|
||||
DEFINE_GUID(CLSID_ComTest, 0xc4cc78db, 0x8266, 0x4ae7, 0x86, 0x85, 0x8e, 0xe0, 0x53, 0x76, 0xcb, 0x9);
|
||||
//static const GUID CLSID_ComTest = {0xc4cc78db,0x8266,0x4ae7,{0x86,0x85,0x8e,0xe0,0x53,0x76,0xcb,0x9}};
|
||||
|
||||
|
||||
//const IID IID_IComTest = {0x10CDF249,0xA336,0x406F,{0xB4,0x72,0x20,0xF0,0x86,0x60,0xD6,0x09}};
|
||||
|
||||
|
||||
class ComTestBase :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IComTest
|
||||
|
||||
{
|
||||
public:
|
||||
ComTestBase();
|
||||
~ComTestBase();
|
||||
|
||||
// *** IComTest methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE test(void);
|
||||
|
||||
|
||||
BEGIN_COM_MAP(ComTestBase)
|
||||
COM_INTERFACE_ENTRY_IID(IID_IComTest, IComTest)
|
||||
END_COM_MAP()
|
||||
};
|
||||
|
||||
class ComTest :
|
||||
public CComCoClass<ComTest, &CLSID_ComTest>,
|
||||
public ComTestBase
|
||||
{
|
||||
public:
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_COMTEST)
|
||||
DECLARE_NOT_AGGREGATABLE(ComTest)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
};
|
109
msvc_stuff/comtest/comtest/comtest.vcxproj
Normal file
109
msvc_stuff/comtest/comtest/comtest.vcxproj
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7F61642A-9DD4-4287-BFCB-CBC90E14A790}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>comtest</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfAtl>false</UseOfAtl>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>C:\WinDDK\7600.16385.1\inc\atl71;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>C:\WinDDK\7600.16385.1\inc\atl71;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;COMTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>C:\WinDDK\7600.16385.1\lib\ATL\i386\atls.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;COMTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>C:\WinDDK\7600.16385.1\lib\ATL\i386\atls.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>comtest.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="comtest.def" />
|
||||
<None Include="IComTest.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="comtest.h" />
|
||||
<ClInclude Include="iComTest.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="comtest.cpp" />
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="iComTest_i.c" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
51
msvc_stuff/comtest/comtest/comtest.vcxproj.filters
Normal file
51
msvc_stuff/comtest/comtest/comtest.vcxproj.filters
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="comtest.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="iComTest.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="comtest.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="iComTest_i.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="IComTest.idl" />
|
||||
<None Include="comtest.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
3
msvc_stuff/comtest/comtest/comtest.vcxproj.user
Normal file
3
msvc_stuff/comtest/comtest/comtest.vcxproj.user
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
37
msvc_stuff/comtest/comtest/dlldata.c
Normal file
37
msvc_stuff/comtest/comtest/dlldata.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/*********************************************************
|
||||
DllData file -- generated by MIDL compiler
|
||||
|
||||
DO NOT ALTER THIS FILE
|
||||
|
||||
This file is regenerated by MIDL on every IDL file compile.
|
||||
|
||||
To completely reconstruct this file, delete it and rerun MIDL
|
||||
on all the IDL files in this DLL, specifying this file for the
|
||||
/dlldata command line option
|
||||
|
||||
*********************************************************/
|
||||
|
||||
|
||||
#include <rpcproxy.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXTERN_PROXY_FILE( iComTest )
|
||||
|
||||
|
||||
PROXYFILE_LIST_START
|
||||
/* Start of list */
|
||||
REFERENCE_PROXY_FILE( iComTest ),
|
||||
/* End of list */
|
||||
PROXYFILE_LIST_END
|
||||
|
||||
|
||||
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C" */
|
||||
#endif
|
||||
|
||||
/* end of generated dlldata file */
|
62
msvc_stuff/comtest/comtest/dllmain.cpp
Normal file
62
msvc_stuff/comtest/comtest/dllmain.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
|
||||
|
||||
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include <initguid.h>
|
||||
#include "stdafx.h"
|
||||
#include "comtest.h"
|
||||
|
||||
|
||||
extern const IID IID_IComTest;
|
||||
|
||||
CComModule gModule;
|
||||
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
OBJECT_ENTRY(CLSID_ComTest, ComTest)
|
||||
END_OBJECT_MAP()
|
||||
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
|
||||
{
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
gModule.Init(ObjectMap, hInstance, NULL);
|
||||
DisableThreadLibraryCalls(hInstance);
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
gModule.Term();
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
STDAPI DllCanUnloadNow()
|
||||
{
|
||||
return gModule.DllCanUnloadNow();
|
||||
}
|
||||
|
||||
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
return gModule.DllGetClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
STDAPI DllRegisterServer()
|
||||
{
|
||||
return gModule.DllRegisterServer(FALSE);
|
||||
}
|
||||
|
||||
STDAPI DllUnregisterServer()
|
||||
{
|
||||
return gModule.DllUnregisterServer(FALSE);
|
||||
}
|
149
msvc_stuff/comtest/comtest/iComTest.h
Normal file
149
msvc_stuff/comtest/comtest/iComTest.h
Normal file
@@ -0,0 +1,149 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 7.00.0555 */
|
||||
/* at Sun Jul 03 16:48:35 2011
|
||||
*/
|
||||
/* Compiler settings for iComTest.idl:
|
||||
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
|
||||
protocol : dce , ms_ext, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
|
||||
|
||||
/* verify that the <rpcndr.h> version is high enough to compile this file*/
|
||||
#ifndef __REQUIRED_RPCNDR_H_VERSION__
|
||||
#define __REQUIRED_RPCNDR_H_VERSION__ 475
|
||||
#endif
|
||||
|
||||
#include "rpc.h"
|
||||
#include "rpcndr.h"
|
||||
|
||||
#ifndef __RPCNDR_H_VERSION__
|
||||
#error this stub requires an updated version of <rpcndr.h>
|
||||
#endif // __RPCNDR_H_VERSION__
|
||||
|
||||
#ifndef COM_NO_WINDOWS_H
|
||||
#include "windows.h"
|
||||
#include "ole2.h"
|
||||
#endif /*COM_NO_WINDOWS_H*/
|
||||
|
||||
#ifndef __iComTest_h__
|
||||
#define __iComTest_h__
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
/* Forward Declarations */
|
||||
|
||||
#ifndef __IComTest_FWD_DEFINED__
|
||||
#define __IComTest_FWD_DEFINED__
|
||||
typedef interface IComTest IComTest;
|
||||
#endif /* __IComTest_FWD_DEFINED__ */
|
||||
|
||||
|
||||
/* header files for imported files */
|
||||
#include "unknwn.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __IComTest_INTERFACE_DEFINED__
|
||||
#define __IComTest_INTERFACE_DEFINED__
|
||||
|
||||
/* interface IComTest */
|
||||
/* [uuid][object] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_IComTest;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("10CDF249-A336-406F-B472-20F08660D609")
|
||||
IComTest : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE test( void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct IComTestVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
IComTest * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [annotation][iid_is][out] */
|
||||
__RPC__deref_out void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
IComTest * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
IComTest * This);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *test )(
|
||||
IComTest * This);
|
||||
|
||||
END_INTERFACE
|
||||
} IComTestVtbl;
|
||||
|
||||
interface IComTest
|
||||
{
|
||||
CONST_VTBL struct IComTestVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define IComTest_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define IComTest_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define IComTest_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define IComTest_test(This) \
|
||||
( (This)->lpVtbl -> test(This) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __IComTest_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* Additional Prototypes for ALL interfaces */
|
||||
|
||||
/* end of Additional Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
79
msvc_stuff/comtest/comtest/iComTest_i.c
Normal file
79
msvc_stuff/comtest/comtest/iComTest_i.c
Normal file
@@ -0,0 +1,79 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
|
||||
|
||||
/* link this file in with the server and any clients */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 7.00.0555 */
|
||||
/* at Sun Jul 03 16:48:35 2011
|
||||
*/
|
||||
/* Compiler settings for iComTest.idl:
|
||||
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
|
||||
protocol : dce , ms_ext, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
#include <rpc.h>
|
||||
#include <rpcndr.h>
|
||||
|
||||
#ifdef _MIDL_USE_GUIDDEF_
|
||||
|
||||
#ifndef INITGUID
|
||||
#define INITGUID
|
||||
#include <guiddef.h>
|
||||
#undef INITGUID
|
||||
#else
|
||||
#include <guiddef.h>
|
||||
#endif
|
||||
|
||||
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
|
||||
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
|
||||
|
||||
#else // !_MIDL_USE_GUIDDEF_
|
||||
|
||||
#ifndef __IID_DEFINED__
|
||||
#define __IID_DEFINED__
|
||||
|
||||
typedef struct _IID
|
||||
{
|
||||
unsigned long x;
|
||||
unsigned short s1;
|
||||
unsigned short s2;
|
||||
unsigned char c[8];
|
||||
} IID;
|
||||
|
||||
#endif // __IID_DEFINED__
|
||||
|
||||
#ifndef CLSID_DEFINED
|
||||
#define CLSID_DEFINED
|
||||
typedef IID CLSID;
|
||||
#endif // CLSID_DEFINED
|
||||
|
||||
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
|
||||
const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||
|
||||
#endif !_MIDL_USE_GUIDDEF_
|
||||
|
||||
MIDL_DEFINE_GUID(IID, IID_IComTest,0x10CDF249,0xA336,0x406F,0xB4,0x72,0x20,0xF0,0x86,0x60,0xD6,0x09);
|
||||
|
||||
#undef MIDL_DEFINE_GUID
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
281
msvc_stuff/comtest/comtest/iComTest_p.c
Normal file
281
msvc_stuff/comtest/comtest/iComTest_p.c
Normal file
@@ -0,0 +1,281 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the proxy stub code */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 7.00.0555 */
|
||||
/* at Sun Jul 03 16:48:35 2011
|
||||
*/
|
||||
/* Compiler settings for iComTest.idl:
|
||||
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
|
||||
protocol : dce , ms_ext, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#if !defined(_M_IA64) && !defined(_M_AMD64)
|
||||
|
||||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
|
||||
#pragma warning( disable: 4211 ) /* redefine extern to static */
|
||||
#pragma warning( disable: 4232 ) /* dllimport identity*/
|
||||
#pragma warning( disable: 4024 ) /* array to pointer mapping*/
|
||||
#pragma warning( disable: 4152 ) /* function/data pointer conversion in expression */
|
||||
#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */
|
||||
|
||||
#pragma optimize("", off )
|
||||
|
||||
#define USE_STUBLESS_PROXY
|
||||
|
||||
|
||||
/* verify that the <rpcproxy.h> version is high enough to compile this file*/
|
||||
#ifndef __REDQ_RPCPROXY_H_VERSION__
|
||||
#define __REQUIRED_RPCPROXY_H_VERSION__ 475
|
||||
#endif
|
||||
|
||||
|
||||
#include "rpcproxy.h"
|
||||
#ifndef __RPCPROXY_H_VERSION__
|
||||
#error this stub requires an updated version of <rpcproxy.h>
|
||||
#endif /* __RPCPROXY_H_VERSION__ */
|
||||
|
||||
|
||||
#include "iComTest.h"
|
||||
|
||||
#define TYPE_FORMAT_STRING_SIZE 3
|
||||
#define PROC_FORMAT_STRING_SIZE 31
|
||||
#define EXPR_FORMAT_STRING_SIZE 1
|
||||
#define TRANSMIT_AS_TABLE_SIZE 0
|
||||
#define WIRE_MARSHAL_TABLE_SIZE 0
|
||||
|
||||
typedef struct _iComTest_MIDL_TYPE_FORMAT_STRING
|
||||
{
|
||||
short Pad;
|
||||
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
|
||||
} iComTest_MIDL_TYPE_FORMAT_STRING;
|
||||
|
||||
typedef struct _iComTest_MIDL_PROC_FORMAT_STRING
|
||||
{
|
||||
short Pad;
|
||||
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
|
||||
} iComTest_MIDL_PROC_FORMAT_STRING;
|
||||
|
||||
typedef struct _iComTest_MIDL_EXPR_FORMAT_STRING
|
||||
{
|
||||
long Pad;
|
||||
unsigned char Format[ EXPR_FORMAT_STRING_SIZE ];
|
||||
} iComTest_MIDL_EXPR_FORMAT_STRING;
|
||||
|
||||
|
||||
static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax =
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
|
||||
|
||||
|
||||
extern const iComTest_MIDL_TYPE_FORMAT_STRING iComTest__MIDL_TypeFormatString;
|
||||
extern const iComTest_MIDL_PROC_FORMAT_STRING iComTest__MIDL_ProcFormatString;
|
||||
extern const iComTest_MIDL_EXPR_FORMAT_STRING iComTest__MIDL_ExprFormatString;
|
||||
|
||||
|
||||
extern const MIDL_STUB_DESC Object_StubDesc;
|
||||
|
||||
|
||||
extern const MIDL_SERVER_INFO IComTest_ServerInfo;
|
||||
extern const MIDL_STUBLESS_PROXY_INFO IComTest_ProxyInfo;
|
||||
|
||||
|
||||
|
||||
#if !defined(__RPC_WIN32__)
|
||||
#error Invalid build platform for this stub.
|
||||
#endif
|
||||
|
||||
#if !(TARGET_IS_NT50_OR_LATER)
|
||||
#error You need Windows 2000 or later to run this stub because it uses these features:
|
||||
#error /robust command line switch.
|
||||
#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
|
||||
#error This app will fail with the RPC_X_WRONG_STUB_VERSION error.
|
||||
#endif
|
||||
|
||||
|
||||
static const iComTest_MIDL_PROC_FORMAT_STRING iComTest__MIDL_ProcFormatString =
|
||||
{
|
||||
0,
|
||||
{
|
||||
|
||||
/* Procedure test */
|
||||
|
||||
0x33, /* FC_AUTO_HANDLE */
|
||||
0x6c, /* Old Flags: object, Oi2 */
|
||||
/* 2 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 6 */ NdrFcShort( 0x3 ), /* 3 */
|
||||
/* 8 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */
|
||||
/* 10 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 12 */ NdrFcShort( 0x8 ), /* 8 */
|
||||
/* 14 */ 0x44, /* Oi2 Flags: has return, has ext, */
|
||||
0x1, /* 1 */
|
||||
/* 16 */ 0x8, /* 8 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 18 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 20 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 22 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Return value */
|
||||
|
||||
/* 24 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
|
||||
/* 26 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */
|
||||
/* 28 */ 0x8, /* FC_LONG */
|
||||
0x0, /* 0 */
|
||||
|
||||
0x0
|
||||
}
|
||||
};
|
||||
|
||||
static const iComTest_MIDL_TYPE_FORMAT_STRING iComTest__MIDL_TypeFormatString =
|
||||
{
|
||||
0,
|
||||
{
|
||||
NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
0x0
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* Object interface: IUnknown, ver. 0.0,
|
||||
GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
|
||||
|
||||
|
||||
/* Object interface: IComTest, ver. 0.0,
|
||||
GUID={0x10CDF249,0xA336,0x406F,{0xB4,0x72,0x20,0xF0,0x86,0x60,0xD6,0x09}} */
|
||||
|
||||
#pragma code_seg(".orpc")
|
||||
static const unsigned short IComTest_FormatStringOffsetTable[] =
|
||||
{
|
||||
0
|
||||
};
|
||||
|
||||
static const MIDL_STUBLESS_PROXY_INFO IComTest_ProxyInfo =
|
||||
{
|
||||
&Object_StubDesc,
|
||||
iComTest__MIDL_ProcFormatString.Format,
|
||||
&IComTest_FormatStringOffsetTable[-3],
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
static const MIDL_SERVER_INFO IComTest_ServerInfo =
|
||||
{
|
||||
&Object_StubDesc,
|
||||
0,
|
||||
iComTest__MIDL_ProcFormatString.Format,
|
||||
&IComTest_FormatStringOffsetTable[-3],
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0};
|
||||
CINTERFACE_PROXY_VTABLE(4) _IComTestProxyVtbl =
|
||||
{
|
||||
&IComTest_ProxyInfo,
|
||||
&IID_IComTest,
|
||||
IUnknown_QueryInterface_Proxy,
|
||||
IUnknown_AddRef_Proxy,
|
||||
IUnknown_Release_Proxy ,
|
||||
(void *) (INT_PTR) -1 /* IComTest::test */
|
||||
};
|
||||
|
||||
const CInterfaceStubVtbl _IComTestStubVtbl =
|
||||
{
|
||||
&IID_IComTest,
|
||||
&IComTest_ServerInfo,
|
||||
4,
|
||||
0, /* pure interpreted */
|
||||
CStdStubBuffer_METHODS
|
||||
};
|
||||
|
||||
static const MIDL_STUB_DESC Object_StubDesc =
|
||||
{
|
||||
0,
|
||||
NdrOleAllocate,
|
||||
NdrOleFree,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
iComTest__MIDL_TypeFormatString.Format,
|
||||
1, /* -error bounds_check flag */
|
||||
0x50002, /* Ndr library version */
|
||||
0,
|
||||
0x700022b, /* MIDL Version 7.0.555 */
|
||||
0,
|
||||
0,
|
||||
0, /* notify & notify_flag routine table */
|
||||
0x1, /* MIDL flag */
|
||||
0, /* cs routines */
|
||||
0, /* proxy/server info */
|
||||
0
|
||||
};
|
||||
|
||||
const CInterfaceProxyVtbl * const _iComTest_ProxyVtblList[] =
|
||||
{
|
||||
( CInterfaceProxyVtbl *) &_IComTestProxyVtbl,
|
||||
0
|
||||
};
|
||||
|
||||
const CInterfaceStubVtbl * const _iComTest_StubVtblList[] =
|
||||
{
|
||||
( CInterfaceStubVtbl *) &_IComTestStubVtbl,
|
||||
0
|
||||
};
|
||||
|
||||
PCInterfaceName const _iComTest_InterfaceNamesList[] =
|
||||
{
|
||||
"IComTest",
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
#define _iComTest_CHECK_IID(n) IID_GENERIC_CHECK_IID( _iComTest, pIID, n)
|
||||
|
||||
int __stdcall _iComTest_IID_Lookup( const IID * pIID, int * pIndex )
|
||||
{
|
||||
|
||||
if(!_iComTest_CHECK_IID(0))
|
||||
{
|
||||
*pIndex = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const ExtendedProxyFileInfo iComTest_ProxyFileInfo =
|
||||
{
|
||||
(PCInterfaceProxyVtblList *) & _iComTest_ProxyVtblList,
|
||||
(PCInterfaceStubVtblList *) & _iComTest_StubVtblList,
|
||||
(const PCInterfaceName * ) & _iComTest_InterfaceNamesList,
|
||||
0, /* no delegation */
|
||||
& _iComTest_IID_Lookup,
|
||||
1,
|
||||
2,
|
||||
0, /* table of [async_uuid] interfaces */
|
||||
0, /* Filler1 */
|
||||
0, /* Filler2 */
|
||||
0 /* Filler3 */
|
||||
};
|
||||
#pragma optimize("", on )
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/
|
||||
|
8
msvc_stuff/comtest/comtest/stdafx.cpp
Normal file
8
msvc_stuff/comtest/comtest/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// comtest.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
16
msvc_stuff/comtest/comtest/stdafx.h
Normal file
16
msvc_stuff/comtest/comtest/stdafx.h
Normal file
@@ -0,0 +1,16 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files:
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
8
msvc_stuff/comtest/comtest/targetver.h
Normal file
8
msvc_stuff/comtest/comtest/targetver.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||
|
||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||
|
||||
#include <SDKDDKVer.h>
|
Reference in New Issue
Block a user