进程内组件编写需要手动添加的函数
来源:互联网 发布:江西泰豪软件 编辑:程序博客网 时间:2024/05/17 07:25
进程内组件编写需要手动添加的函数:组件注册函数、组件注销函数、类厂对象创建函数、组件生存与否函数
extern "C" HRESULT __stdcall DllGetClassObject(const CLSID& clsid, const IID& iid, void **ppv)
{
if (clsid == CLSID_Dictionary ) {
CDictionaryFactory *pFactory = new CDictionaryFactory;
if (pFactory == NULL) {
return E_OUTOFMEMORY ;
}
HRESULT result = pFactory->QueryInterface(iid, ppv);
return result;
} else {
return CLASS_E_CLASSNOTAVAILABLE;
}
}
extern "C" HRESULT __stdcall DllCanUnloadNow(void)
{
if ((g_DictionaryNumber == 0) && (g_LockNumber == 0))
return S_OK;
else
return S_FALSE;
}
//
// Server registration
//
extern "C" HRESULT __stdcall DllRegisterServer()
{
char szModule[1024];
DWORD dwResult = ::GetModuleFileName((HMODULE)g_hModule, szModule, 1024);
if (dwResult == 0)
return SELFREG_E_CLASS;
return RegisterServer(CLSID_Dictionary,
szModule,
"Dictionary.Object",
"Dictionary Component",
NULL);
}
//
// Server unregistration
//
extern "C" HRESULT __stdcall DllUnregisterServer()
{
return UnregisterServer(CLSID_Dictionary,
"Dictionary.Object",NULL);
}
- 进程内组件编写需要手动添加的函数
- GParted需要手动添加的软件包
- NetBeans 手动添加组件
- NetBeans 手动添加组件
- NetBeans 手动添加组件
- 进程内COM组件的创建过程
- 手动添加自己的消息映射函数
- 在windows中手动添加需要解析的域名
- 淘宝服务市场 上架封装类 (仅提供思路, 类内调用的函数还需要您自己编写)
- 编写适合自己需要的printf()函数
- 编写适合自己需要的printf()函数
- 把一个进程内组件以进程外组件的形式调用引发的问题
- 进程内组件注册表注册
- mysql5.6需要手动添加密码
- 编写跨平台的进程内Event事件驱动
- 如何实现单例的进程内COM组件
- 使用MFC实现进程内COM组件的步骤
- 编写Wifi程序需要在AndroidMinifest中添加的permission
- 第十周练习 1002 手机短号
- 使用ps制作社保照片
- Android之DDMS无法查看/data/data目录
- 监听器小例子之统计在线人数
- Memcached, Redis, MongoDB三者比较
- 进程内组件编写需要手动添加的函数
- 旧版本scrapy升级新版本遇到的一些问题
- Android数据存储之:文件存储
- 文件I/O
- Scala学习到精通是spark大数据
- Mac Android NDK 安装方法
- UIDatePicker 日期/时间选取器(滚轮)—IOS开发
- 如何写好博客——为什么要写文
- 监听器application级别获得bean方法