<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[mcmcmc的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/mcmcmc</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; mcmcmc]]></copyright><item><title><![CDATA[OMRON NB7触摸屏读写功能外移]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8144760</link><guid>https://blog.csdn.net/mcmcmc/article/details/8144760</guid><author>mcmcmc</author><pubDate>Sat, 03 Nov 2012 22:32:15 +0800</pubDate><description><![CDATA[当前做的项目要在触摸屏上实现操作人员权限管理,主要是前后翻页,人员添加删除等等
由于nb可以支持.h,我逻辑引擎已经用c语言全部用Qt+mwing实现完毕,到时候在MainEntry中添加Go(),不过其中要用到读写本地内存的操作,就遇到难点了
NB7有2个读写内存的函数ReadLocal(),WriteLocal(),我在一个头文件加了这么一段代码,这样就可以不借助OMRON的静态库在Qt中]]></description><category></category></item><item><title><![CDATA[虚拟电子秤之Atl实现02]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8066195</link><guid>https://blog.csdn.net/mcmcmc/article/details/8066195</guid><author>mcmcmc</author><pubDate>Tue, 23 Oct 2012 13:11:43 +0800</pubDate><description><![CDATA[这几天，一直在看OLE和ATL书，公司要上一个工业新项目，时间不是很紧，我准备用Flash连接C++解决。话说现在的Flash不比当年，大致看了一下AS3的语法，就是Java翻版，连FB4编译器也是eclipse改的。记得好像以前的Flash中可以嵌入COM组件，现在应该也可以吧，但是这个可能性坚定了我搞定ATL的决心。于是还是这个电子秤项目先入手。
电子秤是大众化的叫法，其实是由2个部分组成的]]></description><category></category></item><item><title><![CDATA[OMRON NB7触摸屏添加.h头文件]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8079662</link><guid>https://blog.csdn.net/mcmcmc/article/details/8079662</guid><author>mcmcmc</author><pubDate>Wed, 17 Oct 2012 08:59:19 +0800</pubDate><description><![CDATA[OMRON新的NB7触摸屏号称支持c89语言，但是我进去一看其每个生成的用户c文件，都有一个MainEntry()似乎是开放给上级某个虚拟引擎调用的，用户c文件无法看到其他的用户c文件，也无法共享函数和数据结构。
我试着在项目文件夹里查找用户生成.c文件，的确是找到了，然后在同一fold中手动建立一个info.h文件，在用户.c文件中加上#include "info.h"字段，回NB7软件编译，]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 8.COM Collection and Enumeration Interfaces]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8058379</link><guid>https://blog.csdn.net/mcmcmc/article/details/8058379</guid><author>mcmcmc</author><pubDate>Wed, 10 Oct 2012 23:02:54 +0800</pubDate><description><![CDATA[COM Collection接口定义类似于：
[ object, dual ]
template typename T>
interface ICollection : IDispatch {
  [propget]
  HRESULT Count([out, retval] long* pnCount);

  [id(DISPID_VALUE), propget]
  HRES]]></description><category></category></item><item><title><![CDATA[VC静态链接库建立(ZT自MSDN)]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8051203</link><guid>https://blog.csdn.net/mcmcmc/article/details/8051203</guid><author>mcmcmc</author><pubDate>Tue, 09 Oct 2012 10:25:54 +0800</pubDate><description><![CDATA[Walkthrough: Creating and Using a Static Library  

Visual Studio 2005 




Other Versions 






Visual Studio 2012
Visual Studio 2010



90 out of 122 rated this helpful
- Rate t]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 7.ATL Persistence implements]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8045968</link><guid>https://blog.csdn.net/mcmcmc/article/details/8045968</guid><author>mcmcmc</author><pubDate>Sun, 07 Oct 2012 21:37:37 +0800</pubDate><description><![CDATA[The Property Map
PROP_ENTRY (szDesc, dispid, clsid)
PROP_ENTRY_EX (szDesc, dispid, clsid, iidDispatch)
PROP_DATA_ENTRY (szDesc, member, vt)

 
IPersistPropertyBagImpl
只能实现对VARIANT的读写


