4 * Copyright 2004 Jon Griffiths
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
29 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(actctx
);
34 #define ACTCTX_FLAGS_ALL (\
35 ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID |\
36 ACTCTX_FLAG_LANGID_VALID |\
37 ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID |\
38 ACTCTX_FLAG_RESOURCE_NAME_VALID |\
39 ACTCTX_FLAG_SET_PROCESS_DEFAULT |\
40 ACTCTX_FLAG_APPLICATION_NAME_VALID |\
41 ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF |\
42 ACTCTX_FLAG_HMODULE_VALID )
44 #define ACTCTX_FAKE_HANDLE ((HANDLE) 0xf00baa)
45 #define ACTCTX_FAKE_COOKIE ((ULONG_PTR) 0xf00bad)
47 /***********************************************************************
48 * CreateActCtxA (KERNEL32.@)
50 * Create an activation context.
52 HANDLE WINAPI
CreateActCtxA(PCACTCTXA pActCtx
)
54 FIXME("%p %08lx\n", pActCtx
, pActCtx
? pActCtx
->dwFlags
: 0);
57 return INVALID_HANDLE_VALUE
;
58 if (pActCtx
->cbSize
!= sizeof *pActCtx
)
59 return INVALID_HANDLE_VALUE
;
60 if (pActCtx
->dwFlags
& ~ACTCTX_FLAGS_ALL
)
61 return INVALID_HANDLE_VALUE
;
62 return ACTCTX_FAKE_HANDLE
;
65 /***********************************************************************
66 * CreateActCtxW (KERNEL32.@)
68 * Create an activation context.
70 HANDLE WINAPI
CreateActCtxW(PCACTCTXW pActCtx
)
72 FIXME("%p %08lx\n", pActCtx
, pActCtx
? pActCtx
->dwFlags
: 0);
75 return INVALID_HANDLE_VALUE
;
76 if (pActCtx
->cbSize
!= sizeof *pActCtx
)
77 return INVALID_HANDLE_VALUE
;
78 if (pActCtx
->dwFlags
& ~ACTCTX_FLAGS_ALL
)
79 return INVALID_HANDLE_VALUE
;
80 return ACTCTX_FAKE_HANDLE
;
83 /***********************************************************************
84 * ActivateActCtx (KERNEL32.@)
86 * Activate an activation context.
88 BOOL WINAPI
ActivateActCtx(HANDLE hActCtx
, ULONG_PTR
*ulCookie
)
90 FIXME("%p %p\n", hActCtx
, ulCookie
);
92 *ulCookie
= ACTCTX_FAKE_COOKIE
;
96 /***********************************************************************
97 * DeactivateActCtx (KERNEL32.@)
99 * Deactivate an activation context.
101 BOOL WINAPI
DeactivateActCtx(DWORD dwFlags
, ULONG_PTR ulCookie
)
103 FIXME("%08lx %08lx\n", dwFlags
, ulCookie
);
104 if (ulCookie
!= ACTCTX_FAKE_COOKIE
)
109 /***********************************************************************
110 * GetCurrentActCtx (KERNEL32.@)
112 * Get the current activation context.
114 BOOL WINAPI
GetCurrentActCtx(HANDLE
* phActCtx
)
116 FIXME("%p\n", phActCtx
);
117 *phActCtx
= ACTCTX_FAKE_HANDLE
;
121 /***********************************************************************
122 * AddRefActCtx (KERNEL32.@)
124 * Add a reference to an activation context.
126 void WINAPI
AddRefActCtx(HANDLE hActCtx
)
128 FIXME("%p\n", hActCtx
);
131 /***********************************************************************
132 * ReleaseActCtx (KERNEL32.@)
134 * Release a reference to an activation context.
136 void WINAPI
ReleaseActCtx(HANDLE hActCtx
)
138 FIXME("%p\n", hActCtx
);
141 /***********************************************************************
142 * ZombifyActCtx (KERNEL32.@)
144 * Release a reference to an activation context.
146 BOOL WINAPI
ZombifyActCtx(HANDLE hActCtx
)
148 FIXME("%p\n", hActCtx
);
149 if (hActCtx
!= ACTCTX_FAKE_HANDLE
)
154 /***********************************************************************
155 * FindActCtxSectionStringA (KERNEL32.@)
157 * Find information about a GUID in an activation context.
159 BOOL WINAPI
FindActCtxSectionStringA(DWORD dwFlags
, const GUID
* lpExtGuid
,
160 ULONG ulId
, LPCSTR lpSearchStr
,
161 PACTCTX_SECTION_KEYED_DATA pInfo
)
167 /***********************************************************************
168 * FindActCtxSectionStringW (KERNEL32.@)
170 * Find information about a GUID in an activation context.
172 BOOL WINAPI
FindActCtxSectionStringW(DWORD dwFlags
, const GUID
* lpExtGuid
,
173 ULONG ulId
, LPCWSTR lpSearchStr
,
174 PACTCTX_SECTION_KEYED_DATA pInfo
)
180 /***********************************************************************
181 * FindActCtxSectionGuid (KERNEL32.@)
183 * Find information about a GUID in an activation context.
185 BOOL WINAPI
FindActCtxSectionGuid(DWORD dwFlags
, const GUID
* lpExtGuid
,
186 ULONG ulId
, const GUID
* lpSearchGuid
,
187 PACTCTX_SECTION_KEYED_DATA pInfo
)
193 /***********************************************************************
194 * QueryActCtxW (KERNEL32.@)
196 * Get information about an activation context.
198 BOOL WINAPI
QueryActCtxW(DWORD dwFlags
, HANDLE hActCtx
, PVOID pvSubInst
,
199 ULONG ulClass
, PVOID pvBuff
, SIZE_T cbBuff
,
203 /* this makes Adobe Photoshop 7.0 happy */
204 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);