365key.com
发现·保存·分享@天天网摘

Q版365key  设为首页 加为收藏 帮助

 首页  网址  添加  我的网摘  我的订阅  最新网摘  收录榜  点击榜  同好  配置  工具箱  标签  兴趣小组 
  IT168 |  华军下载 |  猫扑 |  VeryCD |  CSDN技术 |  DoNews |  9Flash |  中金 |  游侠 |  股票天下 |  游戏公会 |  电子工程 |  白银时代 |  和365Key合作

jiangsheng的网摘列表 RSS格式输出  365Key邮件订阅,每天可以定期收到邮件通知  使用 POTU 订阅
搜索词: 时间:
分类:     排序:
 
刷新列表 共1页、18项网摘
Extending Task Manager with DLL Injection点击:52
 分类:UI; security 时间:2006-4-18 5:07:28 jiangsheng收录 复制到我的网摘
http://www.codeproject.com/threads/taskex.asp
The arms race between programs and users on the right to kill点击:31
 分类:UI 时间:2006-4-18 5:00:17 jiangsheng收录 复制到我的网摘
There is a constant struggle between people who write programs and the people who actually use them. For example, you often see questions like, "How do I make my program so the user can't kill it?"

Now, imagine if there were a way to do this. Ask yourself, "What would the world be like if this were possible?"

Well, then there would be some program, say, xyz.exe, that is unkillable. Now suppose you're the user. There's this program xyz.exe that has gone haywire, so you want to exit it. But it won't let you exit. So you try to kill it, but you can't kill it either.

This is just one of several arms races that you can imagine.

"I don't want anybody to kill my process." vs. "How do I kill this runaway process?"
"I want to shove this critical dialog in the user's face." vs. "How do I stop programs from stealing focus?"
"I don't want anybody to delete this file." vs. "How do I delete this file that refuses to be deleted?"
"How do I prevent this program from showing up in Task Manager?" vs. "How can I see all the programs that are running on my computer?"
Eventually you have to decide which side wins, and Windows has decided to keep users in control of their own programs and data, and keep administrators in control of their own computer. So users can kill any process they want (given sufficient privileges), they can stop any program from stealing focus, and they can delete any file they want (again, given sufficient privileges).

Programs can try to make themselves more difficult to kill (deny PROCESS_TERMINATE access, deny PROCESS_CREATE_THREAD access so people can't CreateRemoteThread(EndProcess), deny PROCESS_VM_WRITE so people can't scribble into your stack and make you doublefault, deny PROCESS_SUSPEND_RESUME so they can't suspend you), but eventually you just can't stop them from, say, elevating to Debug privilege, debugging your process, and moving EIP to "ExitProcess".

Notice that you can kill CSRSS.EXE and WINLOGON.EXE if you like. Your computer will get very angry at you, but you can do it. (Save you work first!)

Another useful question to ask yourself: "What's to prevent a virus from doing the same thing?" If there were a way to do these things, then a virus could take advantage of them and make itself invisible to Task Manager, undeletable, and unkillable. Clearly you don't want that, do you?
http://blogs.msdn.com/oldnewthing/archive/2004/02/16/73780.aspx
Windows Vista User Experience Guidelines:Top Rules 点击:42
 分类:UI; Windows; Vista 时间:2006-4-14 10:02:25 jiangsheng收录 复制到我的网摘
http://msdn.microsoft.com/library/en-us/UxGuide/UXGuide/Resources/TopRules/TopRules.asp
Hosting Windows Forms Designers点击:37
 分类:UI 时间:2005-9-15 0:51:03 jiangsheng收录 复制到我的网摘
I decided to write this article not because there is a strong demand for this information, but because there is literally no existing information out there on the topic. The documentation is scarce if any, and aside from a few tidbits thrown out by Microsoft it is a daunting task. It requires you to already be very familiar with the design-time architecture, and have a strong grasp of all the interfaces you commonly use.
http://www.divil.co.uk/net/articles/designers/hosting.asp
C++ Potential-Some Notes about Mixed Types in C++/CLI点击:33
 分类:UI 时间:2005-9-6 5:24:48 jiangsheng收录 复制到我的网摘
Perhaps the most important reason to use C++ for managed code development is that C++ fully understands managed code and existing C++ code. This positions C++ as the ultimate language for doing managed-native interop programming. It is worth sitting back and remembering just how important that capability is. This allows you as the programmer to take advantage of any library that exists whether it is a native library or a .NET library. At the same time, every work item can be accomplished by using C++ alone. Although the CLR allows language interop between assemblies and to some degree within an assembly, it's still harder than using only one language.

C++ definitely makes interop easier than any other language on the .NET platform, but it still requires effort... and intelligence. The most fundamental thing to understand about .NET interop are differences between memory allocators. These are the two models that must be understood: the CLR garbage collector and traditional native heap memory managers.
http://blogs.msdn.com/branbray/archive/2005/07/20/441099.aspx
HOWTO: 如何调用带有可变参数列表的自动化方法点击:39
 分类:UI 时间:2005-9-2 23:22:58 jiangsheng收录 复制到我的网摘
OLE 自动化允许您在服务器上创建可以采用变长参数列表的方法。 这在 Visual Basic 中是一个简单过程。 但是,当您从用 C/C++ 编写的客户程序来调用这样的方法时,则要考虑一些特殊的事项。
http://support.microsoft.com/kb/q158451/
Speeding up adding items to a combobox or listbox点击:47
 分类:UI 时间:2005-9-1 1:44:25 jiangsheng收录 复制到我的网摘
Just a little tip: If you're going to be adding a lot of items to a listbox or combobox, there are a few little things you can do to improve the performance significantly. (Note: The improvements work only if you have a lot of items, like hundreds. Of course, the usability of a listbox with a hundred items is questionable, but I'm assuming you have a really good reason for doing this.)

