API-uri nedocumentate
Last Updated: Apr 17 2002 12:33, Started by
Pac_Man
, Apr 12 2002 20:40
·
0

#1
Posted 12 April 2002 - 20:40

site cineva vreo adresa cu descrieri ale unor API-uri nedocumentate oficial? De ex. BlockInput nu este documentata (cel putin nu in SDK) si zic yo ca e foarte utila.
|
#2
Posted 17 April 2002 - 10:02

Ce gluma.....cum naiba nu e documentata !!
The BlockInput function blocks keyboard and mouse input events from reaching applications. BOOL BlockInput( BOOL fBlockIt // block option ); Parmeters fBlockIt [in] Specifies the function's purpose. If this parameter is TRUE, keyboard and mouse input events are blocked. If this parameter is FALSE, keyboard and mouse events are unblocked. Note that only the thread that blocked input can successfully unblock input. Return Values If the function succeeds, the return value is nonzero. If input is already blocked, the return value is zero. To get extended error information, call GetLastError. Remarks When input is blocked, real physical input from the mouse or keyboard will not affect the input queue's synchronous key state (reported by GetKeyState and GetKeyboardState), nor will it affect the asynchronous key state (reported by GetAsyncKeyState). However, the thread that is blocking input can affect both of these key states by calling SendInput. No other thread can do this. The system will unblock input in the following cases: The thread that blocked input unexpectedly exits without calling BlockInput with fBlock set to FALSE. In this case, the system cleans up properly and re-enables input. Windows 95/98/Me: The system displays the Close Program/Fault dialog box. This can occur if the thread faults or if the user presses CTRL+ALT+DEL. Windows 2000/XP: The user presses CTRL+ALT+DEL or the system invokes the Hard System Error modal message box (for example, when a program faults or a device fails). Aveam o pe undeva o lista cu fct nedocumentate din shell. Daca o gasesc o mai gasesc o pun aici sau ti-o trimit prin mail. |
#3
Posted 17 April 2002 - 10:11

In MSDN library sint documentate toate functiile. Trebuie doar sa stii sa le cauti.
|
#4
Posted 17 April 2002 - 12:33

... bibicule nu-i chiar asa ... exista functii in anumite de .dll ale Windows-ului care nu sunt documentate public de catre Microsoft ... gasisem odata un site cu asa ceva ;) insa ... cine mai stie pe unde o fi .... :rolleyes:
... pana una, alta ... asta ar fi una dintre ele ... SystemFocusDialog ... ea se gaseste in ntlanman.dll afiseaza un dialog din care se pot selecta atat workstation-uri cat si domenii ... ceva asemanator exista insa si documentat ... mai putin partea cu domeniile ;) ... asa ca daca vreti un "Browse for Domains" ... este ceva mai greu ... pt ca va tb sa o faceti voi ... anyway, functia exista ... insa din pacate doar pt NT/2k ... pt XP nu stiu sa va spun ... inca ;) ... so ... cum facem ???? ... pai cam asa: 1. tb sa stim ce optiuni suporta functia ... si atunci vom scrie urmatoarele define-uri Quote #define FOCUSDLG_DOMAINS_ONLY 1 #define FOCUSDLG_SERVERS_ONLY 2 #define FOCUSDLG_SERVERS_DOMAINS 3 #define FOCUSDLG_BROWSE_LOGON_DOMAIN 0x00010000 #define FOCUSDLG_BROWSE_WKSTA_DOMAIN 0x00020000 #define FOCUSDLG_BROWSE_OTHER_DOMAINS 0x00040000 #define FOCUSDLG_BROWSE_TRUSTING_DOMAINS 0x00080000 #define FOCUSDLG_BROWSE_WORKGROUP_DOMAINS 0x00100000 #define FOCUSDLG_BROWSE_ALL_DOMAINS ( FOCUSDLG_BROWSE_LOGON_DOMAIN | FOCUSDLG_BROWSE_WKSTA_DOMAIN | FOCUSDLG_BROWSE_OTHER_DOMAINS | FOCUSDLG_BROWSE_TRUSTING_DOMAINS | FOCUSDLG_BROWSE_WORKGROUP_DOMAINS ) Quote typedef DWORD (WINAPI *PROCSYSTEMFOCUSDIALOG) (HWND,UINT,LPWSTR,DWORD,LPBOOL,LPWSTR,DWORD); 3. realizam propria noastra funtie care sa faca toata treaba de fiecare data cand avem nevoie de asa ceva 3.1 facem o enumerare cu coduri de eroare/succes Quote typedef enum { SUCCESS = 1, INCORECT_WINDOW_HANDLE = 2, LOAD_USER32_FAILED = 3, LOAD_NTLANMAN_FAILED = 4, LOAD_FUNCTION_FAILED = 5, CANCEL_SELECTED = 6, OSNOTSUPPORTED = 7, GENERIC_ERROR = 99 } GENERALS_RESULT; Quote GENERALS_RESULT BrowseForComputer( HWND hWndParent, CString& strName, UINT dwSelectionFlag, LPWSTR wszHelpFile, DWORD dwContextHelpId ); - hWndParent : parintele dialogului - strName : va contine selectia userului - dwSelectionFlag : optiunile pt dialog, ce anume se cauta ... va fi o combinatie din cele definite mai sus - wszHelpFile : fisierul pt help - dwContextHelpId : ID pt mesajul de help afisat cand user-ul are nevoie ;) 3.3 implementam functia : Quote GENERALS_RESULT BrowseForComputer( HWND hWndParent, CString& strName, UINT dwSelectionFlag, LPWSTR wszHelpFile, DWORD dwContextHelpId ) { // Empty computer name. strName.Empty(); // Determine Windows version. DWORD dwVersion; dwVersion = GetVersion(); if( dwVersion < 0x80000000 ) // Windows NT/2000 { PROCSYSTEMFOCUSDIALOG SystemFocusDialog; BOOL bOK; HINSTANCE hLibrary; DWORD dwError; WCHAR wCompName[MAX_COMPUTERNAME_LENGTH + 1]; hLibrary = LoadLibrary( TEXT("ntlanman.dll") ); if( !hLibrary ) return LOAD_NTLANMAN_FAILED; SystemFocusDialog = (PROCSYSTEMFOCUSDIALOG) GetProcAddress( hLibrary, _T("I_SystemFocusDialog") ); if( !SystemFocusDialog ) { FreeLibrary( hLibrary ); return LOAD_FUNCTION_FAILED; } dwError = SystemFocusDialog( hWndParent, dwSelectionFlag, wCompName, sizeof(wCompName)/sizeof(WCHAR), &bOK, wszHelpFile, dwContextHelpId ); FreeLibrary(hLibrary); if( dwError != NO_ERROR ) return GENERIC_ERROR; else strComputerName = CString( wCompName ); return bOK ? SUCCESS : CANCEL_SELECTED ; } else { return OSNOTSUPPORTED; } } .... din pacate n-am timp sa mai explic si codu' ... asa ca va descurcati voi ... Cretze :cya: |
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users