- 博客(17)
- 资源 (1)
- 收藏
- 关注
原创 C# 调用Labview的dll
最近需要在C#中调用Labview生成的dll,无非就是非托管dll的调用,难点在于类型的转换,Labview中的类型和C#中类型的转换。 函数原型: void TestFun(char Path[],CharPro[]) 调用方法: [DllImport("TrustSystem.dll", EntryPoint = "
2013-10-15 10:53:11
9195
1
原创 Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.E
前段时间做了个将Txt中数据导出到Excel中的C#小应用程序,一直都运行很好的。今天突然有同事安装时,报如下错:************** Exception Text **************System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interfac
2013-10-14 11:39:18
8295
原创 C# IntPtr 与 string互转
一、IntPtr 与 string互转string str = "aa";IntPtr init = Marshal.StringToHGlobalAnsi(str);string ss= Marshal.PtrToStringAnsi(init);//最后释放掉Marshal.FreeHGlobal(init); 二、char*与string互转 string a
2013-10-12 14:48:17
24161
转载 C#调用外部DLL
C#调用外部DLL 每种编程语言调用DLL的方法都不尽相同,在此只对用C#调用DLL的方法进行介绍。首先,您需要了解什么是托管,什么是非托管。一般可以认为:非托管代码主要是基于win 32平台开发的DLL,activeX的组件,托管代码是基于.net平台开发的。如果您想深入了解托管与非托管的关系与区别,及它们的运行机制,请您自行查找资料,本文件在此不作讨论。(一) 调
2013-10-09 10:24:48
1182
转载 IT人员经典职业规划
今天看到一篇很不错的文章,觉得很有教益,仔细看看,好好思考一下,规划一下自己的职业生涯,受益无穷。 原文如下: 1、 分享第一条经验:“学历代表过去、能力代表现在、学习力代表未来。”其实这是一个来自国外教育领域的一个研究结果。相信工作过几年、十几年的朋友对这个道 理有些体会吧。但我相信这一点也很重要:“重要的道理明白太晚将抱憾终生!”所以放在每一条,让刚刚毕业的朋友们早点
2013-09-26 09:38:44
767
原创 Cannot initialize RequestProcessor of class org.springframework.web.struts.DelegatingRequestProcesso
今天调试程序,报错:Cannot initialize RequestProcessor of class org.springframework.web.struts.DelegatingRequestProcessor: java.lang.ClassNotFoundException: org.springframework.web.struts.DelegatingRequestProce
2013-09-23 10:50:46
1692
原创 Exception sending context initialized event to listener instance of class org.springframework.web.co
今天,做SSH小项目时,报错:Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 解决办法:在\WebRoot\WEB-INF\lib中添加common-pool.jar包,即可解决。
2013-09-23 10:39:28
1253
原创 Class 'org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean' not found
今天,做项目时,加入Spring后,applicationContext.xml报错,报错信息为:Class 'org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean' not found 解决办法:从网上下载Spring.jar,然后在项目中导入Spring.jar,即可解决问题。
2013-09-16 17:46:00
3977
原创 Class 'org.apache.commons.dbcp.BasicDataSource' not found
今天,做项目时,导入Spring,结果applicationContext.xml报错,报错为:Class 'org.apache.commons.dbcp.BasicDataSource' not found 解决办法如下:从网上下载commons-dbcp-1.4.jar,然后导入到项目中,即可解决问题!
2013-09-16 17:43:30
1231
原创 tomcat启动正常,但无法访问http://localhost:8080
java新人,之前跑程序都很好,今天怎么都不能运行,tomcat显示启动成功,但是访问http://localhost:8080,始终显示“无法显示”,在网上找了很多,都没有解决问题。经过三小时的努力,终于找到解决办法,如下:发现tomcat的配置有问题,截图如下:修改为,第一项为tomcat的安装路径,后面两项自动填充:
2013-09-11 17:24:13
2284
原创 混合模式程序集是针对“v1.1.4322”版的运行时生成的,在没有配置其他信息,无法在 4.0 运行时中加载该程序
今天,想使用SQLite,以前没使用过,连接数据库时,报错:混合模式程序集是针对“v1.1.4322”版的运行时生成的,在没有配置其他信息,无法在 4.0 运行时中加载该程序。 解决办法如下:在项目中单击右键——>添加新建项——>应用程序配置文件(默认App.config),在App.config中添加 保存,即可正常运行。
2013-08-19 17:59:00
1663
原创 java.lang.ClassNoFoundException:org.apache.derby.jdbc.ClientDriver
刚开始学Java,新手,使用MyEclipse自带的Derby时,连接数据时提示java.lang.ClassNoFoundException:org.apache.derby.jdbc.ClientDriver,解决办法是: 在项目的\WebRoot\WEB-INF\lib中导入derby.jar和 derbyclient.jar,Myclipse中自带的Derby自动安装在目录C:\P
2013-08-14 14:55:32
6129
1
原创 txt导出到Excel(数据和图) C#
一、从txt文件中读取数据 StreamReader read = new StreamReader(strFilePath); if (read == null) string strTxt = read.ReadToEnd(); 其中strTxt为txt文件内容;这种读取效率比逐行读取高些; 二、将数据存入DateTabl
2013-08-12 22:59:28
1361
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人