это одно и то же, что и:
По вопросу три: а смысл описывать функцию, не предполагая её вызова?Думаю, что вызов всё же предполагается, но не пойму, где. И всё равно должен же быть эквивалент строке:
метка proc язык тип USES регистры ; TASM
или
метка proc тип язык USES регистры ; MASM/WASM
...
ret
метка endp
Все операнды PROC необязательны.
USES — список регистров, значения которых изменяет процедура. Ассемблер помещает в начало процедуры набор команд PUSH, а перед командой RET — набор команд POP, так что значения перечисленных регистров будут восстановлены.
dlgproc proc hWin:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD
.if uMsg == WM_COMMAND
.if wParam == IDCANCEL
jmp dlg_end
.endif
.text:0040116E ; BOOL __stdcall DialogFunc(HWND,UINT,WPARAM,LPARAM)
.text:0040116E DialogFunc proc near
.text:0040116E
.text:0040116E hDlg = dword ptr 8
.text:0040116E arg_4 = dword ptr 0Ch
.text:0040116E arg_8 = dword ptr 10h
.text:0040116E push ebp
.text:0040116F mov ebp, esp
.text:00401171 cmp [ebp+arg_4], 111h;это мой комментарий:WM_COMMAND equ 111h
.text:00401178 jnz short loc_401184
.text:0040117A cmp [ebp+arg_8], 2;это тоже мой комментарий: IDCANCEL equ 2
.text:0040117E jnz short loc_401194
обязательно ли соблюдение "венгерской нотации", т.е. добавление p и pus. Microsoft же не соблюдает, зачем тогда и нам соблюдать?
BOOL StartService(
SC_HANDLE hService, // handle of service
DWORD dwNumServiceArgs, // number of arguments
LPCTSTR *lpServiceArgVectors // address of array of argument string pointers
);
Parameters:
hService - Identifies the service. This handle is returned by the OpenService or CreateService function, and it must have SERVICE_START access.
dwNumServiceArgs - Specifies the number of argument strings in the lpServiceArgVectors array. If lpServiceArgVectors is NULL, this parameter can be zero.
lpServiceArgVectors - Points to an array of pointers that point to null-terminated argument strings passed to a service. Driver services do not receive these arguments. If no arguments are passed to the service being started, this parameter can be NULL. The service accesses these arguments through its ServiceMain function. Note that in the array of arguments passed to the ServiceMain function, the first argument (argv[0]) is the name of the service by default, followed by the arguments, if any, in the lpServiceArgVectors array.
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.