First, you can disable redraw while you add the items. (This tip works for all controls, actually.)

SetWindowRedraw(hwnd, FALSE);
... add the items ...
SetWindowRedraw(hwnd, TRUE);
InvalidateRect(hwnd, NULL, TRUE);

SetWindowRedraw is defined in the header file.

This suppresses the control redrawing itself each time you add an item. But there is still something else you can do:

SendMessage(hwndCombo, CB_INITSTORAGE, cItems, cbStrings);
... add the items ...

(For listbox controls, use the LB_INITSTORAGE message.)

cItems is the number of items you intend to add, and cbStrings is the total amount of memory (in bytes) required by the strings you intend to add.

It's okay if these values are merely estimates. If you are too low, then there will still be some reallocation for the extra items. If you are too high, then some memory will be allocated but remain unused.

Some people will recommend using LockWindowUpdate, but this is wrong. LockWindowUpdate disables drawing in the window you specify, but suppressing flickering during updates is not what it was designed for.

One clear limitation limitation of LockWindowUpdate is that only one window can be locked for update at a time. So if two windows each try the LockWindowUpdate trick at the same time, only one of them will succeed. That's not particularly reliable, now, is it.

The purpose of LockWindowUpdate is to assist code that is drawing drag/drop feedback. If you are drawing the cursor for a drag/drop operation, you don't want the window beneath the cursor to start drawing (and thereby overwrite your beautiful cursor). So you lock the window while you draw the cursor and unlock it when the cursor leaves the window.

That's why there is only one locked window at a time: There can be only one drag/drop operation active at a time, since there is only one mouse.

http://blogs.msdn.com/oldnewthing/archive/2004/06/10/152612.aspx
PRB: PostThreadMessage Messages Lost When Posted to UI Thread点击:44
 分类:UI 时间:2005-8-26 5:19:09 jiangsheng收录 复制到我的网摘
Messages sent to a UI thread through PostThreadMessage are lost if the messages are posted while the user is manipulating a window owned by the thread. Messages might be lost if they are sent while the user moves or resizes the window or if the window is a modal dialog box.
http://support.microsoft.com/kb/183116
How to Not Step Into Functions using the Visual C++ Debugger 点击:44
 分类:UI 时间:2005-8-7 10:45:10 jiangsheng收录 复制到我的网摘
Ever stepped into a function you didn’t want to? Like an ATL or MFC CString constructor for example? Or a conversion operator you are really not interested in? Well there is a way to tell the Visual Studio debugger to never, ever step into a particular function. This is not a documented option, but the information is available in newgroups, but the changes from 6.0 to 7.0 have caused a great deal of confusion. Here is the real story for 7.0 (and 7.1).

http://blogs.msdn.com/andypennell/archive/2004/02/06/69004.aspx
How to insert objects without using the InsertObject dialog box点击:38
 分类:UI 时间:2005-8-6 9:22:19 jiangsheng收录 复制到我的网摘
When building an OLE container or OLE server application using MFC OLE classes, you should insert an OLE embedded object programmatically, without using the InsertObject dialog box. This article show you how.

