hbhbice

导航

2017年3月13日

错误 88 error C2248: “CObject::CObject”: 无法访问 private 成员(在“CObject”类中声明) c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxcoll.h 590

摘要: 最近接收了以前新公司遗留的代码,一个函数动不动就少的一千行,多的几千行,真是受不了这编码风格! 于是便使用了VS自带的重构工具,选择代码后右键-重构-提取方法,提取完方法就编译不过,想了好久原因,原来是参数的问题, 参数中大量使用了CStringArray,例如: static void Handl 阅读全文

posted @ 2017-03-13 15:58 hbhbice 阅读(296) 评论(0) 推荐(0) 编辑

2015年2月11日

WinCE\Window Mobile程序桌面化总结

摘要: 1、系统API处理将桌面、移动API分开处理2、一份代码,两个工程,分别编译添加已有文件时,使用添加链接,而不是添加附本3、桌面窗体出现位置不规律,样式不统一问题首先,在窗体类成员加入两个成员变量 publicForm parentForm; privatebool inited; 然后添加如下代... 阅读全文

posted @ 2015-02-11 17:18 hbhbice 阅读(175) 评论(0) 推荐(0) 编辑

2013年6月7日

JNI itoa 不能使用的问题

摘要: 在JNI中使用 itoa函数,总是说没有这个函数,jni/TestJni.cpp:22:18: error: 'itoa' was not declared in this scope而我新建一个C++工程(使用的是MinGW),itoa可以正常使用,后来我看了一下两者的头文件,发现JNI中使用的是D:\Android\android-ndk-r8e\platforms\android-14\arch-arm\usr\include\stdlib.h而MinGW则使用的是C:\MinGW\include\stdlib.hNDK中的stdlib.h的确不支持 itoa所以以后使用 阅读全文

posted @ 2013-06-07 20:48 hbhbice 阅读(1107) 评论(0) 推荐(0) 编辑

2013年5月10日

C#编译成x86与x64区别

摘要: static void Main(string[] args) { Console.WriteLine("This applications is compiled to run on all processors."); Console.WriteLine("Checking IntPtr.Size to see if this application is running as a 32bit or 64bit application."); Console.WriteL... 阅读全文

posted @ 2013-05-10 17:24 hbhbice 阅读(809) 评论(0) 推荐(0) 编辑

2013年5月5日

javah用法

摘要: 进入到工程的bin目录,javah -classpath 包的绝对路径(图1)或相对路径(图2),包名+类名。例如:E:\Eclipse\workspace\AndroidFileTest\bin>javah -classpath classes com.ice.androidfiletest.MainActivity 阅读全文

posted @ 2013-05-05 17:32 hbhbice 阅读(459) 评论(0) 推荐(0) 编辑

没有Root 时Data/Data文件夹不可见

摘要: 公司的一款Android平板没有Root工具,没有Root 时Data/Data文件夹不可见可以使用adb.exe shell,进入shell模式,然后使用chmod 777 (目录全路径进行设置)# chmod 777 /data/datachmod 777 /data/data# chmod 777 /data/data/com.zhd.serialtoolandroidchmod 777 /data/data/com.zhd.serialtoolandroid# chmod 777 /data/data/com.zhd.serialtoolandroid/shared_prefschmo 阅读全文

posted @ 2013-05-05 17:04 hbhbice 阅读(736) 评论(0) 推荐(0) 编辑

2013年4月23日

软键盘 WinCE Mobile

摘要: public static uint SIPF_OFF = 0x00;//软键盘关闭 public static uint SIPF_ON = 0x01;//软键盘打开 [DllImport("coredll.dll")] public extern static void SipShowIM(uint dwFlag); 阅读全文

posted @ 2013-04-23 19:12 hbhbice 阅读(178) 评论(0) 推荐(0) 编辑

2013年4月20日

C# 实现 类似Android的Toast

摘要: public partial class ToastForm : Form { /// <summary> /// 显示毫秒 /// </summary> private int _wait_ms = 1000; public ToastForm(double seconds, string text, Form parent) : this(seconds, text, parent, Color.Blue, 15, ContentAlignment.TopCenter) ... 阅读全文

posted @ 2013-04-20 22:38 hbhbice 阅读(602) 评论(0) 推荐(0) 编辑

2013年4月19日

JNI由C编译方式改成C++编译方式

摘要: 以 hello-jni为例1、将hello-jni.c 改为hello-jni.cpp2、将原代码中 (*env)->NewStringUTF(env, "Hello from JNI !"); 改为: return env->NewStringUTF("Hello from JNI !");3、mk文件中 LOCAL_SRC_FILES := hello-jni.c改为: LOCAL_SRC_FILES := hello-jni.cpp4、#ifdef __cplusplusextern "C" { jstring Ja 阅读全文

posted @ 2013-04-19 11:26 hbhbice 阅读(422) 评论(0) 推荐(1) 编辑

2013年1月9日

C#封送回调函数和委托

摘要: C#封送回调函数和委托因需要,需要封装一个C++网络库到C#环境使用,而C++网络库是使用的事件的方式,也就是说,发生网络事件时,C++网络库发出事件通知,而真正的处理函数在C#端。这就要求,在封装时需要封装一个函数指针以实现回调。下面代码实现了如上功能。上网找了一下,找到的一般都是封送值,结构,一般函数的,所以就想写出来分享一下。关键词:C# C++ 互操作 封送 封送回调函数 封送函数指针 C#C++回调建两个工程//CallBackDelegate.csusingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSy 阅读全文

posted @ 2013-01-09 14:38 hbhbice 阅读(529) 评论(0) 推荐(0) 编辑