问题标签 [getlasterror]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c - GetDlgItemText can't get the data
The three GetDlgItemText always has some problem. Now the first and the second is OK,and the last IPAddress get nothing from Edit control. If i change the order,maybe Mask or Gateway will get nothing. the GetLastError is 6.
winapi - 在 VC++ 中不使用 GetLastError() == ERROR_ENVVAR_NOT_FOUND 检查环境变量
这是我的代码
我正在检查 zzz 环境变量是否可用。我需要在不使用if(GetLastError()==ERROR_ENVVAR_NOT_FOUND)
. 有什么办法吗?
我正在使用我不使用的 C# 执行相同的程序GetLastError()
。我需要使这两个程序相似,这就是为什么我不使用GetLastError()
. 这是我的 C# 片段
c# - 以编程方式安装设备驱动程序
我需要通过 c# 安装设备驱动程序(INF 文件)。我使用了UpdateDriverForPlugAndPlayDevices函数。但是,它返回FALSE,但 GetLastError() 返回值0,表示安装成功消息。不确定我是否以正确的方式进行。任何人都可以帮忙吗?在此先感谢,
winapi - 使用 GetFileAttributes(szPath) 和 GetLastError() 检查文件
这是“ LPCTSTR typecast for use with GetFileAttributes ”的后续内容
我扩展了我的方法 GetLastError();
。
我将 DWORD 转换为无符号整数并尝试使用 MessageBox 显示它。
该代码确实有效,但我无法使用 MessageBox 可视化该方法的值DWORD dw
或Unsigned int test
来自该GetLastError();
方法的值并弄清楚如何继续。
这是一个win32项目,我试图构建一种方法来查看硬盘上是否存在文件。
有超过 15.000 个错误代码,不可能全部硬编码。 http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx
delphi - Determining SendMessageTimeout failure reason
If a SendMessageTimeout call fails (i.e., returns 0), but a subsequent GetLastError returns 0 (success), is there any way to determine why the call failed?
The code I'm using (below) works fine for dozens of our users but for two users the SendMessageTimeout fails as described in the first sentence above.
c++ - CString 是否保留 GetLastError 代码?
我需要使用 MFC 的CString将一些调试信息发布到日志中,但我似乎无法找到它是否保留了最后一个 WinAPI 设置的错误代码(并且可以使用GetLastError检索)?
编辑:这是我目前在现有项目中所做的简化版本的代码示例:
c# - 使用 GetLastError() 检索自定义异常属性
因此,我创建了一个自定义异常类(我们称之为CustomException
)以及Exception
该类中未找到的一些自定义属性。在 global.asax.cs 文件中有Application_Error
一个在异常发生时调用的方法。我Server.GetLastError()
用来抓取触发该Application_Error
方法的异常。问题是Server.GetLastError()
它只抓取一个Exception
对象,而不是CustomException
与它的自定义属性一起被抛出的对象。基本上被检索时CustomException
被剥离为一个对象,因此失去了与 关联的自定义属性。Exception
Server.GetLastError()
CustomException
有没有办法GetLastError()
实际检索CustomException
对象而不是精简Exception
版本?为了将错误存储在具有比通常由Exception
.
Application_Error
:
CustomException
:
opengl - [ARB/]WGL 错误的 GetLastError
似乎某些特定于 API 的调用设置了返回的错误GetLastError()
。例如,wglCreateContextAttribsARB(...)
可以返回(来自规范的信息):
然而,在调试时,我得到了不同的结果。例如,尝试使用wglCreateContextAttribsARB(...)
设置 GL 4.5 上下文(我的 GPU 不支持)会导致错误值为0xC0072095
. 低 16 位匹配无效版本错误(这是有道理的,因为这是一个版本问题),但高 16 位对我来说没有意义。
我浏览了 GetLastError 文档,其中说应该为应用程序错误代码设置第 29 位。但是,我找不到任何理由说明为什么要设置其他位,并且无论如何这与 ARB 规范相冲突,即返回某某值。
这是怎么回事?
c# - 负 GetLastWin32Error()
我想知道如何调试(或实际做什么)负值Marshal.GetLastWin32Error()
?
我一直在使用我的 PC 和平代码,突然它在另一台 PC 上不起作用,我不知道该怎么做,因为我不知道那里有什么错误。
这是代码(我认为是基本部分):
其他 PC 上的异常文本是
错误(-536870389)SetupDiChangeState
这里没有列出。
c++ - InternetReadFile 因分块响应而失败
我有一个发送分块传输编码数据的服务器。我使用 InternetReadFile 读取数据,但 InternetReadFile 在读取第一个块后以 12004 失败。我使用提琴手 (Wireshark) 来截取接收到的数据。Wireshark 显示第二个块,但 InternetReadFile API 失败。
示例代码:
WireShark 显示:
HTTP/1.1 200 正常
传输编码:分块
日期:2014 年 9 月 18 日星期四 14:16:16 GMT
服务器:CHND
3
好的\n
3
命令
客户端只读取前 3 个字节的块。当我尝试读取下一个 3 字节块“CMD”时,它不起作用。
请帮助客户端应该做哪些必要的更改?还是服务器端需要处理一些额外的事情?