QT For Android 运行的时候找不到手机怎么办?
摘要:【解决方法】 如果是Android手机,那需要下载这个:http://community.kde.org/Necessitas
阅读全文
posted @
2016-07-31 21:44
今夜太冷
阅读(1486)
推荐(0) 编辑
Qt5 for Android: incompatible ABI
摘要:I recently installed Qt5 and works like a charm for API 17 and armeabi-v7a.But I added second AVD with other parameters (of course, I installed packages in AVD settings). Now, I can't compile first ...
阅读全文
posted @
2016-07-31 15:24
今夜太冷
阅读(1388)
推荐(0) 编辑
fatal error C1853: '<filename>' is not a precompiled header file
摘要:当编译c和c++混合的项目时,会出现如下类似的错误 fatal error C1853: '' is not a precompiled header file 解决方法: 设置Not using precompiled header.
阅读全文
posted @
2016-07-27 14:21
今夜太冷
阅读(269)
推荐(0) 编辑
关于COM组件log的位置
摘要:进程内组件写的log,如果不指定路径直接提供文件名,log文件的位置在dll所在的目录中。 进程外组件写的log,如果不指定路径直接提供文件名,log文件的位置不在exe所在的目录中,而是在系统目录。
阅读全文
posted @
2016-07-27 10:47
今夜太冷
阅读(415)
推荐(0) 编辑
CoCreateInstance(转)
摘要:CoCreateInstance 创建组件的最简单的方法是使用CoCreateInstance函数。 在COM库中包含一个用于创建组件的名为CoCreateInstance的函数。此函数需要一个CLSID参数,在此基础上创建相应组件的一个实例,并返回此组件的某个接口。 CoCreateInstance 的声明 HRESULT _stdcall CoCreate...
阅读全文
posted @
2016-07-26 16:33
今夜太冷
阅读(565)
推荐(0) 编辑
添加的注册表项找不到怎么回事?
摘要:添加了注册表项,死活找不到怎么回事?搜索也搜不到。 解决方法: 重新打开regedit
阅读全文
posted @
2016-07-19 14:10
今夜太冷
阅读(1291)
推荐(0) 编辑
[转载]C++中处理XML文件
摘要:写Unmanaged Code在.NET时代成为一种很悲惨的事,当你需要处理XML文件时,这种感觉会变得尤其强烈。FCL中的System.XML多简单啊,连Steve Ballmer都知道怎么用。事情不会总是那么理想的,假如你要在C/C++程序里处理XML怎么办呢?选择一:市面上的XML lib还是有几个的,最有名的当然是libXML。我一年前用过,很不错,我还特意写了一份简明教程,后来...
阅读全文
posted @
2016-07-14 21:49
今夜太冷
阅读(3764)
推荐(1) 编辑
C++ RegCreateKeyEx成功了,但是注册表并没有这一项
摘要:C++ - RegCreateKeyEx success but without result Could anybody tell me what's wrong is with this code? There is no errors. Everything returns ERROR_SUCCESS but in register can't see any changes. void ...
阅读全文
posted @
2016-07-13 16:38
今夜太冷
阅读(4046)
推荐(0) 编辑
导出DLLRegisterServer接口遇到的问题
摘要:I'm trying to add DLLRegisterServer and DLLUnregisterServer entry points to an existing DLL that is exporting other functions. I have the olectl.h header included and here is the code I'm using to exp...
阅读全文
posted @
2016-07-13 11:56
今夜太冷
阅读(760)
推荐(0) 编辑
C++ vector用法(转)
摘要:在c++中,vector是一个十分有用的容器,下面对这个容器做一下总结。 1 基本操作 (1)头文件#include. (2)创建vector对象,vector vec; (3)尾部插入数字:vec.push_back(a); (4)使用下标访问元素,cout::iterator it; for(it=vec.begin();it!=vec.end();it++) cout #...
阅读全文
posted @
2016-07-12 21:38
今夜太冷
阅读(234)
推荐(0) 编辑
_com_util::ConvertBSTRToString的使用问题
摘要:#include 然后调用_com_util::ConvertBSTRToString提示如下错误: error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString 。。。。 怎么回事那? 【解决方法】 #pragma comment(lib, "comsuppw.l...
阅读全文
posted @
2016-07-12 17:17
今夜太冷
阅读(3006)
推荐(0) 编辑
Ofstream的endl不好用怎么回事?
摘要:用endl,std::endl, "\n"都不好用,不输出换行,怎么回事? 【解决方法】 If you're writing a text file, you shouldn't be using the binary flag.fout.open ("bodyfat.txt", ios::out | ios::app | ios::binary);Remove the ios::binary. ...
阅读全文
posted @
2016-07-11 14:51
今夜太冷
阅读(474)
推荐(0) 编辑
string、wstring、cstring、 char、 tchar、int、dword转换方法(转)
摘要:string、wstring、cstring、 char、 tchar、int、dword转换方法(转) 最近编程一直头痛这集中类型的转化,明知都可以转却总是记不住,不断的上网查来查去,在这里小结一下。以备以后方便使用,当然有些方法可能不是最新的,或者最简单的,但是对于自己已经了解的使用起来应该方便的多: 1》string转wstring wstring s2ws(const st...
阅读全文
posted @
2016-07-11 14:06
今夜太冷
阅读(3895)
推荐(1) 编辑
COM中的几个基本概念
摘要:类厂 组件结构示例 DllGetClassObject COM库与类厂的交互
阅读全文
posted @
2016-07-07 15:20
今夜太冷
阅读(244)
推荐(0) 编辑
OleView.exe:查看机器上的COM 组件。
摘要:OleView.exe可以查看机器上安装的所有COM组件的类别以及各个类别下的COM组件。
阅读全文
posted @
2016-07-06 16:07
今夜太冷
阅读(2059)
推荐(0) 编辑
COM中导出GUID
摘要:编写COM组件的时候需要导出GUID,以下是代码示例。 extern "C" const GUID CLSID_Dictionary = { 0x54bf6567, 0x1007, 0x11d1, { 0xb0, 0xaa, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00} } ; 这种格式的GUID可以...
阅读全文
posted @
2016-07-06 15:22
今夜太冷
阅读(491)
推荐(0) 编辑
拼接多个 wchar_t *
摘要:/* wcscat example */ #include int main () { wchar_t wcs[80]; wcscpy (wcs,L"these "); //这句很重要,否则wcs会是乱码。 wcscat (wcs,L"wide strings "); wcscat (wcs,L"are ");...
阅读全文
posted @
2016-07-06 11:21
今夜太冷
阅读(1418)
推荐(0) 编辑
wstring to wchar_t*
摘要:If you want to convert fromstd::wstringtoconst WCHAR*(i.e. the returned pointer givesread-only accessto the string content), then callingstd::wstring::c_str()method is just fine: std::wstrin...
阅读全文
posted @
2016-07-05 14:44
今夜太冷
阅读(2221)
推荐(0) 编辑
BSTR
摘要:BSTR A BSTR (Basic string or binary string) is a string data type that is used by COM, Automation, and Interop functions. Use the BSTR data type in all interfaces that will be accessed from script. C+...
阅读全文
posted @
2016-07-05 11:58
今夜太冷
阅读(918)
推荐(0) 编辑
GetProcAddress 使用注意事项
摘要:使用GetProcAddressFunction时,有以下几点需要特别留意: 1. 第二个参数类型是LPCSTR,不是; 2. 用__declspec(dllexport),按C名称修饰(extern "C") 导出的函数名,对于__stdcall和__fastcall调用约定是相同的;对__cdecl是不同的(导出的函数名没有前面的下划线);...
阅读全文
posted @
2016-07-05 11:29
今夜太冷
阅读(14320)
推荐(0) 编辑
C++和.net的集合类对应
摘要:Here's what I've found (ignoring the old non-generic collections): Array- C array, though the .NET Arraycanhave a non-zero starting index. List-std::vector Dictionary-unordered_map ...
阅读全文
posted @
2016-07-03 21:31
今夜太冷
阅读(396)
推荐(0) 编辑