CentimetersToPoints函数出错
2013-11-13 09:40
134 查看
在word开发中,碰到CentimetersToPoints函数调用出错,提示未指定的错误的问题。解决办法为修改CentimetersToPoint函数
导入msword.olb后的CentimetersToPoint函数如下
修改后的CentimetersToPoint函数如下,
红色表示的部分为增加的代码
InvokeHelper(0x173, DISPATCH_METHOD|DISPATCH_PROPERTYGET, VT_R4, (void*)&result, parms, Centimeters);
类似的如InchesToPoints、MillimetersToPoints、PicasToPoints等函数同样需要进行如此修改。
导入msword.olb后的CentimetersToPoint函数如下
float _Application::CentimetersToPoints(float Centimeters) { float result; static BYTE parms[] = VTS_R4 ; InvokeHelper(0x173, DISPATCH_METHOD, VT_R4, (void*)&result, parms, Centimeters); return result; }
修改后的CentimetersToPoint函数如下,
float _Application::CentimetersToPoints(float Centimeters) { float result; static BYTE parms[] = VTS_R4 ; InvokeHelper(0x173, DISPATCH_METHOD|DISPATCH_PROPERTYGET, VT_R4, (void*)&result, parms, Centimeters); return result; }
红色表示的部分为增加的代码
InvokeHelper(0x173, DISPATCH_METHOD|DISPATCH_PROPERTYGET, VT_R4, (void*)&result, parms, Centimeters);
类似的如InchesToPoints、MillimetersToPoints、PicasToPoints等函数同样需要进行如此修改。
相关文章推荐
- SDK编译数学函数出错:"undefined reference to 'cos/sin'
- parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)VC以类的成员函数作为线程调用函数时易出错问题解决办法
- [Php.ini]PHP调用mysql_connect()函数出错:Call to undefined function mysql_connect()
- Delphi十进制和十六进制互转 Delphi 自带函数 IntToHex
- 安装Adobe Flash CS5出错的解决办法(Exit Code: 7 ERROR: Unable to get root from inChildPath)
- Android SDK安装时出错“android Failed to rename directory”的解决方法
- spark-shell on yarn 出错(arn application already ended,might be killed or not able to launch applic)解决
- nova-compute出错: unable to connect to AMQP server.
- CreateThread 函数常见错误 cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *
- SetDIBitsToDevice函数的理解
- cvgoodFeaturesToTrack函数详细注释
- hdu4717 The Moving Points 三分求函数最小值
- 利用反射函数实现一键清除缓存,并获取清除的缓存数目。调用反射函数类出错java.lang.NoSuchMethodException: getPackageSizeInfo.
- MySQL5.1升级5.6后,执行grant出错:ERROR 2013 (HY000): Lost connection to MySQL server during query【转载】
- QT5.1发布exe出错failed to load plaform plugin "windows"
- LINQ to Entities查询的简便方法就是使用函数
- Zend studio php内置函数没有自动补全或提示函数未定义"Call to undefined function "
- myeclipse工程环境出错:Set project compiler compliance settings to '1.5'
- android studio 2.3.3 编译出错Error:Failed to complete Gradle execution
- ORACLE函数TO_CHAR以及数字转换格式