VT_UI]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 7.COM Persistence]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8045660</link><guid>https://blog.csdn.net/mcmcmc/article/details/8045660</guid><author>mcmcmc</author><pubDate>Sun, 07 Oct 2012 17:26:01 +0800</pubDate><description><![CDATA[需要保存自身状态的object应该提供IPersistMedium，这里Medium=Stream,Storage,PropertyBag等
client决定何时在何种媒体上要保存object的状态，调用IPersistMedium的Load()，Save()，并且为这两个函数提供相应的IMedium接口
所有的IPersistMedium都派生自IPersist接口：
interface]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 6.interface map tricks]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8045452</link><guid>https://blog.csdn.net/mcmcmc/article/details/8045452</guid><author>mcmcmc</author><pubDate>Sun, 07 Oct 2012 16:30:57 +0800</pubDate><description><![CDATA[Handling Name Conflicts
接口定义有时会遇到命名冲突，例如：

interface ICowboy : IUnknown {
    HRESULT Draw();
};

interface IArtist : IUnknown {
   HRESULT Draw();
};



 

// Ace Powell was a cowboy/a]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 6.各种interface map宏]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8045327</link><guid>https://blog.csdn.net/mcmcmc/article/details/8045327</guid><author>mcmcmc</author><pubDate>Sun, 07 Oct 2012 16:09:30 +0800</pubDate><description><![CDATA[COM_INTERFACE_ENTRY and COM_INTERFACE_ENTRY_IID

#define COM_INTERFACE_ENTRY_IID(iid, x) \                      
  { &iid, offsetofclass(x, _ComMapClass), _ATL_SIMPLEMAPENTRY},



COM_INTERFACE]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 6.Table driven QueryInterface]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8045273</link><guid>https://blog.csdn.net/mcmcmc/article/details/8045273</guid><author>mcmcmc</author><pubDate>Sun, 07 Oct 2012 15:22:44 +0800</pubDate><description><![CDATA[The Raw Interface Map
ATL实现QueryInterface的方法是调用CComObjectRootBase::InternalQueryInterface()：

static HRESULT WINAPI                                         
CComObjectRootBase::InternalQueryInterf]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 5.CAtlModule]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8045104</link><guid>https://blog.csdn.net/mcmcmc/article/details/8045104</guid><author>mcmcmc</author><pubDate>Sun, 07 Oct 2012 14:28:05 +0800</pubDate><description><![CDATA[The _AtlModule Global Variable
每一个项目，wizard都会生成一个全局变量_AtlModule，用户可以通过全局指针_pAtlModule来访问它，例如：

class CMathModule : public CAtlDllModuleT {
public:
    DECLARE_LIBID(LIBID_Math)
    DECLARE_REGIS]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 5.Object Map]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8044774</link><guid>https://blog.csdn.net/mcmcmc/article/details/8044774</guid><author>mcmcmc</author><pubDate>Sun, 07 Oct 2012 12:11:58 +0800</pubDate><description><![CDATA[由于有3种COM Server，ATL提供了CAtlModule的派生类对应
CAtlDllModuleT：in-process dll
CAtlExeModuleT：out-process exe
CAtlServiceModuleT：system service exe
 
CAtlModule使用了Object Map管理server中所有的类
CAtlModule的职责
找到]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 5.COM Server review]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8044710</link><guid>https://blog.csdn.net/mcmcmc/article/details/8044710</guid><author>mcmcmc</author><pubDate>Sun, 07 Oct 2012 10:46:05 +0800</pubDate><description><![CDATA[有3种类型的COM Server
in-process server (DLL)
提供了4个入口

BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason,
    LPVOID lpReserved);     //当线程创建和销毁时被OS调用]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 4.Debugging]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8044116</link><guid>https://blog.csdn.net/mcmcmc/article/details/8044116</guid><author>mcmcmc</author><pubDate>Sat, 06 Oct 2012 22:49:15 +0800</pubDate><description><![CDATA[ASSERT

