l*****8 发帖数: 16949 | 1 下面这个hello world的20天能学会吗?
[
uuid(2573F8F4-CFEE-101A-9A9F-00AA00342820)
]
library LHello
{
// bring in the master library
importlib("actimp.tlb");
importlib("actexp.tlb");
// bring in my interfaces
#include "pshlo.idl"
[
uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820)
]
cotype THello
{
interface IHello;
interface IPersistFile;
};
};
[
exe,
uuid(2573F890-CFEE-101A-9A9F-00AA00342820)
]
module CHelloLib
{
// some code related header files
importheader();
importheader();
importheader(阅读全帖 |
|
D*****r 发帖数: 6791 | 2 http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html
High School/Jr.High
10 PRINT "HELLO WORLD"
20 END
First year in College
program Hello(input, output)
begin
writeln('Hello World')
end.
Senior year in College
(defun hello
(print
(cons 'Hello (list 'World))))
New professional
#include
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i < 2; ++i)
printf("%s", message[i]);
printf("\n");
}
... 阅读全帖 |
|
p********i 发帖数: 12365 | 3 把下面的代码复制下来保存成reg文件备用
CODE:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\WPA\tabletpc]
"installed"=dword:00000001
不太会搞注册表文件,谁指教一下。
谢谢。 |
|
P********e 发帖数: 2610 | 4 这个是编程风格吧
比如
if ( 1 ) {
}
if ( 1 )
{
}
起名字叫naming rule
DWORD dwNum; |
|
o****e 发帖数: 916 | 5 my guess, box?
List is in managed heap, object in List is referenced, and thus need a
pointer to its assigned memory block. That memory block has two leading
DWORD to store address of method table and syncblk index.
i think in this case the value is boxed and the method table is for a class
of boxed int. |
|
M********G 发帖数: 1207 | 6 试试这个吧
让Win XP支持137 GB以上大硬盘
想要使用137 GB以上大硬盘,必须使用48位LBA模式。首先你的主板BIOS必须支持48Bit
LBA,其次Win XP家用版和专业版必须安装SP1补丁。然后打开注册表,在如下路径“
HKEY_LOCAL_MACHINE System CurrentControlSet Services Atapi Parameter”找到“
EnableBigLba”选项,将其值由“0”改为“1”。如果该项不存在,可以自建“DWORD
值”项目,同样设置.最后重新启动即可。 |
|
A*****s 发帖数: 13748 | 7 根本用不着,曾经xp下直接支持160G和320G没问题
48Bit
DWORD |
|
a*o 发帖数: 19981 | 8 disable smb2:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\
parameters]
"SMB2"=dword:00000000
shame on microsoft, they are simply incapable of fixing this well known
issue since vista days, 3 years already!
shame shame shame .... |
|
l*******e 发帖数: 3584 | 9 没有在WIN7上试过,VISTA上也是装完了系统才建的RAID,系统不认,
但我不是建的系统盘,也是折腾了一翻,把当时的笔记贴上来吧,
BIOS里设了RAID,系统不认呀,而且直接蓝屏。
是这个贴子告诉我怎么能让机器在RAID设了之后还能进VISTA,原链接找不到了,重要
的是不明白这个设置是什么意思,因此一定要记下来。而且接下来的事儿与这个哥们儿
说得很象
I noticed that the driver was named iaStorV.sys, so I did a search for it
and found it already installed in theWindows\System32\Drivers folder. I did
a registry search for it and found it inHKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Services\iaStorV. This made me happy!
Some more Googling later and I figured out t... 阅读全帖 |
|
y*z 发帖数: 3244 | 10 win7/8.1去除Win10升级提示
1、在运行中输入regedit后,按回车键进入注册表编辑器
2、定位到
HKEY_LOCAL_MACHINE SOFTWAREPoliciesMicrosoftWindowsGwx
3、新建一个DWORD(32位)值,重命名为DisableGwx
4、双击新建的值,将“数值数据”修改为1
重启电脑之后设定就会生效,Win10升级通知将不会再来“烦你”。
想要恢复的话,只需删除上述DisableGwx值即可。 |
|
ft 发帖数: 106 | 11 Copy the following line in textpad, save it as a text file, but the name
should be like reg.reg
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
\"DisableRegistryTools\"=dword:00000000
Then just run this .reg file by double clicking. You will be fine. |
|
g*****g 发帖数: 34805 | 12 I think XP aligns for a dword which is 8 bytes, that's why you get
104. Reduce a char or two, you'll still get 104.
, |
|
z******i 发帖数: 59 | 13 This code might be very slow.
It will be translated to something like the following assemly code.
fldcw [ebp-4] ;Write new value to FCW
fistp DWORD PTR [ebp-16] ;Convert fvalue to integer
;and pop stack
fldcw [ebp-12] ;Restore FCW to its
;original state
It is a serial code in CPU because it changes FPU's control word.
A better solution is using SSE, 4 float one time |
|
c*******r 发帖数: 75 | 14 这两种数据类型在C++能够通用吗?他们能够直接互相赋值吗?会有什么问题吗?非常
感谢。 |
|
|
r*****s 发帖数: 985 | 16 多谢。我想的也是这样。就是偶尔有那个stack around the variable was corrupted的
runtime error。感觉上还是读写array out of bound之类的问题?还有什么主意吗?
具体来说IMetaDataImport::GetTypeDefProps
HRESULT GetTypeDefProps (
[in] mdTypeDef td,
[out] LPWSTR szTypeDef,
[in] ULONG cchTypeDef,
[out] ULONG *pchTypeDef,
[out] DWORD *pdwTypeDefFlags,
[out] mdToken *ptkExtends
);
MSDN doc里没说啊。
是不是.NET里type name maximal size = 512?
我是给了个wchar_t szTypeDef[512]; |
|
x****u 发帖数: 44466 | 17 你不要太激动,我也是在研究这个细节。
我在VC上编译你这个程序得到的汇编也一样,说明这个行为普遍存在,不管符合不符合
语法,在多线程的全局变量前一定要加上volatile防止编译器自作主张cache值。
这个是没有volatile的
00321002 in al,dx
00321003 and esp,0FFFFFFF8h
unsigned int x=0;
00321006 xor eax,eax
global_var = 1;
for (long long i=0; i<10000000000L; i++) {
00321008 xor edx,edx
0032100A mov dword ptr [global_var (323378h)],1
00321014 xor ecx,ecx
00321016 add edx,1
00321019 adc ecx,0
0032101C cmp |
|
|
|
p***o 发帖数: 1252 | 20 这需求不是挺常见么, 也跟open source扯不上什么关系, 另外对齐方式估计也得检查。
Win32里面的解决方式就是检查struct的大小,比如说
typedef struct _SECURITY_ATTRIBUTES {
DWORD nLength;
LPVOID lpSecurityDescriptor;
BOOL bInheritHandle;
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
Members
nLength
The size, in bytes, of this structure. Set this value to the size of the SEC
URITY_ATTRIBUTES structure.
does
does |
|
o**v 发帖数: 1662 | 21 保存为.reg,导入
REGEDIT4
#B83FC273-3522-4CC6-92EC-75CC86678DA4 /3721
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX
Compatibility\{B83FC273-3522-4CC6-92EC-75CC86678DA4}]
"Compatibility Flags"=dword:00000400 |
|
R*****l 发帖数: 310 | 22 用记事本编辑一个任意名字的.reg文件,比如recover.reg,内容如下:
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
]
"DisableRegistryTools"=dword:0000000
双击运行recover.reg即可。REGEDIT4下面一定要空一行
最后查一下services里加载了什么怪异进程没有。
管理员身份重起到安全模式下,杀毒。 |
|
D********r 发帖数: 66 | 23 可能以前有人发过,我前一阵子中标了,受害非浅,想后来的人有可能能用到。当然希
望您永远也用不上。OK, 步骤如下:
1. 断开网络!!!
2. 结束病毒进程 %System%\drivers\spoclsv.exe
3. 删除病毒文件:c:\windows\system32\drivers\spoclsv.exe
注意:打开C盘要右键-打开,or 就要功亏一篑,重复2!
4. 修改注册表设置,恢复“显示所有文件和文件夹”选项功能:
[Copy to clipboard]CODE:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\
Advanced\Folder\Hidden\SHOWALL]
"CheckedValue"=dword:00000001
本步骤针对病毒将显示隐藏文件禁用的情况
5. 右键点击分区盘符,点击右键菜单中的“打开”进入分区根目录,删除根目录下的
文件:
X:\setup.exe
X:\autorun.inf
6. 删除病毒创建的启动项:
[Copy to clipboa |
|
st 发帖数: 1685 | 24 From netants:(actually tigerNT has same thing.... but simpler)
reg file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\MenuExt\&Download by NetAnts]
@="D:\\PROGRA~1\\NetAnts\\NAGet.htm"
"Contexts"=dword:00000022
NaGet.htm
|
|