循环中的迭代(Iterations In From Loop)
有没有办法在vba中说:
from x = 1 to 100, by 10
所以x的值是1,10,20,30等到100?
is there a way to say in vba something like:
from x = 1 to 100, by 10
so that the x's are 1, 10, 20, 30, etc. to 100?
原文:https://stackoverflow.com/questions/3712000
最满意答案
- 在32位和64位Windows中,
LoadLibrary
在失败时返回NULL
。- 在16位Windows中
LoadLibrary
返回一个小于32的值来表示失败。KB142814显然是从16位Windows日期开始的,如果仔细观察,您会看到一个kb16bitonly关键字。 我认为假设您不再开发16位Windows是安全的!
Raymond Chen在这件事上的一些相关文章:
LoadLibrary
的现代文档位于: https : //msdn.microsoft.com/en-us/library/windows/desktop/ms684175.aspx ,这是您问题中的第一个链接。 它说:返回值
如果函数成功,则返回值是模块的句柄。
如果函数失败,返回值为NULL。 要获得扩展的错误信息,请调用GetLastError。
- In 32 and 64 bit Windows,
LoadLibrary
returnsNULL
on failure.- In 16 bit Windows
LoadLibrary
returns a value less than 32 to indicate failure.KB142814 clearly dates from the 16 bit Windows days, and if you look closely you will see a kb16bitonly keyword. I think it is safe to assume that you are not developing for 16 bit Windows anymore!
Some relevant articles from Raymond Chen on this matter:
- What is the difference between HINSTANCE and HMODULE?
- What can I do with the HINSTANCE returned by the ShellExecute function?
The modern day documentation for
LoadLibrary
is here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175.aspx, that is the first link in your question. It says:Return value
If the function succeeds, the return value is a handle to the module.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
相关问答
更多-
www.kkaba.com是香港的介绍网站。这样样描述正确吗?[2022-06-01]
32 -
我通过将C:\ Program Files \ R \ R-3.4.3 \ bin \ x64添加到路径来解决此问题。 我认为当我卸载了以前的R版本时,该地址已从路径中删除。 根据R for Windows FAQ ,您需要在安装新版本后手动将地址安装到路径中。 I solved the problem by adding C:\Program Files\R\R-3.4.3\bin\x64 to the path. I think that this address was deleted from th ...
-
文件说: 如果函数成功,则返回值是模块的句柄。 如果函数失败,则返回值为NULL 。 要获取扩展错误信息,请调用GetLastError 。 函数成功时,返回值不为NULL 。 这是你的方案。 如果函数成功,文档不会保证GetLastError将返回什么。 一些Win32 API函数会在返回之前调用SetLastError(ERROR_SUCCESS) ,但不是全部。 这是一个没有的。 换句话说,没有错误。 函数返回值表示成功,您不应该调用GetLastError因为它返回的值是没有意义的。 The doc ...
-
有一个操作系统工具来帮助诊断这样的问题。 下载SDK或DDK并使用gflags.exe为该过程设置“显示加载程序捕捉”(+ sls)。 这应该会揭示为什么DLL加载失败。 加载程序捕捉输出将显示在调试器输出窗口中。 马丁 There is an OS tool to help diagnose problems like this. Download the SDK or DDK and use gflags.exe to set 'Show Loader Snaps' (+sls) for the pro ...
-
KeBugCheck是一个内核函数。 这意味着您无法从用户模式代码中调用它,就像您尝试编写的应用程序一样。 此功能也没有提供用户模式包装器,因为用户模式代码不应该能够关闭整个系统。 您必须编写自己的内核模式驱动程序才能执行此操作。 要开始使用,请下载Windows驱动程序开发工具包(DDK) 。 在这种情况下,不需要整个LoadLibrary和GetProcAddress ,因为函数声明位于公共Ntddk.h头文件中,并且将自动从Ntoskrnl.lib文件链接。 至于你在这里遇到的问题, LoadLibr ...
-
LoadLibrary在失败时返回NULL还是错误代码<32?(Does LoadLibrary return NULL or an error code < 32 on failure?)[2023-04-10]
在32位和64位Windows中, LoadLibrary在失败时返回NULL 。 在16位Windows中LoadLibrary返回一个小于32的值来表示失败。 KB142814显然是从16位Windows日期开始的,如果仔细观察,您会看到一个kb16bitonly关键字。 我认为假设您不再开发16位Windows是安全的! Raymond Chen在这件事上的一些相关文章: HINSTANCE和HMODULE有何区别? 我可以用ShellExecute函数返回的HINSTANCE做什么? LoadLib ... -
尝试: [DllImport("kernel32", SetLastError = true] static extern IntPtr LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)]string lpFileName); 底层的Win32 API有两种版本:ASCII模式(只允许字符串中的ASCII字符)和Unicode模式(允许字符串中的UTF16字符)。 C#是基于UTF16的,基本上,你用UTF16字符串调用了一个ASCII风格的函数,你需要明确地告诉 ...
-
好吧,我解决了我的问题,不幸的是,这是一个相当明显的解决方案。 我将包含我的dll的目录添加到PATH变量中。 显然dll不会在自己的目录中查找它们的依赖项。 Well I solved my problem, and unfortunately it's a fairly obvious solution. I added the directory that contained my dll to the PATH variable. Apparently dlls don't look in thei ...
-
错误代码看起来像是“错误的位”,这意味着您可能混合了32位和64位可执行文件/ DLL。 项目属性“链接器 - >高级 - >目标机器”中的设置应该设置为您的DLL中的相同值,并在可执行文件中加载该DLL。 The error code looks like it has the "wrong bitness", meaning you're probably mixing 32-bit and 64-bit executables/DLLs. The setting in the Project prop ...
-
LoadLibrary冻结(LoadLibrary freezes)[2022-08-03]
你的DLL几乎肯定会调用一些试图从其DLLMain()内部获取加载器锁的东西。 你所描述的被称为死锁,这些症状完全适合这个特殊问题。 Your DLL is almost certainly calling something that tries to obtain the loader lock from inside its DLLMain(). What you describe is called deadlock and these symptoms fit this particular is ...