#ifndef ATLASSERT                     
#define ATLASSERT(expr) _ASSERTE(expr)
#endif                                



上述这个宏依赖CRT
传输到debug output

inline void _cdecl AtlTrace(LPCST]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 4.Creators]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8044039</link><guid>https://blog.csdn.net/mcmcmc/article/details/8044039</guid><author>mcmcmc</author><pubDate>Sat, 06 Oct 2012 22:32:01 +0800</pubDate><description><![CDATA[由于CreateInstance过程中需要调用FinalConstruct，用户很容易忘记，所以ATL提供了Creator类，这些类提供了一个静态函数

static HRESULT WINAPI CreateInstance(void* pv, REFIID riid, LPVOID* ppv);



CComCreator

template]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 4.IUnknown]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8043721</link><guid>https://blog.csdn.net/mcmcmc/article/details/8043721</guid><author>mcmcmc</author><pubDate>Sat, 06 Oct 2012 21:27:04 +0800</pubDate><description><![CDATA[Standalone Reference Counting
template  class CComObjectRootEx : public CComObjectRootBase
中的类型定义：
typedef ThreadModel _ThreadModel;
typedef typename _ThreadModel::AutoCriticalSection _CritSec;
t]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 4.Thread]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8043686</link><guid>https://blog.csdn.net/mcmcmc/article/details/8043686</guid><author>mcmcmc</author><pubDate>Sat, 06 Oct 2012 19:42:48 +0800</pubDate><description><![CDATA[Instance Data Synchronization
CComCriticalSection：使用Init()生成，Term()销毁
CComAutoCriticalSection：使用构造函数生成，析构函数销毁
CComSafeDeleteCriticalSection：Init()生成，析构函数销毁
CComAutoDeleteCriticalSection：未定义Term()，]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 3.ATL Memory Managers]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8043527</link><guid>https://blog.csdn.net/mcmcmc/article/details/8043527</guid><author>mcmcmc</author><pubDate>Sat, 06 Oct 2012 18:37:25 +0800</pubDate><description><![CDATA[A Review of Windows Memory Management
Windows有三种内存
stack 栈：用于分配本地变量，大小在编译时确定，分配与释放仅需移动栈指针
memory-mapped files 内存映射文件：不讨论
heap 堆：用于分配动态变量，大小在运行时确定，使用heap manager进行分配和回收
 
在Windows中，每个进程启动时会分配一个de]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 3.CAutoPtr]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8043477</link><guid>https://blog.csdn.net/mcmcmc/article/details/8043477</guid><author>mcmcmc</author><pubDate>Sat, 06 Oct 2012 17:30:23 +0800</pubDate><description><![CDATA[ATL提供了CAutoPtr, CAutoVectorPtr, CAutoPtrArray, and CAutoPtrList，它们具有类似auto_ptr功能，而没有抛出异常，并且不需要借助于CRT库。
The CAutoPtr and CAutoVectorPtr Classes
例子：
 
STDMETHODIMP CMyClass::SomeFunc() {
    CFoo*]]></description><category></category></item><item><title><![CDATA[ATL Internals 2ed复习.chapter 3.CComGITPtr]]></title><link>https://blog.csdn.net/mcmcmc/article/details/8035887</link><guid>https://blog.csdn.net/mcmcmc/article/details/8035887</guid><author>mcmcmc</author><pubDate>Mon, 01 Oct 2012 22:23:52 +0800</pubDate><description><![CDATA[Global Interface Table (GIT)提供了进程内interface共享机制，用户可以高效的在套间之间传递interface.
使用GIT通常需要下面几步：
1..源套间在GIT中注册interface，需要调用IGlobalInterfaceTable系统服务，取得一个cookie

HRESULT RegisterMyInterface(IMyInterface* p]]></description><category></category></item></channel></rss>