rewrite comments into one, unified style
This commit is contained in:
1 parent
6260de0085
commit
467a58c9c6
163 files changed
+3560
-2556
No files matched your search
@@ -1,13 +1,11 @@
|
||||
// ole32.c - Win32 COM / OLE stubs
|
||||
// No COM infrastructure at this stage; all functions fail gracefully.
|
||||
// Win32 OLE compatibility stubs. This file satisfies applications that probe COM initialization paths.
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <ntlite/syscall.h>
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Types
|
||||
// ---------------------------------------------------------------------------
|
||||
// Types.
|
||||
typedef long HRESULT;
|
||||
typedef void* IUnknown;
|
||||
|
||||
@@ -34,26 +32,23 @@ typedef struct {
|
||||
void* punkVal;
|
||||
unsigned char bVal;
|
||||
unsigned int ulVal;
|
||||
// ... (only common fields; full union is ~16 bytes)
|
||||
// ... (only common fields; full union is ~16 bytes).
|
||||
unsigned char padding[16];
|
||||
};
|
||||
} PROPVARIANT;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// COM initialisation
|
||||
// ---------------------------------------------------------------------------
|
||||
// COM initialisation.
|
||||
__declspec(dllexport) HRESULT CoInitializeEx(void* reserved, unsigned long coInit) {
|
||||
(void)reserved; (void)coInit;
|
||||
return S_OK; // Pretend success; no actual apartment is created.
|
||||
}
|
||||
|
||||
// Implements the co Uninitialize operation.
|
||||
__declspec(dllexport) void CoUninitialize(void) {
|
||||
// No-op.
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Object creation
|
||||
// ---------------------------------------------------------------------------
|
||||
// Object creation.
|
||||
__declspec(dllexport) HRESULT CoCreateInstance(const GUID* clsid, IUnknown* outer,
|
||||
unsigned long ctx, const GUID* iid,
|
||||
void** ppv) {
|
||||
@@ -62,16 +57,12 @@ __declspec(dllexport) HRESULT CoCreateInstance(const GUID* clsid, IUnknown* oute
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Memory
|
||||
// ---------------------------------------------------------------------------
|
||||
// Memory.
|
||||
__declspec(dllexport) void CoTaskMemFree(void* pv) {
|
||||
if (pv) free(pv);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// PROPVARIANT
|
||||
// ---------------------------------------------------------------------------
|
||||
// PROPVARIANT.
|
||||
__declspec(dllexport) HRESULT PropVariantClear(PROPVARIANT* pvar) {
|
||||
if (!pvar) return E_NOTIMPL;
|
||||
// Zero the entire structure; no deep release needed for stub types.
|
||||
|
||||
Reference in new issue
Block a user