In a default MFC AppWizard-generated OLE container or OLE server application, a command handler is implemented to enable the user to insert an object by clicking Insert New Object on the Edit menu. The AppWizard-generated code makes use of the COleInsertDialog class, which is an MFC wrapper for the OLEUIINSERTOBJECT common dialog box. The COleInsertDialog data and member functions are used to embed the object.
http://support.microsoft.com/kb/q137357/
The Code Project Visual C++ Forum FAQ点击:152
 分类:UI 时间:2005-4-22 7:24:37 jiangsheng收录 (还有1人收录) 复制到我的网摘
Welcome to the FAQ for the CodeProject Visual C++ forum. This FAQ is a compilation of the most-often asked questions in the forum, and covers several C++ programming subjects. It is not a full-fledged C++ or Windows programming FAQ (there are plenty of those already), but rather it's meant to cover the topics that CodeProject readers ask about the most.

If you think of any questions that you feel should be covered in this FAQ, email me with the question and the answer.

NOTE: Please do not email me directly to ask individual questions. I can't be everyone's personal consultant. Also, don't post programming questions in the message area of this article. Use the CodeProject forums to ask your questions; that's what they're there for!

Thanks to Tim Deveaux, Anders Molin, and Christian Graus for their contributions to this FAQ, along with all the folks who have posted suggestions in the comments area and via email!
http://www.codeproject.com/cpp/cppforumfaq.asp
Using Device Management点击:34
 分类:UI 时间:2005-4-20 7:26:39 jiangsheng收录 复制到我的网摘
The following examples demonstrate device management:

Registering for Device Notification
Enumerating Current Devices
Detecting Media Insertion or Removal
Processing a Request to Remove a Device
http://msdn.microsoft.com/library/en-us/devio/base/using_device_management.asp
Persisting View State Update, Using Managed Extensions in a DLL点击:68
 分类:UI; DotNetFramework 时间:2005-4-20 3:04:24 jiangsheng收录 复制到我的网摘
Q I read your November 2004 column on how to persist the Open dialog view state across user sessions with great interest, but I think you overlooked something. Your CListViewShellWnd (m_wndListViewShell in the dialog) will be destroyed at the moment the user changes folders. So when you close the dialog, it won't save the current view mode, rather the view mode it was in when the user changed to another folder. Is there some way to fix this?
Q I have a DLL that uses MFC and now I want to use the Managed Extensions to call classes in the Microsoft?.NET Framework. When I compile, I get a linker warning LNK4243: "DLL containing objects compiled with /clr is not linked with /NOENTRY; image may not run correctly." I don't really understand what this means so I ignore it梑ut now my app crashes when I run. Can't I use Managed Extensions in a DLL?
http://msdn.microsoft.com/msdnmag/issues/05/02/CATWork/default.aspx
Desktop Location, sscanf Equivalents in C#, and Automatic Update 点击:44
 分类:UI 时间:2005-4-8 4:51:05 jiangsheng收录 复制到我的网摘
http://msdn.microsoft.com/msdnmag/issues/03/04/CQA/
difference between Simplified and Traditional Chinese点击:51
 分类:UI 时间:2005-3-24 0:10:34 jiangsheng收录 复制到我的网摘
http://www.nettranslation.co.uk/resources_about_language_chinese.htm
PRB: Menus for Notification Icons Do Not Work Correctly点击:41
 分类:UI 时间:2005-3-6 4:41:02 jiangsheng收录 复制到我的网摘
为了让TrackPopupMenu在托盘的上下文中正确运行,你必须首先调用SetForegroundWindow,否则,当用户按下ESCAPE键或者在菜单之外单击鼠标时,菜单不会消失
http://support.microsoft.com/kb/135788
INFO: Calling Shell Functions and Interfaces from a Multithreaded Apartment点击:40
 分类:UI 时间:2005-3-4 7:20:33 jiangsheng收录 复制到我的网摘
Also affect CFileDialog
When you call or access a shell function or shell interface from a thread that has been initialized as a multithreaded apartment, the function or interface may have its functionality impaired or completely fail.
http://support.microsoft.com/kb/287087
Rich Edit Shortcut Keys点击:31
 分类:UI 时间:2005-1-11 16:49:09 jiangsheng收录 复制到我的网摘
richedit里面的快捷键。顺便说一下,Word里面的richedit版本比较高一些。
Rich edit controls support the following shortcut keys.
http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/richedit/richeditcontrols/aboutric...
页码: [1 共1页、18项网摘

使用帮助 |  如何保存网摘 |  给365Key提建议 |  媒体报道 |  站长推广须知
Copyright (C) 2004 365Key.com--天天网摘 All Rights Reserved