我一直在使用Windows 8和TortoiseSVN图标已正确显示,但安装Windows 10后,我再也看不到文件/文件夹状态的图标.
我有一个小应用程序,CheckBox如果用户希望应用程序从Windows启动,用户可以设置该选项.
我的问题是如何实际设置应用程序在启动时运行.
ps:我正在使用C#和.NET 2.0.
自从我们从Visual Studio 6切换到Visual Studio 2008以来,我们一直在使用MFC90.dll和msvc [pr] 90.dlls以及私有并排配置中的清单文件,以免担心版本或者将它们安装到系统中.
在SP1之前,这个工作正常(在我们的开发人员机器上仍能正常工作).现在我们已经在SP1之后做了一些测试,从昨天早上起我一直在拉头发.
首先,我们的NSIS安装程序脚本从redist文件夹中提取dll和manifest文件.这些不再正确,因为应用程序仍然链接到RTM版本.
所以我为_BIND_TO_CURRENT_VCLIBS_VERSION=1所有项目添加了define,以便他们在redist文件夹中使用SP1 DLL(或随后的新服务包出来).我花了好几个小时才找到这个.
我已经从编译中检查了中间文件文件夹中生成的清单文件,并正确列出了9.0.30729.1 SP1版本.我有双重和三重检查取决于一台干净的机器:它都链接到本地dll没有错误.
运行应用程序仍会收到以下错误:
应用程序无法正确初始化(0xc0150002).单击"确定"以终止该应用程序.
我在谷歌或微软上所做的任何搜索都没有提出任何与我的具体问题相关的信息(但是这些错误消息可以追溯到2005年).
有没有任何一个与SP1有类似的问题?
选项:
编辑:我尝试重新构建关闭定义(链接到RTM dll),只要RTM dll安装在文件夹中,它就可以工作.如果SP1 dll被删除,则会出现以下错误:
c:\ Program Files\...\...\X.exe
此应用程序无法启动,因为应用程序配置不正确.重新安装应用程序可能会解决此问题.
没有人不得不处理这个问题吗?
编辑:只是为了笑容,我下载并在我的测试机器上运行VS2008SP1的vcredist_x86.exe.它有效.使用SP1 DLL.我的RTM链接应用程序.但不是在SP1之前工作的私有并行分发.
我在过去使用setargv.obj链接扩展通配符参数用于许多C和C++应用程序,但我找不到.net应用程序的任何类似提及.
是否有一种标准方法可以让您的应用程序的命令行参数自动扩展通配符?(即将args参数中的一个条目的*.doc扩展为与该通配符匹配的所有条目).
PS我已经使用Directory.GetFiles()为我当前的小项目攻击了一些东西,但它没有覆盖带路径的通配符(还有),没有自定义代码就可以做到这一点.
更新:这是我粗略的黑客,为了说明.它需要拆分GetFiles的路径和名称参数,但这是一般的想法.将setargv.obj链接到C或C++应用程序基本上会执行所有通配符扩展,使用户只能遍历argv数组.
static void Main(string[] args)
{
foreach (String argString in args)
{
// Split into path and wildcard
int lastBackslashPos = argString.LastIndexOf('\\') + 1;
path = argString.Substring(0, lastBackslashPos);
filenameOnly = argString.Substring(lastBackslashPos,
argString.Length - lastBackslashPos);
String[] fileList = System.IO.Directory.GetFiles(path, filenameOnly);
foreach (String fileName in fileList)
{
//do things for each file
}
}
}
Run Code Online (Sandbox Code Playgroud) 我对XBox开发相对较新,并且想知道开始寻找更多关于XBox Live公开的API的最佳位置.特别是围绕玩家和游戏成就,玩家细节,他们正在玩的其他游戏 - 那种事情.
我见过https://xboxapi.com虽然这很好,但我不知道它是否足够详细以满足我的需求.
类似地,XBox社区开发计划(http://www.xbox.com/en-US/developers/home)似乎非常有用,但还有很多事情需要考虑.
我希望有一些善良的开发人员有一些经验,可以指出正确的方向,让我在路上
谢谢,
我有一个双核处理器,根据解释,我只能使用2个线程,但实际上我可以同时启动2个以上的线程:
以下是解释的副本:
boost :: thread类提供的静态hardware_concurrency()方法根据底层的CPU或CPU核心数返回可以在物理上同时执行的线程数.在常用的双核机器上调用此函数,返回值2.这允许一种简单的方法来识别给定多线程应用程序应同时使用的理论最大线程数.
在我的情况下,hardware_concurrency()方法返回数字2,但是该程序同时使用4个线程:
#include <iostream>
#include <boost\thread.hpp>
using namespace std;
using boost::thread;
using namespace boost::this_thread;
using boost::posix_time::seconds;
void f1()
{
for(int i = 0; i < 10; ++i)
{
cout << i << endl;
sleep(seconds(2));
}
}
void f2()
{
for(int i = 0; i < 10; ++i)
{
cout << i << endl;
sleep(seconds(2));
}
}
int main()
{
// 4 threads are executed on dual core machine (no problem)
thread thr1(f1);
thread thr2(f2);
thread thr3(f1); …Run Code Online (Sandbox Code Playgroud) 使用Visual Studio 2015,我无法再使用命令行工具编译和链接简单的C++程序.
考虑main.cpp:
#include <stdlib.h>
int main() { return 0; }
Run Code Online (Sandbox Code Playgroud)
在以前的版本中(例如Visual Studio 2012),我能够轻松地编译和链接main.cpp:
C:\Users\bkircher\src\test>cl main.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.61030 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
main.cpp
Microsoft (R) Incremental Linker Version 11.00.61030.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:main.exe
main.obj
Run Code Online (Sandbox Code Playgroud)
并做了.
但是,在Visual Studio 2015中,我不再设置正确的CRT包含和库路径:
C:\Users\bkircher\src\test>cl main.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
main.cpp
main.cpp(1): fatal error C1083: Cannot open include file: …Run Code Online (Sandbox Code Playgroud) 我现在正在测试C++ sizeof运算符的结果:
class S{};
class A:public S{
virtual void fun()=0;
};
class B{};
class C : public B,public A {};
int main(){
cout<<sizeof(A)<<endl;// result is 4
cout<<sizeof(C)<<endl;// result is 8
}
Run Code Online (Sandbox Code Playgroud)
但是如果我删除了S类的扩展:
class A{
virtual void fun()=0;
};
class B{};
class C : public B,public A{};
int main(){
cout<<sizeof(A)<<endl;// result is 4
cout<<sizeof(C)<<endl;// result is 4
}
Run Code Online (Sandbox Code Playgroud)
谁能解释sizeof(C)这两个例子中不同的输出?类S只是一个空类(我知道sizeof(S) == 1),那么为什么它是否A有基类有所不同?特别是因为它没有任何区别sizeof(A),只有sizeof(C)?
使用 ng gc my-component 创建组件时出现以下错误
'发生未处理的异常:catch 子句变量不是错误实例, 请参阅“path-to-file\angular-errors.log”了解更多详细信息。
并且文件包含以下堆栈跟踪: [错误] AssertionError [ERR_ASSERTION]:catch 子句变量不是assertIsError 处的错误实例(C:\Users\sam\node_modules@angular\cli\src\utilities\error.js:16:26 )在GenerateCommandModule.runSchematic (C:\Users\sam\node_modules@angular\cli\src\command-builder\schematics-command-module.js:311:43) 在异步GenerateCommandModule.handler (C:\Users\sam\ node_modules@angular\cli\src\command-builder\command-module.js:109:24)
即使更新 Angular cli 后也没有运气
npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
npm cache verify
npm install -g @angular/cli@latest
Run Code Online (Sandbox Code Playgroud)
下面是我的package.json文件:
{
"name": "my-sample-frontend",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.1.0",
"@angular/common": "^14.1.0",
"@angular/compiler": "^14.1.0",
"@angular/core": "^14.1.0",
"@angular/forms": …Run Code Online (Sandbox Code Playgroud) 我在调用时使用这些窗口样式CreateWindow
WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
禁用最大化框,但有什么办法可以完全删除它吗?