2017年3月31日 星期五
[C++] Enumerating All Processes, unresolved external symbol _GetModuleBaseNameW
#include "psapi.h"
void CdlgSSDMP::PrintProcessNameAndID( DWORD processID )
{
TCHAR szProcessName[MAX_PATH] = TEXT("<unknown>");
// Get a handle to the process.
HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
PROCESS_VM_READ,
FALSE, processID );
// Get the process name.
if (NULL != hProcess )
{
HMODULE hMod;
DWORD cbNeeded;
if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod),
&cbNeeded) )
{
GetModuleBaseName( hProcess, hMod, szProcessName,
sizeof(szProcessName)/sizeof(TCHAR) );
}
}
// Print the process name and identifier.
_tprintf( TEXT("%s (PID: %u)\n"), szProcessName, processID );
// Release the handle to the process.
CloseHandle( hProcess );
}
REF:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682623(v=vs.85).aspx
https://social.msdn.microsoft.com/Forums/en-US/623ba3e3-7c47-4cf0-80e8-9262f3b47e52/enumprocesses-issue?forum=Vsexpressvc
________________________________________ 3S CONFIDENTIALITY NOTICE: This message and all attachments may contain legally privileged and confidential information. Any unauthorized review, use or distribution by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by replying to the message and delete all copies. Thank you.
2017年3月28日 星期二
RE: [C++] VC6 shortcut keys
Best regards,
Rex Wu
Tel. (03) 552-6568#1181
Solid State System Co., Ltd.
From: 3s_Rex_Wu 吳瑞益
Sent: Thursday, March 23, 2017 10:24 AM
To: ' (for.adv.upstairs@blogger.com)'
Cc: 'rex@lionrex.pixnet.net'
Subject: [C++] VC6 shortcut keys
Edit | Bookmarks | Alt+F2 | Edits or navigates bookmarks |
Edit | SelectionFormat | Alt+F8 | Formats the selection using the smart indent settings |
Edit | DebugBreakpoints | Alt+F9 | Edits breakpoints in the program |
Edit | SentenceCut | Alt+Shift+L | Deletes the remainder of the sentence |
Edit | LineTranspose | Alt+Shift+T | Swaps current and previous lines |
Edit | DeleteBack | Backspace | Deletes the selection or, if there is no selection, the character to the left of the cursor |
Edit | SelectAll | Ctrl+A | Selects the entire document |
Edit | ListMembers | Ctrl+Alt+T | Brings up the completion list box |
Edit | WordDeleteToStart | Ctrl+Backspace | Deletes a word to the left |
Edit | Copy | Ctrl+C | Copies the selection to the Clipboard |
Edit | FindTool | Ctrl+D | Activates the Find tool |
Edit | WordDeleteToEnd | Ctrl+Del | Deletes a word to the right |
Edit | WindowScrollUp | Ctrl+Down Arrow | Scrolls the file contents up one line |
Edit | DocumentEnd | Ctrl+End | Moves to the end of the document |
Edit | Find | Ctrl+F | Finds the specified text |
Edit | BookmarkToggle | Ctrl+F2 | Toggles a bookmark for the current line on and off |
Edit | FindNextWord | Ctrl+F3 | Finds the next occurrence of the selected text |
Edit | SelectLine | Ctrl+F8 | Selects lines of text |
Edit | GoTo | Ctrl+G | Moves to a specified location |
Edit | FindReplace | Ctrl+H | Replaces the specified text with different text |
Edit | DocumentStart | Ctrl+Home | Moves to the beginning of the file |
Edit | SearchIncremental | Ctrl+I | Starts an incremental search forward |
Edit | ConditionalUp | Ctrl+J | Finds the previous matching preprocessor condition |
Edit | ConditionalDown | Ctrl+K | Finds the next matching preprocessor condition |
Edit | LineCut | Ctrl+L | Deletes the selected lines and puts them on the Clipboard |
Edit | WordLeft | Ctrl+Left Arrow | Moves back one word |
Edit | BrowsePopContext | Ctrl+Num * | Returns to the location preceding the last browse operation |
Edit | BrowseNext | Ctrl+Num + | Displays the next symbol definition or reference |
Edit | BrowsePrev | Ctrl+Num - | Displays the previous symbol definition or reference |
Edit | WordRight | Ctrl+Right Arrow | Moves forward one word |
Edit | ToggleViewWhitespace | Ctrl+Shift+8 | Shows or hides tab characters |
Edit | DocumentEndExtend | Ctrl+Shift+End | Extends the selection to the end of the document |
Edit | BookmarkClearAll | Ctrl+Shift+F2 | Clears all bookmarks in the window |
Edit | FindPrevWord | Ctrl+Shift+F3 | Finds the previous occurrence of the selected text |
Edit | SelectColumn | Ctrl+Shift+F8 | Selects a columnar block of text |
Edit | DocumentStartExtend | Ctrl+Shift+Home | Extends the selection to the beginning of the file |
Edit | SearchIncrementalBack | Ctrl+Shift+I | Starts an incremental search backward |
Edit | ConditionalUpExtend | Ctrl+Shift+J | Extends the selection to the previous matching preprocessor condition |
Edit | ConditionalDownExtend | Ctrl+Shift+K | Extends the selection to the next matching preprocessor condition |
Edit | LineDelete | Ctrl+Shift+L | Deletes the selected line |
Edit | WordLeftExtend | Ctrl+Shift+Left Arrow | Extends the selection back one word |
Edit | WordRightExtend | Ctrl+Shift+Right Arrow | Extends the selection forward one word |
Edit | ParameterInfo | Ctrl+Shift+Space | Provides help with parameters of functions |
Edit | WordTranspose | Ctrl+Shift+T | Swaps the current and previous words |
Edit | SelectionUppercase | Ctrl+Shift+U | Makes the selection all uppercase |
Edit | GoToMatchBraceExtend | Ctrl+Shift+] | Extends the selection to the matching brace |
Edit | CompleteWord | Ctrl+Space | Completes the current statement |
Edit | TypeInfo | Ctrl+T | Provides the syntax for a variable, function or method selected in the editor |
Edit | SelectionLowercase | Ctrl+U | Makes the selection all lowercase |
Edit | WindowScrollDown | Ctrl+Up Arrow | Scrolls the file contents down one line |
Edit | Paste | Ctrl+V | Inserts the Clipboard contents at the insertion point |
Edit | Cut | Ctrl+X | Cuts the selection and moves it to the Clipboard |
Edit | Redo | Ctrl+Y | Redoes the previously undone action |
Edit | Undo | Ctrl+Z | Undoes the last action |
Edit | GoToMatchBrace | Ctrl+] | Finds the matching brace |
Edit | Delete | Del | Deletes the selection |
Edit | LineDown | Down Arrow | Moves the cursor down one line |
Edit | LineEnd | End | Moves to the end of the current line |
Edit | BrowseGoToDefinition | F12 | Displays a symbol definition |
Edit | BookmarkNext | F2 | Moves to the line containing the next bookmark |
Edit | FindNext | F3 | Finds the next occurrence of the specified text |
Edit | GoToNextErrorTag | F4 | Moves to the line containing the next error or tag |
Edit | SelectChar | F8 | Starts character selection mode |
Edit | Home | Home | Moves to either the start of the current line or the start of the text on that line |
Edit | EditToggleOvertype | Ins | Toggles between inserting and replacing text |
Edit | CharLeft | Left Arrow | Moves the cursor one character to the left |
Edit | PageDown | Page Down | Moves the cursor down one page |
Edit | PageUp | Page Up | Moves the cursor up one page |
Edit | CharRight | Right Arrow | Moves the cursor one character to the right |
Edit | LineDownExtend | Shift+Down Arrow | Extends the selection down one line |
Edit | LineEndExtend | Shift+End | Extends the selection to the end of the current line |
Edit | BrowseGoToReference | Shift+F12 | Displays a symbol reference |
Edit | BookmarkPrev | Shift+F2 | Moves to the line containing the previous bookmark |
Edit | FindPrev | Shift+F3 | Finds the previous occurrence of the specified text |
Edit | GoToPrevErrorTag | Shift+F4 | Moves to the line containing the previous error or tag |
Edit | HomeExtend | Shift+Home | Extends the selection to either the start of the current line or the start of the text on that line |
Edit | CharLeftExtend | Shift+Left Arrow | Extends the selection one character to the left |
Edit | PageDownExtend | Shift+Page Down | Extends the selection down one page |
Edit | PageUpExtend | Shift+Page Up | Extends the selection up one page |
Edit | CharRightExtend | Shift+Right Arrow | Extends the selection one character to the right |
Edit | LineUpExtend | Shift+Up Arrow | Extends the selection up one line |
Edit | LineUp | Up Arrow | Moves the cursor up one line |
2017年3月22日 星期三
[C++] VC6 shortcut keys
Edit | Bookmarks | Alt+F2 | Edits or navigates bookmarks |
Edit | SelectionFormat | Alt+F8 | Formats the selection using the smart indent settings |
Edit | DebugBreakpoints | Alt+F9 | Edits breakpoints in the program |
Edit | SentenceCut | Alt+Shift+L | Deletes the remainder of the sentence |
Edit | LineTranspose | Alt+Shift+T | Swaps current and previous lines |
Edit | DeleteBack | Backspace | Deletes the selection or, if there is no selection, the character to the left of the cursor |
Edit | SelectAll | Ctrl+A | Selects the entire document |
Edit | ListMembers | Ctrl+Alt+T | Brings up the completion list box |
Edit | WordDeleteToStart | Ctrl+Backspace | Deletes a word to the left |
Edit | Copy | Ctrl+C | Copies the selection to the Clipboard |
Edit | FindTool | Ctrl+D | Activates the Find tool |
Edit | WordDeleteToEnd | Ctrl+Del | Deletes a word to the right |
Edit | WindowScrollUp | Ctrl+Down Arrow | Scrolls the file contents up one line |
Edit | DocumentEnd | Ctrl+End | Moves to the end of the document |
Edit | Find | Ctrl+F | Finds the specified text |
Edit | BookmarkToggle | Ctrl+F2 | Toggles a bookmark for the current line on and off |
Edit | FindNextWord | Ctrl+F3 | Finds the next occurrence of the selected text |
Edit | SelectLine | Ctrl+F8 | Selects lines of text |
Edit | GoTo | Ctrl+G | Moves to a specified location |
Edit | FindReplace | Ctrl+H | Replaces the specified text with different text |
Edit | DocumentStart | Ctrl+Home | Moves to the beginning of the file |
Edit | SearchIncremental | Ctrl+I | Starts an incremental search forward |
Edit | ConditionalUp | Ctrl+J | Finds the previous matching preprocessor condition |
Edit | ConditionalDown | Ctrl+K | Finds the next matching preprocessor condition |
Edit | LineCut | Ctrl+L | Deletes the selected lines and puts them on the Clipboard |
Edit | WordLeft | Ctrl+Left Arrow | Moves back one word |
Edit | BrowsePopContext | Ctrl+Num * | Returns to the location preceding the last browse operation |
Edit | BrowseNext | Ctrl+Num + | Displays the next symbol definition or reference |
Edit | BrowsePrev | Ctrl+Num - | Displays the previous symbol definition or reference |
Edit | WordRight | Ctrl+Right Arrow | Moves forward one word |
Edit | ToggleViewWhitespace | Ctrl+Shift+8 | Shows or hides tab characters |
Edit | DocumentEndExtend | Ctrl+Shift+End | Extends the selection to the end of the document |
Edit | BookmarkClearAll | Ctrl+Shift+F2 | Clears all bookmarks in the window |
Edit | FindPrevWord | Ctrl+Shift+F3 | Finds the previous occurrence of the selected text |
Edit | SelectColumn | Ctrl+Shift+F8 | Selects a columnar block of text |
Edit | DocumentStartExtend | Ctrl+Shift+Home | Extends the selection to the beginning of the file |
Edit | SearchIncrementalBack | Ctrl+Shift+I | Starts an incremental search backward |
Edit | ConditionalUpExtend | Ctrl+Shift+J | Extends the selection to the previous matching preprocessor condition |
Edit | ConditionalDownExtend | Ctrl+Shift+K | Extends the selection to the next matching preprocessor condition |
Edit | LineDelete | Ctrl+Shift+L | Deletes the selected line |
Edit | WordLeftExtend | Ctrl+Shift+Left Arrow | Extends the selection back one word |
Edit | WordRightExtend | Ctrl+Shift+Right Arrow | Extends the selection forward one word |
Edit | ParameterInfo | Ctrl+Shift+Space | Provides help with parameters of functions |
Edit | WordTranspose | Ctrl+Shift+T | Swaps the current and previous words |
Edit | SelectionUppercase | Ctrl+Shift+U | Makes the selection all uppercase |
Edit | GoToMatchBraceExtend | Ctrl+Shift+] | Extends the selection to the matching brace |
Edit | CompleteWord | Ctrl+Space | Completes the current statement |
Edit | TypeInfo | Ctrl+T | Provides the syntax for a variable, function or method selected in the editor |
Edit | SelectionLowercase | Ctrl+U | Makes the selection all lowercase |
Edit | WindowScrollDown | Ctrl+Up Arrow | Scrolls the file contents down one line |
Edit | Paste | Ctrl+V | Inserts the Clipboard contents at the insertion point |
Edit | Cut | Ctrl+X | Cuts the selection and moves it to the Clipboard |
Edit | Redo | Ctrl+Y | Redoes the previously undone action |
Edit | Undo | Ctrl+Z | Undoes the last action |
Edit | GoToMatchBrace | Ctrl+] | Finds the matching brace |
Edit | Delete | Del | Deletes the selection |
Edit | LineDown | Down Arrow | Moves the cursor down one line |
Edit | LineEnd | End | Moves to the end of the current line |
Edit | BrowseGoToDefinition | F12 | Displays a symbol definition |
Edit | BookmarkNext | F2 | Moves to the line containing the next bookmark |
Edit | FindNext | F3 | Finds the next occurrence of the specified text |
Edit | GoToNextErrorTag | F4 | Moves to the line containing the next error or tag |
Edit | SelectChar | F8 | Starts character selection mode |
Edit | Home | Home | Moves to either the start of the current line or the start of the text on that line |
Edit | EditToggleOvertype | Ins | Toggles between inserting and replacing text |
Edit | CharLeft | Left Arrow | Moves the cursor one character to the left |
Edit | PageDown | Page Down | Moves the cursor down one page |
Edit | PageUp | Page Up | Moves the cursor up one page |
Edit | CharRight | Right Arrow | Moves the cursor one character to the right |
Edit | LineDownExtend | Shift+Down Arrow | Extends the selection down one line |
Edit | LineEndExtend | Shift+End | Extends the selection to the end of the current line |
Edit | BrowseGoToReference | Shift+F12 | Displays a symbol reference |
Edit | BookmarkPrev | Shift+F2 | Moves to the line containing the previous bookmark |
Edit | FindPrev | Shift+F3 | Finds the previous occurrence of the specified text |
Edit | GoToPrevErrorTag | Shift+F4 | Moves to the line containing the previous error or tag |
Edit | HomeExtend | Shift+Home | Extends the selection to either the start of the current line or the start of the text on that line |
Edit | CharLeftExtend | Shift+Left Arrow | Extends the selection one character to the left |
Edit | PageDownExtend | Shift+Page Down | Extends the selection down one page |
Edit | PageUpExtend | Shift+Page Up | Extends the selection up one page |
Edit | CharRightExtend | Shift+Right Arrow | Extends the selection one character to the right |
Edit | LineUpExtend | Shift+Up Arrow | Extends the selection up one line |
Edit | LineUp | Up Arrow | Moves the cursor up one line |