原文:http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/42985583-36fb-4e14-8642-bd837aac0727
I have a code that is called on a pointer that may be invalid (I have no control over its value):
__try
{
CString str = (LPCTSTR)wParam;
//Work with 'str' now
}
__except(1)
{
//Memory fault
}
But when I try to use it in a MFC project, it gives me this error:
error C2712: Cannot use __try in functions that require object unwinding
解决方法:
__try
{
DoStuffWithWParam(wParam);
}
__except(1)
{
//Memory fault
}
void DoStuffWithWParam(WPARAM wParam) {
CString str = (LPCTSTR)wParam;
//Work with 'str' now
}
分享到:
相关推荐
( It can remove any of the emoji supported by that package. ) Installation / 安装方式 via Rubygems gem install remove_emoji In your Gemfile: gem 'remove_emoji' , '~> 3.0.0' Usage / 使用方式 使用...
Category = require ( './category' ) ( sequelize , Sequelize ) ;db . Question = require ( './question' ) ( sequelize , Sequelize ) ;db . Test = require ( './test' ) ( sequelize , Sequelize ) ;db . ...
最近在使用python过重遇到这个问题,NameError: name 'xxx' is not defined,在学习python或者在使用python的过程中这个问题大家肯定都遇到过,在这里我就这个问题总结以下几种情况: 错误NameError: name ‘xxx’ ...
Header-only (optional!) Supports the latest TOML release (v1.0.0), plus...Doesn't require RTTI Works with or without exceptions Tested on Clang (6+), GCC (7+) and MSVC (VS2019) Tested on x64, x86 and ARM
在Vue.js开发过程中,我们可能会遇到“Error: Cannot find module”这样的错误,这通常是由于模块导入路径不正确、npm包未安装或者环境配置问题导致的。以下是一些常见的解决步骤和详细解释,希望能帮助到遇到此类...
记录如何初始化表格 const db = require ( 'mock.db' ) , table = new db . table ( 'test_table' ) ; 如何将数据设置为条目 const db = require ( 'mock.db' ) , table = new db . table ( 'test_table' ) ;table ....
:globe_showing_Europe-Africa: :globe_showing_Asia-Australia: climate-change-reminder :globe_showing_Americas: :globe_showing_Europe-... const climateChangeReminder = require ( 'climate-change-remind
const decode = require ( 'react-error-decoder' ) ;decode ( 'Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or...
Warning: require_once(./libraries/common.inc.php) [function.require-once]: failed to open stream: No such file or directory in X:xxxxxxphpmyadminindex.php on line 34 Fatal error: require_once() ...
递归项 :recycling_symbol: Object.entries,但递归;)安装 :down_arrow: npm i recursive-entries 用法 :hammer_and_wrench: const { recursiveEntries , valueFromPath} = require ( 'recursive-entries' ) ; :...
:microscope: :input_latin_uppercase:内容要求 > = v12.10.* > = 6.10.*安装$ npm install furey/lifx-tile-fonts#semver:^v2用法const { chars , groups } = require ( 'lifx-tile-fonts' )console ....
var assert = require ( 'assert' ) ; var choo = require ( 'choo' ) ; var html = require ( 'choo/html' ) ; var test = require ( 'choo-test' ) ; function model ( state , emitter ) { state . text = '...
die_error(USER_ERROR, $type_field_map[$type]['name'] . '格式无效'); } $user = new User(); $user->set_where_and($type_field_map[$type], SqlOperator::Equals, $value); $result = $user->exists(create...
var loader = require ( 'require-conf' ) ; var config = loader ( __dirname + '/config' ) ; var appConfig = config . load ( 'app' ) ; // => ./config/app.js 在其他环境中: // NODE_ENV=development var ...
composer require wgenial/numeroporextenso include __DIR__. '/vendor/autoload.php' ; use WGenial \ NumeroPorExtenso \ NumeroPorExtenso ; $ extenso = new NumeroPorExtenso ; $ extenso = $ extenso -> ...
Error: Cannot find module 'react-dev-utils/crossSpawn' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) ...
:roller_coaster: 抽动 简单的自托管分析非常适合Express / React Native堆栈 :horizontal_traffic_light: 安装 在您的前端和后端上,安装tics库。 npm i tics ...// Use endpoints to receive im
:bust_in_silhouette: 识别浏览器是否处于隐身模式的功能 :eyes: 如何使用 要安装库: # yarn yarn add is-incognito-mode # npm npm install is-incognito-mode --save // ES6 modules import isIncognito from ...
在本文中,我们将探讨在Ubuntu 16.04系统上安装Ruby 2.7.0时遇到的一个常见问题:`cannot load such file — openssl (LoadError)`。这是一个与Ruby和OpenSSL库集成有关的问题,通常发生在试图安装或运行依赖于...