代码改变世界

ATL学习笔记

2012-09-12 19:51 by Clingingboy, 637 阅读, 0 推荐, 收藏, 编辑
摘要:整理下 ATL 引用计数线程模型 ATL 临界区 ATL 核心COM继承类之CComObjectRootEx及CComObjectLock ATL 核心COM继承类之IDispatchImpl及调用 ATL COM类之激活 ATL 接口映射 A... 阅读全文

ATL COM类之激活

2012-09-09 00:06 by Clingingboy, 1763 阅读, 0 推荐, 收藏, 编辑
摘要:参考: ATL 核心COM继承类之CComObjectRootEx及CComObjectLock 背景 继承自CComObjectRootEx的类实际上并未实现IUnknown的三个方法,那么就得手动编写这三个方法 class CPenguin : public CComObjectRootEx<CComMultiThreadModel>, public IBird, ... 阅读全文

ATL 核心COM继承类之IDispatchImpl及调用

2012-09-07 13:42 by Clingingboy, 4240 阅读, 0 推荐, 收藏, 编辑
摘要:实现 先看IDispatch接口,如同反射 interface IDispatch : IUnknown { HRESULT GetTypeInfoCount([out] UINT * pctinfo); HRESULT GetTypeInfo([in] UINT iTInfo, [in] LCID lc... 阅读全文

ATL 核心COM继承类之CComObjectRootEx及CComObjectLock

2012-09-07 13:21 by Clingingboy, 2257 阅读, 0 推荐, 收藏, 编辑
摘要:参考: ATL 临界区 ATL 引用计数线程模型 CComObjectRootEx Manages reference counting for both aggregated and nonaggregated objects. Allows you to specify a threading model. ... 阅读全文

ATL 临界区

2012-09-07 11:38 by Clingingboy, 1563 阅读, 0 推荐, 收藏, 编辑
摘要:CComAutoCriticalSection Contains methods for obtaining and releasing a critical section. The critical section is automatically initialized. CComCriticalSection Contains method... 阅读全文

ATL 引用计数线程模型

2012-09-07 11:28 by Clingingboy, 801 阅读, 0 推荐, 收藏, 编辑
摘要:只为记录 CComSingleThreadModel Provides methods for incrementing and decrementing a variable. Does not provide a critical section. CComMultiThreadModel Provides thread-safe methods for increment... 阅读全文

Direct3D 9学习笔记(13)网格(Mesh)4

2012-08-23 22:42 by Clingingboy, 347 阅读, 0 推荐, 收藏, 编辑
摘要:一.渐进网格概念 除了优化网格之外,还可以根据远近来减少网格的数量,减少不必要的呈现(太远的物体,即使很精确,肉眼也无法识别) 二.生成渐进网格 三.ID3DXPMesh 阅读全文

Direct3D 9学习笔记(12)网格(Mesh)3

2012-08-23 22:23 by Clingingboy, 367 阅读, 0 推荐, 收藏, 编辑
摘要:一.ID3DXBuffer 二.XFile 加载XFile 示例 HRESULT hr = 0;//// Load the XFile data.//ID3DXBuffer* adjBuffer = 0;ID3DXBuffer* mtrlBuffer = 0;DWORD numMtrls = 0;hr = D3DXLoadMeshFromX( ... 阅读全文

无注册表的COM调用

2012-08-21 11:19 by Clingingboy, 652 阅读, 0 推荐, 收藏, 编辑
摘要:跳过注册表部分 http://blog.csdn.net/problc/article/details/7428440 HRESULT WINAPI CreateCOMObject( LPCWSTR pstrDll, REFCLSID rclsid, REFIID riid, LPVOID* ppObject, IUnknown* pUnkOuter ){ if (ppObject... 阅读全文

Direct3D 9学习笔记(11)网格(Mesh)2

2012-08-20 14:03 by Clingingboy, 736 阅读, 0 推荐, 收藏, 编辑
摘要:七.网格优化 参数解释: 示例: //// Optimize the mesh to generate an attribute table.//std::vector<DWORD> adjacencyBuffer(Mesh->GetNumFaces() * 3);Mesh->GenerateAdjacency(0.0f, &adjacencyBuffer[0]);hr = M... 阅读全文
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 66 下一页